query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Handles the OnLoad event
function ControlOnLoad() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onLoad() {\n \n }", "protected function postLoad(){\n\t\t\t\n\t\t}", "public function onLoad() {\n\t}", "function onLoad($param)\n\t{\n\t\tparent::onLoad($param);\n\n\t\t$this->dataBind();\n\n\t\t//on loading the page for the first time, \n\t\t//initialize the drop down lists\n\t\tif(!$this->Page->IsPostBack)\n\t\t{\n\t\t\t$step1 = $this->Page->RentalWizard->Step1;\n\n\t\t\t//set the default vehicle category and types\n\t\t\t$cat = $step1->VehicleCat->Items[0]->Text;\n\t\t\t$this->setVehicleTypes($cat);\t\n\t\t\t$type = $this->VehicleType->Items[0]->Text;\n\t\t\t$this->setVehicleList($cat, $type);\n\t\t}\n\t}", "public function postLoad() { }", "public function postLoad() {}", "protected function afterLoad()\n {\n }", "public function onLoad($param)\n {}", "public function afterLoad() { }", "protected function after_load(){\n\n\n }", "function ControlOnLoad(){\n parent::ControlOnLoad();\n }", "public function onLoad($param) {\r\n\t\tPrado::trace(\"OnLoad\",'System.Web.Services.TPageService');\r\n\t\t$this->raiseEvent('OnLoad',$this,$param);\r\n\t}", "function load()\n{\n\t\n}", "public function doLoad()\n {\n $this->DataSourceInstance->doLoad();\n }", "public function onLoad(array $params);", "function onLoad($param)\r\n\t{\r\n\t\tif (!$this->IsPostBack){\r\n\t\t\t$this->workerList->DataSource = $this->getWorkers();\r\n\t\t\t$this->workerList->dataBind();\r\n\t\t} \t\r\n\t}", "function load() {\n\n\t}", "function ControlOnLoad() {\n\t\tBackendPage::ControlOnLoad();\n\t\t@$this->_fileStorage = new FileStorage($this->Kernel->Settings->GetItem(\"settings\",\"FileStoragePath\"),\n\t\t$this->Request->ToString(\"directory\", \"\", 1));\n\t}", "public function afterLoad(){\n $this->getType()->afterLoadProcess($this);\n return parent::afterLoad();\n }", "public function postLoadCallback()\n {\n $this->performPostLoadCallback();\n }", "public function postLoadCallback()\n {\n $this->performPostLoadCallback();\n }", "function load()\n {\n }", "protected function onLoad()\n\t\t{\n\t\t\tparent::onLoad();\n\n\t\t\tif( $this->items->count > 0 )\n\t\t\t{\n\t\t\t\t$this->defaultHTMLControlId = $this->getHTMLControlId() . \"__0\";\n\t\t\t}\n\t\t}", "public function ee_breakouts_page_load() {}", "public function loaded()\n {\n // check to delete att\n if(isset($_GET['deleteAtt']) && ($_GET['deleteAtt'] == '1')){\n if((isset($_GET['c'])) && is_numeric($_GET['c'])){\n WPLMS_Assignments::deleteAttachment($_GET['c']);\n delete_comment_meta($_GET['c'], 'attachmentId');\n add_action('admin_notices',array($this, 'mynotice'));\n }\n }\n }", "public function onLoad($param)\n {\n $data = new stdClass;\n $data->nome = $param['nome'];\n $this->form->setData($data);\n }", "public function onLoad() {\n $this->addFileNameHook(array($this, 'parseFileName'));\n }", "protected function _onStart()\n {\n $this->_raise(self::E_LOAD);\n }", "public function onloadCallback();", "public function onLoad($param)\n {\n parent::onLoad($param);\n if(!$this->IsPostBack)\n {\n $sql=\"select * from presupuesto.bancos order by nombre\";\n $bancos=cargar_data($sql,$this);\n $this->drop_bancos->DataSource=$bancos;\n $this->drop_bancos->dataBind();\n }\n }", "protected function childLoad() {}", "public function load()\n {\n }", "public function load()\n {\n }", "public function load()\n {\n }", "public function load()\n {\n }", "public function load()\n {\n }", "function onAjaxLoad($arg = null, $ar2 = null)\r\n\t{\r\n\t\t\r\n\t}", "public function load()\n {\n ObserverHandler::addMHook('init_view_registered_engines', $this->getName(), 'init_view_registered_engines');\n ObserverHandler::addMHook('result_search', $this->getName(), 'result_search');\n }", "function ControlOnLoad(){\n \t$this->Request->SetValue(\"library\", \"props\");\n \t$id=$this->Request->ToString(\"id\",\"0\");\n \tif ($id!=0)\n \t\t$this->Request->SetValue(\"item_id\", $id);\n\n \t//$this->UseBanners=Engine::isPackageExists($this->Kernel, \"banners\");\n parent::ControlOnLoad();\n }", "public function _afterLoad()\n {\n $this->_setStateText();\n return parent::_afterLoad();\n }", "protected function _afterLoad()\n {\n return parent::_afterLoad();\n }", "protected function onLoad()\n\t\t{\n\t\t\tparent::onLoad();\n\n//\t\t\t$this->addValidator(new PostalZipCodeValidator($this->label . ' ' . \\System\\Base\\ApplicationBase::getInstance()->translator->get('must_be_a_valid_zip_postal', 'must be a valid zip/postal code')));\n\t\t}", "function combo_load()\n\t{\n\t\t$this->javascript_loader->combo_load();\n\t}", "public function admin_load()\n {\n }", "function public_load() {\n\n\t}", "function loadFromForm() \n {\n\n }", "public function load()\n {\n }", "public function load()\n {\n }", "public function getLoad();", "private function load()\r\n {\r\n $this->dbFields = MySQL::fetchRecord(MySQL::executeQuery('SELECT * FROM training_slideshow WHERE ts_id='.(int)$this->id),MySQL::fmAssoc);\r\n }", "function onload(){\n\t\treturn true;\n\t}", "public function GetOnload()\n {\n return $this->onload ? 'init()' : '';\n }", "public static function onLoad() {\n\t\tF3::$global['BGCOLOR']='FFF';\n\t\tF3::$global['FGTRANS']=32;\n\t\tF3::$global['IBLOCKS']=4;\n\t\tF3::$global['IPIXELS']=64;\n\t\tF3::$global['HEADERS']=array();\n\t\tF3::$global['SITEMAP']=array();\n\t}", "public function onLoad()\r\n {\r\n parent::onLoad();\r\n\r\n // Connect to the database\r\n $this->connect($this->server, $this->username, $this->password, $this->database);\r\n }", "public function load() {\r\n\t\t$this->includes();\r\n\t\t$this->inits();\r\n\t}", "public function load()\n\t{\n\t\t$this->list_table->load();\n\t}", "function ahla_loaded()\n{\n\tdo_action('ahla_loaded');\n}", "public function loadProcess() {\n\t\t// register page view\n\t\t$this->pixelPageView();\n\t\t\n\t\t// load next URL string\n\t\t$nextPosition = $this->position + 1;\n\t\t$lastPosition = array_pop(array_keys($this->pathOrderArr));\n\t\t\n\t\tfor ($i = $nextPosition; $i <= $lastPosition + 1; $i++) {\n\t\t\tif (array_key_exists($i, $this->pathOrderArr)) {\n\t\t\t\t$nextPosition = $i;\n\t\t\t\tbreak;\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t// generate next page's URL\n\t\tif ($nextPosition > $lastPosition)\n\t\t\t$this->nextUrl = 'javascript: parent.location.href=\\''. $this->redirectURL .'\\''; // end of path, redirect to affiliate's URL\n\t\telse \n\t\t\t$this->nextUrl = $this->getNextUrl($nextPosition);\n\t\t\n\t\t$this->loadView();\n\t}", "function __onload($params){\n\t\t$this->disable_methods();\n\t}", "final public function load() {\n $this->childLoad();\n \\add_action('admin_menu', [$this, 'addAdminMenuEntries']);\n }", "public function view_loader(){\n\n\t\tparent::view_loader();\n\t}", "function show()\n {\n if (!$this->loaded)\n {\n $this->onReload( func_get_arg(0) );\n }\n parent::show();\n }", "public function trigger_onload(){\n\n // Trigger the onload function if it exists\n $temp_function = $this->battle_function_onload;\n $temp_result = $temp_function(array(\n 'this_battle' => $this\n ));\n\n }", "public function web_load(){\n\t\t$this->common();\n\t}", "public function __load()\r\n {\r\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\r\n }", "public function __load()\r\n {\r\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\r\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }" ]
[ "0.7480679", "0.7480635", "0.7355958", "0.70718193", "0.7004879", "0.68789864", "0.67819697", "0.6769828", "0.6663785", "0.66549116", "0.6595607", "0.65771514", "0.6550338", "0.65244263", "0.6482263", "0.6475982", "0.6474661", "0.643189", "0.64298004", "0.6409701", "0.6409701", "0.63587564", "0.63484836", "0.6347066", "0.63176775", "0.6309322", "0.62940085", "0.62738293", "0.6265918", "0.62594056", "0.6155084", "0.613277", "0.61316985", "0.61316985", "0.61316985", "0.6131514", "0.61113304", "0.610322", "0.60866964", "0.6082414", "0.60741687", "0.60636204", "0.60117835", "0.5993532", "0.59680676", "0.5892773", "0.5872011", "0.5872011", "0.58272636", "0.5798943", "0.5792781", "0.57793266", "0.57738364", "0.5760377", "0.57437605", "0.57339394", "0.5729703", "0.57168573", "0.5715338", "0.5700225", "0.56937295", "0.56808937", "0.56725436", "0.56720394", "0.5670859", "0.5670859", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883", "0.56567883" ]
0.65649915
12
Handles the OnUnload event
function ControlOnUnload() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onUnload($param) {\r\n\t\tPrado::trace(\"OnUnload\",'System.Web.Services.TPageService');\r\n\t\t$this->raiseEvent('OnUnload',$this,$param);\r\n\t}", "public function unload()\n {\n // cannot unload started sessions\n if ($this->isStarted()) {\n return;\n }\n $this->_is_loaded = false;\n $this->_store = array();\n $this->_flash = array();\n }", "Function unload(){\n\t\t$this->removeBackup();\n\t\tif($this->info && isset($this->info['im'])){\n\t\t\t@imagedestroy($this->info['im']);\n\t\t}\n\t\t$this->info = false;\n\t}", "Function __destruct(){\n\t\t$this->unload();\n\t}", "public function unloadDocument() {\n\t\tphpQuery::unloadDocuments($this->getDocumentID());\n\t}", "public function unloadDocument() {\n\t\tphpQuery::unloadDocuments($this->getDocumentID());\n\t}", "public function onHandleClosed() {}", "public function unloadValue()\n {\n // Clear LOADED state bit\n $this->_state &= ~self::LOADED;\n\n $this->_value = null;\n }", "function fuzzloc_unload() {\n\n\tunregister_hook('post_local', 'addon/fuzzloc/fuzzloc.php', 'fuzzloc_post_hook');\n\tunregister_hook('feature_settings', 'addon/fuzzloc/fuzzloc.php', 'fuzzloc_settings');\n\tunregister_hook('feature_settings_post', 'addon/fuzzloc/fuzzloc.php', 'fuzzloc_settings_post');\n\n\n\tlogger(\"removed fuzzloc\");\n}", "public function cleanup(){\n\t\n\t\t$this->_p->user->setSessionVal($this->_session_var_name);\n\t\n\t}", "abstract public function unloadDatabase();", "function setOnunloadScript( $pJavscript ) {\n\t\tarray_push( $this->mOnunload, $pJavscript );\n\t}", "public function unload()\n {\n\n $this->synchronized = true;\n $this->id = null;\n $this->newId = null;\n $this->data = [];\n $this->savedData = [];\n $this->orm = null;\n\n $this->multiRef = [];\n $this->i18n = null;\n\n }", "public function onShutdown();", "public function onShutdown();", "public function onLogout()\n {\n // TODO: Implement onLogout() method.\n }", "public function onClose();", "public function onClose();", "public function getPageClose() {}", "public function onShutDown()\n {\n }", "public function onShutDown()\n {\n }", "public function close()\n {\n $this->view_file = null;\n $this->view_data = [];\n }", "function __destruct()\n\t{\n\t\t$this->Pre_GastosModel->close();\n\t}", "public function shutdownHandler()\n {\n if ($this->gi) {\n geoip_close($this->getGI());\n }\n }", "public function finalize()\n {\n $javaScript = $this->onDocumentReady();\n if ($javaScript) {\n WebPage::singleton()->addJavaScript($javaScript, null, true);\n }\n }", "public function _deactivate() {\r\n\t\t// Add deactivation cleanup functionality here.\r\n\t}", "function _endpage()\n\t\t{\n\t\t\t$this->state=1;\n\t\t}", "public function onQuit()\n {\n $nick = trim($this->event->getNick());\n\n foreach ($this->store as $chan => $store) {\n if (isset($store[$nick])) {\n unset($this->store[$chan][$nick]);\n }\n }\n }", "protected function afterLoad()\n {\n }", "function on_deactivation ()\n{\n}", "function on_deactivation ()\n{\n}", "public function __destruct() {\n\t\t$this->unregister();\n\t}", "public function endPage() {}", "public function dispatchLoopShutdown()\n {\n if(!FrontController::getInstance()->getRequest()->isXmlHttpRequest()){\n //limpio la informacion anterior y guardo la nueva\n $this->limpiarHistorial()\n ->guardarVista();\n }\n }", "public function afterLoad() { }", "public function __destruct() {\r\n\t $_SESSION['app'] = $this->_data->toArray();\r\n\t $_SESSION['flash'] = $this->_flashDataNew->toArray();\r\n\t}", "protected function executeUnloadDbalExtension() {}", "function deactivation_hook() {\n\n\t}", "public function cleanup()\n\t{\n\t\t\n\t}", "function bx_exit(){\n bx_db_close();\n exit;\n }", "public function __destroy()\n\t{\n\t\t$this->Obj_Doc->disconnectWorksheets();\n\t\tunset($this->Obj_Doc);\n\t\t$this->Obj_Doc = false;\n\t}", "public function endPageJS() {}", "public function close()\n {\n $this->session->sess_destroy();\n redirect('/home');\n }", "public function tear_down()\n {\n }", "public function tear_down()\n {\n }", "public function tear_down()\n {\n }", "protected function unload_textdomain() {\n\t\tunset($GLOBALS['l10n'][$this->textdomain]);\n\t}", "public function closeWindow() {}", "public function __destruct()\n {\n if (!$this->adapter->isScope(PdfLibAdapter::SCOPE_OBJECT)) {\n $this->adapter->closePdiPage($this);\n }\n }", "public function onKernelTerminate()\n {\n $this->session = null;\n }", "function ft_hook_destroy() {}", "public function cleanup()\n\t{\n\t}", "public function shutdown() {\n $this->saveStorage();\n }", "function __destruct()\n {\n if ($this->renderPage) {\n $this->_template->render($this->renderHeader);\n }\n }", "public function destruct()\n {\n restore_error_handler();\n }", "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "function __destroy() {\n }", "public function closeLocation ()\n\t{\n\t\t//\n\t}", "public function shutdown() {\r\n\t\ttx_auxo_cache::shutdown();\t\r\n\t\t$this->triggerEvent('shutdown');\r\n\t}", "public static function Close()\n {\n self::$_mHandler = null;\n }", "function shutdown() {\n // Safety for themes not using wp_footer\n SLPlus_Actions::ManageTheScripts();\n\t\t}", "protected function finalize() {\n // NOOP\n }", "function xvbLogout()\r\n\t{\r\n\t\tprocess_logout();\r\n\t}", "public function finalize();", "public function tear_down() {\n\t\t$this->registry = null;\n\n\t\tparent::tear_down();\n\t}", "function destruct()\n {\n mysql_close($this->link);\n }", "function close()\r\n\t{\r\n\t\tunset($this->urlprefix);\r\n\t\tunset($this->xml_parser);\r\n\t}", "public function onLogout()\n {\n \n }", "protected function cleanup() {\n $this->clearLocalSessionValues();\n }", "public static function sessionCloseHandler();", "public function cleanup()\n {\n }", "function __destruct() {\n\t\t$_SESSION['QC_UserData'] = self::$data;\n\t}", "function unloadRecursive() {\n if ($this->HasControls()) {\n $keys = array_keys($this->Controls);\n for ($i = 0; $i < count($this->Controls); $i++) {\n @$control = &$this->Controls[$keys[$i]];\n if(method_exists($control, \"unloadRecursive\")){\n $control->unloadRecursive();\n }\n $control=null;\n }\n }\n $this->ControlOnUnload();\n $this->Controls=array();\n }", "public static function end()\r\n {\r\n self::singleton()->endScript();\r\n }", "function Page_Terminate($url = \"\") {\r\n\t\tglobal $conn;\r\n\r\n\t\t// Page unload event, used in current page\r\n\t\t$this->Page_Unload();\r\n\r\n\t\t// Global page unloaded event (in userfn*.php)\r\n\t\tPage_Unloaded();\r\n\r\n\t\t // Close Connection\r\n\t\t$conn->Close();\r\n\r\n\t\t// Go to URL if specified\r\n\t\tif ($url <> \"\") {\r\n\t\t\tob_end_clean();\r\n\t\t\theader(\"Location: $url\");\r\n\t\t}\r\n\t\texit();\r\n\t}", "function Page_Terminate($url = \"\") {\n\t\tglobal $conn;\n\n\t\t// Page unload event, used in current page\n\t\t$this->Page_Unload();\n\n\t\t// Global page unloaded event (in userfn*.php)\n\t\tPage_Unloaded();\n\n\t\t // Close Connection\n\t\t$conn->Close();\n\n\t\t// Go to URL if specified\n\t\tif ($url <> \"\") {\n\t\t\tob_end_clean();\n\t\t\theader(\"Location: $url\");\n\t\t}\n\t\texit();\n\t}", "function Page_Terminate($url = \"\") {\n\t\tglobal $conn;\n\n\t\t// Page unload event, used in current page\n\t\t$this->Page_Unload();\n\n\t\t// Global page unloaded event (in userfn*.php)\n\t\tPage_Unloaded();\n\n\t\t // Close Connection\n\t\t$conn->Close();\n\n\t\t// Go to URL if specified\n\t\tif ($url <> \"\") {\n\t\t\tob_end_clean();\n\t\t\theader(\"Location: $url\");\n\t\t}\n\t\texit();\n\t}", "function Page_Terminate($url = \"\") {\n\t\tglobal $conn;\n\n\t\t// Page unload event, used in current page\n\t\t$this->Page_Unload();\n\n\t\t// Global page unloaded event (in userfn*.php)\n\t\tPage_Unloaded();\n\n\t\t // Close Connection\n\t\t$conn->Close();\n\n\t\t// Go to URL if specified\n\t\tif ($url <> \"\") {\n\t\t\tob_end_clean();\n\t\t\theader(\"Location: $url\");\n\t\t}\n\t\texit();\n\t}", "function Page_Terminate($url = \"\") {\n\t\tglobal $conn;\n\n\t\t// Page unload event, used in current page\n\t\t$this->Page_Unload();\n\n\t\t// Global page unloaded event (in userfn*.php)\n\t\tPage_Unloaded();\n\n\t\t // Close Connection\n\t\t$conn->Close();\n\n\t\t// Go to URL if specified\n\t\tif ($url <> \"\") {\n\t\t\tob_end_clean();\n\t\t\theader(\"Location: $url\");\n\t\t}\n\t\texit();\n\t}", "function Page_Terminate($url = \"\") {\n\t\tglobal $conn;\n\n\t\t// Page unload event, used in current page\n\t\t$this->Page_Unload();\n\n\t\t// Global page unloaded event (in userfn*.php)\n\t\tPage_Unloaded();\n\n\t\t // Close Connection\n\t\t$conn->Close();\n\n\t\t// Go to URL if specified\n\t\tif ($url <> \"\") {\n\t\t\tob_end_clean();\n\t\t\theader(\"Location: $url\");\n\t\t}\n\t\texit();\n\t}", "public function OnDeactivate(){\n\t\t$plxMotor = plxMotor::getInstance();\n\t\tif (!$plxMotor->plxPlugins->deleteDir(PLX_CACHE)){\n\t\t\tif (extension_loaded('glob')){\n\t\t\t\t$cached = glob(PLX_CACHE.\"*\");#*.php\n\t\t\t\tforeach ($cached as $file)\n\t\t\t\t\tunlink($file);\n\t\t\t\tunset($cached);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif($cached = opendir(PLX_CACHE)){\n\t\t\t\t\twhile(($file = readdir($cached))!== false){\n\t\t\t\t\t\tif( $file == '.' || $file == '..' )\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t#if(strtolower(strrchr($file,'.')==\".php\")){\n\t\t\t\t\t\t\tunlink(PLX_CACHE.$file);\n\t\t\t\t\t\t#}\n\t\t\t\t\t}\n\t\t\t\t\tclosedir($cached);\n\t\t\t\t}\n\t\t\t}\n\t\t\trmdir(PLX_CACHE);\n\t\t}\n\t}", "public function logoutPage(): void\n {\n session_unset();\n header(\"Location: \" . $_SERVER[\"HTTP_REFERER\"]);\n }", "public function tear_down() {\n\t\tunset( $GLOBALS['link'] );\n\t\tparent::tear_down();\n\t}", "public function deactivate() {\n\t\t\t// just in case I want to do anyting on deactivate\n\t\t}", "function __destruct() {\n\t\tparent::__destruct();\n\t}", "function OnGoBack(){\n if (strlen($this->host_library_ID))\n $this->library_ID = $this->host_library_ID;\n\n if ($this->is_context_frame)\n\t\t\t$url = \"?package=context&page=contextframe&event=close\";\n\t\telse\n\t\t\t$url =\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"&\" . $this->restore;\n\n $this->AfterSubmitRedirect($url);\n }", "public function shutdown()\n {\n $this->setAttribute('lastrequest', time(), 'user');\n\n // rimozione variabili flash da eliminare\n foreach ($names = $this->getNames('core/user/flash/remove') as $name)\n {\n $this->removeAttribute($name, 'core/user/flash');\n $this->removeAttribute($name, 'core/user/flash/remove');\n }\n\n // termina immediatamente\n session_write_close();\n }", "public function __destruct()\n\t{\n\t\tunset(self::$handles[spl_object_hash($this)]);\n\t}", "function destroy() {\r\n\t\t// Called from ActionServer->destroyApplications() [TODO - if reqd]\r\n\t\t$this->plugIn = NULL;\r\n\t\t;\r\n\r\n\t}", "public function plugin_deactivate() {\r\n\r\n\t}", "public function doLogout() {\n $_SESSION = array();\n session_destroy();\n $this->messages[] = \"Acabas de cerrar Sesión.\";\n \n\n }", "function EndSession(){\n session_unset(); \n // destroy the session \n session_destroy(); \n }", "public function close(){\r\n\t\tself::$dbh = null;\r\n\t\tself::$db = null;\r\n\t}", "public function destroy() \n\t{\n\t\t$labelId = $this->uri->segment(3);\n\n\t\tif (Labels::destroy($labelId)) {\n\t\t\t$this->session->set_flashdata('class', 'alert alert-success'); \n\t\t\t$this->session->set_flashdata('message', 'Label is verwijderd uit het systeem.');\n\t\t}\n\t}", "function Page_Terminate($url = \"\") {\r\r\tglobal $conn;\r\r\r\r\t// Page unload event, used in current page\r\r\tPage_Unload();\r\r\r\r\t// Global page unloaded event (in userfn*.php)\r\r\tPage_Unloaded();\r\r\r\r\t // Close Connection\r\r\t$conn->Close();\r\r\r\r\t// Go to url if specified\r\r\tif ($url <> \"\") {\r\r\t\tob_end_clean();\r\r\t\theader(\"Location: $url\");\r\r\t}\r\r\texit();\r\r}", "protected function childScopeClosed()\n {\n }" ]
[ "0.7558383", "0.6633253", "0.6398019", "0.63769275", "0.60731906", "0.60731906", "0.59652287", "0.5948548", "0.5940119", "0.5842744", "0.5822535", "0.5793563", "0.5744869", "0.5725611", "0.5725611", "0.56765044", "0.5647521", "0.5647521", "0.56395996", "0.56166637", "0.56166637", "0.5588363", "0.55668384", "0.55636674", "0.555637", "0.5543823", "0.5541884", "0.55157626", "0.5478366", "0.54777807", "0.54777807", "0.5465979", "0.5439633", "0.5436206", "0.5418943", "0.54057544", "0.54054713", "0.5404203", "0.5372807", "0.5368289", "0.53590775", "0.53534645", "0.5352488", "0.53503644", "0.53503644", "0.53503644", "0.5349965", "0.5344557", "0.5340313", "0.53226495", "0.5320561", "0.53086644", "0.5302084", "0.5297181", "0.5294471", "0.5290744", "0.5290744", "0.5290744", "0.5290744", "0.5290744", "0.5287239", "0.5284647", "0.5282214", "0.5281952", "0.5281058", "0.52722204", "0.5271807", "0.52574605", "0.52549267", "0.5253382", "0.52515006", "0.52478856", "0.52455425", "0.5245509", "0.5236855", "0.523329", "0.5226166", "0.5216463", "0.5215594", "0.52089226", "0.52089226", "0.52089226", "0.52089226", "0.52089226", "0.520586", "0.5203164", "0.51987994", "0.5195623", "0.5195183", "0.519465", "0.5190829", "0.51879585", "0.5187512", "0.5177665", "0.51764715", "0.51756006", "0.5171459", "0.5169742", "0.51695204", "0.5169107" ]
0.8091386
0
Sends server control content, which will be rendered on the client.
function RenderChildren() { if ($this->HasControls()) { foreach($this->Controls as $control) { $control->Render(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function send() {\n\t\theader ( 'Content-Type: ' . $this->getContentType () );\n\t\t\n\t\techo $this->getContent ();\n\t}", "public function send()\n {\n $this->sendHeader(); // Insure headers are sent before sending content\n\n echo $this->content;\n }", "public function send()\n {\n $httpProtocol = $_SERVER['SERVER_PROTOCOL'];\n\n // Send the HTTP Status and Headers.\n\n if (! headers_sent()) {\n $status = $this->status();\n\n // Send the HTTP Status Header.\n header(\"$httpProtocol $status \" . self::$statuses[$status]);\n\n // Send the rest of the HTTP Headers.\n foreach ($this->headers as $name => $value) {\n header(\"$name: $value\", true);\n }\n }\n\n // Send the stringified Content.\n\n echo $this->render();\n }", "public function sendContent()\n {\n echo $this->content;\n }", "public function send() {\r\n\t\t$this->sendHeaders ();\r\n\t\techo $this->getContent ();\r\n\t}", "public function sendContent()\r\n {\r\n if (sfConfig::get('sf_logging_enabled'))\r\n {\r\n $this->getContext()->getLogger()->info('{sfResponse} send content ('.strlen($this->content).' o)');\r\n }\r\n\r\n echo $this->content;\r\n }", "public function send () {\r\n\t\t$this->sendHeaders();\r\n\t\t$this->sendContent();\r\n\t}", "public function render(): void\n {\n $methodName = $this->methodName;\n $this->$methodName()->sendContent();\n\t}", "public function send() : void\n {\n \\http_response_code( $this->status );\n\n foreach ( $this->headers->all() as $name => $values ) {\n foreach ( $values as $index => $value ) {\n \\header( \"$name: $value\", $index === 0 );\n }\n }\n\n echo $this->content;\n }", "public function render_content()\n {\n CustomizerAddon::view( 'controls.switch', ['control' => &$this] );\n }", "public function sendContent();", "public function send()\n {\n if (function_exists('http_response_code')) {\n http_response_code($this->code);\n } else {\n header(' ', true, $this->code);\n }\n\n foreach ($this->headers as $name => $value) {\n header($name . ': ' . $value);\n }\n\n if (!is_null($this->content)) {\n echo $this->content;\n }\n }", "public function sendContent()\n {\n if (!$this->headerOnly)\n {\n parent::sendContent();\n }\n }", "function renderToClient();", "public function send()\n {\n $this->sendContentOptions();\n $this->sendFrameOptions();\n $this->sendStrictTransport();\n $this->sendCrossOriginResourcePolicy();\n $this->sendContentSecurity();\n }", "public function emit()\n {\n $this->sendHeaders();\n $this->sendBody();\n }", "public function run()\n {\n $this->renderContent();\n echo ob_get_clean();\n }", "public function send()\n {\n http_response_code($this->statusCode);\n $this->sendContent();\n }", "public function sendContent()\n {\n $laravelResponse = $this->laravelResponse;\n\n $this->swooleResponse->end($laravelResponse->getContent());\n }", "public function send() {\n /** @var HeaderCollection $headers */\n $headers = Yii::$app->response->headers;\n $headers->removeAll();\n foreach ($this->getHeaders() as $_header => $lines) {\n $headers->add($_header, $this->getHeaderLine($_header));\n }\n Yii::$app->response->version = $this->getProtocolVersion();\n Yii::$app->response->statusCode = $this->getStatusCode();\n Yii::$app->response->statusText = $this->getReasonPhrase();\n Yii::$app->response->content = $this->getBody();\n\n Yii::$app->response->send();\n }", "public function send()\n {\n fwrite($this->rStream, $this->sText);\n }", "public function send() {\r\n\t\t$this->resource->send();\r\n\t}", "public function send()\n {\n $this->trigger(self::EVENT_BEFORE_SEND);\n $this->prepare();\n $this->trigger(self::EVENT_AFTER_PREPARE);\n $this->sendHeaders();\n $this->sendContent();\n $this->trigger(self::EVENT_AFTER_SEND);\n $this->isSent = true;\n }", "public function respond()\n\t{\n\t\t$this->setTemplate();\n\t\t$this->template->setGuid( $this->request['guid'] );\n\t\t$this->template->setContent( $this->view->getContent() );\n\t\n\t\techo $this->template->request();\t\n\t}", "protected function _sendContent($content) {\n\t\techo $content;\n\t}", "public function send()\n {\n if ($this->isSent) {\n return;\n }\n $this->trigger(self::EVENT_BEFORE_SEND);\n $this->prepare();\n $this->trigger(self::EVENT_AFTER_PREPARE);\n $this->sendHeaders();\n $this->sendContent();\n $this->trigger(self::EVENT_AFTER_SEND);\n $this->isSent = true;\n }", "public function send(){\n\t\t\n\t\texit($this->page->generate());\n\t}", "public function send(){\n header('HTTP/1.1 200 OK');\n header('Content-type: application/json');\n echo CJavaScript::jsonEncode($this->get());\n Yii::app()->end();\n }", "public function run() {\n$this->header('Content-Type: text/html');\n?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n\t<title>Game servers</title>\n</head>\n<body>\n</body>\n</html><?php\n}", "public function actionControlPanel()\n {\n $this->render('controlPanel');\n }", "private function __send_response(){\n http_response_code($this->response_code);\n if($this->_redirect) header(\"Location: \".Config::WEB_DIRECTORY.\"{$this->_redirect_location}\");\n elseif($this->_JSON){\n header('Content-Type: application/json; charset=UTF-8');\n print json_encode($this->_JSON_contents, JSON_PRETTY_PRINT);\n }elseif($this->_HTML){\n if($this->_HTML_load_view) $this->_template->render();\n } /** @noinspection PhpStatementHasEmptyBodyInspection */ else{\n // Do nothing\n }\n }", "public function render()\n\t{\n\t\t$this->addHTTPHeader('Content-Type', $this->getMimeType());\n\n\t\t$name = $this->getName();\n\n\t\tif (!empty($name))\n\t\t{\n\t\t\t$this->addHTTPHeader('Content-Disposition', 'attachment; filename=\"' . $name . '.json\"', true);\n\t\t}\n\n\t\t$this->outputHTTPHeaders();\n\n\t\tif ($this->useHashes)\n\t\t{\n\t\t\techo '###' . $this->getBuffer() . '###';\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo $this->getBuffer();\n\t\t}\n\t}", "public function send()\n\t{\n\t\t$this->page->generatePage();\n\t\texit;\n\t}", "public function sendBody()\n {\n echo $this->body;\n }", "public function sendBody()\n {\n echo $this->body;\n }", "public function render()\n\t{\n\t\t$this->addHTTPHeader('Content-Type', $this->getMimeType());\n\n\t\t$name = $this->getName();\n\n\t\tif (!empty($name))\n\t\t{\n\t\t\t$this->addHTTPHeader('Content-Disposition', 'attachment; filename=\"' . $name . '.csv\"', true);\n\t\t}\n\n\t\t$this->outputHTTPHeaders();\n\n echo $this->getBuffer();\n\t}", "public function send()\r\n\t{\r\n\t\t$this->outputBody();\r\n\t\texit;\r\n\t}", "public function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"toggle-switch-control\">\n\t\t\t\t<div class=\"toggle-switch\">\n\t\t\t\t\t<input type=\"checkbox\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" class=\"toggle-switch-checkbox\" value=\"<?php echo esc_attr( $this->value() ); ?>\"\n\t\t\t\t\t<?php\n\t\t\t\t\t$this->link();\n\t\t\t\t\tchecked( $this->value() );\n\t\t\t\t\t?>\n\t\t\t\t\t>\n\t\t\t\t\t<label class=\"toggle-switch-label\" for=\"<?php echo esc_attr( $this->id ); ?>\">\n\t\t\t\t\t\t<span class=\"toggle-switch-inner\"></span>\n\t\t\t\t\t\t<span class=\"toggle-switch-switch\"></span>\n\t\t\t\t\t</label>\n\t\t\t\t</div>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function sendResponseBody()\n\t{\n\t\t$layoutTemplate = $this->getLayoutTemplate();\n\n\t\t$layoutTemplate['document'] = $this;\n\t\t$layoutTemplate['title'] = $this->getTitle();\n\t\t$layoutTemplate['content'] = $this->getContent();\n\n\t\t$pageHtml = $layoutTemplate->getOutput();\n\n\t\techo $pageHtml;\n\t}", "protected function RenderAjax() {\r\n\t\t\t$strToReturn = '<controls>';\r\n\r\n\t\t\t// Include each control (if applicable) that has been changed/modified\r\n\t\t\tforeach ($this->GetAllControls() as $objControl)\r\n\t\t\t\tif (!$objControl->ParentControl)\r\n//\t\t\t\t\t$strToReturn .= $objControl->RenderAjax(false) . \"\\r\\n\";\r\n\t\t\t\t\t$strToReturn .= $this->RenderAjaxHelper($objControl);\r\n\r\n\t\t\t$strCommands = '';\r\n\t\t\t\r\n\t\t\t// Look to the Application object for any commands to run\r\n\t\t\tforeach (QApplication::$AlertMessageArray as $strAlert) {\r\n\t\t\t\t$strAlert = QString::XmlEscape(sprintf('alert(\"%s\");', addslashes($strAlert)));\r\n\t\t\t\t$strCommands .= sprintf('<command>%s</command>', $strAlert);\r\n\t\t\t}\r\n\t\t\tforeach (QApplication::$JavaScriptArrayHighPriority as $strJavaScript) {\r\n\t\t\t\t$strJavaScript = trim($strJavaScript);\r\n\t\t\t\t\r\n\t\t\t\tif (strlen($strJavaScript)) {\r\n\t\t\t\t\tif (QString::LastCharacter($strJavaScript) != ';')\r\n\t\t\t\t\t\t$strJavaScript .= ';';\r\n\t\t\t\t\t$strCommands .= sprintf('<command>%s</command>', QString::XmlEscape($strJavaScript));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tforeach (QApplication::$JavaScriptArray as $strJavaScript) {\r\n\t\t\t\t$strJavaScript = trim($strJavaScript);\r\n\t\t\t\tif (strlen($strJavaScript)) {\r\n\t\t\t\t\tif (QString::LastCharacter($strJavaScript) != ';')\r\n\t\t\t\t\t\t$strJavaScript .= ';';\r\n\t\t\t\t\t$strCommands .= sprintf('<command>%s</command>', QString::XmlEscape($strJavaScript));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$strRegCJavaScript = '';\r\n\t\t\tforeach ($this->GetAllControls() as $objControl) {\r\n\t\t\t\tif ($objControl->Rendered) {\r\n\t\t\t\t\t$strRegCJavaScript .= sprintf('qc.regC(\"%s\"); ', $objControl->ControlId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($strRegCJavaScript)\r\n\t\t\t\t$strCommands .= sprintf('<command>%s</command>', QString::XmlEscape($strRegCJavaScript));\r\n\r\n\t\t\tforeach ($this->GetAllControls() as $objControl) {\r\n\t\t\t\tif ($objControl->Rendered) {\r\n\t\t\t\t\t$strJavaScript = $objControl->GetEndScript();\r\n\t\t\t\t\tif (strlen($strJavaScript))\r\n\t\t\t\t\t\t$strCommands .= sprintf('<command>%s</command>', QString::XmlEscape($objControl->GetEndScript()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tforeach ($this->objGroupingArray as $objGrouping) {\r\n\t\t\t\t$strRender = $objGrouping->Render();\r\n\t\t\t\tif (trim($strRender))\r\n\t\t\t\t\t$strCommands .= sprintf('<command>%s</command>', QString::XmlEscape($strRender));\r\n\t\t\t}\r\n\r\n\t\t\t// Add in the form state\r\n\t\t\t// DO SOMETHING DIFFERENT IF FORM IS UseSession\r\n\t\t\t$strFormState = QForm::Serialize($this);\r\n\t\t\t$strToReturn .= sprintf('<control id=\"Qform__FormState\">%s</control>', $strFormState);\r\n\r\n\t\t\t// close Control collection, Open the Command collection\r\n\t\t\t$strToReturn .= '</controls><commands>';\r\n\t\t\t\r\n\t\t\t$strToReturn .= $strCommands;\r\n\r\n\t\t\t// close Command collection\r\n\t\t\t$strToReturn .= '</commands>';\r\n\r\n\t\t\t$strContents = trim(ob_get_contents());\r\n\r\n\t\t\tif (strtolower(substr($strContents, 0, 5)) == 'debug') {\r\n\t\t\t} else {\r\n\t\t\t\tob_clean();\r\n\r\n\t\t\t\t// Response is in XML Format\r\n\t\t\t\theader('Content-Type: text/xml');\r\n\r\n\t\t\t\t// Output it and update render state\r\n\t\t\t\tif (QApplication::$EncodingType)\r\n\t\t\t\t\tprintf(\"<?xml version=\\\"1.0\\\" encoding=\\\"%s\\\"?><response>%s</response>\\r\\n\", QApplication::$EncodingType, $strToReturn);\r\n\t\t\t\telse\r\n\t\t\t\t\tprintf(\"<?xml version=\\\"1.0\\\"?><response>%s</response>\\r\\n\", $strToReturn);\r\n\t\t\t}\r\n\r\n\t\t\t// Update Render State\r\n\t\t\t$this->intFormStatus = QFormBase::FormStatusRenderEnded;\r\n\t\t}", "public function send()\n {\n $this->sendHeaders();\n $this->sendBody();\n }", "public function render_control_templates()\n {\n }", "public function run()\r\n\t{\r\n $this->render('MessageDisplay');\r\n\t}", "public function send() {\r\n\t\t\t$this->sent = true;\r\n\t\t}", "public function send_content() {\n Event::factory('response.pre_send_content')->notify_all();\n Event::factory('response.post_send_content')->notify_all();\n return $this;\n }", "public function RenderContentAjax(): void {\n $this->showContent(TRUE);\n }", "public function send()\n {\n // Stream post the data\n $this->evaluateResponse($this->httpPost($this->str_endpoint . '/event', $this->compile()));\n }", "public function send()\n {\n $this->sendHttpHeaders();\n $this->sendContent();\n\n if (function_exists('fastcgi_finish_request'))\n {\n $this->dispatcher->notify(new sfEvent($this, 'response.fastcgi_finish_request'));\n fastcgi_finish_request();\n }\n }", "public function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"tinymce-control\">\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<textarea id=\"<?php echo esc_attr( $this->id ); ?>\" class=\"customize-control-tinymce-editor\" <?php $this->link(); ?>><?php echo esc_attr( $this->value() ); ?></textarea>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function renderForm()\n\t{\n\t\t$this->beginForm();\n\t\t$this->renderMessageInput();\n\t\techo Html::beginTag('div', array('class' => 'chat-from-actions'));\n\t\t$this->renderSubmit();\n\t\techo Html::endTag('div');\n\t\t$this->endForm();\n\t}", "public function emit()\n {\n echo <<<HTML\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>{$this->title}</title>\n <link href=\"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3\" crossorigin=\"anonymous\">\n </head>\n <body>\n\n HTML;\n\n if ($this->contain)\n {\n echo <<<HTML\n <main class=\"container\">\n\n HTML;\n }\n\n $this->emitted = true;\n }", "protected function send() {}", "public function render() {\n\t\t\t\n\t\t\t$this->_content = ob_get_contents();\n\t\t\tob_clean();\n\t\t\t\n\t\t\t$this->outputLine($this->_doctype);\n\t\t\t$this->outputLine('<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"' . $this->_lang . '\" lang=\"' . $this->_lang . '\" dir=\"' . $this->_dir . '\">');\n\t\t\t\n\t\t\t$this->renderHead();\n\t\t\t\n\t\t\t$this->renderBody();\n\t\t\t\n\t\t\t$this->outputLine('</html>');\n\t\t\t\n\t\t}", "public function buffer()\n {\n if ($this->_disabled) {\n return;\n }\n\n if ($this->isTurbo()) {\n return;\n }\n\n ob_start();\n $this->output();\n $this->_html = ob_get_contents();\n ob_end_clean();\n }", "public function sendContent(): static\n {\n echo $this->content;\n\n return $this;\n }", "public function renderResponse(): void\n {\n $methodName = $this->methodName;\n $this->$methodName()->send();\n\t}", "public function send()\n {\n http_response_code( $this->getResultCode() );\n echo $this->getBody();\n }", "public function run()\n\t{\n\t\tif ( $this->notFound() ) {\n\t\t $this->setNotFoundContent();\n\t\t}\n elseif ( $this->success() ) {\n\t\t $this->setSuccessContent();\n\t\t}\n else {\n $this->setFormContent();\n }\n\t}", "public function send()\n {\n // send all headers\n foreach ($this->getHeaders() as $header => $replace) {\n header($header, $replace);\n }\n\n // set cookies\n foreach ($this->_cookie as $name => $options) {\n // simulate cookie set on test\n if (MAD_ENV == 'test') {\n $_COOKIE[$name] = $options['value'];\n } else {\n setcookie($name, $options['value'], $options['expiration'], \n $options['path']);\n }\n }\n\n // set flash/session data\n $this->_session['_flash'] = $this->_flash;\n foreach ($this->_session as $name => $value) {\n $_SESSION[$name] = $value;\n }\n\n // send body\n print $this->getBody();\n }", "function render() {\r\n $sendOutput = true;\r\n // check if plog is configured to use conditional http headers and stuff like\r\n // that... Also, use the HttpCache class to determine whether we should send the\r\n // content or not\r\n if ($this->isCached()) {\r\n // some debug information\r\n $timestamp = $this->_templateObject->getCreationTimestamp();\r\n // and now send the correct headers\r\n if (Http_Cache::httpConditional($timestamp, $this->getCacheTimeSeconds())) $sendOutput = false;\r\n $header = \"Last-Modified: \" . gmdate('D, d M Y H:i:s', $timestamp) . ' GMT';\r\n header($header);\r\n }\r\n else {\r\n // send the results if needed\r\n $sendOutput = true;\r\n }\r\n if ($sendOutput) {\r\n // pass all the values to the template object\r\n $this->_templateObject->assign($this->_params);\r\n // and finally send them after calling the pre-processing method\r\n $content = $this->_templateObject->fetch($this->getViewId());\r\n print ($content);\r\n }\r\n }", "protected function setPlainContent() {}", "public function run()\n { \n $this->controller->render('aut_form',array(\n\t\t\t'client_id' => Opciones::model()->find('opcion = \"client_id_mu\"')['valor'],\n\t\t\t'client_secret' => Opciones::model()->find('opcion = \"client_secret_mu\"')['valor'],\n ));\n }", "public function run()\n\t{\n\t\t$this->renderContent();\n\t\t$content=ob_get_clean();\n\t\tif($this->hideOnEmpty && trim($content)==='')\n\t\t\treturn;\n\t\techo $content;\n\t}", "function output() {\n if (isset($this->status)) {\n $this->send_header(sprintf('HTTP/1.1 %d %s',\n $this->status, $this->reason),\n TRUE,\n $this->status);\n }\n\n foreach ($this->headers as $k => $v) {\n $this->send_header(\"$k: $v\");\n }\n\n echo $this->body;\n }", "public function send() {\n $tidy = new Tidy();\n $tidy->parseString($this->output, $this->tidyConfig);\n $tidy->cleanRepair();\n\n // Send the output string to the client\n echo $tidy;\n }", "protected function sendResponse() {}", "public function render() {\n echo \"<!DOCTYPE html>\\n\";\n echo \"<html>\\n\";\n $this->show_head();\n \n echo\"\\n<body>\\n\";\n echo $this->show_contents();\n\n echo \"\\n</body>\";\n echo \"\\n</html>\\n\\n\";\n }", "public function send()\n {\n }", "public function render() {\n $template = $this->template;\n $template->setFile(__DIR__ . '/QuestionControl.latte');\n $this->template->question = $this->questions->getById($this->questionId);\n $template->render();\n }", "public function render()\n {\n $content = $this->__layoutContent();\n\n extract($this->getViewData());\n ob_start();\n include $content;\n ob_get_flush();\n }", "protected function sendContent()\n {\n if ($this->stream === null) {\n $this->swoole_http_response->end($this->content);\n // 这里看到还有写session的\n return;\n }\n\n $chunkSize = 8 * 1024 * 1024; // 8MB per chunk\n\n if (is_array($this->stream)) {\n list ($handle, $begin, $end) = $this->stream;\n fseek($handle, $begin);\n while (!feof($handle) && ($pos = ftell($handle)) <= $end) {\n if ($pos + $chunkSize > $end) {\n $chunkSize = $end - $pos + 1;\n }\n $this->swoole_http_response->write(fread($handle, $chunkSize));\n }\n fclose($handle);\n } else {\n while (!feof($this->stream)) {\n $this->swoole_http_response->write(fread($this->stream, $chunkSize));\n }\n fclose($this->stream);\n }\n $this->swoole_http_response->end();\n\n // 这里看到还有写session的\n }", "protected function sendResponse() {\n $this->eventManager->triggerEvent(self::EVENT_PRE_RESPONSE, array('web' => $this));\n\n $this->setSessionCookie();\n\n $this->renderView();\n\n // send the response\n if ($this->log) {\n $this->log->logDebug('Sending response', 'Status code ' . $this->response->getStatusCode(), System::LOG_SOURCE);\n\n $headers = $this->response->getHeaders();\n foreach ($headers as $header) {\n $this->log->logDebug('Sending header', $header, System::LOG_SOURCE);\n }\n\n $cookies = $this->response->getCookies();\n foreach ($cookies as $cookie) {\n $this->log->logDebug('Sending header', Header::HEADER_SET_COOKIE . ': ' . $cookie, System::LOG_SOURCE);\n }\n\n $view = $this->response->getView();\n if ($view) {\n $this->log->logDebug('Rendering and sending view', get_class($view), System::LOG_SOURCE);\n }\n }\n\n $this->response->send($this->request);\n\n $this->eventManager->triggerEvent(self::EVENT_POST_RESPONSE, array('web' => $this));\n\n $this->writeSession();\n }", "function sendRequest()\n\t\t{\n\t\t\t$stream = $this->getRequestStream();\n\t\t\t$stream->write( $this->getRequestString() );\n\t\t\t$stream->close();\n\t\t}", "public function renderContent() {}", "public static function renderContent() {}", "public function sendContent() {\n\n\t\t\tif($this->getContentIsSent()) {\n\t\t\t\ttrigger_error(\n\t\t\t\t\t'http response content already sent, sending again',\n\t\t\t\t\tE_USER_WARNING\n\t\t\t\t);\n\t\t\t}\n\t\t\techo $this->getContent();\n\t\t\t$this->setContentIsSent();\n\t\t\treturn $this;\n\n\t\t}", "public function render_content() {\n\t\t\t$allowed_html = array(\n\t\t\t\t'a' => array(\n\t\t\t\t\t'href' => array(),\n\t\t\t\t\t'title' => array(),\n\t\t\t\t\t'class' => array(),\n\t\t\t\t\t'target' => array(),\n\t\t\t\t),\n\t\t\t\t'br' => array(),\n\t\t\t\t'em' => array(),\n\t\t\t\t'strong' => array(),\n\t\t\t\t'i' => array(\n\t\t\t\t\t'class' => array(),\n\t\t\t\t),\n\t\t\t\t'span' => array(\n\t\t\t\t\t'class' => array(),\n\t\t\t\t),\n\t\t\t\t'code' => array(),\n\t\t\t);\n\t\t\t?>\n\t\t\t<div class=\"simple-notice-custom-control\">\n\t\t\t\t<?php if ( ! empty( $this->label ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo wp_kses( $this->description, $allowed_html ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function run()\n {\n echo \"\\n\" . $this->renderBodyEnd();\n echo \"\\n\" . Html::endTag('div');\n\n }", "public function run()\n {\n $this->renderContentEnd();\n echo CHtml::closeTag('div') . \"\\n\";\n\n $this->useViewTemplate(\"box\")->selfRender();\n }", "public function render(){\r\n //Current controller is loaded from within the action method.\r\n define(\"RENDER_BEGIN\", microtime());\r\n \r\n\t\t\t$this->controller->render();\r\n \r\n\t\t\t\r\n\t\t}", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render() {\n\t\techo $this->header->toString();\n\t\techo $this->panel->toString();\n\t\techo $this->page->toString();\n\t\tif( $this->getMessages() != null ) {\n\t\t\techo $this->messages->toString();\n\t\t}\n\t\techo $this->footer->toString();\n\t}", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "public function GetControlHtml() {\n\t\t\t// Pull any Attributes\n\t\t\t$strAttributes = $this->GetAttributes();\n\n\t\t\t// Pull any styles\n\t\t\tif ($strStyle = $this->GetStyleAttributes())\n\t\t\t\t$strStyle = 'style=\"' . $strStyle . '\"';\n\n\t\t\t// Return the HTML\n\t\t\t$strHtml = null;\n\t\t\tif (!$this->strTempFilePath) {\n\t\t\t\t$strHtml .= sprintf('<input type=\"button\" class=\"button\" id=\"%s_button\" value=\"Browse...\"/>', $this->strControlId);\n\n\t\t\t\t$strHtml .= sprintf('<div class=\"progress\" id=\"%s_progress\" style=\"display: none;\">', $this->strControlId);\n\t\t\t\t$strHtml .= sprintf('<div class=\"size\" id=\"%s_size\">n/a</div>', $this->strControlId);\n\n\t\t\t\t$strHtml .= '<div class=\"bar\">';\n\t\t\t\t$strHtml .= sprintf('<div class=\"status\" id=\"%s_status\">Uploading...</div>', $this->strControlId);\n\t\t\t\t$strHtml .= sprintf('<div class=\"fill\" id=\"%s_fill\"></div>', $this->strControlId);\n\t\t\t\t$strHtml .= '</div>';\n\n\t\t\t\t$strHtml .= '<div class=\"cancel\"><a href=\"#\">Cancel</a></div>';\n\t\t\t\t$strHtml .= '</div>';\n\t\t\t} else {\n\t\t\t\t$strHtml .= sprintf('<strong>%s</strong> (%s) &nbsp; <a href=\"#\">Remove</a></div>', $this->strFileName, QString::GetByteSize($this->strFileSize));\n\t\t\t}\n\n\t\t\treturn sprintf('<div id=\"%s\" %s%s>%s</div>', $this->strControlId, $strAttributes, $strStyle, $strHtml);\n\t\t}", "public function send(): void\n\t{\n\t\t$this->sendHeaders();\n\t\t$this->sendBody();\n\t}" ]
[ "0.682915", "0.67147326", "0.6664969", "0.65778685", "0.6476918", "0.6355857", "0.62551826", "0.6047255", "0.6012327", "0.59674084", "0.5961471", "0.5943968", "0.5921423", "0.58756787", "0.5856559", "0.5851578", "0.5843487", "0.58425605", "0.57889545", "0.5787611", "0.57484263", "0.5742189", "0.57157373", "0.5708951", "0.570753", "0.56889313", "0.5676667", "0.5670684", "0.5656172", "0.5629038", "0.56235284", "0.55831206", "0.55609", "0.5560732", "0.5560732", "0.5557487", "0.5555811", "0.5520524", "0.5485246", "0.5466432", "0.5462374", "0.54571676", "0.5444899", "0.54439855", "0.542688", "0.5422892", "0.54197353", "0.54170996", "0.54137766", "0.54057515", "0.5397769", "0.53923607", "0.5373621", "0.5370673", "0.53669626", "0.5355593", "0.53551245", "0.53527623", "0.5350052", "0.53460175", "0.5340371", "0.53339815", "0.5330543", "0.5330139", "0.53162813", "0.53146493", "0.5312795", "0.5301484", "0.5289115", "0.528456", "0.52820206", "0.5281075", "0.5280503", "0.5279944", "0.5278079", "0.5277991", "0.5274901", "0.5273828", "0.5271339", "0.52534205", "0.5245669", "0.5245669", "0.5245669", "0.5245669", "0.5245669", "0.5245669", "0.5245669", "0.5245669", "0.5245669", "0.5245669", "0.5245669", "0.5245669", "0.5245669", "0.5245669", "0.523809", "0.52336055", "0.52336055", "0.52336055", "0.5232114", "0.5231665", "0.52287716" ]
0.0
-1
Sends server control content, which will be rendered on the client.
function Render() { $this->RenderChildren(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function send() {\n\t\theader ( 'Content-Type: ' . $this->getContentType () );\n\t\t\n\t\techo $this->getContent ();\n\t}", "public function send()\n {\n $this->sendHeader(); // Insure headers are sent before sending content\n\n echo $this->content;\n }", "public function send()\n {\n $httpProtocol = $_SERVER['SERVER_PROTOCOL'];\n\n // Send the HTTP Status and Headers.\n\n if (! headers_sent()) {\n $status = $this->status();\n\n // Send the HTTP Status Header.\n header(\"$httpProtocol $status \" . self::$statuses[$status]);\n\n // Send the rest of the HTTP Headers.\n foreach ($this->headers as $name => $value) {\n header(\"$name: $value\", true);\n }\n }\n\n // Send the stringified Content.\n\n echo $this->render();\n }", "public function sendContent()\n {\n echo $this->content;\n }", "public function send() {\r\n\t\t$this->sendHeaders ();\r\n\t\techo $this->getContent ();\r\n\t}", "public function sendContent()\r\n {\r\n if (sfConfig::get('sf_logging_enabled'))\r\n {\r\n $this->getContext()->getLogger()->info('{sfResponse} send content ('.strlen($this->content).' o)');\r\n }\r\n\r\n echo $this->content;\r\n }", "public function send () {\r\n\t\t$this->sendHeaders();\r\n\t\t$this->sendContent();\r\n\t}", "public function render(): void\n {\n $methodName = $this->methodName;\n $this->$methodName()->sendContent();\n\t}", "public function send() : void\n {\n \\http_response_code( $this->status );\n\n foreach ( $this->headers->all() as $name => $values ) {\n foreach ( $values as $index => $value ) {\n \\header( \"$name: $value\", $index === 0 );\n }\n }\n\n echo $this->content;\n }", "public function render_content()\n {\n CustomizerAddon::view( 'controls.switch', ['control' => &$this] );\n }", "public function sendContent();", "public function send()\n {\n if (function_exists('http_response_code')) {\n http_response_code($this->code);\n } else {\n header(' ', true, $this->code);\n }\n\n foreach ($this->headers as $name => $value) {\n header($name . ': ' . $value);\n }\n\n if (!is_null($this->content)) {\n echo $this->content;\n }\n }", "public function sendContent()\n {\n if (!$this->headerOnly)\n {\n parent::sendContent();\n }\n }", "function renderToClient();", "public function send()\n {\n $this->sendContentOptions();\n $this->sendFrameOptions();\n $this->sendStrictTransport();\n $this->sendCrossOriginResourcePolicy();\n $this->sendContentSecurity();\n }", "public function emit()\n {\n $this->sendHeaders();\n $this->sendBody();\n }", "public function send()\n {\n http_response_code($this->statusCode);\n $this->sendContent();\n }", "public function run()\n {\n $this->renderContent();\n echo ob_get_clean();\n }", "public function sendContent()\n {\n $laravelResponse = $this->laravelResponse;\n\n $this->swooleResponse->end($laravelResponse->getContent());\n }", "public function send() {\n /** @var HeaderCollection $headers */\n $headers = Yii::$app->response->headers;\n $headers->removeAll();\n foreach ($this->getHeaders() as $_header => $lines) {\n $headers->add($_header, $this->getHeaderLine($_header));\n }\n Yii::$app->response->version = $this->getProtocolVersion();\n Yii::$app->response->statusCode = $this->getStatusCode();\n Yii::$app->response->statusText = $this->getReasonPhrase();\n Yii::$app->response->content = $this->getBody();\n\n Yii::$app->response->send();\n }", "public function send()\n {\n fwrite($this->rStream, $this->sText);\n }", "public function send() {\r\n\t\t$this->resource->send();\r\n\t}", "public function send()\n {\n $this->trigger(self::EVENT_BEFORE_SEND);\n $this->prepare();\n $this->trigger(self::EVENT_AFTER_PREPARE);\n $this->sendHeaders();\n $this->sendContent();\n $this->trigger(self::EVENT_AFTER_SEND);\n $this->isSent = true;\n }", "public function respond()\n\t{\n\t\t$this->setTemplate();\n\t\t$this->template->setGuid( $this->request['guid'] );\n\t\t$this->template->setContent( $this->view->getContent() );\n\t\n\t\techo $this->template->request();\t\n\t}", "protected function _sendContent($content) {\n\t\techo $content;\n\t}", "public function send()\n {\n if ($this->isSent) {\n return;\n }\n $this->trigger(self::EVENT_BEFORE_SEND);\n $this->prepare();\n $this->trigger(self::EVENT_AFTER_PREPARE);\n $this->sendHeaders();\n $this->sendContent();\n $this->trigger(self::EVENT_AFTER_SEND);\n $this->isSent = true;\n }", "public function send(){\n\t\t\n\t\texit($this->page->generate());\n\t}", "public function send(){\n header('HTTP/1.1 200 OK');\n header('Content-type: application/json');\n echo CJavaScript::jsonEncode($this->get());\n Yii::app()->end();\n }", "public function run() {\n$this->header('Content-Type: text/html');\n?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n\t<title>Game servers</title>\n</head>\n<body>\n</body>\n</html><?php\n}", "public function actionControlPanel()\n {\n $this->render('controlPanel');\n }", "private function __send_response(){\n http_response_code($this->response_code);\n if($this->_redirect) header(\"Location: \".Config::WEB_DIRECTORY.\"{$this->_redirect_location}\");\n elseif($this->_JSON){\n header('Content-Type: application/json; charset=UTF-8');\n print json_encode($this->_JSON_contents, JSON_PRETTY_PRINT);\n }elseif($this->_HTML){\n if($this->_HTML_load_view) $this->_template->render();\n } /** @noinspection PhpStatementHasEmptyBodyInspection */ else{\n // Do nothing\n }\n }", "public function render()\n\t{\n\t\t$this->addHTTPHeader('Content-Type', $this->getMimeType());\n\n\t\t$name = $this->getName();\n\n\t\tif (!empty($name))\n\t\t{\n\t\t\t$this->addHTTPHeader('Content-Disposition', 'attachment; filename=\"' . $name . '.json\"', true);\n\t\t}\n\n\t\t$this->outputHTTPHeaders();\n\n\t\tif ($this->useHashes)\n\t\t{\n\t\t\techo '###' . $this->getBuffer() . '###';\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo $this->getBuffer();\n\t\t}\n\t}", "public function send()\n\t{\n\t\t$this->page->generatePage();\n\t\texit;\n\t}", "public function sendBody()\n {\n echo $this->body;\n }", "public function sendBody()\n {\n echo $this->body;\n }", "public function send()\r\n\t{\r\n\t\t$this->outputBody();\r\n\t\texit;\r\n\t}", "public function render()\n\t{\n\t\t$this->addHTTPHeader('Content-Type', $this->getMimeType());\n\n\t\t$name = $this->getName();\n\n\t\tif (!empty($name))\n\t\t{\n\t\t\t$this->addHTTPHeader('Content-Disposition', 'attachment; filename=\"' . $name . '.csv\"', true);\n\t\t}\n\n\t\t$this->outputHTTPHeaders();\n\n echo $this->getBuffer();\n\t}", "public function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"toggle-switch-control\">\n\t\t\t\t<div class=\"toggle-switch\">\n\t\t\t\t\t<input type=\"checkbox\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" class=\"toggle-switch-checkbox\" value=\"<?php echo esc_attr( $this->value() ); ?>\"\n\t\t\t\t\t<?php\n\t\t\t\t\t$this->link();\n\t\t\t\t\tchecked( $this->value() );\n\t\t\t\t\t?>\n\t\t\t\t\t>\n\t\t\t\t\t<label class=\"toggle-switch-label\" for=\"<?php echo esc_attr( $this->id ); ?>\">\n\t\t\t\t\t\t<span class=\"toggle-switch-inner\"></span>\n\t\t\t\t\t\t<span class=\"toggle-switch-switch\"></span>\n\t\t\t\t\t</label>\n\t\t\t\t</div>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function sendResponseBody()\n\t{\n\t\t$layoutTemplate = $this->getLayoutTemplate();\n\n\t\t$layoutTemplate['document'] = $this;\n\t\t$layoutTemplate['title'] = $this->getTitle();\n\t\t$layoutTemplate['content'] = $this->getContent();\n\n\t\t$pageHtml = $layoutTemplate->getOutput();\n\n\t\techo $pageHtml;\n\t}", "protected function RenderAjax() {\r\n\t\t\t$strToReturn = '<controls>';\r\n\r\n\t\t\t// Include each control (if applicable) that has been changed/modified\r\n\t\t\tforeach ($this->GetAllControls() as $objControl)\r\n\t\t\t\tif (!$objControl->ParentControl)\r\n//\t\t\t\t\t$strToReturn .= $objControl->RenderAjax(false) . \"\\r\\n\";\r\n\t\t\t\t\t$strToReturn .= $this->RenderAjaxHelper($objControl);\r\n\r\n\t\t\t$strCommands = '';\r\n\t\t\t\r\n\t\t\t// Look to the Application object for any commands to run\r\n\t\t\tforeach (QApplication::$AlertMessageArray as $strAlert) {\r\n\t\t\t\t$strAlert = QString::XmlEscape(sprintf('alert(\"%s\");', addslashes($strAlert)));\r\n\t\t\t\t$strCommands .= sprintf('<command>%s</command>', $strAlert);\r\n\t\t\t}\r\n\t\t\tforeach (QApplication::$JavaScriptArrayHighPriority as $strJavaScript) {\r\n\t\t\t\t$strJavaScript = trim($strJavaScript);\r\n\t\t\t\t\r\n\t\t\t\tif (strlen($strJavaScript)) {\r\n\t\t\t\t\tif (QString::LastCharacter($strJavaScript) != ';')\r\n\t\t\t\t\t\t$strJavaScript .= ';';\r\n\t\t\t\t\t$strCommands .= sprintf('<command>%s</command>', QString::XmlEscape($strJavaScript));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tforeach (QApplication::$JavaScriptArray as $strJavaScript) {\r\n\t\t\t\t$strJavaScript = trim($strJavaScript);\r\n\t\t\t\tif (strlen($strJavaScript)) {\r\n\t\t\t\t\tif (QString::LastCharacter($strJavaScript) != ';')\r\n\t\t\t\t\t\t$strJavaScript .= ';';\r\n\t\t\t\t\t$strCommands .= sprintf('<command>%s</command>', QString::XmlEscape($strJavaScript));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$strRegCJavaScript = '';\r\n\t\t\tforeach ($this->GetAllControls() as $objControl) {\r\n\t\t\t\tif ($objControl->Rendered) {\r\n\t\t\t\t\t$strRegCJavaScript .= sprintf('qc.regC(\"%s\"); ', $objControl->ControlId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($strRegCJavaScript)\r\n\t\t\t\t$strCommands .= sprintf('<command>%s</command>', QString::XmlEscape($strRegCJavaScript));\r\n\r\n\t\t\tforeach ($this->GetAllControls() as $objControl) {\r\n\t\t\t\tif ($objControl->Rendered) {\r\n\t\t\t\t\t$strJavaScript = $objControl->GetEndScript();\r\n\t\t\t\t\tif (strlen($strJavaScript))\r\n\t\t\t\t\t\t$strCommands .= sprintf('<command>%s</command>', QString::XmlEscape($objControl->GetEndScript()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tforeach ($this->objGroupingArray as $objGrouping) {\r\n\t\t\t\t$strRender = $objGrouping->Render();\r\n\t\t\t\tif (trim($strRender))\r\n\t\t\t\t\t$strCommands .= sprintf('<command>%s</command>', QString::XmlEscape($strRender));\r\n\t\t\t}\r\n\r\n\t\t\t// Add in the form state\r\n\t\t\t// DO SOMETHING DIFFERENT IF FORM IS UseSession\r\n\t\t\t$strFormState = QForm::Serialize($this);\r\n\t\t\t$strToReturn .= sprintf('<control id=\"Qform__FormState\">%s</control>', $strFormState);\r\n\r\n\t\t\t// close Control collection, Open the Command collection\r\n\t\t\t$strToReturn .= '</controls><commands>';\r\n\t\t\t\r\n\t\t\t$strToReturn .= $strCommands;\r\n\r\n\t\t\t// close Command collection\r\n\t\t\t$strToReturn .= '</commands>';\r\n\r\n\t\t\t$strContents = trim(ob_get_contents());\r\n\r\n\t\t\tif (strtolower(substr($strContents, 0, 5)) == 'debug') {\r\n\t\t\t} else {\r\n\t\t\t\tob_clean();\r\n\r\n\t\t\t\t// Response is in XML Format\r\n\t\t\t\theader('Content-Type: text/xml');\r\n\r\n\t\t\t\t// Output it and update render state\r\n\t\t\t\tif (QApplication::$EncodingType)\r\n\t\t\t\t\tprintf(\"<?xml version=\\\"1.0\\\" encoding=\\\"%s\\\"?><response>%s</response>\\r\\n\", QApplication::$EncodingType, $strToReturn);\r\n\t\t\t\telse\r\n\t\t\t\t\tprintf(\"<?xml version=\\\"1.0\\\"?><response>%s</response>\\r\\n\", $strToReturn);\r\n\t\t\t}\r\n\r\n\t\t\t// Update Render State\r\n\t\t\t$this->intFormStatus = QFormBase::FormStatusRenderEnded;\r\n\t\t}", "public function send()\n {\n $this->sendHeaders();\n $this->sendBody();\n }", "public function render_control_templates()\n {\n }", "public function send() {\r\n\t\t\t$this->sent = true;\r\n\t\t}", "public function run()\r\n\t{\r\n $this->render('MessageDisplay');\r\n\t}", "public function send_content() {\n Event::factory('response.pre_send_content')->notify_all();\n Event::factory('response.post_send_content')->notify_all();\n return $this;\n }", "public function RenderContentAjax(): void {\n $this->showContent(TRUE);\n }", "public function send()\n {\n // Stream post the data\n $this->evaluateResponse($this->httpPost($this->str_endpoint . '/event', $this->compile()));\n }", "public function send()\n {\n $this->sendHttpHeaders();\n $this->sendContent();\n\n if (function_exists('fastcgi_finish_request'))\n {\n $this->dispatcher->notify(new sfEvent($this, 'response.fastcgi_finish_request'));\n fastcgi_finish_request();\n }\n }", "public function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"tinymce-control\">\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<textarea id=\"<?php echo esc_attr( $this->id ); ?>\" class=\"customize-control-tinymce-editor\" <?php $this->link(); ?>><?php echo esc_attr( $this->value() ); ?></textarea>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function renderForm()\n\t{\n\t\t$this->beginForm();\n\t\t$this->renderMessageInput();\n\t\techo Html::beginTag('div', array('class' => 'chat-from-actions'));\n\t\t$this->renderSubmit();\n\t\techo Html::endTag('div');\n\t\t$this->endForm();\n\t}", "public function emit()\n {\n echo <<<HTML\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>{$this->title}</title>\n <link href=\"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3\" crossorigin=\"anonymous\">\n </head>\n <body>\n\n HTML;\n\n if ($this->contain)\n {\n echo <<<HTML\n <main class=\"container\">\n\n HTML;\n }\n\n $this->emitted = true;\n }", "protected function send() {}", "public function render() {\n\t\t\t\n\t\t\t$this->_content = ob_get_contents();\n\t\t\tob_clean();\n\t\t\t\n\t\t\t$this->outputLine($this->_doctype);\n\t\t\t$this->outputLine('<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"' . $this->_lang . '\" lang=\"' . $this->_lang . '\" dir=\"' . $this->_dir . '\">');\n\t\t\t\n\t\t\t$this->renderHead();\n\t\t\t\n\t\t\t$this->renderBody();\n\t\t\t\n\t\t\t$this->outputLine('</html>');\n\t\t\t\n\t\t}", "public function buffer()\n {\n if ($this->_disabled) {\n return;\n }\n\n if ($this->isTurbo()) {\n return;\n }\n\n ob_start();\n $this->output();\n $this->_html = ob_get_contents();\n ob_end_clean();\n }", "public function sendContent(): static\n {\n echo $this->content;\n\n return $this;\n }", "public function renderResponse(): void\n {\n $methodName = $this->methodName;\n $this->$methodName()->send();\n\t}", "public function send()\n {\n http_response_code( $this->getResultCode() );\n echo $this->getBody();\n }", "public function run()\n\t{\n\t\tif ( $this->notFound() ) {\n\t\t $this->setNotFoundContent();\n\t\t}\n elseif ( $this->success() ) {\n\t\t $this->setSuccessContent();\n\t\t}\n else {\n $this->setFormContent();\n }\n\t}", "public function send()\n {\n // send all headers\n foreach ($this->getHeaders() as $header => $replace) {\n header($header, $replace);\n }\n\n // set cookies\n foreach ($this->_cookie as $name => $options) {\n // simulate cookie set on test\n if (MAD_ENV == 'test') {\n $_COOKIE[$name] = $options['value'];\n } else {\n setcookie($name, $options['value'], $options['expiration'], \n $options['path']);\n }\n }\n\n // set flash/session data\n $this->_session['_flash'] = $this->_flash;\n foreach ($this->_session as $name => $value) {\n $_SESSION[$name] = $value;\n }\n\n // send body\n print $this->getBody();\n }", "function render() {\r\n $sendOutput = true;\r\n // check if plog is configured to use conditional http headers and stuff like\r\n // that... Also, use the HttpCache class to determine whether we should send the\r\n // content or not\r\n if ($this->isCached()) {\r\n // some debug information\r\n $timestamp = $this->_templateObject->getCreationTimestamp();\r\n // and now send the correct headers\r\n if (Http_Cache::httpConditional($timestamp, $this->getCacheTimeSeconds())) $sendOutput = false;\r\n $header = \"Last-Modified: \" . gmdate('D, d M Y H:i:s', $timestamp) . ' GMT';\r\n header($header);\r\n }\r\n else {\r\n // send the results if needed\r\n $sendOutput = true;\r\n }\r\n if ($sendOutput) {\r\n // pass all the values to the template object\r\n $this->_templateObject->assign($this->_params);\r\n // and finally send them after calling the pre-processing method\r\n $content = $this->_templateObject->fetch($this->getViewId());\r\n print ($content);\r\n }\r\n }", "protected function setPlainContent() {}", "public function run()\n { \n $this->controller->render('aut_form',array(\n\t\t\t'client_id' => Opciones::model()->find('opcion = \"client_id_mu\"')['valor'],\n\t\t\t'client_secret' => Opciones::model()->find('opcion = \"client_secret_mu\"')['valor'],\n ));\n }", "function output() {\n if (isset($this->status)) {\n $this->send_header(sprintf('HTTP/1.1 %d %s',\n $this->status, $this->reason),\n TRUE,\n $this->status);\n }\n\n foreach ($this->headers as $k => $v) {\n $this->send_header(\"$k: $v\");\n }\n\n echo $this->body;\n }", "public function run()\n\t{\n\t\t$this->renderContent();\n\t\t$content=ob_get_clean();\n\t\tif($this->hideOnEmpty && trim($content)==='')\n\t\t\treturn;\n\t\techo $content;\n\t}", "public function send() {\n $tidy = new Tidy();\n $tidy->parseString($this->output, $this->tidyConfig);\n $tidy->cleanRepair();\n\n // Send the output string to the client\n echo $tidy;\n }", "protected function sendResponse() {}", "public function render() {\n echo \"<!DOCTYPE html>\\n\";\n echo \"<html>\\n\";\n $this->show_head();\n \n echo\"\\n<body>\\n\";\n echo $this->show_contents();\n\n echo \"\\n</body>\";\n echo \"\\n</html>\\n\\n\";\n }", "public function send()\n {\n }", "public function render() {\n $template = $this->template;\n $template->setFile(__DIR__ . '/QuestionControl.latte');\n $this->template->question = $this->questions->getById($this->questionId);\n $template->render();\n }", "public function render()\n {\n $content = $this->__layoutContent();\n\n extract($this->getViewData());\n ob_start();\n include $content;\n ob_get_flush();\n }", "function sendRequest()\n\t\t{\n\t\t\t$stream = $this->getRequestStream();\n\t\t\t$stream->write( $this->getRequestString() );\n\t\t\t$stream->close();\n\t\t}", "protected function sendResponse() {\n $this->eventManager->triggerEvent(self::EVENT_PRE_RESPONSE, array('web' => $this));\n\n $this->setSessionCookie();\n\n $this->renderView();\n\n // send the response\n if ($this->log) {\n $this->log->logDebug('Sending response', 'Status code ' . $this->response->getStatusCode(), System::LOG_SOURCE);\n\n $headers = $this->response->getHeaders();\n foreach ($headers as $header) {\n $this->log->logDebug('Sending header', $header, System::LOG_SOURCE);\n }\n\n $cookies = $this->response->getCookies();\n foreach ($cookies as $cookie) {\n $this->log->logDebug('Sending header', Header::HEADER_SET_COOKIE . ': ' . $cookie, System::LOG_SOURCE);\n }\n\n $view = $this->response->getView();\n if ($view) {\n $this->log->logDebug('Rendering and sending view', get_class($view), System::LOG_SOURCE);\n }\n }\n\n $this->response->send($this->request);\n\n $this->eventManager->triggerEvent(self::EVENT_POST_RESPONSE, array('web' => $this));\n\n $this->writeSession();\n }", "protected function sendContent()\n {\n if ($this->stream === null) {\n $this->swoole_http_response->end($this->content);\n // 这里看到还有写session的\n return;\n }\n\n $chunkSize = 8 * 1024 * 1024; // 8MB per chunk\n\n if (is_array($this->stream)) {\n list ($handle, $begin, $end) = $this->stream;\n fseek($handle, $begin);\n while (!feof($handle) && ($pos = ftell($handle)) <= $end) {\n if ($pos + $chunkSize > $end) {\n $chunkSize = $end - $pos + 1;\n }\n $this->swoole_http_response->write(fread($handle, $chunkSize));\n }\n fclose($handle);\n } else {\n while (!feof($this->stream)) {\n $this->swoole_http_response->write(fread($this->stream, $chunkSize));\n }\n fclose($this->stream);\n }\n $this->swoole_http_response->end();\n\n // 这里看到还有写session的\n }", "public function renderContent() {}", "public function sendContent() {\n\n\t\t\tif($this->getContentIsSent()) {\n\t\t\t\ttrigger_error(\n\t\t\t\t\t'http response content already sent, sending again',\n\t\t\t\t\tE_USER_WARNING\n\t\t\t\t);\n\t\t\t}\n\t\t\techo $this->getContent();\n\t\t\t$this->setContentIsSent();\n\t\t\treturn $this;\n\n\t\t}", "public static function renderContent() {}", "public function render_content() {\n\t\t\t$allowed_html = array(\n\t\t\t\t'a' => array(\n\t\t\t\t\t'href' => array(),\n\t\t\t\t\t'title' => array(),\n\t\t\t\t\t'class' => array(),\n\t\t\t\t\t'target' => array(),\n\t\t\t\t),\n\t\t\t\t'br' => array(),\n\t\t\t\t'em' => array(),\n\t\t\t\t'strong' => array(),\n\t\t\t\t'i' => array(\n\t\t\t\t\t'class' => array(),\n\t\t\t\t),\n\t\t\t\t'span' => array(\n\t\t\t\t\t'class' => array(),\n\t\t\t\t),\n\t\t\t\t'code' => array(),\n\t\t\t);\n\t\t\t?>\n\t\t\t<div class=\"simple-notice-custom-control\">\n\t\t\t\t<?php if ( ! empty( $this->label ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo wp_kses( $this->description, $allowed_html ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function run()\n {\n echo \"\\n\" . $this->renderBodyEnd();\n echo \"\\n\" . Html::endTag('div');\n\n }", "public function run()\n {\n $this->renderContentEnd();\n echo CHtml::closeTag('div') . \"\\n\";\n\n $this->useViewTemplate(\"box\")->selfRender();\n }", "public function render(){\r\n //Current controller is loaded from within the action method.\r\n define(\"RENDER_BEGIN\", microtime());\r\n \r\n\t\t\t$this->controller->render();\r\n \r\n\t\t\t\r\n\t\t}", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render() {\n\t\techo $this->header->toString();\n\t\techo $this->panel->toString();\n\t\techo $this->page->toString();\n\t\tif( $this->getMessages() != null ) {\n\t\t\techo $this->messages->toString();\n\t\t}\n\t\techo $this->footer->toString();\n\t}", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "public function GetControlHtml() {\n\t\t\t// Pull any Attributes\n\t\t\t$strAttributes = $this->GetAttributes();\n\n\t\t\t// Pull any styles\n\t\t\tif ($strStyle = $this->GetStyleAttributes())\n\t\t\t\t$strStyle = 'style=\"' . $strStyle . '\"';\n\n\t\t\t// Return the HTML\n\t\t\t$strHtml = null;\n\t\t\tif (!$this->strTempFilePath) {\n\t\t\t\t$strHtml .= sprintf('<input type=\"button\" class=\"button\" id=\"%s_button\" value=\"Browse...\"/>', $this->strControlId);\n\n\t\t\t\t$strHtml .= sprintf('<div class=\"progress\" id=\"%s_progress\" style=\"display: none;\">', $this->strControlId);\n\t\t\t\t$strHtml .= sprintf('<div class=\"size\" id=\"%s_size\">n/a</div>', $this->strControlId);\n\n\t\t\t\t$strHtml .= '<div class=\"bar\">';\n\t\t\t\t$strHtml .= sprintf('<div class=\"status\" id=\"%s_status\">Uploading...</div>', $this->strControlId);\n\t\t\t\t$strHtml .= sprintf('<div class=\"fill\" id=\"%s_fill\"></div>', $this->strControlId);\n\t\t\t\t$strHtml .= '</div>';\n\n\t\t\t\t$strHtml .= '<div class=\"cancel\"><a href=\"#\">Cancel</a></div>';\n\t\t\t\t$strHtml .= '</div>';\n\t\t\t} else {\n\t\t\t\t$strHtml .= sprintf('<strong>%s</strong> (%s) &nbsp; <a href=\"#\">Remove</a></div>', $this->strFileName, QString::GetByteSize($this->strFileSize));\n\t\t\t}\n\n\t\t\treturn sprintf('<div id=\"%s\" %s%s>%s</div>', $this->strControlId, $strAttributes, $strStyle, $strHtml);\n\t\t}", "protected function render_content()\n {\n }", "public function send(): void\n\t{\n\t\t$this->sendHeaders();\n\t\t$this->sendBody();\n\t}" ]
[ "0.6828984", "0.6714026", "0.666529", "0.6577088", "0.6476717", "0.6355295", "0.6255282", "0.60472834", "0.60124063", "0.59668964", "0.59614193", "0.5944149", "0.5920824", "0.5875371", "0.5857338", "0.5850816", "0.584317", "0.58421683", "0.5788322", "0.5787968", "0.57486266", "0.5743437", "0.5716053", "0.5708906", "0.5706987", "0.5689226", "0.5677315", "0.5671163", "0.5655851", "0.56292915", "0.56237805", "0.5582123", "0.55614054", "0.5561318", "0.5561318", "0.5556427", "0.5556352", "0.5520207", "0.5484371", "0.5466939", "0.5463128", "0.5458191", "0.54447705", "0.54440117", "0.54263204", "0.54219097", "0.5420554", "0.5417372", "0.5413476", "0.5405971", "0.5396995", "0.53931814", "0.53730476", "0.53696764", "0.5366599", "0.5356024", "0.53556573", "0.5351299", "0.53507644", "0.534563", "0.53387666", "0.5333927", "0.5329304", "0.5328486", "0.53161746", "0.53151137", "0.5312128", "0.530262", "0.5289638", "0.5283356", "0.5281638", "0.5281175", "0.5281162", "0.5278721", "0.5277622", "0.5276686", "0.5274492", "0.52731884", "0.5270743", "0.5254094", "0.52448684", "0.52448684", "0.52448684", "0.52448684", "0.52448684", "0.52448684", "0.52448684", "0.52448684", "0.52448684", "0.52448684", "0.52448684", "0.52448684", "0.52448684", "0.52448684", "0.5237492", "0.52326846", "0.52326846", "0.52326846", "0.5231846", "0.52311945", "0.522979" ]
0.0
-1
Run the database seeds.
public function run() { echo "\n"; echo "/*---------------------------------------------- \n"; echo "| @Reset Data! \n"; echo "|----------------------------------------------*/ \n"; $this->reset(); echo "\n"; echo "/*---------------------------------------------- \n"; echo "| @Populating Data! \n"; echo "|----------------------------------------------*/ \n"; /* |----------------------------------------------- | @Roles |----------------------------------------------*/ $this->call(RolesTableSeeder::class); /* |----------------------------------------------- | @Groups |----------------------------------------------*/ $this->call(GroupsTableSeeder::class); /* |----------------------------------------------- | @Locations |----------------------------------------------*/ $this->call(LocationsTableSeeder::class); /* |----------------------------------------------- | @Organization |----------------------------------------------*/ $this->call(OrganizationTableSeeder::class); /* |----------------------------------------------- | @Employee Categories |----------------------------------------------*/ $this->call(EmployeeCategoriesTableSeeder::class); /* |----------------------------------------------- | @Form Template Categories |----------------------------------------------*/ $this->call(FormTemplateCategoriesTableSeeder::class); /* |----------------------------------------------- | @Event Categories |----------------------------------------------*/ $this->call(EventCategoriesTableSeeder::class); /* |----------------------------------------------- | @IDP Competency |----------------------------------------------*/ $this->call(IDPCompetencyTableSeeder::class); /* |----------------------------------------------- | @Default Forms |----------------------------------------------*/ // $this->call(FormsSeeder::class); /* |----------------------------------------------- | @Default Settings |----------------------------------------------*/ // $this->call(SettingsSeeder::class); echo "\n" . "Uncomment me to proceed to the sample data seeders" . "\n"; exit(); echo "\n"; echo "/*---------------------------------------------- \n"; echo "| @Populating Sample Data! \n"; echo "|----------------------------------------------*/ \n"; /* |----------------------------------------------- | @Default Users |----------------------------------------------*/ // $this->call(UATUsersSeeder::class); /* | @Organization |----------------------------------------------*/ // $this->call(SampleOrganizationTableSeeder::class); /* | @Employees |----------------------------------------------*/ // $this->call(SampleUserTableSeeder::class); /* |----------------------------------------------- | @Settings |----------------------------------------------*/ // $this->call(SampleSettingsTableSeeder::class); /* | @Form Templates |----------------------------------------------*/ // $this->call(SampleFormTemplateTableSeeder::class); /* | @Events |----------------------------------------------*/ // $this->call(SampleEventsTableSeeder::class); /* | @IDP |----------------------------------------------*/ // $this->call(SampleIDPsTableSeeder::class); /* | @Requests |----------------------------------------------*/ // $this->call(SampleRequestsTableSeeder::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Gets the status code that corresponds to this exception. This is usually an HTTP status code.
public function getAssociatedStatusCode() { return AbstractResponse::RESPONSE_UNAUTHORIZED; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatusCode() {\n\t\treturn $this->status['code'];\n\t}", "public function status() :int\n {\n return (int) $this->exception->getStatusCode();\n }", "public function get_status_code(): int {\n if (empty($this->status_code)) {\n throw new RuntimeException(\"HTTP Response is missing a status code\");\n }\n\n return $this->status_code;\n }", "public function getStatusCode()\n {\n return isset($this->headers['statusCode']) ? $this->headers['statusCode']: 500;\n }", "public function getStatusCode()\n {\n return $this->status;\n }", "public function getStatusCode()\r\n\t{\r\n\t\treturn $this->m_code;\r\n\t}", "public function getStatusCode()\n {\n return $this->status_code;\n }", "public function get_status_code() {\n\n\t\treturn $this->get_status_info()->code;\n\t}", "public function getStatusCode(): int\n {\n return $this->status;\n }", "public function getStatusCode()\n {\n return (int) $this->statusCode;\n }", "public function getHttpStatusCode()\n {\n return $this->statusCode;\n }", "public function getHttpStatusCode()\n {\n return $this->httpStatusCode;\n }", "public function getHttpStatusCode()\n {\n return $this->httpStatusCode;\n }", "public function getStatusCode() {\n\n return $this->result->status_code;\n }", "public function getStatusCode(): int\n {\n return $this->meta['status_code'];\n }", "public function getStatusCode()\n {\n preg_match(\"/(\\d\\d\\d)/\", $this->_status, $matches);\n return isset($matches[1]) ? (int) $matches[1] : 0;\n }", "public function getStatusCode(): int\n {\n return $this->code ;\n }", "public function getStatusCode()\n {\n return static::STATUS_CODE;\n }", "public function getCode()\n\t{\n\t\treturn (int)$this->statusCode;\n\t}", "public function getStatusCode(): int\n {\n return (int) $this->response->getStatusCode();\n }", "public function statusCode()\n {\n return $this->code;\n }", "public function getStatusCode() : int\n {\n return $this->statusCode;\n }", "public function getStatusCode() : int\n {\n return $this->statusCode;\n }", "public function getStatusCode(): int\n {\n return $this->response->getStatusCode();\n }", "public function getStatusCode(): int {\n\t\treturn $this->statusCode;\n\t}", "public function getStatusCode(): int {\n\t\treturn $this->statusCode;\n\t}", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode(): int\r\n {\r\n return $this->_statusCode;\r\n }", "public function getStatusCode()\n {\n return $this->httpStatusCode;\n }", "public function getStatusCode()\n {\n return isset($this->statusCode) ? $this->statusCode : null;\n }", "public function getStatusCode(): int\n {\n return $this->statusCode;\n }", "public function getStatusCode(): int\n {\n return $this->statusCode;\n }", "public function getStatusCode(): int\n {\n return $this->statusCode;\n }", "public function getStatusCode(): int\n {\n return $this->statusCode;\n }", "public function getStatusCode(): int\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n\t{\n\t\treturn $this->statusCode_;\n\t}", "public function getStatusCode()\n {\n return (int) $this->getReturnVal();\n }", "public function getStatusCode(): int\r\n {\r\n // TODO: Implement getStatusCode() method.\r\n return $this->statusCode;\r\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode() {\r\n\t\treturn $this->statusCode;\r\n\t}", "public function getStatusCode() {\n return $this->getResponse()->statuscode;\n }", "protected function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode(): int\n {\n return match ($this->status) {\n ActionResponseStatus::CLIENT_ERROR => 400,\n ActionResponseStatus::CREATED => 201,\n ActionResponseStatus::SUCCESS => 200,\n ActionResponseStatus::DELETED => 204,\n ActionResponseStatus::NOT_FOUND => 404,\n ActionResponseStatus::PERISTENCE_ERROR => 409,\n default => 500,\n };\n }", "public function statusCode()\n {\n return $this->meta['http_code'];\n }", "public function status()\n {\n return (int)$this->response->getStatusCode();\n }", "public function getStatusCode()\n {\n \treturn $this->statusCode;\n }", "public function getHTTPStatusCode() { return $this->status; }", "public function getStatusCode()\n {\n return \\http_response_code();\n }", "public function getStatusCode() {\n return $this->statusCode;\n }", "public function getResponseCode() {\n return $this->client->getHttpStatusCode();\n }", "public function statusCode()\n {\n return Lastus::getStatusCode(static::class, $this->status);\n }", "private function getStatusCode()\n {\n return $this->statusCode;\n }", "public static function getStatusCode(): int;", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getHttpStatusCode()\n {\n return $this->response->getHttpStatusCode();\n }", "public function getStatus(): int\n {\n return $this->statusCode;\n }", "public function getHttpCode()\n {\n return $this->code;\n }", "private function getStatus(Exception $exception)\n {\n if (method_exists($exception, 'getStatusCode')) {\n return $exception->getStatusCode();\n }\n\n return ($exception->getCode() && $exception->getCode() >= 100 && $exception->getCode() <= 522)\n ? $exception->getCode()\n : 500;\n }", "public function getResponseStatusCode()\r\n\t{\r\n\t\treturn (int) $this->statusCode;\r\n\t}", "public function getResponseHTTPCode()\n {\n return $this->httpCode;\n }", "public function getHttpCode()\n {\n return $this->information[ self::INFORMATION_HTTP_CODE ];\n }", "public function getStatusCode()\n {\n return $this->statusCode ?: 200;\n }", "public function getHttpCode()\n {\n return $this->http_code;\n }", "public function code() {\n return $this->info['http_code'];\n }", "public function getStatusCode() {}", "protected function getStatusCode(Exception $exception)\n {\n return $exception instanceof HttpExceptionInterface ? $exception->getStatusCode() : 500;\n }", "public function getHttpCode()\n {\n return $this->httpCode;\n }", "public function getHttpStatus(): int\n {\n\n return http_response_code();\n\n }", "public function getStatusCode(): int;" ]
[ "0.84035456", "0.84027636", "0.8305358", "0.8273803", "0.8260128", "0.82591057", "0.82517266", "0.8251708", "0.8246169", "0.8232071", "0.82084626", "0.8172489", "0.8172489", "0.8169037", "0.81626153", "0.8155708", "0.81375736", "0.8135647", "0.80889076", "0.8085555", "0.80779356", "0.8046861", "0.8046861", "0.8039253", "0.8035441", "0.8035441", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.8029219", "0.80276644", "0.8023852", "0.80103827", "0.8009748", "0.8009748", "0.8009748", "0.8009748", "0.8009748", "0.8006909", "0.80068606", "0.79889", "0.7987408", "0.7973179", "0.7972205", "0.795361", "0.79222155", "0.7888528", "0.78779924", "0.7855227", "0.78343904", "0.7833098", "0.7831722", "0.782828", "0.78221357", "0.78206927", "0.78003067", "0.77925164", "0.7789163", "0.7789163", "0.7789163", "0.7789163", "0.7789163", "0.7789163", "0.7789163", "0.7789163", "0.7789163", "0.7789163", "0.7785103", "0.7750418", "0.77175665", "0.7714828", "0.77047384", "0.76974374", "0.7691752", "0.76833045", "0.76686966", "0.7651684", "0.76403093", "0.76280534", "0.76220423", "0.7609656", "0.7599445" ]
0.0
-1
Construtor do Controlador Basico_OPController_FormularioAssocclElementoAssocclEventoOPController.
protected function __construct() { // chamando construtor da classe pai parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function conf__pantallas_evt(toba_ei_formulario $form)\n\t{\n\t\t$datos = array();\n\t\t//Meto los eventos asociados actuales por si agregaron alguno.\n\t\tforeach ($this->s__pantalla_evt_asoc as $dep) {\n\t\t\t$datos[$dep] = array('evento' => $dep, 'asociar' => 0);\n\t\t}\n\t\t//Busco la asociacion hecha\n\t\t$busqueda = $this->get_entidad()->tabla('eventos_pantalla')->nueva_busqueda();\n\t\t$busqueda->set_padre('pantallas', $this->get_pant_actual());\n\t\t$ids = $busqueda->buscar_ids();\n\t\tforeach ($ids as $id) {\n\t\t\t$id_evt_padre = $this->get_entidad()->tabla('eventos_pantalla')->get_id_padres(array($id), 'eventos');\n\t\t\t$evt_involucrado = $this->get_entidad()->tabla('eventos')->get_fila_columna(current($id_evt_padre), 'identificador');\n\t\t\t$datos[$evt_involucrado] = array('evento' => $evt_involucrado, 'asociar' => 1);\n\t\t}\n\t\t$form->set_datos(array_values($datos));\n\t}", "public function getFkEconomicoElementoAtivCadEconomico()\n {\n return $this->fkEconomicoElementoAtivCadEconomico;\n }", "public function newAssocForm()\n {\n $assocs = $this->assocManager->getAssocs();\n require_once 'vue/new.assoc.view.php';\n }", "public function getFkFolhapagamentoConfiguracaoEventoCaso()\n {\n return $this->fkFolhapagamentoConfiguracaoEventoCaso;\n }", "public function agregaElementoAdicional(Request $request)\n {\n if($request->isMethod('post'))\n {\n $fuente = $request->input('adicionalFuente', \"\");\n $link = $request->input('adicionalLink', \"\");\n $descripcion= $request->input('adicionalDescripcion', \"\");\n $medio = $request->input('adicionalMedio', \"\");\n\n if( !empty($descripcion) && !empty($fuente) && !empty($link) )\n {\n $nuevoElemento = [\n 'subcategoria'=>\"complemento\",\n 'fuente'=>$fuente,\n 'link'=>$link,\n 'descripcion'=>$descripcion,\n 'medio'=>$medio,\n 'evidencia'=>[]\n ];\n try{\n $evento = Resevento::project([\n 'id'=>1,\n 'complemento_digital'=>1\n ])->findOrFail($request->input('evento_id', null));\n\n if(isset($evento->complemento_digital))\n {\n $elementos = array($nuevoElemento);\n foreach($evento->complemento_digital as $item)\n array_push($elementos, $item);\n $evento->complemento_digital = $elementos;\n }else{\n $evento->complemento_digital = array( $nuevoElemento );\n }\n\n if($evento->save())\n {\n return redirect()->route('coordinadorEventoDetalles', [\n 'id'=>$evento->id\n ]);\n }else{\n return view('shared.complete.404')\n ->with('mensaje', 'Evento no actualizado');\n }\n }catch(ModelNotFoundException $e)\n {\n return view('shared.complete.404')\n ->with('mensaje', 'Evento no localizado');\n }\n }else{\n return view('shared.complete.404')\n ->with('mensaje', 'Los datos del elemento adicional son incorrectos');\n }\n }else{\n return view('shared.complete.404')\n ->with('mensaje', 'Metodo no aceptado');\n }\n }", "private function camposObligatorios()\n {\n $this->setRequiredField(\"mascara\");\n $this->setRequiredField(\"etiqueta\");\n/*\n $this->setRequiredField(\"id_padre\");\n*/\n $this->setRequiredField(\"posicion\");\n $this->setRequiredField(\"visible\");\n $this->setRequiredField(\"nivel_acceso\");\n/*\n $this->setRequiredField(\"accion\");\n*/\n\n return;\n }", "public function getFkEconomicoCadastroEconomico()\n {\n return $this->fkEconomicoCadastroEconomico;\n }", "public function setFkEconomicoElementoAtivCadEconomico(\\Urbem\\CoreBundle\\Entity\\Economico\\ElementoAtivCadEconomico $fkEconomicoElementoAtivCadEconomico)\n {\n $this->inscricaoEconomica = $fkEconomicoElementoAtivCadEconomico->getInscricaoEconomica();\n $this->codAtividade = $fkEconomicoElementoAtivCadEconomico->getCodAtividade();\n $this->ocorrenciaAtividade = $fkEconomicoElementoAtivCadEconomico->getOcorrenciaAtividade();\n $this->codElemento = $fkEconomicoElementoAtivCadEconomico->getCodElemento();\n $this->ocorrenciaElemento = $fkEconomicoElementoAtivCadEconomico->getOcorrenciaElemento();\n $this->fkEconomicoElementoAtivCadEconomico = $fkEconomicoElementoAtivCadEconomico;\n return $this;\n }", "function conf__cuadro (toba_ei_cuadro $cuadro){\n if(isset($this->s__where)){\n $cuadro->descolapsar();\n $fecha=date('Y-m-d');\n $anio_lectivo=date('Y');\n $periodos=$this->dep('datos')->tabla('periodo')->get_periodo_calendario($fecha, $anio_lectivo);\n $cuadro->set_datos($this->procesar_periodo($periodos, \"hr\"));\n $cuadro->set_titulo(\"Listado de asignaciones\");\n }\n else{\n $cuadro->colapsar();\n }\n }", "public function getFkEconomicoCadastroEconomicoEmpresaDireito()\n {\n return $this->fkEconomicoCadastroEconomicoEmpresaDireito;\n }", "public function setFkFolhapagamentoConfiguracaoEventoCaso(\\Urbem\\CoreBundle\\Entity\\Folhapagamento\\ConfiguracaoEventoCaso $fkFolhapagamentoConfiguracaoEventoCaso)\n {\n $this->codCaso = $fkFolhapagamentoConfiguracaoEventoCaso->getCodCaso();\n $this->codEvento = $fkFolhapagamentoConfiguracaoEventoCaso->getCodEvento();\n $this->timestamp = $fkFolhapagamentoConfiguracaoEventoCaso->getTimestamp();\n $this->codConfiguracao = $fkFolhapagamentoConfiguracaoEventoCaso->getCodConfiguracao();\n $this->fkFolhapagamentoConfiguracaoEventoCaso = $fkFolhapagamentoConfiguracaoEventoCaso;\n \n return $this;\n }", "public final function definition() {\n $mform = $this->_form;\n $customdata = $this->_customdata;\n $editmode = $customdata['editmode'];\n\t\n $mform->addElement('header', 'typeheading', get_string('editingacoupon', 'enrol_coupon', get_string($this->typestring, 'enrol_coupon')));\n\n $mform->addElement('hidden', 'id');\n $mform->setType('id', PARAM_INT);\n\n $mform->addElement('hidden', 'couponid');\n $mform->setType('couponid', PARAM_INT);\n\n\t\t$mform->addElement('hidden', 'type');\n\t\t$mform->setType('type', PARAM_INT);\n\t\t\n\t\t$mform->addElement('hidden', 'couponaction');\n\t\t$mform->setType('couponaction', PARAM_INT);\n\t\t\n\t\t$mform->addElement('hidden', 'couponvalue');\n\t\t$mform->setType('couponvalue', PARAM_INT);\n\n\t\t$mform->addElement('text', 'name', get_string('couponname', 'enrol_coupon'), array('size'=>70));\n\t\t$mform->setType('name', PARAM_TEXT);\n\t\t$mform->addRule('name', get_string('required'), 'required', null, 'client');\n\t\t\n\t\t$mform->addElement('textarea', 'description', get_string('description'), 'wrap=\"virtual\" rows=\"4\" cols=\"50\"');\n\t\t$mform->setType('description', PARAM_TEXT);\n\t\t\n\t\t\t\n $this->custom_definition();\n \n\n\t\t\n\t\t$mform->addElement('text', 'maxuses', get_string('maxuses', 'enrol_coupon'));\n\t\t$mform->setType('maxuses', PARAM_INT);\n\t\t$mform->setDefault('maxuses', 1);\n\t\t$mform->addRule('maxuses', get_string('required'), 'required', null, 'client');\n\t\t\n $options = array('optional'=>true);\n $mform->addElement('date_selector', 'fromdate',get_string('fromdate','enrol_coupon'), $options);\n $mform->addElement('date_selector', 'todate',get_string('todate','enrol_coupon'), $options);\n\n\t\t$mform->addElement('text', 'duration', get_string('duration', 'enrol_coupon'));\n\t\t$mform->setType('duration', PARAM_INT);\n\t\t$mform->setDefault('duration', 0);\n\t\t$mform->addRule('duration', get_string('required'), 'required', null, 'client');\n\n\n\t\t//add the action buttons\n $this->add_action_buttons(get_string('cancel'), get_string('savecoupon', 'enrol_coupon'));\n\n }", "function form_init_elements() \r\n {\r\n //we want an confirmation page for this form.\r\n //$this->set_confirm();\r\n\r\n //Crea una caja de texto llamada nombre y longitud 50\r\n $elemT = new FEText(\"Asunto\", FALSE, 50);\r\n //$elemT->set_style_attribute('align', 'right');\r\n //Le asignamos el id nombre y la tecla de acceso n (ctrl+n)\r\n $elemT->set_attribute(\"id\",\"asunto\");\r\n $elemT->set_attribute(\"accesskey\",\"n\"); \r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemT);\r\n\t\r\n //Creamos un Area de Texto llamada comentario\r\n $elemTA = new FETextArea(\"Comentario\", FALSE, 10, 60,\"500px\", \"100px\");\r\n $elemTA->set_attribute('wrap', 'physical');\r\n //Le asignamos el id email y la tecla de acceso c (ctrl+c) \r\n $elemTA->set_attribute(\"id\",\"comentario\");\r\n $elemTA->set_attribute(\"accesskey\",\"d\");\r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemTA);\r\n\r\n //Añade un campo oculto llamado id. En ocasiones este campo se utiliza para indicar ciertas operaciones.\r\n //OJO!! es un punto sensible porque el usuario podría cambiar su valor de forma inexperada para el código.\r\n// $this->add_hidden_element(\"id\");\r\n\r\n //Añade un boton con la acción submit\r\n $submit = $this->_formatElem(\"base_SubmitButton\", \"Aceptar\", \"submit\", agt(\"miguel_Enter\"));\r\n //$submit->set_attribute('id',''); \r\n $submit->set_attribute('accesskey','e'); \r\n $this->add_element($submit); \r\n\t\t\t\t\r\n\t\t\t\t$this->add_hidden_element('status');\r\n \t\t$this->set_hidden_element_value('status', 'new');\r\n }", "public function incluirAction () {\n\n // Título da tela (action)\n $this->view->telaTitle = 'Cadastrar Exercício Orçamentário';\n\n // Adiciona o formulário\n $formulario = new $this->_formulario ();\n\n // Define a tabela de negocio Exercicio\n $negocio = new Orcamento_Business_Negocio_Exercicio();\n $negocio->excluiCaches();\n\n // Exibe o formulário\n $this->view->formulario = $formulario;\n\n // Se for post...\n if ($this->getRequest()->isPost()) {\n\n $dados = $this->getRequest()->getPost();\n\n // Se os dados estiverem válidos\n if ($formulario->isValid($dados)) {\n\n // Verifica se o ano exercicio já foi excluido lógicamente\n $registro = $negocio->retornaExercicioExcluido($dados['ANOE_AA_ANO']);\n\n // Verifica se o ano exercicio do mesmo estatus ja existe\n $status = $negocio->retornaAnoExercicioComStatus($dados['ANOE_AA_ANO'], Trf1_Orcamento_Definicoes::FASE_EXERCICIO);\n \n // Verifica se ja existe\n if ($registro) {\n // seta mensagem de erro e redireciona\n $this->erroOperacao(\"Ocorreu um erro ao cadastrar a exercicio. \" . Orcamento_Business_Dados::MSG_REGISTRO_NAO_ENCONTRADO . '<br />');\n $this->voltarIndexAction();\n }\n\n // Faz a inclusão do na tabela de exercicio e fase\n if( $negocio->incluirExercicioFase ( $dados ) ) {\n \n // inclui na tabela de log do orçamento\n $this->_logdados->incluirLog( $dados[\"ANOE_AA_ANO\"] );\n // Exclui o cache do sistema\n $negocio->excluiCaches ();\n \n $this->_helper->flashMessenger ( array ( message => Orcamento_Business_Dados::MSG_SUCESSO_EXERCICIO, 'status' => 'success' ) );\n } else {\n // TODO: A mensagem abaixo deveria ser a Orcamento_Business_Dados::MSG_INCLUIR_ERRO\n $this->erroOperacao(\"Ocorreu um erro ao cadastrar a exercicio. O Exercicio pode ter sido excluido logicamente.\");\n }\n\n // Volta para a index\n $this->voltarIndexAction();\n } else {\n // Reapresenta os dados no formulário para correção do usuário\n $formulario->populate($dados);\n }\n }\n }", "public function getFkEconomicoDiasCadastroEconomicos()\n {\n return $this->fkEconomicoDiasCadastroEconomicos;\n }", "public function definition() {\n \n $mform = $this->_form; // Don't forget the underscore! \n \n $datetimeSettings=array(\n 'startyear' => date('Y')-5, \n 'stopyear' => date('Y')+5,\n 'timezone' => 99,\n 'step' =>1\n );\n $mform->addElement('date_time_selector', 'incident_datetime', \"Incident Date/Time\",$datetimeSettings);\n $mform->addRule('incident_datetime', \"Incident Date/Time is required\", 'required', null, 'server');\n $classificationList=$this->getClassifications(); \n $classifications=$this->formatClassificationArray($classificationList);\n $mform->addElement('select', 'classification_id', \"Classification\",$classifications);\n $mform->addRule('classification_id', \"Classification is required\", 'required', null, 'server');\n $mform->addElement('textarea', 'description', \"Description\", 'wrap=\"virtual\" rows=\"10\" cols=\"80\"'); \n $mform->addRule('description', \"Description is required\", 'required', null, 'server');\n $mform->addElement('hidden','id','Incident ID');\n $mform->setType('id',PARAM_INT);\n $mform->addElement('html', '<div><strong>NOTE: Clicking Continue will create this incident prior to assignment to a certification.</strong></div><br>');\n $this->add_action_buttons(true,'Continue');\n }", "function getDatosEpoca()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'epoca'));\n $oDatosCampo->setEtiqueta(_(\"época\"));\n return $oDatosCampo;\n }", "public function __construct(array $medico = null, array $cuarto = null)\n {\n parent::__construct('AdmisionForm');\n $this->setAttribute('method', 'post');\n\n // medicos\n $this->add(array(\n 'name' => 'idmedico',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Medicos',\n 'empty_option' => 'Seleccione un medico',\n 'value_options' => $medico,\n ),\n 'attributes' => array(\n 'id' => 'idmedicoadmision'\n )\n ));\n // cuarto\n $this->add(array(\n 'name' => 'idcuarto',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Cuarto',\n 'empty_option' => 'Seleccione un cuarto',\n 'value_options' => $cuarto,\n ),\n 'attributes' => array(\n 'id' => 'idcuarto'\n )\n ));\n // paciente\n $this->add(array(\n 'name' => 'idpaciente',\n 'type' => 'Text',\n 'attributes' => array(\n 'id' => 'idpacienteadmision'\n )\n ));\n\n $this->add(array(\n 'name' => 'admision_fechaadmision',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Fecha de admisión',\n ),\n 'attributes' => array(\n 'id' => 'admision_fechaadmision'\n )\n ));\n $this->add(array(\n 'name' => 'admision_fechasalida',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Fecha de salida',\n ),\n 'attributes' => array(\n 'id' => 'admision_fechasalida'\n )\n ));\n $this->add(array(\n 'name' => 'admision_diagnostico',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Diagnostico',\n ),\n 'attributes' => array(\n 'id' => 'admision_diagnostico'\n )\n ));\n $this->add(array(\n 'name' => 'admision_observaciones',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Observaciones',\n ),\n 'attributes' => array(\n 'id' => 'admision_observaciones'\n )\n ));\n $this->add(array(\n 'name' => 'admision_status',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Status',\n 'empty_option' => 'Seleccione su estado civil',\n 'value_options' => array('pagada' => 'pagada','no pagada' => 'no pagada','pendiente' => 'pendiente'),\n ),\n 'attributes' => array(\n 'id' => 'admision_status'\n )\n ));\n $this->add(array(\n 'name' => 'admision_total',\n 'required' => true,\n 'validators' => array(\n array(\n 'name' => 'Float',\n 'options' => array(\n 'min' => 0,\n 'locale' => 'es_MX',\n ),\n ),\n ),\n 'options' => array(\n 'label' => 'Admisión Total'\n ),\n 'attributes' => array(\n 'id' => 'admision_total'\n )\n ));\n $this->add(array(\n 'name' => 'admision_pagadaen',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Pagada en',\n ),\n 'attributes' => array(\n 'id' => 'admision_pagadaen'\n )\n ));\n $this->add(array(\n 'name' => 'admision_tipodepago',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Tipo de pago',\n 'empty_option' => 'Seleccione tipo de pago',\n 'value_options' => array('efectivo', 'tarjeta debito','tarjeta credito','cheque','no identificado'),\n ),\n 'attributes' => array(\n 'id' => 'admision_tipodepago'\n )\n ));\n $this->add(array(\n 'name' => 'admision_referenciapago',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Referencia de pago (4 últimos dígitos)',\n ),\n 'attributes' => array(\n 'id' => 'admision_referenciapago'\n )\n ));\n $this->add(array(\n 'name' => 'admision_facturada',\n 'type' => 'Text',\n 'options' => array(\n 'label' => '¿Facturada?',\n ),\n 'attributes' => array(\n 'id' => 'admision_facturada'\n )\n ));\n $this->add(array(\n 'name' => 'admision_registrada',\n 'type' => 'Text',\n 'options' => array(\n 'label' => '¿Registrada?',\n ),\n 'attributes' => array(\n 'id' => 'admision_registrada'\n )\n ));\n }", "public function __construct()\n {\n parent::__construct();\n\n // creates the form\n $this->form = new BootstrapFormBuilder(self::$formName);\n\n // define the form title\n $this->form->setFormTitle('Avaliações');\n\n $inscricao_evento_id = new TDBUniqueSearch('inscricao_evento_id', 'eventtus', 'Evento', 'id', 'id','nome asc' );\n\n $inscricao_evento_id->setSize('100%');\n $inscricao_evento_id->setMinLength(0);\n $inscricao_evento_id->setMask('{nome}');\n\n $row1 = $this->form->addFields([new TLabel('Evento', null, '14px', null),$inscricao_evento_id]);\n $row1->layout = ['col-sm-6'];\n\n // keep the form filled during navigation with session data\n $this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );\n\n $btn_ongenerate = $this->form->addAction('Gerar', new TAction([$this, 'onGenerate']), 'fa:search #ffffff');\n $btn_ongenerate->addStyleClass('btn-primary'); \n\n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 100%';\n $container->add(TBreadCrumb::create(['Cadastros','Avaliações']));\n $container->add($this->form);\n\n parent::add($container);\n\n }", "public function init()\r\n {\r\n \t\r\n \r\n \tif(!isset($this->_PROJETOS)){\r\n \t\t$projeto= new Application_Model_DbTable_Projeto();\r\n \t\t$this->_PROJETOS=$projeto->getProjetoCombo() ;\r\n \t} \t\r\n \t$this->setName('FormularioServico');\r\n $FL_VALIDAR_SERVICO= new Zend_Form_Element_Hidden('FL_VALIDAR_SERVICO');\r\n $FL_VALIDAR_SERVICO->addFilter('Int');\r\n $FL_VALIDAR_SERVICO->removeDecorator('Label');\r\n \r\n $ID_SERVICO = new Zend_Form_Element_Hidden('ID_SERVICO');\r\n $ID_SERVICO->addFilter('Int');\r\n $ID_SERVICO->removeDecorator('Label');\r\n \r\n \r\n $FK_OPERADOR = new Zend_Form_Element_Hidden('FK_OPERADOR');\r\n $FK_OPERADOR->addFilter('Int');\r\n $FK_OPERADOR->removeDecorator('Label');\r\n \r\n $FL_PCP = new Zend_Form_Element_Hidden('FL_PCP');\r\n $FL_PCP->addFilter('Int');\r\n $FL_PCP->removeDecorator('Label');\r\n \r\n /* \r\n \r\n \r\n \r\n \r\n \r\n \r\n */\r\n\r\n $FK_TIPO_SERVICO= new Zend_Form_Element_Select('FK_TIPO_SERVICO');\r\n $tipoServico= new Application_Model_DbTable_TipoServico();\r\n $FK_TIPO_SERVICO->setLabel('TIPO PCP');\r\n $FK_TIPO_SERVICO->setMultiOptions( $tipoServico->getTipoServicoCombo() )\r\n ->setRequired(true)\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control select2');\r\n \r\n\t\t\r\n \r\n $FK_PROJETO= new Zend_Form_Element_Hidden('FK_PROJETO');\r\n $FK_PROJETO->addFilter('Int');\r\n $FK_PROJETO->removeDecorator('Label');\r\n \r\n $FK_PROJETO1 = new Zend_Form_Element_Text('FK_PROJETO1');\r\n $FK_PROJETO1->setLabel('PROJETO')\r\n ->setAttrib('class', 'form-control');\r\n\r\n \r\n $DS_SERVICO = new Zend_Form_Element_Textarea('DS_SERVICO');\r\n $DS_SERVICO->setLabel('PCP')\r\n \t\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control ')\r\n \t ->setAttrib('rows', '20');\r\n \r\n $DT_SERVICO = new Zend_Form_Element_Text('DT_SERVICO');\r\n $DT_SERVICO->setLabel('DATA')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control')\r\n ->addPrefixPath('Aplicacao_Validate', 'Aplicacao/Validate/', 'validate')\r\n\t\t\t->addValidator(new Aplicacao_Validate_Data())\r\n ->setAttrib('placeholder', 'Enter serviço ');\r\n \r\n $NR_CARGA_HORARIA = new Zend_Form_Element_Text('NR_CARGA_HORARIA');\r\n $NR_CARGA_HORARIA->setLabel('CARGA HORARIA')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->addValidator('float', true, array('locale' => 'en_US'))\r\n ->setAttrib('class', 'form-control')\r\n ->setAttrib('placeholder', 'Enter carga horária ');\r\n \r\n \r\n \r\n $submit = new Zend_Form_Element_Submit('submit');\r\n $submit->setLabel(\"Adiconar\");\r\n $submit->setAttrib('id', 'submitbutton');\r\n $submit->removeDecorator('DtDdWrapper')\r\n ->setAttrib('class', 'btn btn-primary button')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label'); \r\n \r\n $this->addElements(array($FK_PROJETO1,$FL_VALIDAR_SERVICO,$ID_SERVICO,$FK_PROJETO,$DS_SERVICO,$FK_OPERADOR,$FK_TIPO_SERVICO,$DT_SERVICO,$FL_PCP,$NR_CARGA_HORARIA,$submit)); \r\n $this->setDecorators( array( array('ViewScript', array('viewScript' => '/forms/formularioPcpProjeto.phtml')))); \r\n\t\r\n }", "private function getCodigoPresupuestarioActividadEconomica()\r\n\t\t{\r\n\t\t\t$codigoPresupuesto['codigo'] = '301020700';\r\n\t\t\treturn $codigo = self::getCodigoPresupuestarioByCodigo($codigoPresupuesto['codigo']);\r\n\t\t}", "protected function createComponentObecForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\r\n\t\t$form->addText('nazev', 'Název:')\r\n\t\t\t->setRequired('Uveďte název.');\r\n\r\n\t\t$form->addText('psc', 'PSČ:')\r\n\t\t\t->setRequired('Uveďte PSČ.');\r\n\t\t\r\n\t\t$form->addSubmit('save', 'Uložit')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno')->setValidationScope(FALSE);\r\n\t\t$form->onSuccess[] = callback($this, 'obecFormSubmitted');\r\n\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "protected function doEdicaoPeridoAcesso() {\r\n\t\t$editar = intval($this->system->input['editar']);\r\n\t\tif ($editar) {\t\t\t\r\n\t\t\t$erro_msg = $this->validarPeriodoAcesso();\r\n\t\t\t\r\n\t\t\tif ($erro_msg) {\r\n\t\t\t\t$this->system->view->assign('msg_alert', $erro_msg['msg']);\r\n\t\t\t\t$this->system->view->assign('periodo', $this->system->input);\r\n\t\t\t}else{\r\n\t\t\t\t$this->system->configuracoesgerais->atualizarPeriodoAcesso($this->system->input);\r\n\t\t\t\t$this->system->view->assign('msg_alert', 'Período de Acesso atualizado com sucesso!');\t\t\t\t\r\n\t\t\t\t$this->system->view->assign('periodo', $this->system->input);\r\n\t\t\t}\r\n\t\t} \t\t\r\n\t\t$this->system->view->assign('periodo',$this->system->configuracoesgerais->getPeriodoAcesso());\r\n\t\t\r\n\t\t$this->system->admin->topo(13);\r\n\t\t$this->system->view->display('administrador-geral/configuracoes_perido_acesso.tpl');\r\n\t\t$this->system->admin->rodape();\t\t\r\n\t}", "function evt__cuadro_puntajes__aplicar()\n\t{\n //a los que se desea aplicar el puntaje elegido \n $hab = $this->controlador()->get_habilitacion();\n $rel = $this->controlador()->get_relacion_evaluacion();\n \n foreach ($this->s__seleccion_puntajes as $elegido) {\n $fh = $elegido['formulario_habilitado'];\n $conc = ($elegido['concepto'] != '-1') ? $elegido['concepto'] : null;\n $t_elto = ($elegido['tipo_elemento'] != '-1') ? $elegido['tipo_elemento'] : null; \n \n //se debe averiguar primero todos los formulario_habilitado_detalle que correspoden\n //a formulario_habilitado+concepto+tipo_elemento indicados\n $res = $this->get_formularios_detalle($hab, $fh, $conc, $this->s__encuesta, $t_elto);\n foreach ($res as $fhd) {\n $fila['formulario_habilitado'] = $fh;\n $fila['formulario_habilitado_detalle'] = $fhd['formulario_habilitado_detalle'];\n $fila['puntaje'] = $this->s__nuevo_puntaje;\n $this->upsert_puntaje_aplicacion($fh, $fhd['formulario_habilitado_detalle'], $this->s__nuevo_puntaje);\n }\n }\n $rel->sincronizar();\n\t}", "public function getAcroForm() {}", "public function getAcroForm() {}", "public function __construct($name = null) {\n parent::__construct('Events');\n $this->setAttribute('method', 'post');\n \t\n\t\t$this->add(array(\n 'name' => 'id',\n 'type' => 'Hidden',\n ));\n\n $this->add(array(\n 'name' => 'event_name',\n 'attributes' => array(\n 'type' => 'text',\n 'class' => 'form-control',\n 'id'=>'event_name'\n ),\n 'options' => array(\n 'label' => 'Event Title',\n ),\n ));\n\n $this->add(array(\n 'name' => 'sponser_name',\n 'attributes' => array(\n 'type' => 'text',\n 'class' => 'form-control',\n 'id'=>'sponser_name'\n ),\n 'options' => array(\n 'label' => 'Sponser Name',\n ),\n ));\n\n $this->add(array(\n 'name' => 'sponser_contact',\n 'attributes' => array(\n 'type' => 'number',\n 'class' => 'form-control',\n 'id'=>'sponser_contact'\n ),\n 'options' => array(\n 'label' => 'Sponser Contact',\n ),\n ));\n\n $this->add(array(\n 'name' => 'event_organiser',\n 'attributes' => array(\n 'type' => 'text',\n 'class' => 'form-control',\n 'id'=>'event_organiser'\n ),\n 'options' => array(\n 'label' => 'Organiser Name',\n ),\n ));\n\n $this->add(array(\n 'name' => 'organiser_contact',\n 'attributes' => array(\n 'type' => 'number',\n 'class' => 'form-control',\n 'id'=>'organiser_contact'\n ),\n 'options' => array(\n 'label' => 'Organiser Contact',\n ),\n ));\n\n\n $this->add(array(\n 'name' => 'sponser_photo',\n 'attributes' => array(\n 'type' => 'file',\n 'class' => 'thisnot',\n 'id'=>'sponser_photo'\n ),\n 'options' => array(\n 'label' => 'Sponser Photo',\n ),\n ));\n\n $this->add(array(\n 'name' => 'organiser_photo',\n 'attributes' => array(\n 'type' => 'file',\n 'class' => 'thisnot',\n 'id'=>'organiser_photo'\n ),\n 'options' => array(\n 'label' => 'Organiser Photo',\n ),\n ));\n\n $this->add(array(\n 'type' => 'Hidden',\n 'name' => 'event_desc',\n 'attributes' => array(\n 'class' => 'form-control',\n 'id'=>'event_desc'\n ),\n 'options' => array(\n 'label' => 'Event Description',\n )\n ));\n\n $this->add(array(\n 'name' => 'image',\n 'attributes' => array(\n 'type' => 'file',\n 'class' => 'form-control',\n 'id'=>'image'\n ),\n 'options' => array(\n 'label' => 'Upload Event Image',\n ),\n ));\n\n \n $this->add(array(\n 'type' => 'Zend\\Form\\Element\\Select',\n 'name' => 'country_id',\n 'attributes' => array(\n 'class' => 'form-control',\n 'id'=>'country_id'\n ),\n 'options' => array(\n 'label' => 'Country Name',\n 'empty_option' => 'Please Select Country Name',\n 'value_options' => self::$country_nameList,\n )\n ));\n\n $this->add(array(\n 'type' => 'Zend\\Form\\Element\\Select',\n 'name' => 'state_id',\n 'attributes' => array(\n 'class' => 'form-control',\n 'id'=>'state_id'\n ),\n 'options' => array(\n 'label' => 'State Name',\n 'empty_option' => 'Please Select State Name',\n 'value_options' => self::$state_nameList,\n )\n ));\n\n $this->add(array(\n 'type' => 'Zend\\Form\\Element\\Select',\n 'name' => 'city_id',\n 'attributes' => array(\n 'class' => 'form-control',\n 'id'=>'city_id'\n ),\n 'options' => array(\n 'label' => 'City Name',\n 'empty_option' => 'Please Select City Name',\n 'value_options' => self::$city_nameList,\n )\n ));\n\n\n $this->add(array(\n 'name' => 'venue',\n 'attributes' => array(\n 'type' => 'textarea',\n 'class' => 'form-control',\n 'id'=>'venue'\n ),\n 'options' => array(\n 'label' => 'venue',\n ),\n ));\n\n $this->add(array(\n 'name' => 'event_date',\n 'attributes' => array(\n 'type' => 'text',\n 'class' => 'form-control',\n 'id'=>'event_date'\n ),\n 'options' => array(\n 'label' => 'Start Date',\n ),\n ));\n\n $this->add(array(\n 'name' => 'end_date',\n 'attributes' => array(\n 'type' => 'text',\n 'class' => 'form-control',\n 'id'=>'end_date'\n ),\n 'options' => array(\n 'label' => 'End Date',\n ),\n ));\n\n $this->add(array(\n 'name' => 'start_time',\n 'attributes' => array(\n 'type' => 'time',\n 'class' => 'form-control timepicker',\n 'id'=>'start_time'\n ),\n 'options' => array(\n 'label' => 'Start Time',\n ),\n ));\n\n $this->add(array(\n 'name' => 'end_time',\n 'attributes' => array(\n 'type' => 'time',\n 'class' => 'form-control timepicker',\n 'id'=>'end_time'\n ),\n 'options' => array(\n 'label' => 'End Time',\n ),\n ));\n\n\n $this->add(array(\n 'name' => 'event_cost',\n 'attributes' => array(\n 'type' => 'number',\n 'class' => 'form-control',\n 'id'=>'event_cost'\n ),\n 'options' => array(\n 'label' => 'Event Cost',\n ),\n ));\n $this->add(array(\n 'name' => 'event_members',\n 'attributes' => array(\n 'type' => 'number',\n 'class' => 'form-control',\n 'id'=>'event_members'\n ),\n 'options' => array(\n 'label' => 'Event Members',\n ),\n ));\n\n $this->add(array(\n 'type' => 'Zend\\Form\\Element\\Select',\n 'name' => 'IsActive',\n 'attributes' => array(\n 'class' => 'form-control',\n 'id'=>'IsActive'\n ),\n 'options' => array(\n 'label' => 'Status',\n 'empty_option' => 'Please Select Status',\n 'value_options' => array(\n '1'=>'Active',\n '0'=>'In Active'),\n )\n ));\n\n\t\t$this->add(array(\n 'name' => 'submit',\n 'attributes' => array(\n 'type' => 'submit',\n 'value' => 'Contact Us',\n 'id' => 'submit',\n 'class' => 'btn btn-default'\n ),\n )); \n \n }", "public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)\n\t{\n\t\t$keys = C060InventarioPeer::getFieldNames($keyType);\n\n\t\tif (array_key_exists($keys[0], $arr)) $this->setCoEquipo($arr[$keys[0]]);\n\t\tif (array_key_exists($keys[1], $arr)) $this->setCoRegion($arr[$keys[1]]);\n\t\tif (array_key_exists($keys[2], $arr)) $this->setCoNegocio($arr[$keys[2]]);\n\t\tif (array_key_exists($keys[3], $arr)) $this->setCoDivision($arr[$keys[3]]);\n\t\tif (array_key_exists($keys[4], $arr)) $this->setCoTipo($arr[$keys[4]]);\n\t\tif (array_key_exists($keys[5], $arr)) $this->setCoCustodio($arr[$keys[5]]);\n\t\tif (array_key_exists($keys[6], $arr)) $this->setTxEtiquetaSti($arr[$keys[6]]);\n\t\tif (array_key_exists($keys[7], $arr)) $this->setCoEstado($arr[$keys[7]]);\n\t\tif (array_key_exists($keys[8], $arr)) $this->setTxNombreEquipo($arr[$keys[8]]);\n\t\tif (array_key_exists($keys[9], $arr)) $this->setTxFunsionEquipo($arr[$keys[9]]);\n\t\tif (array_key_exists($keys[10], $arr)) $this->setCoSo($arr[$keys[10]]);\n\t\tif (array_key_exists($keys[11], $arr)) $this->setTxEtiquetaActivo($arr[$keys[11]]);\n\t\tif (array_key_exists($keys[12], $arr)) $this->setTxSerialHardware($arr[$keys[12]]);\n\t\tif (array_key_exists($keys[13], $arr)) $this->setTxMarcaHardware($arr[$keys[13]]);\n\t\tif (array_key_exists($keys[14], $arr)) $this->setTxModeloHardware($arr[$keys[14]]);\n\t\tif (array_key_exists($keys[15], $arr)) $this->setCoCiudad($arr[$keys[15]]);\n\t\tif (array_key_exists($keys[16], $arr)) $this->setCoEdificio($arr[$keys[16]]);\n\t\tif (array_key_exists($keys[17], $arr)) $this->setTxDireccionUbicacion($arr[$keys[17]]);\n\t\tif (array_key_exists($keys[18], $arr)) $this->setTxDetalleUbicacion($arr[$keys[18]]);\n\t\tif (array_key_exists($keys[19], $arr)) $this->setCoCentroDato($arr[$keys[19]]);\n\t\tif (array_key_exists($keys[20], $arr)) $this->setCoRack($arr[$keys[20]]);\n\t\tif (array_key_exists($keys[21], $arr)) $this->setTxUbicacionLlave($arr[$keys[21]]);\n\t\tif (array_key_exists($keys[22], $arr)) $this->setInRespaldoAutomatizado($arr[$keys[22]]);\n\t\tif (array_key_exists($keys[23], $arr)) $this->setInBloqueoInactividad($arr[$keys[23]]);\n\t\tif (array_key_exists($keys[24], $arr)) $this->setInAdiministradoresPersonalizados($arr[$keys[24]]);\n\t\tif (array_key_exists($keys[25], $arr)) $this->setInPoliticaPassword($arr[$keys[25]]);\n\t\tif (array_key_exists($keys[26], $arr)) $this->setInSincronizacionReloj($arr[$keys[26]]);\n\t\tif (array_key_exists($keys[27], $arr)) $this->setInMonitoreado($arr[$keys[27]]);\n\t\tif (array_key_exists($keys[28], $arr)) $this->setInInfActualizada($arr[$keys[28]]);\n\t\tif (array_key_exists($keys[29], $arr)) $this->setInLogActivo($arr[$keys[29]]);\n\t\tif (array_key_exists($keys[30], $arr)) $this->setCoNivelCriticidad($arr[$keys[30]]);\n\t\tif (array_key_exists($keys[31], $arr)) $this->setTxObservaciones($arr[$keys[31]]);\n\t\tif (array_key_exists($keys[32], $arr)) $this->setTxRutaRespaldoConfiguraciones($arr[$keys[32]]);\n\t\tif (array_key_exists($keys[33], $arr)) $this->setCoNumInventario($arr[$keys[33]]);\n\t}", "function __construct()\n {\n parent::__construct();\n\n $usuario_logado = TSession::getValue('login');\n \n // creates the form\n $this->form = new BootstrapFormBuilder('form_Equipe');\n $this->form->setFormTitle('Inscrição');\n \n // master fields\n $id = new TEntry('id');\n $nome = new TEntry('nome');\n $ref_campeonato = new TDBCombo('ref_campeonato', 'futapp', 'Campeonato', 'id', '{nome}','id asc' );\n $ref_categoria = new TCombo('ref_categoria');\n $escudo = new TFile('escudo');\n $usuario = new THidden('usuario');\n \n // detail fields\n $id_atleta = new THidden('id_atleta');\n $nome_atleta = new TEntry('nome_atleta');\n $cpf = new TEntry('cpf');\n\n if(TSession::getValue('login') == 'J30EVENTOS' || TSession::getValue('login') == 'admin' || TSession::getValue('login') == 'Roni')\n {\n $ja_jogou = new TCombo('ja_jogou');\n\n $ja_jogou->addItems( [ 't' => 'Sim', 'f' => 'Não' ] ); \n $label_ja = new TLabel('Já Jogou ?'); \n }\n else\n {\n $ja_jogou = new THidden('ja_jogou');\n $label_ja = new TLabel(' ');\n }\n\n\n $ref_campeonato->setChangeAction(new TAction([$this,'onMudaCampeonato']));\n $usuario->setValue($usuario_logado);\n\n $ref_campeonato->setEditable(false);\n \n // adjust field properties\n $id->setEditable(false);\n $id_atleta->setEditable(false);\n $nome->setSize('100%');\n $nome_atleta->setSize('100%');\n $cpf->setSize('100%');\n $cpf->setMask('99999999999');\n\n // allow just these extensions\n $escudo->setAllowedExtensions( ['png', 'jpg', 'jpeg'] );\n \n // enable progress bar, preview, and file remove actions\n $escudo->enableFileHandling();\n \n // add validations\n $nome->addValidation('Nome', new TRequiredValidator);\n \n // add master form fields\n $this->form->addFields( [new TLabel('ID')], [$id]);\n $this->form->addFields( [new TLabel('Nome da Equipe')], [$nome ] );\n $this->form->addFields( [new TLabel('Campeonato')], [$ref_campeonato ] );\n $this->form->addFields( [new TLabel('Categoria')], [$ref_categoria ] );\n $this->form->addFields( [new TLabel('Escudo')], [$escudo] );\n $this->form->addFields( [new TLabel('')], [$usuario] );\n \n \n $add_atleta = TButton::create('add_atleta', [$this, 'onProductAdd'], 'Adicionar', 'fa:save');\n \n $Label_id = new TLabel('');\n $Label_nome = new TLabel('Nome Completo (*)');\n $label_cpf = new TLabel('CPF (*)');\n\n $Label_nome->setFontColor('#FF0000');\n $label_cpf->setFontColor('#FF0000');\n \n $this->form->addContent( ['<h4>Atletas</h4><hr>'] );\n $this->form->addContent( ['Digite o Nome e CPF do atleta e clique em ADICIONAR para inserir o atleta na equipe.'] );\n $this->form->addContent( ['Para editar os dados do atleta clique no icone do lapis azul.'] );\n $this->form->addContent( ['Para remover o atleta clique no icone da lixeira vermelha.'] );\n $this->form->addFields( [$Label_id], [$id_atleta]);\n $this->form->addFields( [$Label_nome], [$nome_atleta]);\n $this->form->addFields( [$label_cpf], [$cpf]);\n $this->form->addFields( [$label_ja], [$ja_jogou]);\n $this->form->addFields( [], [$add_atleta] )->style = 'background: whitesmoke; padding: 5px; margin: 1px;';\n \n $this->product_list = new BootstrapDatagridWrapper(new TDataGrid);\n $this->product_list->setId('products_list');\n $this->product_list->style = \"min-width: 700px; width:100%;margin-bottom: 10px\";\n \n $col_id = new TDataGridColumn( 'id_atleta', 'ID', 'left', '10%');\n $col_nome = new TDataGridColumn( 'nome_atleta', 'Nome', 'left', '45%');\n $col_cpf = new TDataGridColumn( 'cpf', 'CPF', 'left', '45%');\n $col_jogou = new TDataGridColumn( 'ja_jogou', 'Já Jogou?', 'left', '45%');\n \n $this->product_list->addColumn($col_id);\n $this->product_list->addColumn($col_nome);\n $this->product_list->addColumn($col_cpf);\n $this->product_list->addColumn($col_jogou);\n\n $col_jogou->setTransformer( function($ja_jogou) \n {\n if ($ja_jogou == 't') \n {\n return 'Sim';\n }\n else\n {\n return 'Não';\n }\n });\n \n // creates two datagrid actions\n $action1 = new TDataGridAction([$this, 'onEditItemProduto']);\n $action1->setLabel('Editar');\n $action1->setImage('fa:edit blue');\n $action1->setField('id_atleta');\n $action1->setField('nome_atleta');\n $action1->setField('cpf');\n $action1->setField('ja_jogou');\n \n $action2 = new TDataGridAction([$this, 'onDeleteItem']);\n $action2->setLabel('Excluir');\n $action2->setImage('fa:trash red');\n $action2->setField('id_atleta');\n // $action2->setField('nome_atleta');\n // $action2->setField('cpf');\n \n // add the actions to the datagrid\n $this->product_list->addAction($action1);\n $this->product_list->addAction($action2);\n \n $this->product_list->createModel();\n \n $panel = new TPanelGroup;\n $panel->add($this->product_list);\n $panel->getBody()->style = 'overflow-x:auto';\n $this->form->addContent( [$panel] );\n \n $this->form->addAction( 'Salvar', new TAction([$this, 'onSave']), 'fa:save green');\n // $this->form->addAction( 'Clear', new TAction([$this, 'onClear']), 'fa:eraser red');\n \n // create the page container\n $container = new TVBox;\n $container->style = 'width: 100%';\n // $container->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $container->add($this->form);\n parent::add($container);\n }", "public function definition() {\n\t\t\tglobal $CFG, $DB;\t\n\t\t\n\t\t$mform = $this->_form; // Don't forget the underscore!\n\t\n\t\t$result= $DB->get_records_sql(\"SELECT DISTINCT `intensidad` FROM `mdl_ejercicios`\");\n\t\t$result_tren= $DB->get_records_sql(\"SELECT DISTINCT `categoria` FROM `mdl_ejercicios`\");\n\t\t$options= array();\n\t\tforeach($result as $rs)\n\t\t\t\t$options[$rs->intensidad] = $rs->intensidad;\n\t\t\n\t\t$options_tren= array();\n\t\tforeach ($result_tren as $rst)\n\t\t\t$options_tren[$rst->categoria]= $rst->categoria;\n\t\t$mform->addElement('header', 'header', 'Para crear una rutina aleatoria');\n\t\t\n\t\t$mform->addElement('select', 'intensidad', '¿Qué intensidad quieres?:',$options);\n\n\t\t//$mform->addElement('select', 'categoria', '¿Qué tren de tu cuerpo quieres trabajar?:',$options_tren);\n\t\t\n\t\t\n\t\t$buttonarray=array();\n\t\t$buttonarray[] = &$mform->createElement('submit', 'submitbutton', 'Buscar rutina');\n\t\t$buttonarray[] = &$mform->createElement('reset', 'resetbutton', 'Resetear');\n\t\t$buttonarray[] = &$mform->createElement('cancel', 'cancel', 'Cancelar');\n\t\t$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);\n\t\t$mform->addElement('hidden', 'end');\n\t\t$mform->setType('end', PARAM_NOTAGS);\n\t\t$mform->closeHeaderBefore('end');\n\t}", "function evt_cfg_menu_elem($evt_tmp, $agenda_tmp, $jour_ymd_select)\r\n{\r\n\t////\tINIT\r\n\tglobal $trad, $objet;\r\n\tif(!isset($evt_tmp[\"droit_acces\"]))\t\t$evt_tmp[\"droit_acces\"] = droit_acces($objet[\"evenement\"],$evt_tmp,false);\r\n\t$cfg_menu_elem = array(\"objet\"=>$objet[\"evenement\"], \"objet_infos\"=>$evt_tmp, \"taille_icone\"=>\"small\");\r\n\r\n\t////\tMODIF\r\n\tif($evt_tmp[\"droit_acces\"] > 1)\t\t$cfg_menu_elem[\"modif\"] = \"evenement_edit.php?id_evenement=\".$evt_tmp[\"id_evenement\"].\"&id_agenda=\".$agenda_tmp[\"id_agenda\"];\r\n\t////\tSUPPRESSION\r\n\tif($evt_tmp[\"droit_acces\"]==3 || $agenda_tmp[\"droit\"]>=2)\r\n\t{\r\n\t\t////\tSuppression ds l'agenda courant\r\n\t\t$cfg_menu_elem[\"suppr\"] = \"index.php?action=suppr_evt&id_evenement=\".$evt_tmp[\"id_evenement\"].\"&id_agenda=\".$agenda_tmp[\"id_agenda\"];\r\n\t\t$cfg_menu_elem[\"suppr_text_confirm\"] = $trad[\"AGENDA_confirm_suppr_evt\"];\r\n\t\t////\tSuppressions ds les agendas, pour le proprio de l'evt\r\n\t\tif($evt_tmp[\"droit_acces\"]==3)\r\n\t\t{\r\n\t\t\t// Périodicité : supprime à une date précise\r\n\t\t\tif($evt_tmp[\"periodicite_type\"]!=\"\")\t$cfg_menu_elem[\"options_divers\"][] = array(\"action_js\"=>\"confirmer('\".addslashes($trad[\"AGENDA_confirm_suppr_evt_date\"]).\"','index.php?action=suppr_evt&id_evenement=\".$evt_tmp[\"id_evenement\"].\"&id_agenda=tous&date_suppr=\".$jour_ymd_select.\"');\", \"icone_src\"=>PATH_TPL.\"divers/supprimer.png\", \"text\"=>$trad[\"AGENDA_supprimer_evt_date\"]);\r\n\t\t\t// Supprime pour tous les agendas ou il est affecté (s'il y en a plusieurs)\r\n\t\t\tif(db_valeur(\"SELECT count(*) FROM gt_agenda_jointure_evenement WHERE id_evenement='\".$evt_tmp[\"id_evenement\"].\"'\")>1){\r\n\t\t\t\t$cfg_menu_elem[\"options_divers\"][] = array(\"action_js\"=>\"confirmer('\".addslashes($trad[\"AGENDA_confirm_suppr_evt_tout\"]).\"','index.php?action=suppr_evt&id_evenement=\".$evt_tmp[\"id_evenement\"].\"&id_agenda=tous');\", \"icone_src\"=>PATH_TPL.\"divers/supprimer.png\", \"text\"=>$trad[\"AGENDA_supprimer_evt_agendas\"]);\r\n\t\t\t\t$cfg_menu_elem[\"suppr_text\"] = $trad[\"AGENDA_supprimer_evt_agenda\"];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t////\tVISIBILITE SPECIFIQUE & RETOUR\r\n\t$cfg_menu_elem[\"visibilite_specifique\"] = txt_affections_evt($evt_tmp);\r\n\treturn $cfg_menu_elem;\r\n}", "public function actionAcervo($id)\n{\n\t\t$Criteria = new CDbCriteria();\n\t\t//$Criteria->select = \"idacervo, tipoacervo, clasificacion, pie_imprenta, descripcion_fisica, issn, dificultad, fecha_ingreso, notas, catalogador, estatus\";\n\t\t$Criteria->condition = \"idacervo=\".$id;\n\t\t$inventario= Inventario::model()->find($Criteria);\n\t\t\n\t\t//$model = new InventarioForm;\n\t\tif(isset($_POST['Inventario']))\n\t\t{\n\t\t\t\n\t\t\t//$inventario->attributes=$_POST['Inventario'];\n\t\t\t//Obtener el id inventario más alto\n\t\t\t$Criteria = new CDbCriteria();\t\t\t\t\t\t\t\t\n\t\t\t$Criteria -> limit = 1;\n\t\t\t$Criteria -> order = \"idacervo DESC\";\t\n\t\t\t$inventario = Inventario::model()->find($Criteria);\t\t\t\n\n\t\t\t$numInventario = $inventario->idacervo +1;\n\t\t\t$inventario->idacervo = $numInventario;\n\t\t\t$inventario->idacervo_anterior = $id;\n\t\t\t$inventario->tipoacervo = 1;\n\t\t\t$inventario->clasificacion = $_POST['Inventario']['clasificacion'];\n\t\t\t$inventario->pie_imprenta = $_POST['Inventario']['pie_imprenta'];\n\t\t\t$inventario->descripcion_fisica = $_POST['Inventario']['descripcion_fisica'];\n\t\t\t$inventario->issn = $_POST['Inventario']['issn'];\n\t\t\t$inventario->dificultad = $_POST['Inventario']['dificultad'];\n\t\t\t$inventario->fecha_ingreso = date(\"Y-m-d\");\n\t\t\t$inventario->notas = $_POST['Inventario']['notas'];;\n\t\t\t$inventario->catalogador = strtoupper(Yii::app()->user->name);//'Alex Rdz';\n\t\t\t$inventario->estatus = $_POST['Inventario']['estatus'];\n\t\t\t$inventario->isNewRecord = true;\n\n\t\t\tif($inventario->validate())\n\t\t\t{\t\t\t\t\n\t\t\t\t$inventario->save();\n\t\t\t\t$Criteria = new CDbCriteria();\n\t\t\t\t$Criteria->select = \"idacervo\";\n\t\t\t\t$Criteria->condition = \"idacervo=\".$id;\n\t\t\t\t$model = AcervoImpreso::model()->find($Criteria);\n\t\t\t\t$this->redirect(array('view', 'id'=>$model->idacervo, 'inventario'=>$inventario->idacervo));\n\t\t\t\t//$this->redirect(array('view', 'id'=>$model->idacervo));\n\t\t\t}\n\t\t}\n\t\t$this->render('acervo',array('inventario'=>$inventario));\n}", "public function getFkArrecadacaoCalculo()\n {\n return $this->fkArrecadacaoCalculo;\n }", "public function getFkArrecadacaoCalculo()\n {\n return $this->fkArrecadacaoCalculo;\n }", "private function getConfigurationFields($oForm)\n {\n $oForm->setWidgets(\n\t\t\tarray(\n\t\t\t\t\t'date_next'\t=> __('Next'),\n\t\t\t\t\t'date_prev'\t=> __('Previous'),\n\t\t\t\t\t'cem_id' => __('Select Cemetery'),\n\t\t\t\t\t\n\t\t\t\t\t'grantee_identity_id' => __('Select Grantee Identity')\n\t\t\t\t )\n\t\t);\n\n $oForm->setLabels(\n array(\n\t\t\t\t'cem_id' => __('Select Cemetery'),\n 'grantee_first_name' \t \t=> __('Grantee First Name'),\n 'grantee_middle_name'\t\t=> __('Grantee Middle Name'),\n 'grantee_surname' \t\t\t=> __('Grantee Surname'),\n 'grantee_relationship' \t=> __('Grantee Relationship'),\n 'grantee_address' \t\t\t=> __('Grantee Address'),\n 'grantee_dob'\t\t\t\t=> __('Grantee DOB'),\n 'grantee_id_number' \t\t=> __('Grantee Id Number'),\n 'town' \t\t\t\t\t=> __('Suburb/Town'),\n 'phone' \t\t\t\t\t=> __('Telephone'),\n\t\t\t\t'contact_mobile' \t\t\t=> __('Mobile'),\n 'grantee_email'\t\t\t\t=> __('Grantee Email'),\n\t\t\t\t'postal_code' \t\t\t\t=> __('Postal Code'),\n\t\t\t\t'area_code' \t\t\t\t=> __('Telephone Area Code'),\n\t\t\t\t'fax_area_code' \t\t\t=> __('Fax Area Code'),\n 'remarks_1' \t\t\t\t=> __('Remarks 1'),\n 'remarks_2' \t\t\t\t=> __('Remarks 2'),\n\t\t\t\t'grantee_identity_id' \t\t=> __('Grantee Identity'),\n 'grantee_identity_number'\t=> __('Grantee Identity Number'),\n\t\t\t\t'date_of_purchase'\t\t\t=> __('Tenure From'),\n\t\t\t\t'tenure_expiry_date'\t\t=> __('Tenure To')\n )\n );\n\n $oForm->setValidators(\n array(\n\t\t\t\t\t'cem_id' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t'required' => __('Please select cemetery')\n\t\t\t\t\t\t\t\t\t\t\t), \n\t 'grantee_first_name'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t'required' => __('Please enter grantee first name')\n\t\t\t\t\t\t\t\t\t\t\t),\n\t 'grantee_middle_name'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t'required' => __('Please enter grantee middle name')\n\t\t\t\t\t\t\t\t\t\t\t),\n\t 'grantee_surname'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t'required' => __('Please enter grantee surname')\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t'grantee_email'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t'invalid' => __('Please enter valid email')\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t'tenure_expiry_date' \t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t'invalid' => __('Tenure To date must be grater than Tenure From')\n\t\t\t\t\t\t\t\t\t\t\t\t), \n\t\t\t\t)\n );\n }", "public function elemento()\n {\n return $this->belongsTo('App\\Models\\Elemento');\n }", "public function init() {\n $dcpr_id_processo_digital = new Zend_Form_Element_Hidden('DCPR_ID_PROCESSO_DIGITAL');\n $dcpr_id_processo_digital->setRequired(true)\n ->addValidator('StringLength', false, array(0, 5));\n\n $dcpr_id_documento = new Zend_Form_Element_Hidden('DCPR_ID_DOCUMENTO');\n $dcpr_id_documento->setRequired(true)\n ->addValidator('StringLength', false, array(0, 20));\n\n $dcpr_id_tp_vinculacao = new Zend_Form_Element_Select('DCPR_ID_TP_VINCULACAO');\n $dcpr_id_tp_vinculacao->setRequired(true)\n ->setLabel('Selecione o tipo de juntada:');\n\n $dcpr_dh_vinculacao_doc = new Zend_Form_Element_Text('DCPR_DH_VINCULACAO_DOC');\n $dcpr_dh_vinculacao_doc->setRequired(true)\n ->setLabel('Data e Hora da juntada:');\n\n $dcpr_ic_ativo = new Zend_Form_Element_Checkbox('DCPR_IC_ATIVO');\n $dcpr_ic_ativo->setRequired(true)\n ->setLabel('Ativo:')\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $this->addElements(array($dcpr_id_processo_digital\n , $dcpr_id_documento\n , $dcpr_id_tp_vinculacao\n , $dcpr_dh_vinculacao_doc\n , $dcpr_ic_ativo));\n }", "public function initialize()\n {\n // attributes\n $this->setName('eventocontrarecibo');\n $this->setPhpName('Eventocontrarecibo');\n $this->setClassname('Eventocontrarecibo');\n $this->setPackage('aersa');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('ideventocontrarecibo', 'Ideventocontrarecibo', 'INTEGER', true, null, null);\n $this->addForeignKey('idcontrarecibo', 'Idcontrarecibo', 'INTEGER', 'contrarecibo', 'idcontrarecibo', true, null, null);\n $this->addColumn('eventocontrarecibo_fecha', 'EventocontrareciboFecha', 'TIMESTAMP', true, null, null);\n $this->addColumn('eventocontrarecibo_generador', 'EventocontrareciboGenerador', 'CHAR', true, null, null);\n $this->getColumn('eventocontrarecibo_generador', false)->setValueSet(array (\n 0 => 'proveedor',\n 1 => 'cliente',\n));\n $this->addColumn('eventocontrarecibo_evento', 'EventocontrareciboEvento', 'CHAR', true, null, null);\n $this->getColumn('eventocontrarecibo_evento', false)->setValueSet(array (\n 0 => 'generado',\n 1 => 'rechazado',\n 2 => 'revisado',\n 3 => 'validado',\n 4 => 'pago',\n 5 => 'pagado',\n 6 => 'recordatoriopago',\n 7 => 'pagocincompleto',\n));\n $this->addColumn('idempresa', 'Idempresa', 'INTEGER', true, null, null);\n $this->addColumn('idsucursal', 'Idsucursal', 'INTEGER', true, null, null);\n $this->addColumn('idusuario', 'Idusuario', 'INTEGER', true, null, null);\n $this->addColumn('eventocontrarecibo_nota', 'EventocontrareciboNota', 'LONGVARCHAR', true, null, null);\n // validators\n }", "public function eventos()\r\n {\r\n // belongsTo(RelatedModel, foreignKey = category_id, keyOnRelatedModel = id)\r\n return $this->belongsToMany(Evento::class);\r\n }", "public function getFkFolhapagamentoEventoComplementarCalculado()\n {\n return $this->fkFolhapagamentoEventoComplementarCalculado;\n }", "public function buildPkeyCriteria()\n\t{\n\t\t$criteria = new Criteria(C060InventarioPeer::DATABASE_NAME);\n\n\t\t$criteria->add(C060InventarioPeer::CO_NUM_INVENTARIO, $this->co_num_inventario);\n\n\t\treturn $criteria;\n\t}", "public function searchConce()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t//obtener los alumnos de la convocatoria actual\n\t\t$convocatoria = Convocatoria::model()->find(\"con_estado=1\")->con_semestre;\n\t\t$alumnos=Alumno::model()->findAll(\"con_semestre='\".$convocatoria.\"' AND al_campus='Concepción'\");\n\n\t\t$criteria=new CDbCriteria;\n\t\t$condicion='';\n\n\t\t$j=0;\n\t\t$cantidad=0;\n\n\t\t//obtener los proyectos de los alumnos\n\t\tfor ($i=0; $i < count($alumnos); $i++) {\n\t\t\t\n\t\t\t//obtener el proyecto del alumno\n \t\t\t$proyecto = Alumnoproyecto::model()->find(\"al_rut='\".$alumnos[$i]->al_rut.\"'\");\n\t\t\t\n\n\t\t\t//si el alumno tiene un proyecto\n\t\t\tif(count($proyecto)>0){\n\t\t\t\n\t\t\t//para que no se le ponga \"or\" al principio ni al final \n\t\t\tif($cantidad>=1){\n\t\t\t\t$condicion=$condicion.\" or \";\t\t\n\t\t\t}\n\t\t\t\t$condicion=$condicion.\"pro_idProyecto=\".$proyecto->pro_idProyecto;\n\t\t\t\t$cantidad++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//si no hay ningun proyecto\n\t\tif($cantidad==0){\n\t\t\t$condicion=\"pro_idProyecto=-1\";\n\t\t}\n\n\t\t$criteria->addCondition($condicion);\n\t\t$criteria->compare('pro_idProyecto',$this->pro_idProyecto);\n\t\t$criteria->compare('pro_titulo',$this->pro_titulo,true);\n\t\t$criteria->compare('pro_duracion',$this->pro_duracion,true);\n\t\t$criteria->compare('pro_ambito',$this->pro_ambito,true);\n\t\t$criteria->compare('pro_emNombre',$this->pro_emNombre,true);\n\t\t$criteria->compare('pro_emContacto',$this->pro_emContacto,true);\n\t\t$criteria->compare('pro_emTelefono',$this->pro_emTelefono,true);\n\t\t$criteria->compare('emEmail',$this->emEmail,true);\n\t\t$criteria->compare('pro_profeNombre',$this->pro_profeNombre,true);\n\t\t$criteria->compare('pro_profeEmail',$this->pro_profeEmail,true);\n\t\t$criteria->compare('pro_profeTelefono',$this->pro_profeTelefono,true);\n\t\t$criteria->compare('pro_dirEscuela',$this->pro_dirEscuela,true);\n\t\t$criteria->compare('pro_vBEscuela',$this->pro_vBEscuela,true);\n\t\t$criteria->compare('pro_aporteValorado',$this->pro_aporteValorado);\n\t\t$criteria->compare('pro_aportePecuniario',$this->pro_aportePecuniario);\n\t\t$criteria->compare('pro_resumenEjecutivo',$this->pro_resumenEjecutivo,true);\n\t\t$criteria->compare('pro_descripcionEmpresa',$this->pro_descripcionEmpresa,true);\n\t\t$criteria->compare('pro_definicionProblema',$this->pro_definicionProblema,true);\n\t\t$criteria->compare('pro_solucionPropuesta',$this->pro_solucionPropuesta,true);\n\t\t$criteria->compare('pro_estadoArte',$this->pro_estadoArte,true);\n\t\t$criteria->compare('pro_objetivoGeneral',$this->pro_objetivoGeneral,true);\n\t\t$criteria->compare('pro_metodologia',$this->pro_metodologia,true);\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function testObtenerPropuestaDeProyecto () {\n $test = new FormularioDePropuestaAprobacionModel();\n $this->assertNotEmpty($test->obtenerPropuestaDeProyecto([\"columna1\" => 1]));\n }", "private function getConfigurationFields($oForm)\n {\n $oForm->setWidgets(\n\t\t\tarray(\n\t\t\t\t\t'country_id' => __('Select Country'),\n\t\t\t\t\t'cem_cemetery_id' => __('Select Cemetery'),\n\t\t\t\t )\n\t\t);\n\n $oForm->setLabels(\n array(\n\t\t\t\t'country_id' => __('Select Country'),\n\t\t\t\t'cem_cemetery_id' => __('Select Cemetery'),\n 'area_name' => __('Area Name'),\n 'area_code' => __('Area Code'),\n 'area_description' => __('Area Description'),\n 'area_control_numberr'\t=> __('Area Control Number'),\n 'area_user' => __('Area User'),\n 'is_enabled' \t\t=> __('Enabled')\n )\n );\n\n $oForm->setValidators(\n array(\n\t 'area_name' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'required' => __('Please enter area name')\n\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t'area_code' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'required' => __('Please enter area code')\n\t\t\t\t\t\t\t\t\t\t\t\t\t),\n \t 'country_id' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'required' => __('Please select country')\n\t\t\t\t\t\t\t\t\t\t\t\t),\n \t 'cem_cemetery_id' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'required' => __('Please select cemetery')\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t)\n );\n }", "public function __construct($model, $evento, $conn, $conexion)\r\n {\r\n $this->_model = $model;\r\n $this->_evento = $evento;\r\n $this->_conn = $conn;\r\n $this->_conexion = $conexion;\r\n parent::__construct($model['id_contribuyente']);\r\n }", "public function adjuntarAction()\n {\n $idList = $this->_getParam('id');\n \n /* Traigo el formulario*/\n $form = $this->_form->getFrmAdjunta($idList);\n $form->setAction($this->view->baseUrlController . '/adjuntar/id/'. $idList .'/');\n\n if ($this->_request->isPost()) { /* Si se ha submiteado el formulario, se procede a guardar los datos */\n \n /* Desactivo el auto renderizado */\n $this->disableAutoRender();\n\n /* Recibo la lista de Ids separado por comas */\n //$idList = $this->_getParam('id');\n\n if ($idList) {\n /* Convierto la lista a un Array */\n $idArray = explode (\",\", $idList);\n \n /* Recibo datos del formulario */\n $formData = $this->_request->getPost(); \n\n /* Lleno el formulario con los datos recibidos por _POST */\n $form->populate($formData);\n \n /* Creo el objeto Movimiento */\n $objMovimiento = new Gidoc_Model_MovimientoMapper();\n \n /* Recorro el array eliminando cada Id */\n foreach ($idArray as $id) {\n\n /* Como recibo el Id del Movimiento, entonces obtengo el id de la tabla Documento para poder editarlo */\n $movimiento = $objMovimiento->getById($id);\n $documento_id = $movimiento->documento_id;\n\n /* Creo mi array */\n $data = array('documento_id' => $documento_id,\n 'dependencia_id' => $this->_usuario->dependencia_id,\n 'usuario_id' => $this->_usuario->id,\n 'tipomovimiento_id' => 6,\n 'acciones' => $form->acciones->getValue(),\n 'documento_idadjuntado' => $form->documento_idadjuntado->getValue(),\n 'movimientoprocesado_id' => $id);\n \n $movimiento = new Gidoc_Model_MovimientoMapper();\n try {\n $movimiento->save($data);\n } catch(Exception $ex) {\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n }\n }\n\n \n } else { /* Se llama al formulario */\n \n $this->view->form = $form;\n $this->_forward('myeditar','index','default');\n\n }\n }", "public function ajouterEpciAction(Request $request) {\n $this->denyAccessUnlessGranted('ROLE_ADMIN', 'Vous n\\'avez pas accès à cette page' );\n $epci = new Epci();\n $form = $this->createForm(EpciType::class, $epci);\n\n $form->handleRequest($request);\n //$error = \"\";\n if ($form->isSubmitted()) {\n $em = $this->getDoctrine()->getManager();\n if ($form->isValid()) {\n\n $em->persist($epci);\n $em->flush();\n $request->getSession()->getFlashBag()->add('notice', 'EPCI ajouté avec succès !');\n return $this->redirectToRoute('ls_imarket_liste_epci');\n }\n }\n return $this->render('@LSIMarket/admin/gestion_epci/ajout_epci.html.twig', array(\n 'form' => $form->createView()));\n }", "public function __construct(array $especialidades =null)\n {\n parent::__construct('MedicoForm');\n $this->setAttribute('method', 'post');\n\n $this->add(array(\n 'name' => 'idespecialidad',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Especialidad',\n 'empty_option' => 'Seleccione una especialidad *',\n 'value_options' => $especialidades,\n ),\n 'attributes' => array(\n 'required' => 'required'\n ),\n ));\n \n $this->add(array(\n 'name' => 'medico_nombre',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Nombre *', \n ),\n 'attributes' => array(\n 'required' => 'required'\n ),\n ));\n $this->add(array(\n 'name' => 'medico_apellidopaterno',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Apellido Paterno *',\n ),\n 'attributes' => array(\n 'required' => 'required'\n ),\n ));\n $this->add(array(\n 'name' => 'medico_apellidomaterno',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Apellido Materno *',\n ),\n 'attributes' => array(\n 'required' => 'required'\n ),\n ));\n $this->add(array(\n 'name' => 'medico_calle',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Calle',\n ),\n ));\n $this->add(array(\n 'name' => 'medico_noexterior',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'No. Exterior',\n ),\n ));\n $this->add(array(\n 'name' => 'medico_nointerior',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'No. Interior',\n ),\n ));\n $this->add(array(\n 'name' => 'medico_colonia',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Colonia',\n ),\n ));\n $this->add(array(\n 'name' => 'medico_codigopostal',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Código postal',\n ),\n ));\n $this->add(array(\n 'name' => 'medico_ciudad',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Ciudad',\n ),\n ));\n $this->add(array(\n 'name' => 'medico_estado',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Estado',\n ),\n ));\n $this->add(array(\n 'name' => 'medico_pais',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'País',\n ),\n ));\n $this->add(array(\n 'name' => 'medico_telefono',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Casa',\n ),\n ));\n $this->add(array(\n 'name' => 'medico_telefonocelular',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Celular *',\n ),\n 'attributes' => array(\n 'required' => 'required'\n ),\n ));\n $this->add(array(\n 'name' => 'medico_clave',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Clave',\n ),\n ));\n $this->add(array(\n 'name' => 'medico_dgp',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'D.G.P *',\n ),\n 'attributes' => array(\n 'required' => 'required'\n ),\n ));\n $this->add(array(\n 'name' => 'medico_ssa',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'S.S.A',\n ),\n ));\n $this->add(array(\n 'name' => 'medico_ae',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'A.E',\n ),\n ));\n\n \n }", "public function encontrar_encargado_tarea( $tipo_elemento ) {\n switch( $tipo_elemento ){\n case 'procesos':\n $this->encargado_tarea = new Administrador_proceso();\n break;\n\n case 'equipos':\n $this->encargado_tarea = new Administrador_equipo();\n break;\n\n case 'componentes':\n $this->encargado_tarea = new Administrador_componente();\n break;\n\n case 'simulador':\n $this->encargado_tarea = new Simulador_procesos();\n }\n }", "public static function adicionarCriterioAvaliacao( CriterioAvaliacao $oCriterioAvaliacao ) {\n\n if( !array_key_exists( $oCriterioAvaliacao->getCodigo(), CriterioAvaliacaoRepository::getInstance()->aCriterioAvaliacao ) ) {\n CriterioAvaliacaoRepository::getInstance()->aCriterioAvaliacao[$oCriterioAvaliacao->getCodigo()] = $oCriterioAvaliacao;\n }\n return true;\n }", "public function configure()\n {\n \t$arregloEstados = array(2 => 'Libre', 3 => 'Regular');\n\t// Consultar Guille, 1 => 'Cursando'\n \t\n \t$this->widgetSchema['fechacierre'] = new sfWidgetFormInput(array('label' => '<p align=\"left\">Fecha de Cierre:</p>'), array('size' =>'10'));\n \t$this->widgetSchema['fechavencimiento'] = new sfWidgetFormInput(array('label' => '<p align=\"left\">Fecha de Vencimiento:</p>'), array('size' =>'10'));\n \t$this->widgetSchema['idestadomateria'] = new sfWidgetFormSelect(array('choices' => $arregloEstados));\n \t$this->widgetSchema['idcomision'] = new sfWidgetFormInputHidden();\n\t$this->widgetSchema['idmesaexamen'] = new sfWidgetFormSelect(array('choices' => array(0 => '----Seleccione----')));\n\t\n \t// Se define los labels\n\t$this->widgetSchema->setLabel('idestadomateria', '<p align=\"left\">Estado:</p>');\n\t$this->widgetSchema->setLabel('idmesaexamen', '<p align=\"left\">Mesa de Examen:</p>');\n\t \t\n \t// Se define los validadores \n\t$this->setValidators(array(\n\t\t'fechacierre' => new sfValidatorString(),\n\t\t'fechavencimiento' => new sfValidatorString()\n\t)); \n }", "public function setFkEconomicoCadastroEconomicoEmpresaDireito(\\Urbem\\CoreBundle\\Entity\\Economico\\CadastroEconomicoEmpresaDireito $fkEconomicoCadastroEconomicoEmpresaDireito)\n {\n $this->inscricaoEconomica = $fkEconomicoCadastroEconomicoEmpresaDireito->getInscricaoEconomica();\n $this->fkEconomicoCadastroEconomicoEmpresaDireito = $fkEconomicoCadastroEconomicoEmpresaDireito;\n \n return $this;\n }", "function __construct()\n {\n parent::__construct('rs_Widget_Agenda', 'Eventos', 'Exibe uma lista com os próximos eventos.');\n }", "protected function __construct()\n {\n parent::__construct(\n 'Event',\n array(\n TextField::create(\n 'title',\n array(\n 'mandatory' => true,\n )\n ),\n TextareaField::create(\n 'description',\n array(\n 'use_markdown' => true,\n )\n ),\n TextField::create(\n 'date',\n array()\n ),\n ReferenceField::create(\n 'guest_lists',\n array(\n 'references' => array(\n array(\n 'module' => '\\\\Honeybee\\\\Domain\\\\Guestlist\\\\GuestlistModule',\n 'identity_field' => 'identifier',\n 'display_field' => 'title',\n ),\n ),\n )\n ),\n ReferenceField::create(\n 'assignee',\n array(\n 'max' => 1,\n 'references' => array(\n array(\n 'module' => '\\\\Honeybee\\\\Domain\\\\User\\\\UserModule',\n 'identity_field' => 'identifier',\n 'display_field' => 'username',\n ),\n ),\n )\n ),\n KeyValueField::create(\n 'meta',\n array(\n 'constraints' => array(\n 'value_type' => 'dynamic',\n ),\n )\n ),\n AggregateField::create(\n 'workflowTicket',\n array(\n 'modules' => array(\n '\\\\Honeybee\\\\Domain\\\\Event\\\\WorkflowTicketModule',\n ),\n )\n ),\n ),\n array(\n 'prefix' => 'event',\n 'identifier_field' => 'identifier',\n 'slugPattern' => 'event-{shortId}',\n )\n );\n }", "public function getFkEstagioAreaConhecimento()\n {\n return $this->fkEstagioAreaConhecimento;\n }", "public function __construct()\n {\n parent::__construct();\n \n parent::setTargetContainer('adianti_right_panel');\n \n // creates the form\n $this->form = new BootstrapFormBuilder('form_event');\n $this->form->setFormTitle('Event');\n $this->form->setProperty('style', 'margin-bottom:0;box-shadow:none');\n \n $hours = array();\n $minutes = array();\n for ($n=0; $n<24; $n++)\n {\n $hours[$n] = str_pad($n, 2, '0', STR_PAD_LEFT);\n }\n \n for ($n=0; $n<=55; $n+=5)\n {\n $minutes[$n] = str_pad($n, 2, '0', STR_PAD_LEFT);\n }\n \n // create the form fields\n $view = new THidden('view');\n $id = new TEntry('id');\n $color = new TColor('color');\n $start_date = new TDate('start_date');\n $start_hour = new TCombo('start_hour');\n $start_minute = new TCombo('start_minute');\n $end_date = new TDate('end_date');\n $end_hour = new TCombo('end_hour');\n $end_minute = new TCombo('end_minute');\n $title = new TEntry('title');\n $description = new TText('description');\n $color->setValue('#3a87ad');\n \n $start_hour->addItems($hours);\n $start_minute->addItems($minutes);\n $end_hour->addItems($hours);\n $end_minute->addItems($minutes);\n \n $id->setEditable(FALSE);\n \n // define the sizes\n $id->setSize(40);\n $color->setSize(100);\n $start_date->setSize(120);\n $end_date->setSize(120);\n $start_hour->setSize(70);\n $end_hour->setSize(70);\n $start_minute->setSize(70);\n $end_minute->setSize(70);\n $title->setSize(400);\n $description->setSize(400, 50);\n \n $start_hour->setChangeAction(new TAction(array($this, 'onChangeStartHour')));\n $end_hour->setChangeAction(new TAction(array($this, 'onChangeEndHour')));\n $start_date->setExitAction(new TAction(array($this, 'onChangeStartDate')));\n $end_date->setExitAction(new TAction(array($this, 'onChangeEndDate')));\n\n // add one row for each form field\n $this->form->addFields( [$view] );\n $this->form->addFields( [new TLabel('ID:', null, null, 'b')]);\n $this->form->addFields( [$id] );\n $this->form->addFields( [new TLabel('Color:', null, null, 'b')] );\n $this->form->addFields( [$color] );\n $this->form->addFields( [new TLabel('Start time:', null, null, 'b')]);\n $this->form->addFields( [$start_date, $start_hour, ':', $start_minute] );\n $this->form->addFields( [new TLabel('End time:', null, null, 'b')]);\n $this->form->addFields( [$end_date, $end_hour, ':', $end_minute] );\n $this->form->addFields( [new TLabel('Title:', null, null, 'b')]);\n $this->form->addFields( [$title] );\n $this->form->addFields( [new TLabel('Description:', null, null, 'b')]);\n $this->form->addFields( [$description] );\n \n $this->form->addAction( _t('Save'), new TAction(array($this, 'onSave')), 'fa:save green');\n $this->form->addAction( _t('Clear'), new TAction(array($this, 'onEdit')), 'fa:eraser orange');\n $this->form->addAction( _t('Delete'), new TAction(array($this, 'onDelete')), 'far:trash-alt red');\n $this->form->addHeaderActionLink( _t('Close'), new TAction(array($this, 'onClose')), 'fa:times red');\n \n parent::add($this->form);\n }", "public function __construct()\n {\n parent::__construct('ServicioForm');\n $this->setAttribute('method', 'post');\n \n $this->add(array(\n 'name' => 'servicio_nombre',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Nombre',\n ),\n ));\n $this->add(array(\n 'name' => 'servicio_descripcion',\n 'type' => 'textarea',\n 'options' => array(\n 'label' => 'Descripcion',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_costo',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Costo',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_precio',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Precio',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_iva',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'IVA',\n ),\n ));\n \n\n\n }", "public function actionCreate()\n\t{\n\t\t$model=new AcervoImpreso;\n\t\t$inventario = new Inventario;\n\n\t\tif(isset($_POST['AcervoImpreso'], $_POST['Inventario']))\n\t\t{\t\t\t\t\n\t\t\t\t\n\t\t\t\t$Criteria = new CDbCriteria();\t\t\t\t\t\t\t\t\n\t\t\t\t$Criteria -> limit = 1;\n\t\t\t\t$Criteria -> order = \"idacervo DESC\";\t\n\t\t\t\t$acervo = \tInventario::model()->find($Criteria);\n\t\t\t\t/*\t\t\t\n\t\t\t\techo '<pre>';\n\t\t\t\tprint_r($acervo);\n\t\t\t\techo '</pre>';\n\t\t\t\techo $acervo->idacervo;\t\t\t\t\n\t\t\t\tYii::app()->end(); // termino la aplicación para poder ver los resultados en pantalla \t\n\t\t\t\t*/\n\t\t\t\t$idacervo=(int)$acervo->idacervo;\n\t\t\t\t$idacervo=$idacervo+1; // Incrmento el valor de idaprendiente en UNO para insertar con el siguiente registro\n\t\t\t\t$model->idacervo = $idacervo;\t\t\t\n\t\t\t\t$model->catalogo = $_POST['AcervoImpreso']['catalogo']; //1- Mediateca, 2 - Acervo Asesores, 3 - Master, 4 - Bajas, 5 - CAD\n\t\t\t\t$model->material = $_POST['AcervoImpreso']['material'];\n\t\t\t\t$model->idioma = $_POST['AcervoImpreso']['idioma'];\n\t\t\t\t$model->titulo = $_POST['AcervoImpreso']['titulo'];\n\t\t\t\t$model->autor_personal = $_POST['AcervoImpreso']['autor_personal'];\n\t\t\t\t$model->autor_corporativo = $_POST['AcervoImpreso']['autor_corporativo'];\n\t\t\t\t$model->edicion = $_POST['AcervoImpreso']['edicion'];\n\t\t\t\t$model->isbn = strtoupper($_POST['AcervoImpreso']['isbn']);\t\t\t\n\t\t\t\t$model->descripcion_area = $_POST['AcervoImpreso']['descripcion_area'];\n\t\t\t\t$model->serie = $_POST['AcervoImpreso']['serie'];\t\t\t\t\n\t\t\t\t$model->fondo = $_POST['AcervoImpreso']['fondo'];\n\t\t\t\t$model->acento = $_POST['AcervoImpreso']['acento'];\n\t\t\t\t$model->tipo_formato = $_POST['AcervoImpreso']['tipo_formato'];\n\t\t\t\t\n\t\t\t\t$inventario->idacervo = (int)$model->idacervo;\n\t\t\t\t//$inventario->idacervo_anterior = 777;// Aquí recupero el idacervo de los ejemplares\n\t\t\t\t$inventario->idacervo_anterior = $idacervo;//\n\t\t\t\t$inventario->tipoacervo = 1;//tipo de acervo para Acervo Impreso = 1\n\t\t\t\t$inventario->clasificacion = $_POST['Inventario']['clasificacion'];\n\t\t\t\t$inventario->pie_imprenta = $_POST['Inventario']['pie_imprenta'];\t\t\t\t\n\t\t\t\t$inventario->descripcion_fisica = $_POST['Inventario']['descripcion_fisica'];\t\t\t\t\t\t\t\t\n\t\t\t\t$inventario->issn = $_POST['Inventario']['issn'];\n\t\t\t\t$inventario->dificultad = $_POST['Inventario']['dificultad'];\n\t\t\t\t$inventario->fecha_ingreso = date(\"Y-m-d\");\n\t\t\t\t$inventario->notas = $_POST['Inventario']['notas'];\n\t\t\t\t$inventario->catalogador = strtoupper(Yii::app()->user->name);//'Alex Rdz'\n\t\t\t\t$inventario->estatus = $_POST['Inventario']['estatus'];\n\t\t\t\t/*\n\t\t\t\techo '<pre>';\n\t\t\t\tprint_r($_POST);\n\t\t\t\techo '</pre>';\n\t\t\t\tYii::app()->end(); // termino la aplicación para poder ver los resultados en pantalla \n\t\t\t\t*/\n\t\t\t\t//validar ambos modelos\n\t\t\t\t$valid =$model->validate();\n\t\t\t\t$valid =$inventario->validate() && $valid;\n\n\t\t\t\tif($valid)\n\t\t\t\t{\n\t\t\t\t\t//usar falso para desactivar la validacion del modelo\n\t\t\t\t\t$model->save();\n\t\t\t\t\t$inventario->save();\n\t\t\t\t\t//if($model->save())\n\t\t\t\t\t$this->redirect(array('view', 'id'=>$model->idacervo, 'inventario'=>$inventario->idacervo));\n\t\t\t\t}\n\t\t}//cierre de isset()\n\t\t$this->render('create', array('model'=>$model, 'inventario'=>$inventario));\n\t}", "public function getFkFolhapagamentoConfiguracaoEmpenhos()\n {\n return $this->fkFolhapagamentoConfiguracaoEmpenhos;\n }", "public function actionCreateA()\n\t{\n //var_dump( $_POST ); \n //Yii::trace('<pre>'.print_r( $_POST,1 ).'</pre>');\n Yii::import('ext.multimodelform.MultiModelForm');\n \t\t$model=new Event;\n\t\t$eventType = new EventType;\n $member = new EventAttribute;\n $validatedMembers = array(); //ensure an empty array\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['EventType']))\n\t\t{\n\t\t\t$eventType->attributes=$_POST['EventType'];\n \n\t\t\tif($eventType->save())\n {\n if(MultiModelForm::validate($member,$validatedMembers))\n {\n //the value for the foreign key 'groupid'\n //Yii::trace('<pre>'.print_r($validatedMembers,1).'</pre>');\n $masterValues = array ('eventTypes'=>array(0=>$eventType->idEventType));\n //Yii::trace('<pre>'.print_r($masterValues,1).'</pre>');\n if (MultiModelForm::save($member,$validatedMembers,$deleteMembers,$masterValues))\n {\n //$entity->people = $validatedMembers;\n //$entity->update();\n //write many-to-many relations, since masterValues isn't working with CAdvancedArBehaviour\n foreach($validatedMembers as $attribute ) {\n $eventTypeAttribute = new EventTypeAttribute;\n $eventTypeAttribute->eventAttributeId = $attribute->idEventAttribute;\n $eventTypeAttribute->eventTypeId = $eventType->idEventType;\n if(!$eventTypeAttribute->save()) print_r($eventTypeAttribute->errors); \n }\n //$this->refresh();\n $this->redirect(array('eventType/view','id'=>$eventType->idEventType));\n }\n }\t\n \n }\t\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t\t\t'eventType'=>$eventType,\n //submit the member and validatedItems to the widget in the edit form\n 'member' => $member,\n 'validatedMembers' => $validatedMembers,\n\t\t));\n\t}", "public function espacioAcademico()\n {\n \treturn $this->belongsTo('App\\EspacioAcademico');\n }", "public function init() {\n $docm_id_documento = new Zend_Form_Element_Hidden('DOCM_ID_DOCUMENTO');\n $docm_id_documento->setRequired(true)\n ->addValidator('StringLength', false, array(0, 20))\n ->removeDecorator('Label')\n ->removeDecorator('HtmlTag');\n\n $docm_nr_documento = new Zend_Form_Element_Text('DOCM_NR_DOCUMENTO');\n $docm_nr_documento->setRequired(false)\n ->addValidator('StringLength', false, array(0, 28));\n\n $docm_nr_sequencial_doc = new Zend_Form_Element_Text('DOCM_NR_SEQUENCIAL_DOC');\n $docm_nr_sequencial_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 10));\n\n $docm_nr_dcmto_usuario = new Zend_Form_Element_Text('DOCM_NR_DCMTO_USUARIO');\n $docm_nr_dcmto_usuario->setRequired(false)\n ->addValidator('StringLength', false, array(0, 16));\n\n $docm_dh_cadastro = new Zend_Form_Element_Text('DOCM_DH_CADASTRO');\n $docm_dh_cadastro->setRequired(false);\n\n $docm_cd_matricula_cadastro = new Zend_Form_Element_Text('DOCM_CD_MATRICULA_CADASTRO');\n $docm_cd_matricula_cadastro->setRequired(false)\n ->addValidator('StringLength', false, array(0, 14));\n\n $docm_id_tipo_doc = new Zend_Form_Element_Select('DOCM_ID_TIPO_DOC');\n $docm_id_tipo_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 5));\n\n $docm_sg_secao_geradora = new Zend_Form_Element_Text('DOCM_SG_SECAO_GERADORA');\n $docm_sg_secao_geradora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_cd_lotacao_geradora = new Zend_Form_Element_Text('DOCM_CD_LOTACAO_GERADORA');\n $docm_cd_lotacao_geradora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 5));\n\n $docm_sg_secao_redatora = new Zend_Form_Element_Text('DOCM_SG_SECAO_REDATORA');\n $docm_sg_secao_redatora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_cd_lotacao_redatora = new Zend_Form_Element_Text('DOCM_CD_LOTACAO_REDATORA');\n $docm_cd_lotacao_redatora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 5));\n\n $docm_id_pctt = new Zend_Form_Element_Select('DOCM_ID_PCTT');\n $docm_id_pctt->setRequired(false)\n ->addValidator('StringLength', false, array(0, 7));\n\n $docm_ds_assunto_doc = new Zend_Form_Element_Text('DOCM_DS_ASSUNTO_DOC');\n $docm_ds_assunto_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 4000));\n\n $docm_id_tipo_situacao_doc = new Zend_Form_Element_Select('DOCM_ID_TIPO_SITUACAO_DOC');\n $docm_id_tipo_situacao_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_id_confidencialidade = new Zend_Form_Element_Select('DOCM_ID_CONFIDENCIALIDADE');\n $docm_id_confidencialidade->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_nr_documento_red = new Zend_Form_Element_Text('DOCM_NR_DOCUMENTO_RED');\n $docm_nr_documento_red->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_dh_expiracao_documento = new Zend_Form_Element_Text('DOCM_DH_EXPIRACAO_DOCUMENTO');\n $docm_dh_expiracao_documento->setRequired(false);\n\n\n $docm_ds_palavra_chave = new Zend_Form_Element_Textarea('DOCM_DS_PALAVRA_CHAVE');\n $docm_ds_palavra_chave->setRequired(false)\n ->addValidator('StringLength', false, array(0, 500));\n\n $docm_ic_arquivamento = new Zend_Form_Element_Checkbox('DOCM_IC_ARQUIVAMENTO');\n $docm_ic_arquivamento->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_id_pessoa = new Zend_Form_Element_Text('DOCM_ID_PESSOA');\n $docm_id_pessoa->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_ic_documento_externo = new Zend_Form_Element_Checkbox('DOCM_IC_DOCUMENTO_EXTERNO');\n $docm_ic_documento_externo->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_ic_ativo = new Zend_Form_Element_Checkbox('DOCM_IC_ATIVO');\n $docm_ic_ativo->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_ic_processo_autuado = new Zend_Form_Element_Checkbox('DOCM_IC_PROCESSO_AUTUADO');\n $docm_ic_processo_autuado->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_id_movimentacao = new Zend_Form_Element_Text('DOCM_ID_MOVIMENTACAO');\n $docm_id_movimentacao->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_dh_fase = new Zend_Form_Element_Text('DOCM_DH_FASE');\n $docm_dh_fase->setRequired(false);\n\n $docm_id_documento_pai = new Zend_Form_Element_Text('DOCM_ID_DOCUMENTO_PAI');\n $docm_id_documento_pai->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_id_pessoa_temporaria = new Zend_Form_Element_Text('DOCM_ID_PESSOA_TEMPORARIA');\n $docm_id_pessoa_temporaria->setRequired(false)\n ->addValidator('StringLength', false, array(0, 6));\n\n $docm_id_tp_extensao = new Zend_Form_Element_Select('DOCM_ID_TP_EXTENSAO');\n $docm_id_tp_extensao->setRequired(false)\n ->addValidator('StringLength', false, array(0, 3));\n\n $docm_ic_movi_individual = new Zend_Form_Element_Checkbox('DOCM_IC_MOVI_INDIVIDUAL');\n $docm_ic_movi_individual->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_ic_apensado = new Zend_Form_Element_Checkbox('DOCM_IC_APENSADO');\n $docm_ic_apensado->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $this->addElements(array(\n $docm_id_documento\n , $docm_nr_documento\n , $docm_nr_sequencial_doc\n , $docm_nr_dcmto_usuario\n , $docm_dh_cadastro\n , $docm_cd_matricula_cadastro\n , $docm_id_tipo_doc\n , $docm_sg_secao_geradora\n , $docm_cd_lotacao_geradora\n , $docm_sg_secao_redatora\n , $docm_cd_lotacao_redatora\n , $docm_id_pctt\n , $docm_ds_assunto_doc\n , $docm_id_tipo_situacao_doc\n , $docm_id_confidencialidade\n , $docm_nr_documento_red\n , $docm_dh_expiracao_documento\n , $docm_ds_palavra_chave\n , $docm_ic_arquivamento\n , $docm_id_pessoa\n , $docm_ic_documento_externo\n , $docm_ic_ativo\n , $docm_ic_processo_autuado\n , $docm_id_movimentacao\n , $docm_dh_fase\n , $docm_id_documento_pai\n , $docm_id_pessoa_temporaria\n , $docm_id_tp_extensao\n , $docm_ic_movi_individual\n , $docm_ic_apensado\n ));\n }", "function clsRecordmc_c_aplicacion($RelativePath, & $Parent)\n {\n\n global $FileName;\n global $CCSLocales;\n global $DefaultDateFormat;\n $this->Visible = true;\n $this->Parent = & $Parent;\n $this->RelativePath = $RelativePath;\n $this->Errors = new clsErrors();\n $this->ErrorBlock = \"Record mc_c_aplicacion/Error\";\n $this->DataSource = new clsmc_c_aplicacionDataSource($this);\n $this->ds = & $this->DataSource;\n $this->ReadAllowed = true;\n if($this->Visible)\n {\n $this->ComponentName = \"mc_c_aplicacion\";\n $this->Attributes = new clsAttributes($this->ComponentName . \":\");\n $CCSForm = explode(\":\", CCGetFromGet(\"ccsForm\", \"\"), 2);\n if(sizeof($CCSForm) == 1)\n $CCSForm[1] = \"\";\n list($FormName, $FormMethod) = $CCSForm;\n $this->EditMode = ($FormMethod == \"Edit\");\n $this->FormEnctype = \"application/x-www-form-urlencoded\";\n $this->FormSubmitted = ($FormName == $this->ComponentName);\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\n $this->descripcion = new clsControl(ccsLabel, \"descripcion\", \"descripcion\", ccsText, \"\", CCGetRequestParam(\"descripcion\", $Method, NULL), $this);\n $this->severidad = new clsControl(ccsLabel, \"severidad\", \"severidad\", ccsInteger, \"\", CCGetRequestParam(\"severidad\", $Method, NULL), $this);\n $this->lblTiempoAtencion = new clsControl(ccsLabel, \"lblTiempoAtencion\", \"lblTiempoAtencion\", ccsText, \"\", CCGetRequestParam(\"lblTiempoAtencion\", $Method, NULL), $this);\n $this->lblTiempoSolucion = new clsControl(ccsLabel, \"lblTiempoSolucion\", \"lblTiempoSolucion\", ccsText, \"\", CCGetRequestParam(\"lblTiempoSolucion\", $Method, NULL), $this);\n }\n }", "public function testCambiarEstadoAccionImprimir ($accion, $aprobacion, $observaciones, $codProyecto, $resultado_esperado) {\n $test = new FormularioDePropuestaAprobacionModel();\n $this->assertSame ($resultado_esperado, $test->CambiarEstado($accion, $aprobacion, $codProyecto, $observaciones));\n }", "public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)\n {\n $keys = EventPeer::getFieldNames($keyType);\n\n if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);\n if (array_key_exists($keys[1], $arr)) $this->setCode($arr[$keys[1]]);\n if (array_key_exists($keys[2], $arr)) $this->setCategory($arr[$keys[2]]);\n if (array_key_exists($keys[3], $arr)) $this->setAddress($arr[$keys[3]]);\n if (array_key_exists($keys[4], $arr)) $this->setAddress2($arr[$keys[4]]);\n if (array_key_exists($keys[5], $arr)) $this->setZipcode($arr[$keys[5]]);\n if (array_key_exists($keys[6], $arr)) $this->setCity($arr[$keys[6]]);\n if (array_key_exists($keys[7], $arr)) $this->setGeoCoordinateX($arr[$keys[7]]);\n if (array_key_exists($keys[8], $arr)) $this->setGeoCoordinateY($arr[$keys[8]]);\n if (array_key_exists($keys[9], $arr)) $this->setDistanceCamping($arr[$keys[9]]);\n if (array_key_exists($keys[10], $arr)) $this->setImage($arr[$keys[10]]);\n if (array_key_exists($keys[11], $arr)) $this->setPriority($arr[$keys[11]]);\n if (array_key_exists($keys[12], $arr)) $this->setTel($arr[$keys[12]]);\n if (array_key_exists($keys[13], $arr)) $this->setFax($arr[$keys[13]]);\n if (array_key_exists($keys[14], $arr)) $this->setEmail($arr[$keys[14]]);\n if (array_key_exists($keys[15], $arr)) $this->setWebsite($arr[$keys[15]]);\n if (array_key_exists($keys[16], $arr)) $this->setCreatedAt($arr[$keys[16]]);\n if (array_key_exists($keys[17], $arr)) $this->setUpdatedAt($arr[$keys[17]]);\n if (array_key_exists($keys[18], $arr)) $this->setActive($arr[$keys[18]]);\n }", "public function __construct()\n {\n parent::__construct();\n // creates the form\n $this->form = new BootstrapFormBuilder(self::$formName);\n\n // define the form title\n $this->form->setFormTitle(\"Listagem de emprestimos\");\n\n $exemplar_id = new TDBUniqueSearch('exemplar_id', 'biblioteca', 'Exemplar', 'id', 'codigo_barras','id asc' );\n $leitor_id = new TDBUniqueSearch('leitor_id', 'biblioteca', 'Leitor', 'id', 'nome','nome asc' );\n $dt_emprestimo = new TDate('dt_emprestimo');\n $dt_emprestimo_final = new TDate('dt_emprestimo_final');\n $dt_previsao = new TDate('dt_previsao');\n $dt_prevista_final = new TDate('dt_prevista_final');\n $dt_devolucao = new TDate('dt_devolucao');\n $dt_devolucao_final = new TDate('dt_devolucao_final');\n\n $leitor_id->setMinLength(2);\n $exemplar_id->setMinLength(1);\n\n $dt_previsao->setDatabaseMask('yyyy-mm-dd');\n $dt_devolucao->setDatabaseMask('yyyy-mm-dd');\n $dt_emprestimo->setDatabaseMask('yyyy-mm-dd');\n $dt_prevista_final->setDatabaseMask('yyyy-mm-dd');\n $dt_devolucao_final->setDatabaseMask('yyyy-mm-dd');\n $dt_emprestimo_final->setDatabaseMask('yyyy-mm-dd');\n\n $leitor_id->setSize('70%');\n $dt_previsao->setSize(100);\n $dt_devolucao->setSize(100);\n $exemplar_id->setSize('70%');\n $dt_emprestimo->setSize(100);\n $dt_prevista_final->setSize(100);\n $dt_devolucao_final->setSize(100);\n $dt_emprestimo_final->setSize(100);\n\n $leitor_id->setMask('{nome}');\n $dt_previsao->setMask('dd/mm/yyyy');\n $dt_devolucao->setMask('dd/mm/yyyy');\n $dt_emprestimo->setMask('dd/mm/yyyy');\n $exemplar_id->setMask('{livro->titulo}');\n $dt_prevista_final->setMask('dd/mm/yyyy');\n $dt_devolucao_final->setMask('dd/mm/yyyy');\n $dt_emprestimo_final->setMask('dd/mm/yyyy');\n\n $row1 = $this->form->addFields([new TLabel(\"Exemplar:\", null, '14px', null)],[$exemplar_id]);\n $row2 = $this->form->addFields([new TLabel(\"Leitor:\", null, '14px', null)],[$leitor_id]);\n $row3 = $this->form->addFields([new TLabel(\"Data de empréstimo inicial:\", null, '14px', null)],[$dt_emprestimo],[new TLabel(\"Data de empréstimo final:\", null, '14px', null)],[$dt_emprestimo_final]);\n $row4 = $this->form->addFields([new TLabel(\"Data prevista de devolução inicial:\", null, '14px', null)],[$dt_previsao],[new TLabel(\"Data prevista de devolução final:\", null, '14px', null)],[$dt_prevista_final]);\n $row5 = $this->form->addFields([new TLabel(\"Data de devolução inicial:\", null, '14px', null)],[$dt_devolucao],[new TLabel(\"Data de devolução final:\", null, '14px', null)],[$dt_devolucao_final]);\n\n // keep the form filled during navigation with session data\n $this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );\n\n $btn_onsearch = $this->form->addAction(\"Buscar\", new TAction([$this, 'onSearch']), 'fas:search #ffffff');\n $btn_onsearch->addStyleClass('btn-primary'); \n\n $btn_onexportcsv = $this->form->addAction(\"Exportar como CSV\", new TAction([$this, 'onExportCsv']), 'far:file-alt #000000');\n\n $btn_onshow = $this->form->addAction(\"Novo emprestimo\", new TAction(['EmprestimoLivroForm', 'onShow']), 'fas:plus #69aa46');\n\n // creates a Datagrid\n $this->datagrid = new TDataGrid;\n $this->datagrid->disableHtmlConversion();\n $this->datagrid = new BootstrapDatagridWrapper($this->datagrid);\n $this->filter_criteria = new TCriteria;\n\n $this->datagrid->style = 'width: 100%';\n $this->datagrid->setHeight(320);\n\n $column_id = new TDataGridColumn('id', \"Id\", 'left' , '69px');\n $column_exemplar_livro_titulo = new TDataGridColumn('exemplar->livro->titulo', \"Exemplar\", 'left');\n $column_leitor_nome = new TDataGridColumn('leitor->nome', \"Leitor\", 'left');\n $column_dt_emprestimo_transformed = new TDataGridColumn('dt_emprestimo', \"Emprestado em\", 'left');\n $column_dt_previsao_transformed = new TDataGridColumn('dt_previsao', \"Previsão de devolução\", 'left');\n $column_dt_devolucao_transformed = new TDataGridColumn('dt_devolucao', \"Devolvido em\", 'left');\n\n $column_dt_emprestimo_transformed->setTransformer(function($value, $object, $row) \n {\n if(!empty(trim($value)))\n {\n try\n {\n $date = new DateTime($value);\n return $date->format('d/m/Y');\n }\n catch (Exception $e)\n {\n return $value;\n }\n }\n });\n\n $column_dt_previsao_transformed->setTransformer(function($value, $object, $row) \n {\n if(!empty(trim($value)))\n {\n try\n {\n $date = new DateTime($value);\n return $date->format('d/m/Y');\n }\n catch (Exception $e)\n {\n return $value;\n }\n }\n });\n\n $column_dt_devolucao_transformed->setTransformer(function($value, $object, $row) \n {\n if(!empty(trim($value)))\n {\n try\n {\n $date = new DateTime($value);\n return $date->format('d/m/Y');\n }\n catch (Exception $e)\n {\n return $value;\n }\n }\n }); \n\n $order_id = new TAction(array($this, 'onReload'));\n $order_id->setParameter('order', 'id');\n $column_id->setAction($order_id);\n $order_dt_emprestimo_transformed = new TAction(array($this, 'onReload'));\n $order_dt_emprestimo_transformed->setParameter('order', 'dt_emprestimo');\n $column_dt_emprestimo_transformed->setAction($order_dt_emprestimo_transformed);\n $order_dt_previsao_transformed = new TAction(array($this, 'onReload'));\n $order_dt_previsao_transformed->setParameter('order', 'dt_previsao');\n $column_dt_previsao_transformed->setAction($order_dt_previsao_transformed);\n $order_dt_devolucao_transformed = new TAction(array($this, 'onReload'));\n $order_dt_devolucao_transformed->setParameter('order', 'dt_devolucao');\n $column_dt_devolucao_transformed->setAction($order_dt_devolucao_transformed);\n\n $this->datagrid->addColumn($column_id);\n $this->datagrid->addColumn($column_exemplar_livro_titulo);\n $this->datagrid->addColumn($column_leitor_nome);\n $this->datagrid->addColumn($column_dt_emprestimo_transformed);\n $this->datagrid->addColumn($column_dt_previsao_transformed);\n $this->datagrid->addColumn($column_dt_devolucao_transformed);\n\n $action_onDevolver = new TDataGridAction(array('EmprestimoList', 'onDevolver'));\n $action_onDevolver->setUseButton(true);\n $action_onDevolver->setButtonClass('btn btn-default btn-sm');\n $action_onDevolver->setLabel(\"Devolver\");\n $action_onDevolver->setImage('fa:arrow-up #000000');\n $action_onDevolver->setField(self::$primaryKey);\n $action_onDevolver->setDisplayCondition('EmprestimoList::onExibirDevolver');\n\n $this->datagrid->addAction($action_onDevolver);\n\n // create the datagrid model\n $this->datagrid->createModel();\n\n // creates the page navigation\n $this->pageNavigation = new TPageNavigation;\n $this->pageNavigation->setAction(new TAction(array($this, 'onReload')));\n $this->pageNavigation->setWidth($this->datagrid->getWidth());\n\n $panel = new TPanelGroup;\n $panel->add($this->datagrid);\n\n $panel->addFooter($this->pageNavigation);\n\n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 100%';\n // $container->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $container->add($this->form);\n $container->add($panel);\n\n parent::add($container);\n\n }", "public function rules() {\n return array(\n array('cedula,nombre, apellido, correoElectronico, fechaNacimiento, ciudad, genero, fechaNacimiento, tieneHijos, \n tieneMascotas, telefonoFijo, telefonoCelular, profesion, ocupacion', \n 'required', 'message' => '{attribute} no puede estar vacío'),\n array('condiciones', 'required', 'message' => 'Aceptar términos y condiciones'),\n //array('cedula', 'numerical','integerOnly' => true),\n //array('cedula', 'length', 'min'=>5, 'max'=>12),\n array('correoElectronico', 'email', 'allowEmpty' => false),\n array('fechaNacimiento', 'date', 'format' => 'yyyy-M-d', 'allowEmpty' => true),\n array('genero', 'in', 'range' => array(1, 2), 'allowEmpty' => true),\n array('cedula, nombre, apellido, correoElectronico', 'length', 'max' => 50),\n array('cedula,nombre, apellido, correoElectronico, fechaNacimiento, genero, fechaNacimiento, tieneHijos, \n tieneMascotas, telefonoFijo, telefonoCelular, codigoVerificacion, ocupacion','safe'),\n array('correoElectronico', 'validarCorreo' ),\n //array('solicitarVerificacion', 'validarCodigo' ),\n );\n }", "public function getEventForm()\n\t{\n\t\t$url = 'professional-development/';\n\t\t$controller\t= new ProfessionalDevelopmentPage_Controller();\n\t\t$form = $controller->EventForm()->setFormAction(Controller::join_links($url, 'SearchForm'));\n\t\treturn isset($form) ? $form : false;\n\t}", "public function getFkTcemgContratoAditivos()\n {\n return $this->fkTcemgContratoAditivos;\n }", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "public function rules() {\r\n return array(\r\n array('cedula, condiciones, nombre, apellido, correoElectronico, genero, fechaNacimiento, condiciones', 'attributeTrim'),\r\n \r\n array('cedula', 'required', 'on' => 'registro', 'message' => '{attribute} no puede estar vacío'),\r\n array('condiciones', 'required', 'on' => 'registro', 'message' => 'Aceptar términos y condiciones'),\r\n array('cedula', 'numerical','integerOnly'=>true),\r\n array('cedula', 'length', 'min'=>5, 'max'=>12),\r\n array('nombre, apellido', 'required', 'on' => 'registro, actualizar', 'message' => '{attribute} no puede estar vacío'),\r\n array('clave, claveConfirmar', 'required', 'on' => 'registro, restablecer, contrasena', 'message' => '{attribute} no puede estar vacío'),\r\n array('clave, claveConfirmar', 'length', 'min'=>5, 'max'=>15, 'on' => 'registro, restablecer, contrasena'),\r\n array('correoElectronico', 'email', 'on' => 'registro, actualizar', 'allowEmpty' => false),\r\n array('fechaNacimiento', 'date', 'on' => 'registro, actualizar', 'format' => 'yyyy-M-d', 'allowEmpty' => true),\r\n array('genero', 'in', 'range' => array(1, 2), 'on' => 'registro, actualizar', 'allowEmpty' => true),\r\n array('genero, fechaNacimiento', 'default', 'on' => 'registro, actualizar', 'value' => null),\r\n \r\n \r\n array('cedula, nombre, apellido, correoElectronico', 'length', 'max' => 50),\r\n \r\n array('claveConfirmar', 'validarClave', 'on' => 'registro, restablecer, contrasena'),\r\n array('cedula', 'safe', 'on' => 'restablecer, actualizar'),\r\n array('profesion', 'safe', 'on' => 'actualizar'),\r\n array('profesion', 'default', 'value' => null),\r\n array('profesion', 'validarProfesion'),\r\n array('cedula', 'validarCedula', 'on' => 'registro'),\r\n array('correoElectronico', 'validarCorreo', 'on' => 'registro, actualizar'),\r\n );\r\n }", "private function getConfigurationFields($oForm)\n {\n $oForm->setWidgets(\n\t\t\tarray(\n\t\t\t\t\t'cem_cemetery_id' \t=> __('Select Cemetery'),\n\t\t\t\t\t'country_id'\t\t=> __('Select Country'),\n\t\t\t\t )\n\t\t);\n\n $oForm->setLabels(\n array(\n\t\t\t\t'country_id' \t=> __('Country'),\n\t\t\t\t'cem_cemetery_id' \t=> __('Cemetery'),\n 'import_file' => __('Select File')\n )\n );\n\n $oForm->setValidators(\n array(\n\t\t\t\t\t'import_file' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'required' => __('Please select file'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'invalid' => __('Please select only EXCEL and CSV file'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'maxsize' => __('The file size is too large')\n\t\t\t\t\t\t\t\t\t\t\t\t\t),\n \t 'country_id' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'required' => __('Please select country')\n\t\t\t\t\t\t\t\t\t\t\t\t),\n \t 'cem_cemetery_id' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'required' => __('Please select cemetery')\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t)\n );\n }", "public static function getFormComponents(): array {\n return [\n 'title' => ['attr' => ['required' => true, 'maxlength' => AppConstants::INDEXED_STRINGS_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'status' => ['type' => 'translated', 'attr' => ['required' => true, 'maxlength' => AppConstants::INDEXED_STRINGS_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'startDate' => ['type' => 'date', 'attr' => ['required' => true]],\n 'endDate' => ['type' => 'date', 'attr' => ['required' => true]],\n 'price' => ['attr' => ['max' => AppConstants::SMALL_INTEGER_MAXIMUM_VALUE]],\n 'type' => ['type' => 'translated', 'attr' => ['max' => AppConstants::SMALL_INTEGER_MAXIMUM_VALUE]],\n // 'major_id' => ['type'=>'reference','attr' => ['maxlength' => AppConstants::STRINGS_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'requiredNumberOfUsers' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'appliedUsersCount' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'language' => ['details-type' => 'multi-data'],\n 'location' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'workHoursCount' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'willTakeCertificate' => ['type' => 'boolean', 'attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n // 'major' => [\n // 'type' => 'reference',\n // 'reference' => 'major.name',\n // 'displayColumn' => 'major.name',\n // ],\n 'company' => [\n 'type' => 'reference',\n 'reference' => 'company.name',\n 'displayColumn' => 'company.name',\n ],\n 'requiredNumberOfUsers' => ['attr' => ['max' => AppConstants::SMALL_INTEGER_MAXIMUM_VALUE]],\n 'briefDescription' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'fullDescription' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'majors' => ['details-type' => 'multi-data-majors'],\n\n ];\n }", "public function __construct($nome, $email, $mensagem, $tituloAnuncio, $categoriaAnuncio, $nameAnunciante, $telefone ) //oq eles recebem do formulario e do controller\n {\n // os dados aqui e declaramos os atributos em cima do construct e no construct entre () recebemos os\n //parametros do controller\n // e dentro o construct ou seja **aqui ** atualizamos os valores das variáveis\n //que vamos por la em cima\n\n $this->nome = $nome;\n $this->email = $email;\n $this->mensagem = $mensagem;\n $this->tituloAnuncio = $tituloAnuncio ;\n $this->categoriaAnuncio = $categoriaAnuncio ;\n $this->nameAnunciante = $nameAnunciante ;\n $this->telefone = $telefone ;\n\n\n }", "public function calendarioacedemico()\n {\n return $this->hasMany(CalendarioAcad::class, 'iCalAcadId');\n }", "function conf__pantallas_ei($componente)\n\t{\t\t\n\t\t//Ahora busco las que estan asociadas a la pantalla actual\n\t\t$busqueda = $this->get_entidad()->tabla('objetos_pantalla')->nueva_busqueda();\n\t\t$busqueda->set_padre('pantallas', $this->get_pant_actual());\n\t\t$ids = $busqueda->buscar_ids();\n\t\t$objetos_en_pantalla = array();\n\t\tforeach ($ids as $id) {\n\t\t\t$obj_a = $this->get_entidad()->tabla('objetos_pantalla')->get_fila_columna($id, 'dependencia');\n\t\t\t$orden = $this->get_entidad()->tabla('objetos_pantalla')->get_fila_columna($id, 'orden');\n\t\t\t$objetos_en_pantalla[] = array('dependencia' => $obj_a, 'orden' => $orden);\n\t\t}\n\t\t$salida = rs_ordenar_por_columna($objetos_en_pantalla, 'orden');\n\t\t$componente->set_datos($salida);\n\t}", "public function _report_form()\n\t{\n\t\t// Load the View\n\t\t$form = View::factory('actionable_form');\n\t\t// Get the ID of the Incident (Report)\n\t\t$id = Event::$data;\n\t\t\n\t\tif ($id)\n\t\t{\n\t\t\t// Do We have an Existing Actionable Item for this Report?\n\t\t\t$action_item = ORM::factory('actionable')\n\t\t\t\t->where('incident_id', $id)\n\t\t\t\t->find();\n\t\t\tif ($action_item->loaded)\n\t\t\t{\n\t\t\t\t$this->actionable = $action_item->actionable;\n\t\t\t\t$this->action_taken = $action_item->action_taken;\n\t\t\t\t$this->action_summary = $action_item->action_summary;\n\t\t\t\t$this->resolution_summary = $action_item->resolution_summary;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$form->actionable = $this->actionable;\n\t\t$form->action_taken = $this->action_taken;\n\t\t$form->action_summary = $this->action_summary;\n\t\t$form->resolution_summary = $this->resolution_summary;\n\t\t$form->render(TRUE);\n\t}", "public function getFkEconomicoAtividade()\n {\n return $this->fkEconomicoAtividade;\n }", "public function getFkImaConfiguracaoConvenioBb()\n {\n return $this->fkImaConfiguracaoConvenioBb;\n }", "public function getFkEconomicoResponsavel()\n {\n return $this->fkEconomicoResponsavel;\n }", "public function __construct()\n {\n parent::__construct();\n\n // creates the form\n $this->form = new BootstrapFormBuilder(self::$formName);\n\n // define the form title\n $this->form->setFormTitle(\"Consulta de relatórios\");\n\n $criteria_relatorio_id = new TCriteria();\n\n\tTTransaction::open('permission');\n $conn = TTransaction::get();\n $result = $conn->query('SELECT * FROM system_user_group WHERE system_user_id = '.TSession::getValue(\"userid\").' and system_group_id = (SELECT ID FROM system_group WHERE name = \\'Managers\\')');\n $objects = $result->fetchAll(PDO::FETCH_CLASS, \"stdClass\");\n if (count($objects) > 0) {\n $filterVar = null;\n $result = $conn->query('SELECT * FROM system_users WHERE system_unit_id = (SELECT system_unit_id FROM system_users WHERE id = '.TSession::getValue(\"userid\").')');\n $system_users = $result->fetchAll(PDO::FETCH_CLASS, \"stdClass\");\n foreach ($system_users as $user) {\n if ($filterVar != null) {\n $filterVar = $filterVar.',';\n }\n $filterVar = $filterVar.$user->id;\n }\n $criteria_relatorio_id->add(new TFilter('id', 'in', \"(SELECT id FROM relatorio WHERE user_id in ($filterVar))\"));\n } else {\n $filterVar = TSession::getValue(\"userid\");\n $criteria_relatorio_id->add(new TFilter('user_id', '=', $filterVar));\n }\n TTransaction::close();\n\n $relatorio_id = new TDBCheckGroup('relatorio_id', 'bedevops', 'Relatorio', 'id', '{titulo}','id asc' , $criteria_relatorio_id );\n $categoria_id = new TDBCombo('categoria_id', 'bedevops', 'Categoria', 'id', '{categoria}','categoria asc' );\n\n $relatorio_id->setBreakItems(2);\n $relatorio_id->setLayout('horizontal');\n\n $relatorio_id->setSize(600);\n $categoria_id->setSize('20%');\n\n $row1 = $this->form->addFields([new TLabel(\"Título:\", null, '14px', null)],[$relatorio_id]);\n $row2 = $this->form->addFields([new TLabel(\"Categoria:\", null, '14px', null)],[$categoria_id]);\n\n // keep the form filled during navigation with session data\n $this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );\n\n $btn_ongenerate = $this->form->addAction(\"Filtrar\", new TAction([$this, 'onGenerate']), 'fas:search #ffffff');\n $btn_ongenerate->addStyleClass('btn-primary'); \n\n $btn_onaction = $this->form->addAction(\"Cadastrar\", new TAction([$this, 'onAction']), 'fas:hammer #ffffff');\n $btn_onaction->addStyleClass('btn-success'); \n\n $btn_onexport = $this->form->addHeaderAction(\"Exportar\", new TAction([$this, 'onExport']), 'fas:file-pdf #ffffff');\n $btn_onexport->addStyleClass('btn-danger'); \n\n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 100%';\n $container->add(TBreadCrumb::create([\"Relatórios\",\"Consulta de Relatórios\"]));\n $container->add($this->form);\n\n TButton::disableField(self::$formName, 'btn_onexport');\n\n parent::add($container);\n\n }", "public function proposeAssoc(){\r\n\t\t$str = '<div class=\"partie\">\r\n\t\t\t<div class=\"unePartie\">\r\n\t\t\t\t<h1>Diriás qu\\'aqueste mot es coerent amb aquel sens ?</h1>\r\n\t\t\t\t'.$this->afficheAssoc().'\r\n\t\t\t\t<div class=\"listRep\">\r\n\t\t\t\t\t<div class=\"boutonRep\"><a href=\"partie.php?rep=Òc\" onclick=\"attend()\">Solide</a></div>\r\n\t\t\t\t\t<div class=\"boutonRep\"><a href=\"partie.php?rep=Non\" onclick=\"attend()\">Pas brica</a></div>\r\n\t\t\t\t\t<div class=\"boutonRep\"><a href=\"partie.php?rep=none\" onclick=\"attend()\">Sabi pas</a></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"quitter\">\r\n\t\t\t\t<a href=\"bye.php\">Arrestar la partida</a>\r\n\t\t\t</div>\r\n\t\t</div>';\r\n\t\treturn $str;\r\n\t}", "public function form($bean, $form, &$form_state) {\n $form = array();\n $form['settings'] = array(\n '#type' => 'fieldset',\n '#tree' => 1,\n '#title' => t('Options'),\n );\n\n $event_types=taxonomy_get_tree(taxonomy_vocabulary_machine_name_load('event_type')->vid);\n foreach($event_types as $event_type){\n $options[$event_type->tid]=$event_type->name;\n }\n $form['settings']['event_type'] = array(\n '#type' => 'select',\n '#title' => t('Event Type'),\n '#description' => t('Select a event type taxonomy term to filter by.'),\n '#options' => $options,\n '#multiple' => TRUE,\n '#default_value' => isset($bean->settings['event_type']) ? $bean->settings['event_type'] : 1,\n );\n $form['settings']['display_count'] = array(\n '#type' => 'select',\n '#title' => t('Number of items to display'),\n '#options' => array(1,2,3,4,5,6,7,8,9,10),\n '#default_value' => isset($bean->settings['display_count']) ? $bean->settings['display_count'] : 9,\n );\n $form['settings']['date2'] = array(\n '#type' => 'date_popup',\n '#title' => t('Start date'),\n '#default_value' => $date_now = date('m/d/Y'),\n '#date_format' => 'm/d/Y',\n '#date_label_position' => 'within',\n '#description' => t('Show events with a start date on or after the above date. If no date is provided, it will display future events'),\n );\n\n return $form;\n }", "function evt__procesar_especifico()\r\n\t{}", "public function actaConcertacion()\n {\n return $this->hasMany('App\\ActaConcetacion');\n }", "public function setAutorizacaoOdonto(array $autorizacaoOdonto)\n {\n $this->autorizacaoOdonto = $autorizacaoOdonto;\n return $this;\n }", "public function init()\r\n {\r\n \t\r\n \r\n \t \t\r\n \t$this->setName('FormularioCliente');\r\n $ID_CLIENTE = new Zend_Form_Element_Hidden('$ID_CLIENTE');\r\n $ID_CLIENTE->addFilter('Int');\r\n $ID_CLIENTE->removeDecorator('Label');\r\n \r\n \r\n \r\n $DT_ATUALIZACAO = new Zend_Form_Element_Text('DT_ATUALIZACAO');\r\n $DT_ATUALIZACAO->setLabel('DATA ÚLTIMA ATUALIZAÇÃO')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control')\r\n ->setAttrib('placeholder', '');\r\n \r\n \r\n \r\n $NM_CLIENTE= new Zend_Form_Element_Text('NM_CLIENTE');\r\n $NM_CLIENTE->setLabel('NOME')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter nome');\r\n \r\n $NR_CNPJ = new Zend_Form_Element_Text('NR_CNPJ');\r\n $NR_CNPJ->setLabel('CNPJ')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cnpj');\r\n \r\n \t$TX_OBSERVACAO = new Zend_Form_Element_Textarea('TX_OBSERVACAO');\r\n $TX_OBSERVACAO->setLabel('OBSERVA��O')\r\n \t\t\r\n\t\t\t\t\t ->removeDecorator('DtDdWrapper')\r\n \t\t\t ->removeDecorator('HtmlTag')\r\n \t\t\t\t ->removeDecorator('Label')\r\n \t\t\t ->setAttrib('class', 'form-control')\r\n \t\t\t\t ->setAttrib('rows', '5'); \r\n \t\r\n $NM_LOGRADOURO = new Zend_Form_Element_Text('NM_LOGRADOURO');\r\n $NM_LOGRADOURO->setLabel('LOGRADOURO')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter logradouro');\r\n \r\n \r\n \t\r\n \t$NR_NUMERO = new Zend_Form_Element_Text('NR_NUMERO');\r\n $NR_NUMERO->setLabel('NÚMERO')\r\n\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter número');\t\t\t \r\n \t\t\t\t \r\n \t$DS_COMPLEMENTO = new Zend_Form_Element_Text('DS_COMPLEMENTO');\r\n $DS_COMPLEMENTO->setLabel('LOGRADOURO')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter complemento');\t\t\r\n \r\n \t \r\n \t \r\n \t\t\t\t \r\n \t$NM_BAIRRO = new Zend_Form_Element_Text('NM_BAIRRO');\r\n $NM_BAIRRO->setLabel('BAIRRO')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter bairro');\r\n \t\r\n \t$NR_CEP= new Zend_Form_Element_Text('NR_CEP');\r\n $NR_CEP->setLabel('CEP')\r\n\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cep');\r\n \t\r\n \t\t\r\n \t$NM_CIDADE = new Zend_Form_Element_Text('NM_CIDADE');\r\n $NM_CIDADE->setLabel('CIDADE')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cidade');\r\n \t \r\n \t\r\n \t$estados = array(\"AC\"=>\"Acre\", \"AL\"=>\"Alagoas\", \"AM\"=>\"Amazonas\", \"AP\"=>\"Amapá\",\"BA\"=>\"Bahia\",\"CE\"=>\"Ceará\",\"DF\"=>\"Distrito Federal\",\"ES\"=>\"Espírito Santo\",\"GO\"=>\"Goiás\",\"MA\"=>\"Maranhão\",\"MT\"=>\"Mato Grosso\",\"MS\"=>\"Mato Grosso do Sul\",\"MG\"=>\"Minas Gerais\",\"PA\"=>\"Pará\",\"PB\"=>\"Paraíba\",\"PR\"=>\"Paraná\",\"PE\"=>\"Pernambuco\",\"PI\"=>\"Piauí\",\"RJ\"=>\"Rio de Janeiro\",\"RN\"=>\"Rio Grande do Norte\",\"RO\"=>\"Rondônia\",\"RS\"=>\"Rio Grande do Sul\",\"RR\"=>\"Roraima\",\"SC\"=>\"Santa Catarina\",\"SE\"=>\"Sergipe\",\"SP\"=>\"São Paulo\",\"TO\"=>\"Tocantins\");\r\n \t\r\n \t$NM_UF = new Zend_Form_Element_Select( 'NM_UF' );\r\n $NM_UF->setLabel('UF')\r\n ->addMultiOptions($estados)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t->removeDecorator('DtDdWrapper')\r\n \t->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t->setAttrib('class', 'form-control select2') ->setAttrib('placeholder', 'Enter uf');;\t\t \r\n\r\n \t\t\t\t \r\n \t$FK_RAMO_ATIVIDADE= new Zend_Form_Element_Select('FK_RAMO_ATIVIDADE');\r\n $FK_RAMO_ATIVIDADE->setAttrib('class', 'form-control');\r\n \r\n $ramoAtividade= new Application_Model_DbTable_RamoAtividade();\r\n $FK_RAMO_ATIVIDADE->setLabel('RAMO ATIVIDADE')\r\n ->setRequired(true)\r\n\t\t->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control select2');\r\n \r\n \r\n $listaRamoAtividade=$ramoAtividade->getRamoAtividadeCombo();\r\n $FK_RAMO_ATIVIDADE->setMultiOptions( $listaRamoAtividade );\t\t\t \r\n \t\r\n $submit = new Zend_Form_Element_Submit('submit');\r\n $submit->setLabel(\"Adiconar\");\r\n $submit->setAttrib('id', 'submitbutton');\r\n $submit->removeDecorator('DtDdWrapper')\r\n ->setAttrib('class', 'btn btn-primary button')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label'); \r\n \r\n $this->addElements(array($ID_CLIENTE,$NM_CLIENTE,$NR_CNPJ,$TX_OBSERVACAO,$NM_LOGRADOURO,$NR_NUMERO,$DS_COMPLEMENTO,$NM_BAIRRO,$NR_CEP,$NM_CIDADE,$NM_UF,$DT_ATUALIZACAO,$FK_RAMO_ATIVIDADE,$submit)); \r\n $this->setDecorators( array( array('ViewScript', array('viewScript' => '/forms/formularioCliente.phtml')))); \r\n\t\r\n }", "public function getFkOrcamentoPaoPpaAcao()\n {\n return $this->fkOrcamentoPaoPpaAcao;\n }", "public function _report_form()\n\t{\n\t\t// Load the View\n\t\t$form = View::factory('actionable_form');\n\t\t// Get the ID of the Incident (Report)\n\t\t$id = Event::$data;\n\n\t\tif ($id)\n\t\t{\n\t\t\t// Do We have an Existing Actionable Item for this Report?\n\t\t\t$action_item = ORM::factory('actionable')\n\t\t\t\t->where('incident_id', $id)\n\t\t\t\t->find();\n\t\t\tif ($action_item->loaded)\n\t\t\t{\n\t\t\t\t$this->actionable = $action_item->actionable;\n\t\t\t\t$this->action_taken = $action_item->action_taken;\n\t\t\t\t$this->action_summary = $action_item->action_summary;\n\t\t\t}\n\t\t}\n\n\t\t$form->actionable = $this->actionable;\n\t\t$form->action_taken = $this->action_taken;\n\t\t$form->action_summary = $this->action_summary;\n\t\t$form->render(TRUE);\n\t}", "public function __construct()\n {\n $this->middleware('auth');\n $this->field_list = ['identificador'=>'Folio','number_usuario'=>'Membresía','conta'=>'Número','premio'=>'Premio','dtip'=>'Tipo', 'name'=>'Lugar','punto'=>'Puntos','nombre'=>'Estado','estad_uno'=>'Fecha de elaboración','id'=>'Acciones'];\n //$this->field_list = ['folio'=>'Folio','id_product'=>'Producto','name'=>'Estacion','points'=>'Puntos','value'=>'Valor','qr_memberships'=>'Membresia','name_status'=>'Status','name_state'=>'Estado', 'name_exchange'=>'Tipo','todate'=>'Fecha','id'=>'Acciones'];\n $this->name = 'Recibido';\n $this->name_plural = 'fa fa-newspaper-o';\n $this->form = 'App\\Core\\Forms\\Lealtad\\RecibidoForm';\n $this->model = 'App\\Models\\Lealtad\\Exchange';\n $this->url_prefix = 'recibidoexchange';\n $validation_add = [\n // 'folio'=>'required|max:25',\n ];\n $validation_edit = $validation_add;\n $this->setValidatorAdd($validation_add);\n $this->setValidatorEdit($validation_edit);\n }", "public function colaboradoresEvento ($event) {\n\t\t$this->db->select(\"*\");\n\t\t$this->db->from(\"colaborador_evento\");\n\t\t$this->db->where(\"fk_id_evento\", $event);\n\t\treturn $this->db->get()->result_array();\n\t}", "public function __construct()\n {\n $this->middleware('auth');\n //$this->field_list = ['nombre' => 'Nombre', 'direccion' => 'Dirección', 'telefono' => 'Teléfono', 'imglogo' => 'Logo', 'total_facturas' => 'Facturas', 'total_timbres' => 'Timbres', 'activo' => 'Activo', 'id' => 'Acciones'];\n $this->field_list = ['nombre' => 'Nombre', 'direccion' => 'Dirección', 'telefono' => 'Teléfono', 'id' => 'Acciones'];\n $this->name = 'Empresas';\n $this->name_plural = 'Empresas';\n $this->form = 'App\\Core\\Forms\\Admin\\EmpresaForm';\n $this->model = 'App\\Models\\Catalogos\\Empresas';\n $this->url_prefix = 'empresas';\n $validation_add = [];\n $validation_edit = $validation_add;\n $this->setValidatorAdd($validation_add);\n $this->setValidatorEdit($validation_edit);\n }", "function clsRecordmc_calificacion_incidente($RelativePath, & $Parent)\n {\n\n global $FileName;\n global $CCSLocales;\n global $DefaultDateFormat;\n $this->Visible = true;\n $this->Parent = & $Parent;\n $this->RelativePath = $RelativePath;\n $this->Errors = new clsErrors();\n $this->ErrorBlock = \"Record mc_calificacion_incidente/Error\";\n $this->DataSource = new clsmc_calificacion_incidenteDataSource($this);\n $this->ds = & $this->DataSource;\n $this->UpdateAllowed = true;\n $this->ReadAllowed = true;\n if($this->Visible)\n {\n $this->ComponentName = \"mc_calificacion_incidente\";\n $this->Attributes = new clsAttributes($this->ComponentName . \":\");\n $CCSForm = explode(\":\", CCGetFromGet(\"ccsForm\", \"\"), 2);\n if(sizeof($CCSForm) == 1)\n $CCSForm[1] = \"\";\n list($FormName, $FormMethod) = $CCSForm;\n $this->EditMode = ($FormMethod == \"Edit\");\n $this->FormEnctype = \"application/x-www-form-urlencoded\";\n $this->FormSubmitted = ($FormName == $this->ComponentName);\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\n $this->Button_Update = new clsButton(\"Button_Update\", $Method, $this);\n $this->Cumple_DISP_SOPORTE = new clsControl(ccsHidden, \"Cumple_DISP_SOPORTE\", \"Disponibilidad del Personal de Soporte\", ccsInteger, \"\", CCGetRequestParam(\"Cumple_DISP_SOPORTE\", $Method, NULL), $this);\n $this->Cumple_Inc_TiempoSolucion = new clsControl(ccsListBox, \"Cumple_Inc_TiempoSolucion\", \"Tiempo Solucion\", ccsInteger, \"\", CCGetRequestParam(\"Cumple_Inc_TiempoSolucion\", $Method, NULL), $this);\n $this->Cumple_Inc_TiempoSolucion->DSType = dsListOfValues;\n $this->Cumple_Inc_TiempoSolucion->Values = array(array(\"0\", \"No Cumple\"), array(\"1\", \"Cumple\"));\n $this->Cumple_Inc_TiempoAsignacion = new clsControl(ccsListBox, \"Cumple_Inc_TiempoAsignacion\", \"Tiempo Asignacion\", ccsInteger, \"\", CCGetRequestParam(\"Cumple_Inc_TiempoAsignacion\", $Method, NULL), $this);\n $this->Cumple_Inc_TiempoAsignacion->DSType = dsListOfValues;\n $this->Cumple_Inc_TiempoAsignacion->Values = array(array(\"0\", \"No Cumple\"), array(\"1\", \"Cumple\"));\n $this->Obs_Manuales = new clsControl(ccsTextArea, \"Obs_Manuales\", \"Obs Manuales\", ccsText, \"\", CCGetRequestParam(\"Obs_Manuales\", $Method, NULL), $this);\n $this->severidad = new clsControl(ccsHidden, \"severidad\", \"Severidad\", ccsInteger, \"\", CCGetRequestParam(\"severidad\", $Method, NULL), $this);\n $this->MesReporte = new clsControl(ccsHidden, \"MesReporte\", \"Mes Reporte\", ccsInteger, \"\", CCGetRequestParam(\"MesReporte\", $Method, NULL), $this);\n $this->MesReporte->Required = true;\n $this->AnioReporte = new clsControl(ccsHidden, \"AnioReporte\", \"Anio Reporte\", ccsInteger, \"\", CCGetRequestParam(\"AnioReporte\", $Method, NULL), $this);\n $this->AnioReporte->Required = true;\n $this->id_servicio = new clsControl(ccsHidden, \"id_servicio\", \"Id Servicio\", ccsInteger, \"\", CCGetRequestParam(\"id_servicio\", $Method, NULL), $this);\n $this->id_proveedor = new clsControl(ccsHidden, \"id_proveedor\", \"Id Proveedor\", ccsInteger, \"\", CCGetRequestParam(\"id_proveedor\", $Method, NULL), $this);\n $this->FechaUltMod = new clsControl(ccsHidden, \"FechaUltMod\", \"Fecha Ult Mod\", ccsDate, array(\"ShortDate\"), CCGetRequestParam(\"FechaUltMod\", $Method, NULL), $this);\n $this->UsrUltMod = new clsControl(ccsHidden, \"UsrUltMod\", \"Usr Ult Mod\", ccsText, \"\", CCGetRequestParam(\"UsrUltMod\", $Method, NULL), $this);\n $this->ObsCAPC = new clsControl(ccsLabel, \"ObsCAPC\", \"ObsCAPC\", ccsText, \"\", CCGetRequestParam(\"ObsCAPC\", $Method, NULL), $this);\n }\n }", "protected function createComponentAddEvent() {\n\t\t$form = new AppForm;\n\t\t$form->setTranslator($this->translator);\n\t\t$form->addText('name', 'Name:*')\n\t\t\t\t->addRule(Form::FILLED, 'Fill name.');\n\t\t$form->addText('date', 'Date:*')\n\t\t\t\t\t\t->addRule(Form::FILLED, 'Fill date.')\n\t\t\t\t\t\t->getControlPrototype()->class = \"datepicker\";\n\t\t$form->addTextArea('description', 'Description:*')\n\t\t\t\t->addRule(Form::FILLED, 'Fill description.');\n\n\t\t$form->addSubmit('post', 'Add');\n\t\t$form->onSubmit[] = callback($this, 'addEventFormSubmitted');\n\t\treturn $form;\n\t}", "public function eventos()\n {\n return $this->belongsToMany(Evento::class);\n }", "public function incluir ()\n {\n try {\n // Define a ação de incluir\n $acao = Orcamento_Business_Dados::ACTION_INCLUIR;\n \n // Cria o formulário vazio\n $formulario = $this->retornaFormulario ( $acao );\n \n // Faz transformações no formulário, se necessário\n $formulario = $this->transformaFormulario ( $formulario, $acao );\n \n // Exibe o formulário\n $this->view->formulario = $formulario;\n \n // Grava o novo registro\n $this->gravaDados ( $acao, $formulario );\n } catch ( Exception $e ) {\n // Gera o erro\n throw new Zend_Exception ( $e->getMessage () );\n }\n }", "protected function seteoContacto() {\n if (is_object($this->responsable)) {\n if ($this->responsable->getNombre() != '') {\n $this->arrayContacto[] = \"<nombre>\" . $this->responsable->getNombre() . \"</nombre>\";\n $this->arrayObligatorios[$this->NOMBRE] = 1;\n }\n if ($this->responsable->getApellido() != '') {\n $this->arrayContacto[] = \"<apellido>\" . $this->responsable->getApellido() . \"</apellido>\";\n $this->arrayObligatorios[$this->APELLIDO] = 1;\n }\n if ($this->responsable->getEmail() != '') {\n $this->arrayContacto[] = \"<email>\" . $this->responsable->getEmail() . \"</email>\";\n $this->arrayObligatorios[$this->EMAIL] = 1;\n }\n $this->arrayContacto[] = \"<horarioContacto>9 a 13 y 15 a 19 hs</horarioContacto>\";\n $this->arrayObligatorios[$this->HORARIOCONT] = 1;\n }\n }", "function evt__agregar()\n\t{\n\t\t$this->set_pantalla('pant_edicion');\n\t}", "function loadClienteForm(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_GET';//'\n\t\t$this->tipo_procedimiento='IME';//tipo de transaccion\n\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t$this->captura('v_valor','varchar');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\n\t\t$this->captura('nombre_completo1','text');\n\t\t$this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t/*$this->captura('v_id_cliente','int4');\n\t\t$this->captura('v_genero','varchar');\n\t\t$this->captura('v_ci','varchar');\n\t\t$this->captura('v_email','varchar');\n\t\t$this->captura('v_direccion','varchar');\n\t\t$this->captura('v_celular','varchar');\n\t\t$this->captura('v_nombre','varchar');\n\t\t$this->captura('v_lugar_expedicion','varchar');\n\t\t$this->captura('v_apellido_paterno','varchar');\n\t\t$this->captura('v_telefono','varchar');\n\t\t$this->captura('v_ciudad_residencia','varchar');\n\t\t$this->captura('v_id_pais_residencia','int4');\n\t\t$this->captura('v_nacionalidad','varchar');\n\t\t$this->captura('v_barrio_zona','varchar');\n\t\t//$this->captura('estado_reg','varchar');\n\t\t$this->captura('v_apellido_materno','varchar');\n\t\t//$this->captura('id_usuario_ai','int4');\n\t\t//$this->captura('fecha_reg','timestamp');\n\t\t//$this->captura('usuario_ai','varchar');\n\t\t//$this->captura('id_usuario_reg','int4');\n\t\t//$this->captura('fecha_mod','timestamp');\n\t\t//$this->captura('id_usuario_mod','int4');\n\t\t//$this->captura('usr_reg','varchar');\n\t\t//$this->captura('usr_mod','varchar');\n\n\t\t$this->captura('v_completo','text');\n\t\t$this->captura('v_nombre_completo2','text');\n\t\t$this->captura('v_pais_residencia','varchar');*/\n\t\t//$this->captura('nombre','varchar');\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function form_init_elements() \r\n {\r\n //we want an confirmation page for this form.\r\n //$this->set_confirm();\r\n\r\n // Course Info \r\n $elemT1 = new FEText( \"courseName\", true, 10);\r\n $elemT1->set_style_attribute('align', 'left');\r\n $elemT1->set_attribute(\"id\",\"coursename\");\r\n $elemT1->set_attribute(\"accesskey\",\"n\"); \r\n $this->add_element($elemT1);\r\n\r\n $elemP1 = new FETextArea(\"coursedataDescripcion\", true, 10, 50, null, 300);\r\n $elemP1->set_style_attribute('align', 'left');\r\n $elemP1->set_attribute(\"id\",\"coursedatadescripcion\"); \r\n $elemP1->set_attribute(\"accesskey\",\"d\"); \r\n $this->add_element($elemP1);\r\n\r\n include(Util::app_Path(\"andromeda/include/classes/nls.inc.php\"));\r\n $language = $this->_formatElem(\"FEListBox\", \"courseLanguage\", \"courseLanguage\", FALSE, \"100px\", NULL, $nls['languages_form']);\r\n $language->set_style_attribute('align', 'left');\r\n $language->set_attribute(\"id\",\"courselanguage\");\r\n $language->set_attribute(\"accesskey\",\"l\"); \r\n $this->add_element($language);\r\n \r\n $elemT2 = new FEText( \"coursedataVersion\", FALSE, 10);\r\n $elemT2->set_style_attribute('align', 'left');\r\n $elemT2->set_attribute(\"id\",\"coursedataversion\");\r\n $elemT2->set_attribute(\"accesskey\",\"v\"); \r\n $this->add_element($elemT2);\r\n \r\n $elemP2 = new FETextArea(\"coursedataPalabrasClaves\", false, 10, 50, null, 300);\r\n $elemP2->set_style_attribute('align', 'left');\r\n $elemP2->set_attribute(\"id\",\"coursedatapalabrasclaves\");\r\n $elemP2->set_attribute(\"accesskey\",\"w\"); \r\n $this->add_element($elemP2);\r\n\r\n $elemT3 = new FEText( \"coursedataDestinatarios\", FALSE, 10);\r\n $elemT3->set_style_attribute('align', 'left');\r\n $elemT3->set_attribute(\"id\",\"coursedatadestinatarios\");\r\n $elemT3->set_attribute(\"accesskey\",\"u\"); \r\n $this->add_element($elemT3);\r\n \r\n $elemP3 = new FETextArea(\"coursedataConocimientosPrevios\", false, 10, 50, null, 300);\r\n $elemP3->set_style_attribute('align', 'left');\r\n $elemP3->set_attribute(\"id\",\"coursedataconocimientosprevios\");\r\n $elemP3->set_attribute(\"accesskey\",\"k\"); \r\n $this->add_element($elemP3);\r\n\r\n $elemT4 = new FEText( \"coursedataMetodologia\", FALSE, 10);\r\n $elemT4->set_style_attribute('align', 'left');\r\n $elemT4->set_attribute(\"id\",\"coursedatametodologia\");\r\n $elemT4->set_attribute(\"accesskey\",\"m\"); \r\n $this->add_element($elemT4);\r\n\r\n $elemCB1 = new FECheckBox('courseActive', agt('Poner el curso activo.') );\r\n $elemCB1->set_style_attribute('align', 'left');\r\n $elemCB1->set_attribute(\"id\",\"courseactive\"); \r\n $elemCB1->set_attribute(\"accesskey\",\"o\"); \r\n $this->add_element( $elemCB1 );\r\n\r\n $elemCB2 = new FECheckBox('courseAccess', agt('Poner el curso accesible.') ); \r\n $elemCB2->set_style_attribute('align', 'left');\r\n $elemCB2->set_attribute(\"id\",\"courseaccess\");\r\n $elemCB2->set_attribute(\"accesskey\",\"p\"); \r\n $this->add_element( $elemCB2 ); \r\n\r\n $submit = $this->_formatElem(\"base_SubmitButton\", \"Aceptar\", \"submit\", agt(\"Insertar Curso\"));\r\n $submit->set_attribute(\"id\",\"submit\"); \r\n $submit->set_attribute(\"accesskey\",\"e\"); \r\n $this->add_element($submit);\r\n }", "public function registarAtuacoes() {\n //ucwords-colocar iniciais em maiusculo\n \n $this->form_validation->set_rules('dataEvento', 'Data', 'required');\n $this->form_validation->set_rules('localizacao', 'Localização', 'required|ucwords');\n $this->form_validation->set_rules('orcamento', 'Orçamento', 'required');\n $this->form_validation->set_rules('responsavel', 'Responsável', 'required|ucwords');\n $this->form_validation->set_rules('contacto', 'Contacto', 'required');\n $this->form_validation->set_rules('designacao', 'Designação', 'required|ucwords|is_unique[eventos.designacao]');\n\n \n \n\n\n if ($this->form_validation->run() == FALSE) {\n $this->load->view('includes/header_v');\n $this->load->view('registarAtuacoes_v');\n $this->load->view('includes/menu_v');\n $this->load->view('includes/footer_v');\n } else {\n //insere os dados na base de dados\n $dados = elements(array('estado','tipo', 'dataEvento', 'localizacao','orcamento','responsavel','contacto','designacao'), $this->input->post());\n \n $this->load->model('Atuacoes_m');\n $this->Atuacoes_m->do_insert($dados);\n \n redirect('atuacoes/consultarAtuacoes/' . '/1', 'refresh');\n }\n }" ]
[ "0.5152678", "0.5120071", "0.5088142", "0.50752866", "0.47845143", "0.45727366", "0.45681238", "0.45629045", "0.45456752", "0.45378312", "0.44816238", "0.44474918", "0.44294387", "0.4412847", "0.4394826", "0.43625692", "0.43269375", "0.43192586", "0.43000907", "0.42959833", "0.42818385", "0.42650554", "0.42626667", "0.42613524", "0.42529464", "0.42529464", "0.42402872", "0.42362246", "0.4226025", "0.42257044", "0.42230242", "0.42197058", "0.42096928", "0.42096928", "0.4176695", "0.41762486", "0.4175804", "0.41718763", "0.4171373", "0.4149527", "0.41494092", "0.4143496", "0.41433513", "0.41411263", "0.41405913", "0.41399783", "0.4138975", "0.4136845", "0.4124188", "0.41194826", "0.41061133", "0.41056028", "0.40979373", "0.40936196", "0.4086633", "0.40814453", "0.4074252", "0.40522027", "0.40501836", "0.40500212", "0.40496257", "0.404889", "0.40472272", "0.40466943", "0.40423077", "0.40379283", "0.4032736", "0.40307036", "0.40229514", "0.40190533", "0.40139297", "0.4008889", "0.39936474", "0.39861777", "0.39735183", "0.39711747", "0.39668512", "0.39561844", "0.39559683", "0.3953504", "0.39531466", "0.3952604", "0.39495626", "0.394944", "0.39465752", "0.39417583", "0.39378494", "0.3932654", "0.3931604", "0.3925877", "0.39235312", "0.39172527", "0.39134854", "0.3911524", "0.39083058", "0.3906851", "0.39043677", "0.39018008", "0.3901487", "0.39013842", "0.39007026" ]
0.0
-1
Inicializa o controlador Basico_OPController_FormularioAssocclElementoAssocclEventoOPController
protected function _init() { // chamando inicializacao da classe pai parent::_init(); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newAssocForm()\n {\n $assocs = $this->assocManager->getAssocs();\n require_once 'vue/new.assoc.view.php';\n }", "public function init()\n {\n \t\n \t$this->setAttrib('enctype', 'multipart/form-data');\n \t \t\n \t$this->setName('FormularioOcorrencia');\n $id = new Zend_Form_Element_Hidden('id_ocorrencia');\n $id->addFilter('Int');\n \n \n \n\t\t$descricao = new Zend_Form_Element_Textarea('descricao');\n $descricao->setLabel('Descricao')\n ->setRequired(true);\n\t\t$descricao->removeDecorator('DtDdWrapper')\n ->removeDecorator('HtmlTag')\n ->removeDecorator('Label')\n ->setAttrib('class', 'form-control')\n \t->setAttrib('rows', '5');\n \n\t\t\n\t\t\n\t\t\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setLabel(\"Adiconar\");\n $submit->setAttrib('id', 'submitbutton');\n $submit->removeDecorator('DtDdWrapper')\n ->setAttrib('class', 'btn btn-primary')\n ->removeDecorator('HtmlTag')\n ->removeDecorator('Label');\n \n \n \n \n $this->addElements(array($id,$descricao,$submit)); \n \n $this->setDecorators( array( array('ViewScript', array('viewScript' => 'formularioOcorrencia.phtml'))));\n }", "public function init() {\n $dcpr_id_processo_digital = new Zend_Form_Element_Hidden('DCPR_ID_PROCESSO_DIGITAL');\n $dcpr_id_processo_digital->setRequired(true)\n ->addValidator('StringLength', false, array(0, 5));\n\n $dcpr_id_documento = new Zend_Form_Element_Hidden('DCPR_ID_DOCUMENTO');\n $dcpr_id_documento->setRequired(true)\n ->addValidator('StringLength', false, array(0, 20));\n\n $dcpr_id_tp_vinculacao = new Zend_Form_Element_Select('DCPR_ID_TP_VINCULACAO');\n $dcpr_id_tp_vinculacao->setRequired(true)\n ->setLabel('Selecione o tipo de juntada:');\n\n $dcpr_dh_vinculacao_doc = new Zend_Form_Element_Text('DCPR_DH_VINCULACAO_DOC');\n $dcpr_dh_vinculacao_doc->setRequired(true)\n ->setLabel('Data e Hora da juntada:');\n\n $dcpr_ic_ativo = new Zend_Form_Element_Checkbox('DCPR_IC_ATIVO');\n $dcpr_ic_ativo->setRequired(true)\n ->setLabel('Ativo:')\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $this->addElements(array($dcpr_id_processo_digital\n , $dcpr_id_documento\n , $dcpr_id_tp_vinculacao\n , $dcpr_dh_vinculacao_doc\n , $dcpr_ic_ativo));\n }", "public function init()\r\n {\r\n \t\r\n \r\n \tif(!isset($this->_PROJETOS)){\r\n \t\t$projeto= new Application_Model_DbTable_Projeto();\r\n \t\t$this->_PROJETOS=$projeto->getProjetoCombo() ;\r\n \t} \t\r\n \t$this->setName('FormularioServico');\r\n $FL_VALIDAR_SERVICO= new Zend_Form_Element_Hidden('FL_VALIDAR_SERVICO');\r\n $FL_VALIDAR_SERVICO->addFilter('Int');\r\n $FL_VALIDAR_SERVICO->removeDecorator('Label');\r\n \r\n $ID_SERVICO = new Zend_Form_Element_Hidden('ID_SERVICO');\r\n $ID_SERVICO->addFilter('Int');\r\n $ID_SERVICO->removeDecorator('Label');\r\n \r\n \r\n $FK_OPERADOR = new Zend_Form_Element_Hidden('FK_OPERADOR');\r\n $FK_OPERADOR->addFilter('Int');\r\n $FK_OPERADOR->removeDecorator('Label');\r\n \r\n $FL_PCP = new Zend_Form_Element_Hidden('FL_PCP');\r\n $FL_PCP->addFilter('Int');\r\n $FL_PCP->removeDecorator('Label');\r\n \r\n /* \r\n \r\n \r\n \r\n \r\n \r\n \r\n */\r\n\r\n $FK_TIPO_SERVICO= new Zend_Form_Element_Select('FK_TIPO_SERVICO');\r\n $tipoServico= new Application_Model_DbTable_TipoServico();\r\n $FK_TIPO_SERVICO->setLabel('TIPO PCP');\r\n $FK_TIPO_SERVICO->setMultiOptions( $tipoServico->getTipoServicoCombo() )\r\n ->setRequired(true)\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control select2');\r\n \r\n\t\t\r\n \r\n $FK_PROJETO= new Zend_Form_Element_Hidden('FK_PROJETO');\r\n $FK_PROJETO->addFilter('Int');\r\n $FK_PROJETO->removeDecorator('Label');\r\n \r\n $FK_PROJETO1 = new Zend_Form_Element_Text('FK_PROJETO1');\r\n $FK_PROJETO1->setLabel('PROJETO')\r\n ->setAttrib('class', 'form-control');\r\n\r\n \r\n $DS_SERVICO = new Zend_Form_Element_Textarea('DS_SERVICO');\r\n $DS_SERVICO->setLabel('PCP')\r\n \t\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control ')\r\n \t ->setAttrib('rows', '20');\r\n \r\n $DT_SERVICO = new Zend_Form_Element_Text('DT_SERVICO');\r\n $DT_SERVICO->setLabel('DATA')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control')\r\n ->addPrefixPath('Aplicacao_Validate', 'Aplicacao/Validate/', 'validate')\r\n\t\t\t->addValidator(new Aplicacao_Validate_Data())\r\n ->setAttrib('placeholder', 'Enter serviço ');\r\n \r\n $NR_CARGA_HORARIA = new Zend_Form_Element_Text('NR_CARGA_HORARIA');\r\n $NR_CARGA_HORARIA->setLabel('CARGA HORARIA')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->addValidator('float', true, array('locale' => 'en_US'))\r\n ->setAttrib('class', 'form-control')\r\n ->setAttrib('placeholder', 'Enter carga horária ');\r\n \r\n \r\n \r\n $submit = new Zend_Form_Element_Submit('submit');\r\n $submit->setLabel(\"Adiconar\");\r\n $submit->setAttrib('id', 'submitbutton');\r\n $submit->removeDecorator('DtDdWrapper')\r\n ->setAttrib('class', 'btn btn-primary button')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label'); \r\n \r\n $this->addElements(array($FK_PROJETO1,$FL_VALIDAR_SERVICO,$ID_SERVICO,$FK_PROJETO,$DS_SERVICO,$FK_OPERADOR,$FK_TIPO_SERVICO,$DT_SERVICO,$FL_PCP,$NR_CARGA_HORARIA,$submit)); \r\n $this->setDecorators( array( array('ViewScript', array('viewScript' => '/forms/formularioPcpProjeto.phtml')))); \r\n\t\r\n }", "public function init()\r\n {\r\n \t\r\n \r\n \t \t\r\n \t$this->setName('FormularioRamoAtividade');\r\n $ID_RAMO_ATIVIDADE = new Zend_Form_Element_Hidden('ID_RAMO_ATIVIDADE');\r\n $ID_RAMO_ATIVIDADE->addFilter('Int');\r\n $ID_RAMO_ATIVIDADE->removeDecorator('Label');\r\n \r\n $DS_RAMO_ATIVIDADE= new Zend_Form_Element_Text('DS_RAMO_ATIVIDADE');\r\n $DS_RAMO_ATIVIDADE->setLabel('RAMO DE ATIVIDADE')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter ramo de atividade');\r\n \r\n \t \r\n \t\t\t\t \r\n \t\t\t\t \r\n \r\n $submit = new Zend_Form_Element_Submit('submit');\r\n $submit->setLabel(\"Adiconar\");\r\n $submit->setAttrib('id', 'submitbutton');\r\n $submit->removeDecorator('DtDdWrapper')\r\n ->setAttrib('class', 'btn btn-primary button')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label'); \r\n \r\n $this->addElements(array($ID_RAMO_ATIVIDADE,$DS_RAMO_ATIVIDADE,$submit)); \r\n $this->setDecorators( array( array('ViewScript', array('viewScript' => '/forms/formularioRamoAtividade.phtml')))); \r\n\t\r\n }", "function form_init_elements() \r\n {\r\n //we want an confirmation page for this form.\r\n //$this->set_confirm();\r\n\r\n //Crea una caja de texto llamada nombre y longitud 50\r\n $elemT = new FEText(\"Asunto\", FALSE, 50);\r\n //$elemT->set_style_attribute('align', 'right');\r\n //Le asignamos el id nombre y la tecla de acceso n (ctrl+n)\r\n $elemT->set_attribute(\"id\",\"asunto\");\r\n $elemT->set_attribute(\"accesskey\",\"n\"); \r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemT);\r\n\t\r\n //Creamos un Area de Texto llamada comentario\r\n $elemTA = new FETextArea(\"Comentario\", FALSE, 10, 60,\"500px\", \"100px\");\r\n $elemTA->set_attribute('wrap', 'physical');\r\n //Le asignamos el id email y la tecla de acceso c (ctrl+c) \r\n $elemTA->set_attribute(\"id\",\"comentario\");\r\n $elemTA->set_attribute(\"accesskey\",\"d\");\r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemTA);\r\n\r\n //Añade un campo oculto llamado id. En ocasiones este campo se utiliza para indicar ciertas operaciones.\r\n //OJO!! es un punto sensible porque el usuario podría cambiar su valor de forma inexperada para el código.\r\n// $this->add_hidden_element(\"id\");\r\n\r\n //Añade un boton con la acción submit\r\n $submit = $this->_formatElem(\"base_SubmitButton\", \"Aceptar\", \"submit\", agt(\"miguel_Enter\"));\r\n //$submit->set_attribute('id',''); \r\n $submit->set_attribute('accesskey','e'); \r\n $this->add_element($submit); \r\n\t\t\t\t\r\n\t\t\t\t$this->add_hidden_element('status');\r\n \t\t$this->set_hidden_element_value('status', 'new');\r\n }", "public function __construct()\n {\n parent::__construct();\n\n // creates the form\n $this->form = new BootstrapFormBuilder(self::$formName);\n\n // define the form title\n $this->form->setFormTitle('Avaliações');\n\n $inscricao_evento_id = new TDBUniqueSearch('inscricao_evento_id', 'eventtus', 'Evento', 'id', 'id','nome asc' );\n\n $inscricao_evento_id->setSize('100%');\n $inscricao_evento_id->setMinLength(0);\n $inscricao_evento_id->setMask('{nome}');\n\n $row1 = $this->form->addFields([new TLabel('Evento', null, '14px', null),$inscricao_evento_id]);\n $row1->layout = ['col-sm-6'];\n\n // keep the form filled during navigation with session data\n $this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );\n\n $btn_ongenerate = $this->form->addAction('Gerar', new TAction([$this, 'onGenerate']), 'fa:search #ffffff');\n $btn_ongenerate->addStyleClass('btn-primary'); \n\n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 100%';\n $container->add(TBreadCrumb::create(['Cadastros','Avaliações']));\n $container->add($this->form);\n\n parent::add($container);\n\n }", "protected function initializeAction()\n\t{\n\t\tparent::init('Form');\n\t}", "function conf__pantallas_evt(toba_ei_formulario $form)\n\t{\n\t\t$datos = array();\n\t\t//Meto los eventos asociados actuales por si agregaron alguno.\n\t\tforeach ($this->s__pantalla_evt_asoc as $dep) {\n\t\t\t$datos[$dep] = array('evento' => $dep, 'asociar' => 0);\n\t\t}\n\t\t//Busco la asociacion hecha\n\t\t$busqueda = $this->get_entidad()->tabla('eventos_pantalla')->nueva_busqueda();\n\t\t$busqueda->set_padre('pantallas', $this->get_pant_actual());\n\t\t$ids = $busqueda->buscar_ids();\n\t\tforeach ($ids as $id) {\n\t\t\t$id_evt_padre = $this->get_entidad()->tabla('eventos_pantalla')->get_id_padres(array($id), 'eventos');\n\t\t\t$evt_involucrado = $this->get_entidad()->tabla('eventos')->get_fila_columna(current($id_evt_padre), 'identificador');\n\t\t\t$datos[$evt_involucrado] = array('evento' => $evt_involucrado, 'asociar' => 1);\n\t\t}\n\t\t$form->set_datos(array_values($datos));\n\t}", "public function init() {\n $docm_id_documento = new Zend_Form_Element_Hidden('DOCM_ID_DOCUMENTO');\n $docm_id_documento->setRequired(true)\n ->addValidator('StringLength', false, array(0, 20))\n ->removeDecorator('Label')\n ->removeDecorator('HtmlTag');\n\n $docm_nr_documento = new Zend_Form_Element_Text('DOCM_NR_DOCUMENTO');\n $docm_nr_documento->setRequired(false)\n ->addValidator('StringLength', false, array(0, 28));\n\n $docm_nr_sequencial_doc = new Zend_Form_Element_Text('DOCM_NR_SEQUENCIAL_DOC');\n $docm_nr_sequencial_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 10));\n\n $docm_nr_dcmto_usuario = new Zend_Form_Element_Text('DOCM_NR_DCMTO_USUARIO');\n $docm_nr_dcmto_usuario->setRequired(false)\n ->addValidator('StringLength', false, array(0, 16));\n\n $docm_dh_cadastro = new Zend_Form_Element_Text('DOCM_DH_CADASTRO');\n $docm_dh_cadastro->setRequired(false);\n\n $docm_cd_matricula_cadastro = new Zend_Form_Element_Text('DOCM_CD_MATRICULA_CADASTRO');\n $docm_cd_matricula_cadastro->setRequired(false)\n ->addValidator('StringLength', false, array(0, 14));\n\n $docm_id_tipo_doc = new Zend_Form_Element_Select('DOCM_ID_TIPO_DOC');\n $docm_id_tipo_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 5));\n\n $docm_sg_secao_geradora = new Zend_Form_Element_Text('DOCM_SG_SECAO_GERADORA');\n $docm_sg_secao_geradora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_cd_lotacao_geradora = new Zend_Form_Element_Text('DOCM_CD_LOTACAO_GERADORA');\n $docm_cd_lotacao_geradora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 5));\n\n $docm_sg_secao_redatora = new Zend_Form_Element_Text('DOCM_SG_SECAO_REDATORA');\n $docm_sg_secao_redatora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_cd_lotacao_redatora = new Zend_Form_Element_Text('DOCM_CD_LOTACAO_REDATORA');\n $docm_cd_lotacao_redatora->setRequired(false)\n ->addValidator('StringLength', false, array(0, 5));\n\n $docm_id_pctt = new Zend_Form_Element_Select('DOCM_ID_PCTT');\n $docm_id_pctt->setRequired(false)\n ->addValidator('StringLength', false, array(0, 7));\n\n $docm_ds_assunto_doc = new Zend_Form_Element_Text('DOCM_DS_ASSUNTO_DOC');\n $docm_ds_assunto_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 4000));\n\n $docm_id_tipo_situacao_doc = new Zend_Form_Element_Select('DOCM_ID_TIPO_SITUACAO_DOC');\n $docm_id_tipo_situacao_doc->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_id_confidencialidade = new Zend_Form_Element_Select('DOCM_ID_CONFIDENCIALIDADE');\n $docm_id_confidencialidade->setRequired(false)\n ->addValidator('StringLength', false, array(0, 2));\n\n $docm_nr_documento_red = new Zend_Form_Element_Text('DOCM_NR_DOCUMENTO_RED');\n $docm_nr_documento_red->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_dh_expiracao_documento = new Zend_Form_Element_Text('DOCM_DH_EXPIRACAO_DOCUMENTO');\n $docm_dh_expiracao_documento->setRequired(false);\n\n\n $docm_ds_palavra_chave = new Zend_Form_Element_Textarea('DOCM_DS_PALAVRA_CHAVE');\n $docm_ds_palavra_chave->setRequired(false)\n ->addValidator('StringLength', false, array(0, 500));\n\n $docm_ic_arquivamento = new Zend_Form_Element_Checkbox('DOCM_IC_ARQUIVAMENTO');\n $docm_ic_arquivamento->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_id_pessoa = new Zend_Form_Element_Text('DOCM_ID_PESSOA');\n $docm_id_pessoa->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_ic_documento_externo = new Zend_Form_Element_Checkbox('DOCM_IC_DOCUMENTO_EXTERNO');\n $docm_ic_documento_externo->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_ic_ativo = new Zend_Form_Element_Checkbox('DOCM_IC_ATIVO');\n $docm_ic_ativo->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_ic_processo_autuado = new Zend_Form_Element_Checkbox('DOCM_IC_PROCESSO_AUTUADO');\n $docm_ic_processo_autuado->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_id_movimentacao = new Zend_Form_Element_Text('DOCM_ID_MOVIMENTACAO');\n $docm_id_movimentacao->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_dh_fase = new Zend_Form_Element_Text('DOCM_DH_FASE');\n $docm_dh_fase->setRequired(false);\n\n $docm_id_documento_pai = new Zend_Form_Element_Text('DOCM_ID_DOCUMENTO_PAI');\n $docm_id_documento_pai->setRequired(false)\n ->addValidator('StringLength', false, array(0, 20));\n\n $docm_id_pessoa_temporaria = new Zend_Form_Element_Text('DOCM_ID_PESSOA_TEMPORARIA');\n $docm_id_pessoa_temporaria->setRequired(false)\n ->addValidator('StringLength', false, array(0, 6));\n\n $docm_id_tp_extensao = new Zend_Form_Element_Select('DOCM_ID_TP_EXTENSAO');\n $docm_id_tp_extensao->setRequired(false)\n ->addValidator('StringLength', false, array(0, 3));\n\n $docm_ic_movi_individual = new Zend_Form_Element_Checkbox('DOCM_IC_MOVI_INDIVIDUAL');\n $docm_ic_movi_individual->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $docm_ic_apensado = new Zend_Form_Element_Checkbox('DOCM_IC_APENSADO');\n $docm_ic_apensado->setRequired(false)\n ->setOptions(array('S' => 'Sim', 'N' => 'Não'))\n ->setCheckedValue('S')\n ->setUncheckedValue('N');\n\n $this->addElements(array(\n $docm_id_documento\n , $docm_nr_documento\n , $docm_nr_sequencial_doc\n , $docm_nr_dcmto_usuario\n , $docm_dh_cadastro\n , $docm_cd_matricula_cadastro\n , $docm_id_tipo_doc\n , $docm_sg_secao_geradora\n , $docm_cd_lotacao_geradora\n , $docm_sg_secao_redatora\n , $docm_cd_lotacao_redatora\n , $docm_id_pctt\n , $docm_ds_assunto_doc\n , $docm_id_tipo_situacao_doc\n , $docm_id_confidencialidade\n , $docm_nr_documento_red\n , $docm_dh_expiracao_documento\n , $docm_ds_palavra_chave\n , $docm_ic_arquivamento\n , $docm_id_pessoa\n , $docm_ic_documento_externo\n , $docm_ic_ativo\n , $docm_ic_processo_autuado\n , $docm_id_movimentacao\n , $docm_dh_fase\n , $docm_id_documento_pai\n , $docm_id_pessoa_temporaria\n , $docm_id_tp_extensao\n , $docm_ic_movi_individual\n , $docm_ic_apensado\n ));\n }", "public function definition() {\n\t\t\tglobal $CFG, $DB;\t\n\t\t\n\t\t$mform = $this->_form; // Don't forget the underscore!\n\t\n\t\t$result= $DB->get_records_sql(\"SELECT DISTINCT `intensidad` FROM `mdl_ejercicios`\");\n\t\t$result_tren= $DB->get_records_sql(\"SELECT DISTINCT `categoria` FROM `mdl_ejercicios`\");\n\t\t$options= array();\n\t\tforeach($result as $rs)\n\t\t\t\t$options[$rs->intensidad] = $rs->intensidad;\n\t\t\n\t\t$options_tren= array();\n\t\tforeach ($result_tren as $rst)\n\t\t\t$options_tren[$rst->categoria]= $rst->categoria;\n\t\t$mform->addElement('header', 'header', 'Para crear una rutina aleatoria');\n\t\t\n\t\t$mform->addElement('select', 'intensidad', '¿Qué intensidad quieres?:',$options);\n\n\t\t//$mform->addElement('select', 'categoria', '¿Qué tren de tu cuerpo quieres trabajar?:',$options_tren);\n\t\t\n\t\t\n\t\t$buttonarray=array();\n\t\t$buttonarray[] = &$mform->createElement('submit', 'submitbutton', 'Buscar rutina');\n\t\t$buttonarray[] = &$mform->createElement('reset', 'resetbutton', 'Resetear');\n\t\t$buttonarray[] = &$mform->createElement('cancel', 'cancel', 'Cancelar');\n\t\t$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);\n\t\t$mform->addElement('hidden', 'end');\n\t\t$mform->setType('end', PARAM_NOTAGS);\n\t\t$mform->closeHeaderBefore('end');\n\t}", "public function init()\n {\n\t\t$this->setName('Velatorio');\n\n //campo hidden para guardar id del velatorio\n $idvelatorio = new Zend_Form_Element_Hidden('idvelatorio'); \n $idvelatorio->addFilter('Int');\n\n //creamos <input text> para escribir nombre del velatorio\n $RUC = new Zend_Form_Element_Text('RUC');\n $RUC->setLabel('RUC:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t\n //creamos <input text> para escribir nombre del velatorio\n $nombre = new Zend_Form_Element_Text('nombre');\n $nombre->setLabel('Nombre del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t \n\t\t \n //creamos <input text> para escribir direccion del velatorio\n $direccion = new Zend_Form_Element_Text('direccion');\n $direccion->setLabel('Direccion del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t\t\n //Combo del Departamento \n $iddepartamento = new Zend_Form_Element_Select('iddepartamento');\n $iddepartamento->setLabel('Seleccione departamentos:')->setRequired(true); \n\t\t\n\t\t$iddepartamento->addMultiOption(0, \"select\");\t\t\n\n\t\t//cargo en un select los departamentos\n $table = new Application_Model_DbTable_Departamento();\n //obtengo listado de todos los departamentos y los recorro en un\n //arreglo para agregarlos a la lista\n foreach ($table->listar() as $c)\n {\n $iddepartamento->addMultiOption($c->iddepartamento, $c->nombre);\n }\n\n\t\t\n\t\t//Combo de la Provincia\n $idprovincias = new Zend_Form_Element_Select('idprovincias');\n $idprovincias->setLabel('Seleccione provincias:')->setRequired(true); \n\t\t\n\t\t//cargo en un select las provincias\n /* $table = new Application_Model_DbTable_Provincia();\n //obtengo listado de todas los provincias y los recorro en un\n //arreglo para agregarlos a la lista\n foreach ($table->listar() as $c)\n {\n $idprovincias->addMultiOption($c->idprovincia, $c->nombre);\n }\n\t\t*/\n\t\t\t\t\n\t\t//Combo del Distrito\n $iddistrito = new Zend_Form_Element_Select('iddistrito');\n $iddistrito->setLabel('Seleccione distritos:')->setRequired(true); \n\n\t\t//cargo en un select los distritos\n /*$table = new Application_Model_DbTable_Distrito();\n //obtengo listado de todos los distritos y los recorro en un\n //arreglo para agregarlos a la lista\n foreach ($table->listar() as $c)\n {\n $iddistrito->addMultiOption($c->iddistrito, $c->nombre);\n }\n\t\t*/\n\t\t\n\t\t\n\t\t//creamos <input text> para escribir telefono del velatorio\n $telefono_fijo = new Zend_Form_Element_Text('telefono_fijo');\n $telefono_fijo->setLabel('Telefono del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\t\t \n\t\t//creamos <input text> para escribir celular del velatorio\n $telefono_celular = new Zend_Form_Element_Text('telefono_celular');\n $telefono_celular->setLabel('Celular del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\t\t \n\t\t//creamos <input text> para escribir correo electronico del velatorio\n $mail = new Zend_Form_Element_Text('mail');\n $mail->setLabel('Correo Electronico del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t//creamos <input text> para escribir costo alquiler del velatorio\n $costo = new Zend_Form_Element_Text('costo');\n $costo->setLabel('Costo Alquiler del velatorio:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\t\t\n\t\t//creamos <input text> para escribir observacion del velatorio\n $observacion = new Zend_Form_Element_Textarea('observacion');\n $observacion->setLabel('Observaciones:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\n\t\t\t\n\t\t \n //boton para enviar formulario\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setAttrib('id', 'submitbutton');\n\n //agregolos objetos creados al formulario\n //$this->addElements(array($id, $nombre,$Descripccion,$profesores,$submit));\t\n\t\t$this->addElements(array($idvelatorio,$RUC,$nombre,$direccion,$iddepartamento,$idprovincias,$iddistrito,$telefono_fijo,$telefono_celular,$mail,$costo,$observacion,$submit));\t\n\t\t\n\t\t//DECORATOR GRUPOS\n\t\t$this->addDisplayGroups(array(\n\t\t\t'left' => array(\n\t\t\t\t'options' => array('description' => 'Left Column'),\n\t\t\t\t'elements' => array($RUC,$nombre,$direccion,$iddepartamento,$idprovincias),\n\t\t\t),\n\t\t\t'right' => array(\n\t\t\t\t'options' => array('description' => 'Right Column'),\n\t\t\t\t'elements' => array($iddistrito,$telefono_fijo,$telefono_celular,$mail,$costo,$observacion),\n\t\t\t),\n\t\t\t'bottom' => array(\n\t\t\t\t'elements' => array($submit),\n\t\t\t)\n\t\t));\n\t\t \n\t\t//$this->setDisplayGroupDecorators(array('Description', 'FormElements', 'Fieldset'));\t\t\n\t\t$this->setDisplayGroupDecorators(array('FormElements', 'Fieldset'));\n\t\t\n\t\t//DECORATOR GRUPOS\n\t\t$this->addDisplayGroups(array(\n\t\t\t'left' => array(\n\t\t\t\t'options' => array('description' => 'Left Column'),\n\t\t\t\t'elements' => array($RUC,$nombre,$direccion,$iddepartamento,$idprovincias),\n\t\t\t),\n\t\t\t'right' => array(\n\t\t\t\t'options' => array('description' => 'Right Column'),\n\t\t\t\t'elements' => array($iddistrito,$telefono_fijo,$telefono_celular,$mail,$costo,$observacion),\n\t\t\t),\n\t\t\t'bottom' => array(\n\t\t\t\t'elements' => array($submit),\n\t\t\t)\n\t\t));\n\t\t \n\t\t//$this->setDisplayGroupDecorators(array('Description', 'FormElements', 'Fieldset'));\t\t\n\t\t$this->setDisplayGroupDecorators(array('FormElements', 'Fieldset'));\n\t\t\n\t\t\n }", "public function init()\r\n {\r\n \t\r\n \r\n \t \t\r\n \t$this->setName('FormularioCliente');\r\n $ID_CLIENTE = new Zend_Form_Element_Hidden('$ID_CLIENTE');\r\n $ID_CLIENTE->addFilter('Int');\r\n $ID_CLIENTE->removeDecorator('Label');\r\n \r\n \r\n \r\n $DT_ATUALIZACAO = new Zend_Form_Element_Text('DT_ATUALIZACAO');\r\n $DT_ATUALIZACAO->setLabel('DATA ÚLTIMA ATUALIZAÇÃO')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control')\r\n ->setAttrib('placeholder', '');\r\n \r\n \r\n \r\n $NM_CLIENTE= new Zend_Form_Element_Text('NM_CLIENTE');\r\n $NM_CLIENTE->setLabel('NOME')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter nome');\r\n \r\n $NR_CNPJ = new Zend_Form_Element_Text('NR_CNPJ');\r\n $NR_CNPJ->setLabel('CNPJ')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cnpj');\r\n \r\n \t$TX_OBSERVACAO = new Zend_Form_Element_Textarea('TX_OBSERVACAO');\r\n $TX_OBSERVACAO->setLabel('OBSERVA��O')\r\n \t\t\r\n\t\t\t\t\t ->removeDecorator('DtDdWrapper')\r\n \t\t\t ->removeDecorator('HtmlTag')\r\n \t\t\t\t ->removeDecorator('Label')\r\n \t\t\t ->setAttrib('class', 'form-control')\r\n \t\t\t\t ->setAttrib('rows', '5'); \r\n \t\r\n $NM_LOGRADOURO = new Zend_Form_Element_Text('NM_LOGRADOURO');\r\n $NM_LOGRADOURO->setLabel('LOGRADOURO')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter logradouro');\r\n \r\n \r\n \t\r\n \t$NR_NUMERO = new Zend_Form_Element_Text('NR_NUMERO');\r\n $NR_NUMERO->setLabel('NÚMERO')\r\n\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter número');\t\t\t \r\n \t\t\t\t \r\n \t$DS_COMPLEMENTO = new Zend_Form_Element_Text('DS_COMPLEMENTO');\r\n $DS_COMPLEMENTO->setLabel('LOGRADOURO')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter complemento');\t\t\r\n \r\n \t \r\n \t \r\n \t\t\t\t \r\n \t$NM_BAIRRO = new Zend_Form_Element_Text('NM_BAIRRO');\r\n $NM_BAIRRO->setLabel('BAIRRO')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter bairro');\r\n \t\r\n \t$NR_CEP= new Zend_Form_Element_Text('NR_CEP');\r\n $NR_CEP->setLabel('CEP')\r\n\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cep');\r\n \t\r\n \t\t\r\n \t$NM_CIDADE = new Zend_Form_Element_Text('NM_CIDADE');\r\n $NM_CIDADE->setLabel('CIDADE')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cidade');\r\n \t \r\n \t\r\n \t$estados = array(\"AC\"=>\"Acre\", \"AL\"=>\"Alagoas\", \"AM\"=>\"Amazonas\", \"AP\"=>\"Amapá\",\"BA\"=>\"Bahia\",\"CE\"=>\"Ceará\",\"DF\"=>\"Distrito Federal\",\"ES\"=>\"Espírito Santo\",\"GO\"=>\"Goiás\",\"MA\"=>\"Maranhão\",\"MT\"=>\"Mato Grosso\",\"MS\"=>\"Mato Grosso do Sul\",\"MG\"=>\"Minas Gerais\",\"PA\"=>\"Pará\",\"PB\"=>\"Paraíba\",\"PR\"=>\"Paraná\",\"PE\"=>\"Pernambuco\",\"PI\"=>\"Piauí\",\"RJ\"=>\"Rio de Janeiro\",\"RN\"=>\"Rio Grande do Norte\",\"RO\"=>\"Rondônia\",\"RS\"=>\"Rio Grande do Sul\",\"RR\"=>\"Roraima\",\"SC\"=>\"Santa Catarina\",\"SE\"=>\"Sergipe\",\"SP\"=>\"São Paulo\",\"TO\"=>\"Tocantins\");\r\n \t\r\n \t$NM_UF = new Zend_Form_Element_Select( 'NM_UF' );\r\n $NM_UF->setLabel('UF')\r\n ->addMultiOptions($estados)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t->removeDecorator('DtDdWrapper')\r\n \t->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t->setAttrib('class', 'form-control select2') ->setAttrib('placeholder', 'Enter uf');;\t\t \r\n\r\n \t\t\t\t \r\n \t$FK_RAMO_ATIVIDADE= new Zend_Form_Element_Select('FK_RAMO_ATIVIDADE');\r\n $FK_RAMO_ATIVIDADE->setAttrib('class', 'form-control');\r\n \r\n $ramoAtividade= new Application_Model_DbTable_RamoAtividade();\r\n $FK_RAMO_ATIVIDADE->setLabel('RAMO ATIVIDADE')\r\n ->setRequired(true)\r\n\t\t->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control select2');\r\n \r\n \r\n $listaRamoAtividade=$ramoAtividade->getRamoAtividadeCombo();\r\n $FK_RAMO_ATIVIDADE->setMultiOptions( $listaRamoAtividade );\t\t\t \r\n \t\r\n $submit = new Zend_Form_Element_Submit('submit');\r\n $submit->setLabel(\"Adiconar\");\r\n $submit->setAttrib('id', 'submitbutton');\r\n $submit->removeDecorator('DtDdWrapper')\r\n ->setAttrib('class', 'btn btn-primary button')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label'); \r\n \r\n $this->addElements(array($ID_CLIENTE,$NM_CLIENTE,$NR_CNPJ,$TX_OBSERVACAO,$NM_LOGRADOURO,$NR_NUMERO,$DS_COMPLEMENTO,$NM_BAIRRO,$NR_CEP,$NM_CIDADE,$NM_UF,$DT_ATUALIZACAO,$FK_RAMO_ATIVIDADE,$submit)); \r\n $this->setDecorators( array( array('ViewScript', array('viewScript' => '/forms/formularioCliente.phtml')))); \r\n\t\r\n }", "function FotografiaControl(){\n\t\t$this->acceso=new AccesoDatos();\n\t}", "public function init()\n {\n $this->setMethod('post');\n \n $auth = Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session('admin'));\n $user = $auth->getIdentity();\n $num_membre = $user->num_membre;\n \n \n $o_map = new Application_Model_EuObjetMapper();\n $rows = $o_map->fetchAll();\n $objets = array();\n foreach ($rows as $o) {\n $objets[] = $o->design_objet;\n }\n $elem_o = new ZendX_JQuery_Form_Element_AutoComplete(\n \"design_objet\", array('label' => 'Désignation *','required' => true,)\n );\n $elem_o->setJQueryParams(array('source' => $objets));\n $this->addElement($elem_o);\n \n $gamme_select = new Zend_Form_Element_Select('num_gamme');\n $gamme_select->setLabel('Gamme de produit *')\n ->setRequired(true);\n $g = new Application_Model_DbTable_EuGammeProduit();\n $rows = $g->fetchAll();\n foreach ($rows as $c) {\n $gamme_select->addMultiOption($c->code_gamme, $c->design_gamme);\n }\n $this->addElement($gamme_select);\n \n $type_unite = array('' => '', 'jour' => 'Jour', 'mois' => 'Mois', 'annee' => 'Année');\n $unit_select = new Zend_Form_Element_Select('unite_mdv');\n $unit_select->setLabel('Unité de durée *')\n ->setRequired(true)\n ->addMultiOptions($type_unite);\n $this->addElement($unit_select);\n \n \n $this->addElement('text', 'duree_vie', array(\n 'label' => 'Durée de vie *',\n 'required' => true,\n 'validators'=>array('validator' => 'digits'),\n ));\n \n $this->addElement('text', 'prix_unitaire', array(\n 'label' => 'Prix unitaire *',\n 'required' => true,\n 'validators'=>array('validator' => 'digits'),\n ));\n \n $boutique_select = new Zend_Form_Element_Select('code_bout');\n $boutique_select->setLabel('Boutique *')\n ->setRequired(true);\n $b = new Application_Model_DbTable_EuBoutique();\n $select=$b->select();\n $select->from($b)\n ->where('proprietaire = ?', $num_membre);\n $rows = $b->fetchAll($select);\n foreach ($rows as $c) {\n $boutique_select->addMultiOption($c->code_bout, $c->design_bout);\n }\n $this->addElement($boutique_select);\n \n $smcipn_select = new Zend_Form_Element_Select('code_demand');\n $smcipn_select->setLabel('Code subvention ')\n ->setRequired(false);\n $s = new Application_Model_DbTable_EuSmcipn();\n $rows = $s->fetchAll();\n $smcipn_select->addMultiOption('', '');\n foreach ($rows as $c) {\n $smcipn_select->addMultiOption($c->code_demand, $c->code_demand);\n }\n $this->addElement($smcipn_select);\n \n $this->addElement('textarea', 'caract_objet', array(\n 'label' => 'Caractéristique ',\n 'required' => false,\n ));\n \n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Valider',\n ));\n \n // Add the cancel button\n $this->addElement('button', 'cancel', array(\n 'ignore' => true,\n 'label' => 'Annuler',\n )); \n }", "public function init()\n {\n $this->setMethod('post');\n\n $this->addElement(\n 'text', 'code_bout', array(\n 'label' => 'Code *',\n 'required' => true,\n 'filters' => array('StringTrim'),\n ));\n\n $this->addElement('text', 'design_bout', array(\n 'label' => 'Raison sociale *',\n 'required' => true,\n ));\n \n $this->addElement('text', 'telephone', array(\n 'label' => 'Téléphone *',\n 'required' => true,\n 'filters' => array('StringTrim'),\n ));\n \n $this->addElement('text', 'adresse', array(\n 'label' => 'Adresse *',\n 'required' => true,\n 'filters' => array('StringTrim'),\n ));\n \n $ms = new Application_Model_EuSecteurMapper();\n $secteur = $ms->fetchAll();\n $z_select = new Zend_Form_Element_Select('codesect');\n $z_select->setLabel('Nom secteur *: ')->isRequired(true);\n foreach ($secteur as $s) {\n $z_select->addMultiOption($s->codesect, $s->nomsect);\n }\n $this->addElement($z_select);\n \n $this->addElement('text', 'nom_responsable', array(\n 'label' => 'Nom responsable*:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n ));\n \n $this->addElement('text', 'prenom_responsable', array(\n 'label' => 'Prenom responsable*:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n ));\n \n // $nm = new Application_Model_DbTable_EuMembre();\n // $select = $nm->select();\n // $select->where('type_membre=?', 'M');\n // $rows = $nm->fetchAll($select);\n // $membres = array();\n // foreach ($rows as $c) {\n // $membres[] = $c->num_membre;\n // }\n // $elem = new ZendX_JQuery_Form_Element_AutoComplete(\n // \"proprietaire\", array('label' => 'Numéro membre *')\n // );\n // $elem->setJQueryParams(array('source' => $membres));\n // $this->addElement($elem);\n \n \n $this->addElement('text', 'mail', array(\n 'label' => 'E-Mail:',\n 'required' => false,\n 'filters' => array('StringTrim'),\n ));\n \n $this->addElement('text', 'siteweb', array(\n 'label' => 'Site web:',\n 'required' =>false,\n 'filters' => array('StringTrim'),\n ));\n \n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Valider',\n )); \n \n // Add the cancel button\n $this->addElement('button', 'cancel', array(\n 'ignore' => true,\n 'label' => 'Annuler',\n ));\n }", "public function __construct() {\n $this->adminProveedorModelo = new adminProveedorModelo();\n }", "function form_init_data() \r\n {\r\n //$this->set_hidden_element_value(\"id\", \"logon\");\r\n $dataForm = $this->getViewVariable('courseDataForm');\r\n\r\n $this->set_element_value(\"courseName\", $dataForm['c_name'] );\r\n $this->set_element_value(\"courseLanguage\", $dataForm['c_language'] );\r\n //$this->set_element_value(\"coursedescription\", $dataForm['c_description'] );\r\n $this->set_element_value(\"courseActive\", $dataForm['c_active'] );\r\n $this->set_element_value(\"courseAccess\", $dataForm['c_access'] );\r\n $this->set_element_value(\"coursedataDescripcion\", $dataForm['cd_descripcion'] );\r\n $this->set_element_value(\"coursedataVersion\", $dataForm['cd_version'] );\r\n $this->set_element_value(\"coursedataPalabrasClaves\", $dataForm['cd_claves'] );\r\n $this->set_element_value(\"coursedataDestinatarios\", $dataForm['cd_destinatarios'] );\r\n $this->set_element_value(\"coursedataConocimientosPrevios\", $dataForm['cd_conocimientos'] );\r\n $this->set_element_value(\"coursedataMetodologia\", $dataForm['cd_metodologia'] );\r\n\r\n }", "public function init() {\n \n $auth = Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session('admin'));\n $user = $auth->getIdentity();\n $this->setMethod('post');\n $login = $user->code_acteur;\n\t\tif($login!='' || $login!= NULL){\n\t\t\t$login1=$login;\n\t\t}else{\n\t\t\t$login1='';\n\t\t}\n $gacs = array();\n $g_map = new Application_Model_DbTable_EuGacFiliere();\n $select = $g_map->select()\n ->where('code_gac = ?', $login1)\n ->where('groupe = ?', 'GAC')\n ->order('date_creation', 'ASC');\n $ngac = $g_map->fetchAll($select);\n foreach ($ngac as $value) {\n $gacs[$value->code_gac_filiere] = ucfirst($value->nom_gac_filiere);\n }\n $g_select = new Zend_Form_Element_Select('num_gac_filiere');\n $g_select->setLabel('Nom GAC Filière *')->isRequired(true);\n $g_select->addMultiOption('', '');\n $g_select->addMultiOptions($gacs);\n $this->addElement($g_select);\n \n $this->addElement('button', 'valider', array(\n 'ignore' => true,\n 'label' => 'Valider',\n ));\n\n // Add the cancel button\n $this->addElement('reset', 'annuler', array(\n 'ignore' => true,\n 'label' => 'Annuler',\n ));\n }", "public function __construct() {\n parent::__construct();\n Session::accesoEstricto(array(ADMINISTRATIVOS));\n }", "public function init() {\n $this->sessionCarrinho = new Zend_Session_Namespace('carrinho');\n $qtdCarrinho = $this->sessionCarrinho->qtd;\n\n //MENSAGEM QUE FICARÁ NO MENU DO TOPO\n $msgItens = null;\n $msgItens = ($qtdCarrinho == 1) ? '(' . $qtdCarrinho . ' item)' : $msgItens;\n $msgItens = ($qtdCarrinho > 1) ? '(' . $qtdCarrinho . ' itens)' : $msgItens;\n $this->view->msgItens = $msgItens;\n\n //VALIDANDO AUTENTICACAO\n if (!Zend_Auth::getInstance()->hasIdentity()): //NAO AUTENTICADO\n $this->redirect('login');\n else:\n //RETORNANDO O NOME DO USUÁRIO LOGADO\n $nomeUsuario = Zend_Auth::getInstance()->getIdentity()->nome;\n $this->view->nomeUsuario = $nomeUsuario;\n endif;\n\n //USADO NO ESTILO DO LINK DO MENU\n $this->view->controllerName = $this->_request->getControllerName();\n }", "function __construct()\n {\n parent::__construct();\n\n $usuario_logado = TSession::getValue('login');\n \n // creates the form\n $this->form = new BootstrapFormBuilder('form_Equipe');\n $this->form->setFormTitle('Inscrição');\n \n // master fields\n $id = new TEntry('id');\n $nome = new TEntry('nome');\n $ref_campeonato = new TDBCombo('ref_campeonato', 'futapp', 'Campeonato', 'id', '{nome}','id asc' );\n $ref_categoria = new TCombo('ref_categoria');\n $escudo = new TFile('escudo');\n $usuario = new THidden('usuario');\n \n // detail fields\n $id_atleta = new THidden('id_atleta');\n $nome_atleta = new TEntry('nome_atleta');\n $cpf = new TEntry('cpf');\n\n if(TSession::getValue('login') == 'J30EVENTOS' || TSession::getValue('login') == 'admin' || TSession::getValue('login') == 'Roni')\n {\n $ja_jogou = new TCombo('ja_jogou');\n\n $ja_jogou->addItems( [ 't' => 'Sim', 'f' => 'Não' ] ); \n $label_ja = new TLabel('Já Jogou ?'); \n }\n else\n {\n $ja_jogou = new THidden('ja_jogou');\n $label_ja = new TLabel(' ');\n }\n\n\n $ref_campeonato->setChangeAction(new TAction([$this,'onMudaCampeonato']));\n $usuario->setValue($usuario_logado);\n\n $ref_campeonato->setEditable(false);\n \n // adjust field properties\n $id->setEditable(false);\n $id_atleta->setEditable(false);\n $nome->setSize('100%');\n $nome_atleta->setSize('100%');\n $cpf->setSize('100%');\n $cpf->setMask('99999999999');\n\n // allow just these extensions\n $escudo->setAllowedExtensions( ['png', 'jpg', 'jpeg'] );\n \n // enable progress bar, preview, and file remove actions\n $escudo->enableFileHandling();\n \n // add validations\n $nome->addValidation('Nome', new TRequiredValidator);\n \n // add master form fields\n $this->form->addFields( [new TLabel('ID')], [$id]);\n $this->form->addFields( [new TLabel('Nome da Equipe')], [$nome ] );\n $this->form->addFields( [new TLabel('Campeonato')], [$ref_campeonato ] );\n $this->form->addFields( [new TLabel('Categoria')], [$ref_categoria ] );\n $this->form->addFields( [new TLabel('Escudo')], [$escudo] );\n $this->form->addFields( [new TLabel('')], [$usuario] );\n \n \n $add_atleta = TButton::create('add_atleta', [$this, 'onProductAdd'], 'Adicionar', 'fa:save');\n \n $Label_id = new TLabel('');\n $Label_nome = new TLabel('Nome Completo (*)');\n $label_cpf = new TLabel('CPF (*)');\n\n $Label_nome->setFontColor('#FF0000');\n $label_cpf->setFontColor('#FF0000');\n \n $this->form->addContent( ['<h4>Atletas</h4><hr>'] );\n $this->form->addContent( ['Digite o Nome e CPF do atleta e clique em ADICIONAR para inserir o atleta na equipe.'] );\n $this->form->addContent( ['Para editar os dados do atleta clique no icone do lapis azul.'] );\n $this->form->addContent( ['Para remover o atleta clique no icone da lixeira vermelha.'] );\n $this->form->addFields( [$Label_id], [$id_atleta]);\n $this->form->addFields( [$Label_nome], [$nome_atleta]);\n $this->form->addFields( [$label_cpf], [$cpf]);\n $this->form->addFields( [$label_ja], [$ja_jogou]);\n $this->form->addFields( [], [$add_atleta] )->style = 'background: whitesmoke; padding: 5px; margin: 1px;';\n \n $this->product_list = new BootstrapDatagridWrapper(new TDataGrid);\n $this->product_list->setId('products_list');\n $this->product_list->style = \"min-width: 700px; width:100%;margin-bottom: 10px\";\n \n $col_id = new TDataGridColumn( 'id_atleta', 'ID', 'left', '10%');\n $col_nome = new TDataGridColumn( 'nome_atleta', 'Nome', 'left', '45%');\n $col_cpf = new TDataGridColumn( 'cpf', 'CPF', 'left', '45%');\n $col_jogou = new TDataGridColumn( 'ja_jogou', 'Já Jogou?', 'left', '45%');\n \n $this->product_list->addColumn($col_id);\n $this->product_list->addColumn($col_nome);\n $this->product_list->addColumn($col_cpf);\n $this->product_list->addColumn($col_jogou);\n\n $col_jogou->setTransformer( function($ja_jogou) \n {\n if ($ja_jogou == 't') \n {\n return 'Sim';\n }\n else\n {\n return 'Não';\n }\n });\n \n // creates two datagrid actions\n $action1 = new TDataGridAction([$this, 'onEditItemProduto']);\n $action1->setLabel('Editar');\n $action1->setImage('fa:edit blue');\n $action1->setField('id_atleta');\n $action1->setField('nome_atleta');\n $action1->setField('cpf');\n $action1->setField('ja_jogou');\n \n $action2 = new TDataGridAction([$this, 'onDeleteItem']);\n $action2->setLabel('Excluir');\n $action2->setImage('fa:trash red');\n $action2->setField('id_atleta');\n // $action2->setField('nome_atleta');\n // $action2->setField('cpf');\n \n // add the actions to the datagrid\n $this->product_list->addAction($action1);\n $this->product_list->addAction($action2);\n \n $this->product_list->createModel();\n \n $panel = new TPanelGroup;\n $panel->add($this->product_list);\n $panel->getBody()->style = 'overflow-x:auto';\n $this->form->addContent( [$panel] );\n \n $this->form->addAction( 'Salvar', new TAction([$this, 'onSave']), 'fa:save green');\n // $this->form->addAction( 'Clear', new TAction([$this, 'onClear']), 'fa:eraser red');\n \n // create the page container\n $container = new TVBox;\n $container->style = 'width: 100%';\n // $container->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $container->add($this->form);\n parent::add($container);\n }", "public function init()\n {\n $this->addElement(\n 'text','USUARIO_RUT', array(\n 'label'=>'Rut de Usuario',\n 'required'=>true\n )\n );\n \n $this->addElement(\n 'password', 'USUARIO_SESSION', array(\n 'label'=>'Sesión',\n 'required'=>true\n )\n );\n \n $this->addElement(\n 'submit', 'Ingresar', array(\n 'id'=>'send',\n )\n ); \n }", "public function init() {\n\n $this->setMethod('post');\n $this->setName('order');\n\n\n\n $vyrobce = new Zend_Form_Element_Text('vyrobce');\n $vyrobce->setLabel('Výrobce')\n ->setRequired(true);\n\n $typ = new Zend_Form_Element_Text('typ');\n $typ->setLabel('Typ')\n ->setRequired(true);\n\n $druhPaliva = new Zend_Form_Element_Text('palivo');\n $druhPaliva->setLabel('Druh paliva')\n ->setRequired(true);\n\n $pocetValcu = new Zend_Form_Element_Text('valce');\n $pocetValcu->setLabel('Počet válců')\n ->setRequired(true);\n\n $obsahCM = new Zend_Form_Element_Text('obsah');\n $obsahCM->setLabel('Obsah v cm3')\n ->setRequired(true);\n\n $rokVyroby = new Zend_Form_Element_Text('vyroba');\n $rokVyroby->setLabel('Rok vyroby')\n ->setRequired(true);\n\n $vykonKW = new Zend_Form_Element_Text('vykon');\n $vykonKW->setLabel('Výkon v KW')\n ->setRequired(true);\n\n $this->addDisplayGroup(array($vyrobce,$typ,$druhPaliva,$pocetValcu,$obsahCM,$rokVyroby,$vykonKW), 'technickeparam',array('legend' => 'Technické parametry vozu'));\n\n // FAKTURACNI UDAJE\n\n $zakaznik = new Zend_Form_Element_Text('zakaznik');\n $zakaznik->setLabel('Jméno a příjmení')\n ->setRequired(true);\n\n $firma = new Zend_Form_Element_Text('firma');\n $firma->setLabel('Název firmy');\n\n $ico = new Zend_Form_Element_Text('ico');\n $ico->setLabel('IČO');\n\n $dic = new Zend_Form_Element_Text('dic');\n $dic->setLabel('DIČ');\n\n $ulice = new Zend_Form_Element_Text('ulice');\n $ulice->setLabel('Ulice, ČP')\n ->setRequired(true);\n\n $mesto = new Zend_Form_Element_Text('mesto');\n $mesto->setLabel('Město')\n ->setRequired(true);\n\n $psc = new Zend_Form_Element_Text('psc');\n $psc->setLabel('PSČ')\n ->setRequired(true);\n\n $telefon = new Zend_Form_Element_Text('telefon');\n $telefon->setLabel('Telefon')\n ->setRequired(true);\n\n $email = new Zend_Form_Element_Text('zakaznikemail');\n $email->setLabel('E-mail')\n ->addValidator(new Zend_Validate_EmailAddress());\n\n //textarea\n $poznamka = new Zend_Form_Element_Textarea('poznamka');\n $poznamka->setAttribs(array('cols' => 60, 'rows' => 8))\n ->setLabel('Poznámka');\n\n\n $this->addDisplayGroup(array($zakaznik,$firma,$ico,$dic,$ulice,$mesto,$psc,$telefon,$email,$poznamka), 'fakturace',array('legend' => 'Fakturační údaje'));\n\n //DODACI ADRESA\n\n $zakaznikd = new Zend_Form_Element_Text('zakaznikd');\n $zakaznikd->setLabel('Jméno a příjmení');\n\n $firmad = new Zend_Form_Element_Text('firmad');\n $firmad->setLabel('Název firmy');\n\n $uliced = new Zend_Form_Element_Text('uliced');\n $uliced->setLabel('Ulice, ČP');\n\n $mestod = new Zend_Form_Element_Text('mestod');\n $mestod->setLabel('Město');\n\n $pscd = new Zend_Form_Element_Text('pscd');\n $pscd->setLabel('PSČ');\n\n $telefond = new Zend_Form_Element_Text('telefond');\n $telefond->setLabel('Telefon');\n\n $this->addDisplayGroup(array($zakaznikd,$firmad,$uliced,$mestod,$pscd,$telefond), 'dodaci',array('legend' => 'Dodací adresa'));\n\n $control = new Zend_Form_Element_Text('order_control');\n $control->setLabel('Kontrola 5+3 (slovy)')\n ->setRequired(true);\n\n\n //tlacitko submit pro dany formular\n $submit = new Zend_Form_Element_Submit('order');\n $submit->setAttrib('id', 'order_button');\n $submit->setLabel('Objednat zboží');\n\n //$this->addElements(array($email, $messageContent, $captcha, $submit));\n $this->addElements(array($vyrobce, $typ, $druhPaliva, $pocetValcu, $obsahCM, $rokVyroby, $vykonKW, $zakaznik, $firma, $ico, $dic, $ulice, $mesto, $psc, $telefon,\n $email, $poznamka, $zakaznikd, $firmad, $uliced, $mestod, $pscd, $telefond, $control, $submit));\n //akce pro zpracovani formulare\n // $this->setAction($this->getBaseUrl() . '/index/send');\n $url = new Zend_View_Helper_Url();\n $this->setAction($url->url(array('controller' => 'index', 'action' => 'sendorder'), 'default'));\n }", "public function controllerFrontInitBefore($event) \n {\n Netresearch_Epayments_Model_Autoloader::register();\n }", "public function __construct() {\r\n\r\n parent::__construct();\r\n \r\n //cargamos modelo para CI perfil\r\n $this->load->model('paciente_model');\r\n $this->load->model('dropdown_model');\r\n \r\n //Cargamos todas las librerias utilizadas en es CI\r\n $this->load->library(array(\r\n 'form_validation',//funciones para los formularios\r\n 'session',//iniciar session\r\n 'fileclass',//control css y js para cada pagina\r\n 'general_sessions',//Validar datos de session\r\n 'data_empresa',//informacion de la empresa\r\n 'gestion_view'));//controlar vistas\r\n \r\n //Cargamos todos los helper que utilizaremos\r\n $this->load->helper(array('url', 'form','html','funciones_system'));\r\n }", "public function __construct() {\n \t\n\t \tinclude('../conexion/datos.php');\n \n\t $this->id_modulo = 14;\n\t $this->NameCookieApp = $NomCookiesApp;\n\t //$this->permisosInst = new permisosController();\n\t }", "public function init()\n {\n parent::init();\n \n $this->addCssFile(\"/css/library/Account/Form/activate-accounts.css\");\n $this->addJsFile(\"/js/library/Account/Form/activate-accounts.js\");\n \n //add js file to do cool input masking\n $this->addJsFile(\"/js/jquery.maskedinput-1.3.js\");\n \n $this->setDecorators(self::$_formDecorators);\n \n foreach ($this->order->order_configurations as $config) {\n $subform = new \\Account_Form_ActivateAccountsSubForm($config->id);\n $this->addSubForm($subform, \"orderConfiguration_\" . $config->id);\n }\n \n $emailEveryone = new Zend_Form_Element_Checkbox(\"emailEveryone\");\n $emailEveryone->setLabel(\"Send email to account holders with their login information.\")\n ->setDecorators(self::$checkboxDecorators)\n ->setValue(1);\n $this->addElement($emailEveryone);\n \n $orderId = new Zend_Form_Element_Hidden(\"orderId\");\n $orderId->setDecorators(array('ViewHelper'));\n $this->addElement($orderId);\n\n $saveButton = new Fisdap_Form_Element_SaveButton(\"saveButton\");\n $saveButton->setLabel(\"Save\")\n ->setDecorators(self::$buttonDecorators);\n $this->addElement($saveButton);\n \n if ($this->order->id) {\n $this->setDefaults(array(\n 'orderId' => $this->order->id,\n ));\n }\n }", "public function init()\n {\n $this->_equipo = new Application_Model_DeporEquipo();\n }", "public function init()\n {\n parent::init();\n\n $this->idPronac = $this->getRequest()->getParam('idPronac');\n $this->idDiligencia = $this->getRequest()->getParam('idDiligencia');\n $this->idAvaliacaoProposta = $this->getRequest()->getParam('idAvaliacaoProposta');\n $this->situacao = $this->getRequest()->getParam('situacao');\n $this->tpDiligencia = $this->getRequest()->getParam('tpDiligencia');\n $this->idProduto = $this->getRequest()->getParam('idProduto');\n\n if ($this->tpDiligencia) {\n $GrupoAtivo = new Zend_Session_Namespace('GrupoAtivo'); // cria a sess�o com o grupo ativo\n $urlArray = array('controller' => 'verificarreadequacaodeprojeto');\n\n // ajusta o link de voltar de acordo com o tipo de dilignecia\n if ($GrupoAtivo->codGrupo == 122) { // diligencia na readequacao - coordenador acompanhamento\n $this->btnVoltar = $this->view->url(array_merge($urlArray, array('action' => 'verificarreadequacaodeprojetocoordacompanhamento')));\n } elseif ($this->tpDiligencia == 171) { // diligencia na readequacao - tecnico acompanhamento\n $this->btnVoltar = $this->view->url(array_merge($urlArray, array('action' => 'verificarreadequacaodeprojetotecnico')));\n } elseif ($this->tpDiligencia == 179) { // diligencia na readequacao - parecerista\n $this->btnVoltar = $this->view->url(array_merge($urlArray, array('action' => 'verificarreadequacaodeprojetoparecerista')));\n } else {\n $this->btnVoltar = 'javascript:voltar()';\n }\n }\n\n $this->view->btnVoltar = $this->btnVoltar; // botao voltar dinamico\n }", "public function init() {\n $this->setMethod('post');\n \n // Add claim Number element\n $this->addElement(\n 'text',\n 'claimNumber',\n array(\n 'required' => true,\n 'validators' => array(\n array(\n 'NotEmpty',\n true,\n array(\n 'messages' => array (\n 'isEmpty' => 'Please enter claim number',\n 'notEmptyInvalid' => 'Please enter valid claim number'\n )\n )\n )\n )\n )\n );\n\n // Add hidden element for claim reference number\n $this->addElement('hidden', 'ref_num', array(\n 'value' => '',\n 'class' => 'noborder',\n 'label' =>''\n ));\n \n // Add hidden element for mode\n $this->addElement('hidden', 'mode', array(\n 'value' => '',\n 'class' => 'noborder',\n 'label' =>''\n )); \n\n // Add search button\n $this->addElement('image', 'search', array(\n 'src' => '/assets/connect/images/claims/search-button.jpg',\n 'align' => 'top',\n 'class' => 'search',\n 'onclick' => 'return validateClaimNumber()'\n ));\n\n \n // Add the back button\n $this->addElement('button', 'back', array(\n 'ignore' => true,\n 'label' => 'Back',\n 'value' => 'Back',\n 'onclick' => 'window.location=\"/rentguaranteeclaims/home\"'\n ));\n \n // Set decorators\n $this->clearDecorators();\n $this->setDecorators(array('Form'));\n $this->setElementDecorators(array ('ViewHelper', 'Errors')); \n }", "public function init()\n {\n $request = new Zend_Controller_Request_Http();\n $domain = $request->getCookie('domain');\n $defaultBehaviors = array(\n '' => '--',\n 'Discarded' => 'Discard Email',\n 'Rejected' => 'Reject Email',\n 'Rerouted to' => 'Forward to this address:',\n 'Accepted and Bounced' => 'Accept and Bounce'\n );\n\n\n $this->addElement('text', 'domain', array(\n 'label' => 'Domain Name',\n 'readonly' => true,\n 'value' => $domain,\n 'validators' => array(\n array('NotEmpty', true),\n\n ),\n ));\n\n $this->addElement('select', 'MailToUnknown', array(\n 'label' => 'Set Default Behavior',\n 'multiOptions' => $defaultBehaviors,\n // 'required' => true,\n ));\n\n $this->addElement('text', 'MailRerouteAddress', array(\n 'label' => 'Address to forward to',\n ));\n\n $this->populate($this->getSettings());\n\n $this->addControlButtons(array(\n 'cancelLink' => pm_Context::getBaseUrl(),\n ));\n }", "function init()\n {\n $this->setMethod('post');\n $this->addAttribs(array('id' => 'frmCoupons'));\n $this->setEnctype(Zend_Form::ENCTYPE_MULTIPART);\n\n $name = new Zend_Form_Element_Text('code');\n $name->setLabel('Cod');\n $name->setAttribs(array('maxlength' => 'code', 'class' => 'validate[required,minSize[5],maxSize[10]]', 'style' => 'width:250px;'));\n $name->setRequired(true);\n $this->addElement($name);\n\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setValue('Adauga');\n $submit->setAttribs(array('class' => 'button1'));\n $submit->setIgnore(true);\n $this->addElement($submit);\n\n }", "public function init()\n {\n $this->setMethod('post');\n $this->addElement('text', 'model', array('label' => 'Model'));\n $this->addElement('text', 'unique', array('label' => 'Numer zamówienia'));\n $this->addElement('text', 'ebay_id', array('label' => 'Numer ebay'));\n $this->addElement('text', 'invoice_id', array('label' => 'Numer faktury vat'));\n $this->addElement('text', 'color', array('label' => 'Kolor'));\n $this->addElement('text', 'frame', array('label' => 'Stelaż'));\n $this->addElement('radio', 'is_seat', array('label' => 'Fotelik', 'multiOptions' => array('0' => 'Nie', '1' => 'Tak')));\n $this->addElement('select', 'status', array('label' => 'Status zamówienia', 'multiOptions' => array(\n 'paid' => 'Opłacone',\n 'unpaid' => 'Niepłacone',\n 'sent' => 'Wysłane',\n 'other' => 'Oczekuje'\n )));\n $this->addElement('text', 'wheels', array('label' => 'Koła'));\n $this->addElement('textarea', 'bonus', array('label' => 'Dodatki', 'cols' => 50, 'rows' => 3));\n $this->addElement('textarea', 'client', array('label' => 'Klient', 'cols' => 50, 'rows' => 3));\n $this->addElement('text', 'date_of_payment', array('label' => 'Data opłacenia', 'value' => null));\n $this->addElement('text', 'date_of_receipt', array('label' => 'Data odbioru', 'value' => null));\n $this->addElement('submit', 'submit', array('label' => 'Zapisz'));\n }", "public function incluirAction () {\n\n // Título da tela (action)\n $this->view->telaTitle = 'Cadastrar Exercício Orçamentário';\n\n // Adiciona o formulário\n $formulario = new $this->_formulario ();\n\n // Define a tabela de negocio Exercicio\n $negocio = new Orcamento_Business_Negocio_Exercicio();\n $negocio->excluiCaches();\n\n // Exibe o formulário\n $this->view->formulario = $formulario;\n\n // Se for post...\n if ($this->getRequest()->isPost()) {\n\n $dados = $this->getRequest()->getPost();\n\n // Se os dados estiverem válidos\n if ($formulario->isValid($dados)) {\n\n // Verifica se o ano exercicio já foi excluido lógicamente\n $registro = $negocio->retornaExercicioExcluido($dados['ANOE_AA_ANO']);\n\n // Verifica se o ano exercicio do mesmo estatus ja existe\n $status = $negocio->retornaAnoExercicioComStatus($dados['ANOE_AA_ANO'], Trf1_Orcamento_Definicoes::FASE_EXERCICIO);\n \n // Verifica se ja existe\n if ($registro) {\n // seta mensagem de erro e redireciona\n $this->erroOperacao(\"Ocorreu um erro ao cadastrar a exercicio. \" . Orcamento_Business_Dados::MSG_REGISTRO_NAO_ENCONTRADO . '<br />');\n $this->voltarIndexAction();\n }\n\n // Faz a inclusão do na tabela de exercicio e fase\n if( $negocio->incluirExercicioFase ( $dados ) ) {\n \n // inclui na tabela de log do orçamento\n $this->_logdados->incluirLog( $dados[\"ANOE_AA_ANO\"] );\n // Exclui o cache do sistema\n $negocio->excluiCaches ();\n \n $this->_helper->flashMessenger ( array ( message => Orcamento_Business_Dados::MSG_SUCESSO_EXERCICIO, 'status' => 'success' ) );\n } else {\n // TODO: A mensagem abaixo deveria ser a Orcamento_Business_Dados::MSG_INCLUIR_ERRO\n $this->erroOperacao(\"Ocorreu um erro ao cadastrar a exercicio. O Exercicio pode ter sido excluido logicamente.\");\n }\n\n // Volta para a index\n $this->voltarIndexAction();\n } else {\n // Reapresenta os dados no formulário para correção do usuário\n $formulario->populate($dados);\n }\n }\n }", "public function __construct(){\n\t\tparent::__construct();\n\t\tinit_painel();\n\t\t$this->load->model('Comentarios_model', 'Comentarios');\n\t}", "public function init()\n {\n $this->setMethod('post');\n\n // Add an email element\n $this->addElement('text', 'nom', array(\n 'label' => \"Nom de l'endroit:\",\n 'required' => true,\n 'filters' => array('StringTrim')\n ));\n\n // Add an email element\n $this->addElement('select', 'active', array(\n 'label' => \"État\",\n\t 'multiOptions' => array(0 => 'Proposition', 1 => 'ZAP en service')\n ));\n\n // And finally add some CSRF protection\n $this->addElement('hidden', 'latitude', array(\n ));\n\n // And finally add some CSRF protection\n $this->addElement('hidden', 'longitude', array(\n ));\n\n // And finally add some CSRF protection\n $this->addElement('hidden', 'id', array(\n ));\n \n // Add the submit button\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Modifier',\n ));\n\n // And finally add some CSRF protection\n $this->addElement('hash', 'csrf', array(\n 'ignore' => true,\n ));\n }", "public function __construct($name = null) {\n parent::__construct('Events');\n $this->setAttribute('method', 'post');\n \t\n\t\t$this->add(array(\n 'name' => 'id',\n 'type' => 'Hidden',\n ));\n\n $this->add(array(\n 'name' => 'event_name',\n 'attributes' => array(\n 'type' => 'text',\n 'class' => 'form-control',\n 'id'=>'event_name'\n ),\n 'options' => array(\n 'label' => 'Event Title',\n ),\n ));\n\n $this->add(array(\n 'name' => 'sponser_name',\n 'attributes' => array(\n 'type' => 'text',\n 'class' => 'form-control',\n 'id'=>'sponser_name'\n ),\n 'options' => array(\n 'label' => 'Sponser Name',\n ),\n ));\n\n $this->add(array(\n 'name' => 'sponser_contact',\n 'attributes' => array(\n 'type' => 'number',\n 'class' => 'form-control',\n 'id'=>'sponser_contact'\n ),\n 'options' => array(\n 'label' => 'Sponser Contact',\n ),\n ));\n\n $this->add(array(\n 'name' => 'event_organiser',\n 'attributes' => array(\n 'type' => 'text',\n 'class' => 'form-control',\n 'id'=>'event_organiser'\n ),\n 'options' => array(\n 'label' => 'Organiser Name',\n ),\n ));\n\n $this->add(array(\n 'name' => 'organiser_contact',\n 'attributes' => array(\n 'type' => 'number',\n 'class' => 'form-control',\n 'id'=>'organiser_contact'\n ),\n 'options' => array(\n 'label' => 'Organiser Contact',\n ),\n ));\n\n\n $this->add(array(\n 'name' => 'sponser_photo',\n 'attributes' => array(\n 'type' => 'file',\n 'class' => 'thisnot',\n 'id'=>'sponser_photo'\n ),\n 'options' => array(\n 'label' => 'Sponser Photo',\n ),\n ));\n\n $this->add(array(\n 'name' => 'organiser_photo',\n 'attributes' => array(\n 'type' => 'file',\n 'class' => 'thisnot',\n 'id'=>'organiser_photo'\n ),\n 'options' => array(\n 'label' => 'Organiser Photo',\n ),\n ));\n\n $this->add(array(\n 'type' => 'Hidden',\n 'name' => 'event_desc',\n 'attributes' => array(\n 'class' => 'form-control',\n 'id'=>'event_desc'\n ),\n 'options' => array(\n 'label' => 'Event Description',\n )\n ));\n\n $this->add(array(\n 'name' => 'image',\n 'attributes' => array(\n 'type' => 'file',\n 'class' => 'form-control',\n 'id'=>'image'\n ),\n 'options' => array(\n 'label' => 'Upload Event Image',\n ),\n ));\n\n \n $this->add(array(\n 'type' => 'Zend\\Form\\Element\\Select',\n 'name' => 'country_id',\n 'attributes' => array(\n 'class' => 'form-control',\n 'id'=>'country_id'\n ),\n 'options' => array(\n 'label' => 'Country Name',\n 'empty_option' => 'Please Select Country Name',\n 'value_options' => self::$country_nameList,\n )\n ));\n\n $this->add(array(\n 'type' => 'Zend\\Form\\Element\\Select',\n 'name' => 'state_id',\n 'attributes' => array(\n 'class' => 'form-control',\n 'id'=>'state_id'\n ),\n 'options' => array(\n 'label' => 'State Name',\n 'empty_option' => 'Please Select State Name',\n 'value_options' => self::$state_nameList,\n )\n ));\n\n $this->add(array(\n 'type' => 'Zend\\Form\\Element\\Select',\n 'name' => 'city_id',\n 'attributes' => array(\n 'class' => 'form-control',\n 'id'=>'city_id'\n ),\n 'options' => array(\n 'label' => 'City Name',\n 'empty_option' => 'Please Select City Name',\n 'value_options' => self::$city_nameList,\n )\n ));\n\n\n $this->add(array(\n 'name' => 'venue',\n 'attributes' => array(\n 'type' => 'textarea',\n 'class' => 'form-control',\n 'id'=>'venue'\n ),\n 'options' => array(\n 'label' => 'venue',\n ),\n ));\n\n $this->add(array(\n 'name' => 'event_date',\n 'attributes' => array(\n 'type' => 'text',\n 'class' => 'form-control',\n 'id'=>'event_date'\n ),\n 'options' => array(\n 'label' => 'Start Date',\n ),\n ));\n\n $this->add(array(\n 'name' => 'end_date',\n 'attributes' => array(\n 'type' => 'text',\n 'class' => 'form-control',\n 'id'=>'end_date'\n ),\n 'options' => array(\n 'label' => 'End Date',\n ),\n ));\n\n $this->add(array(\n 'name' => 'start_time',\n 'attributes' => array(\n 'type' => 'time',\n 'class' => 'form-control timepicker',\n 'id'=>'start_time'\n ),\n 'options' => array(\n 'label' => 'Start Time',\n ),\n ));\n\n $this->add(array(\n 'name' => 'end_time',\n 'attributes' => array(\n 'type' => 'time',\n 'class' => 'form-control timepicker',\n 'id'=>'end_time'\n ),\n 'options' => array(\n 'label' => 'End Time',\n ),\n ));\n\n\n $this->add(array(\n 'name' => 'event_cost',\n 'attributes' => array(\n 'type' => 'number',\n 'class' => 'form-control',\n 'id'=>'event_cost'\n ),\n 'options' => array(\n 'label' => 'Event Cost',\n ),\n ));\n $this->add(array(\n 'name' => 'event_members',\n 'attributes' => array(\n 'type' => 'number',\n 'class' => 'form-control',\n 'id'=>'event_members'\n ),\n 'options' => array(\n 'label' => 'Event Members',\n ),\n ));\n\n $this->add(array(\n 'type' => 'Zend\\Form\\Element\\Select',\n 'name' => 'IsActive',\n 'attributes' => array(\n 'class' => 'form-control',\n 'id'=>'IsActive'\n ),\n 'options' => array(\n 'label' => 'Status',\n 'empty_option' => 'Please Select Status',\n 'value_options' => array(\n '1'=>'Active',\n '0'=>'In Active'),\n )\n ));\n\n\t\t$this->add(array(\n 'name' => 'submit',\n 'attributes' => array(\n 'type' => 'submit',\n 'value' => 'Contact Us',\n 'id' => 'submit',\n 'class' => 'btn btn-default'\n ),\n )); \n \n }", "public final function definition() {\n $mform = $this->_form;\n $customdata = $this->_customdata;\n $editmode = $customdata['editmode'];\n\t\n $mform->addElement('header', 'typeheading', get_string('editingacoupon', 'enrol_coupon', get_string($this->typestring, 'enrol_coupon')));\n\n $mform->addElement('hidden', 'id');\n $mform->setType('id', PARAM_INT);\n\n $mform->addElement('hidden', 'couponid');\n $mform->setType('couponid', PARAM_INT);\n\n\t\t$mform->addElement('hidden', 'type');\n\t\t$mform->setType('type', PARAM_INT);\n\t\t\n\t\t$mform->addElement('hidden', 'couponaction');\n\t\t$mform->setType('couponaction', PARAM_INT);\n\t\t\n\t\t$mform->addElement('hidden', 'couponvalue');\n\t\t$mform->setType('couponvalue', PARAM_INT);\n\n\t\t$mform->addElement('text', 'name', get_string('couponname', 'enrol_coupon'), array('size'=>70));\n\t\t$mform->setType('name', PARAM_TEXT);\n\t\t$mform->addRule('name', get_string('required'), 'required', null, 'client');\n\t\t\n\t\t$mform->addElement('textarea', 'description', get_string('description'), 'wrap=\"virtual\" rows=\"4\" cols=\"50\"');\n\t\t$mform->setType('description', PARAM_TEXT);\n\t\t\n\t\t\t\n $this->custom_definition();\n \n\n\t\t\n\t\t$mform->addElement('text', 'maxuses', get_string('maxuses', 'enrol_coupon'));\n\t\t$mform->setType('maxuses', PARAM_INT);\n\t\t$mform->setDefault('maxuses', 1);\n\t\t$mform->addRule('maxuses', get_string('required'), 'required', null, 'client');\n\t\t\n $options = array('optional'=>true);\n $mform->addElement('date_selector', 'fromdate',get_string('fromdate','enrol_coupon'), $options);\n $mform->addElement('date_selector', 'todate',get_string('todate','enrol_coupon'), $options);\n\n\t\t$mform->addElement('text', 'duration', get_string('duration', 'enrol_coupon'));\n\t\t$mform->setType('duration', PARAM_INT);\n\t\t$mform->setDefault('duration', 0);\n\t\t$mform->addRule('duration', get_string('required'), 'required', null, 'client');\n\n\n\t\t//add the action buttons\n $this->add_action_buttons(get_string('cancel'), get_string('savecoupon', 'enrol_coupon'));\n\n }", "public function init()\n {\n //Obiekt odpowiedzialny za pobieranie danych z get i post\n $this->request = new \\application\\config\\core\\Request();\n //Pobieranie nazwy kontrolera który został wywołany przez dispatcher\n $this->controllerName = get_called_class();\n //Z nazwy kontrolera tworzymy nazwę modelu który musi być takiej samej nazwy jak kontroler\n $controllerNameExplodeList = explode('\\\\', $this->controllerName);\n $this->controllerName = end($controllerNameExplodeList);\n $model = '\\application\\model\\\\'.str_replace('Controller', 'Model', $this->controllerName);\n if (class_exists($model)) {\n $this->model = new $model();\n }else{\n // Jeżeli nie istnieje to zarzuć wyjątkiem :).\n throw new \\Exception('Nie istnieje model o nazwie '.$model);\n }\n //Inicjujemy obiekt który ma za zadanie zarządzać layoutem.\n $this->view = new \\application\\config\\core\\View($this->controllerName);\n //Ustawiamy domyślny layout aplikacji\n $this->view->setLayout('default');\n }", "public function init() {\n $auth = Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session('admin'));\n $user = $auth->getIdentity();\n $code_groupe = $user->code_groupe;\n\n $this->setMethod('post');\n\n $this->addElement('text', 'nom_gac', array(\n 'label' => 'Nom *',\n 'required' => true,\n 'size' => 30,\n 'filters' => array('StringTrim'),\n ));\n\n $nm = new Application_Model_DbTable_EuMembreMorale();\n $select = $nm->select();\n $rows = $nm->fetchAll($select);\n $membres = array();\n foreach ($rows as $c) {\n $membres[] = $c->code_membre_morale;\n }\n $elem = new ZendX_JQuery_Form_Element_AutoComplete(\n \"code_membre\", array('label' => 'Code membre','required' => false)\n );\n $elem->setJQueryParams(array('source' => $membres));\n $elem->setAttrib('size', '25');\n $elem->setRequired(false);\n $this->addElement($elem);\n\n $mapper = new Application_Model_DbTable_EuTypeGac();\n $select = $mapper->select();\n $select->order('ordre_type_gac', 'ASC');\n if ($code_groupe == 'agregat') {\n $select->where('ordre_type_gac >=?', 1);\n $select->where('ordre_type_gac <=?', 8);\n } elseif ($code_groupe == 'gac') {\n $select->where('ordre_type_gac >=?', 2);\n $select->where('ordre_type_gac <=?', 8);\n } elseif ($code_groupe == 'gacp') {\n $select->where('ordre_type_gac >=?', 3);\n $select->where('ordre_type_gac <=?', 8);\n } elseif ($code_groupe == 'gacsu') {\n $select->where('ordre_type_gac >=?', 9);\n $select->where('ordre_type_gac <=?', 11);\n } elseif ($code_groupe == 'gacex') {\n $select->where('ordre_type_gac >=?', 3);\n } elseif ($code_groupe == 'gacse') {\n $select->where('ordre_type_gac >=?', 4);\n $select->where('ordre_type_gac <=?', 8);\n } elseif ($code_groupe == 'gacr') {\n $select->where('ordre_type_gac >=?', 5);\n $select->where('ordre_type_gac <=?', 8);\n } elseif ($code_groupe == 'gacs') {\n $select->where('ordre_type_gac >=?', 6);\n $select->where('ordre_type_gac <=?', 8);\n }\n $tgac = $mapper->fetchAll($select);\n $t_select = new Zend_Form_Element_Select('code_type_gac');\n $t_select->setLabel('Type GAC *');\n $t_select->setRequired(true);\n foreach ($tgac as $c) {\n $t_select->addMultiOption('', '');\n $t_select->addMultiOption($c->code_type_gac, $c->nom_type_gac);\n }\n $this->addElement($t_select);\n\n $mapper = new Application_Model_EuZoneMapper();\n $zones = $mapper->fetchAll();\n $z_select = new Zend_Form_Element_Select('code_zone');\n $z_select->setLabel('Zone géographique');\n $z_select->isRequired(true);\n foreach ($zones as $c) {\n $z_select->addMultiOption('', '');\n $z_select->addMultiOption($c->code_zone, $c->nom_zone);\n }\n $mapper = new Application_Model_EuPaysMapper();\n $zones = $mapper->fetchAll();\n $z_select->isRequired(true);\n foreach ($zones as $c) {\n $z_select->addMultiOption('', '');\n $z_select->addMultiOption($c->id_pays, $c->libelle_pays);\n }\n $mapper = new Application_Model_DbTable_EuSection();\n $zones = $mapper->fetchAll();\n $z_select->isRequired(true);\n foreach ($zones as $c) {\n $z_select->addMultiOption('', '');\n $z_select->addMultiOption($c->id_section, $c->nom_section);\n }\n $mapper = new Application_Model_DbTable_EuRegion();\n $zones = $mapper->fetchAll();\n $z_select->isRequired(true);\n foreach ($zones as $c) {\n $z_select->addMultiOption('', '');\n $z_select->addMultiOption($c->id_region, $c->nom_region);\n }\n $mapper = new Application_Model_EuSecteurMapper();\n $zones = $mapper->fetchAll();\n $z_select->isRequired(true);\n foreach ($zones as $c) {\n $z_select->addMultiOption('', '');\n $z_select->addMultiOption($c->code_secteur, $c->nom_secteur);\n }\n $mapper = new Application_Model_EuAgenceMapper();\n $zones = $mapper->fetchAll();\n $z_select->isRequired(true);\n foreach ($zones as $c) {\n $z_select->addMultiOption('', '');\n $z_select->addMultiOption($c->code_agence, $c->libelle_agence);\n }\n $this->addElement($z_select);\n\n $a_select = new Zend_Form_Element_Multiselect('code_agence');\n $a_select->setLabel('Agences couvertes');\n $a_select->isRequired(false);\n $mapper = new Application_Model_DbTable_EuAgence();\n $select = $mapper->select();\n $select->order('libelle_agence', 'ASC');\n $agence = $mapper->fetchAll($select);\n foreach ($agence as $c) {\n $a_select->addMultiOption('', '');\n $a_select->addMultiOption($c->code_agence, $c->libelle_agence);\n }\n $this->addElement($a_select);\n \n $ng = new Application_Model_DbTable_EuMembre();\n $select = $ng->select();\n $rows = $ng->fetchAll($select);\n $membres = array();\n foreach ($rows as $c) {\n $membres[] = $c->code_membre;\n }\n $elem = new ZendX_JQuery_Form_Element_AutoComplete(\n \"code_membre_gestionnaire\", array('label' => 'Numéro gestionnaire','required' => false)\n );\n $elem->setJQueryParams(array('source' => $membres));\n $elem->setAttrib('size', '25');\n $elem->setRequired(false);\n $this->addElement($elem);\n\n $this->addElement('text', 'nom_gestion', array(\n 'label' => 'Nom gestionnaire',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'size' => 25,\n 'readonly' => true,\n ));\n\n $this->addElement('text', 'prenom_gestion', array(\n 'label' => 'Prénoms gestionnaire',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'size' => 25,\n 'readonly' => true,\n ));\n\n $this->addElement('text', 'tel_gestion', array(\n 'label' => 'Téléphone gestionnaire',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'size' => 25,\n 'readonly' => true,\n ));\n\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Valider',\n ));\n\n // Add the cancel button\n $this->addElement('button', 'cancel', array(\n 'ignore' => true,\n 'label' => 'Annuler',\n ));\n $this->addElement(\n 'hidden', 'code_gac', array(\n ));\n $this->addElement(\n 'hidden', 'zone', array(\n ));\n \n }", "public function __construct($request) {\n // ficheros a subir\n $this->request = $request;\n\n // Cargar la configuracion del modulo (modules/moduloName/config.yml)\n $this->form = new Form($this->entity);\n\n\n // Pongo la app a la que pertenece\n $this->app = $this->form->getNode('app');\n\n // Pongo si es o no el modulo raiz de la app\n $this->isModuleRoot = $this->form->getNode('isModuleRoot');\n\n // Instanciar el objeto listado con los parametros del modulo\n // y los eventuales valores del filtro enviados en el request\n if ($this->form->getTieneListado()) {\n $this->listado = new Listado($this->form, $this->request);\n $this->values['listado'] = array(\n 'filter' => $this->listado->getFilter(),\n );\n }\n\n // Cargar los permisos.\n $this->permisos = new ControlAcceso('PcaeEmpresas');\n\n $this->values['titulo'] = $this->form->getTitle();\n $this->values['ayuda'] = $this->form->getHelpFile();\n $this->values['permisos'] = $this->permisos->getPermisos();\n $this->values['enCurso'] = $this->values['permisos']['enCurso'];\n $this->values['tieneListado'] = $this->form->getTieneListado();\n $this->values['request'] = $this->request;\n $this->values['linkBy'] = array(\n 'id' => $this->form->getLinkBy(),\n 'value' => '',\n );\n\n // Cargar los includes del Head html\n $includesHead = $this->form->getIncludesHead();\n $this->values['twigCss'] = $includesHead['twigCss'];\n $this->values['twigJs'] = $includesHead['twigJs'];\n\n // Cargas las variables\n //$this->cargaVariables();\n\n $this->values['atributos'] = $this->form->getAtributos($this->values['permisos']['enCurso']['modulo']);\n\n // Poner la solapa activa de los campos comunes\n ($this->request['solapaActiva'] == '') ? $this->values['solapaActiva'] = 'general' : $this->values['solapaActiva'] = $this->request['solapaActiva'];\n }", "public function __construct()\n {\n parent::__construct('ServicioForm');\n $this->setAttribute('method', 'post');\n \n $this->add(array(\n 'name' => 'servicio_nombre',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Nombre',\n ),\n ));\n $this->add(array(\n 'name' => 'servicio_descripcion',\n 'type' => 'textarea',\n 'options' => array(\n 'label' => 'Descripcion',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_costo',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Costo',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_precio',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Precio',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_iva',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'IVA',\n ),\n ));\n \n\n\n }", "public function __construct() {\r\n $this->ctrlAccueil = new ControleurAccueil();\r\n $this->ctrlBillet = new ControleurBillet();\r\n $this->ctrlConnexion = new ControleurConnexion();\r\n $this->ctrlAdmin = new ControleurAdmin();\r\n }", "public function init() {\n $this->setMethod(\"post\");\n $this->addElement('text', 'code_categorie', array('label' => 'Code:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'class' => 'text',\n 'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, 10))\n )));\n\n $this->addElement('text', 'libelle_categorie', array('label' => 'Libelle:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'class' => 'text'\n ));\n\n $this->addElement('textarea', 'description_categorie', array(\n 'label' => 'Description:',\n 'required' => FALSE,\n ));\n\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Valider',\n ));\n\n // Add the cancel button\n $this->addElement('button', 'cancel', array(\n 'ignore' => true,\n 'label' => 'Annuler',\n ));\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->load->database();\n $this->load->helper(array('form','captcha','general'));\n $this->load->library('form_complete');\n $this->load->library('form_validation');\n $this->load->library('Ventana_modal');\n $this->load->model('Encuestas_model', 'enc_mod');\n\n\n }", "public function initialize($entity = null, $options = array())\n {\n if (!isset($options['edit'])) {\n\n $elemento = new Text(\"formacion_id\");\n $this->add($elemento->setLabel(\"Id\"));\n } else {\n $this->add(new \\Phalcon\\Forms\\Element\\Hidden(\"formacion_id\"));\n }\n /*========================== ==========================*/\n $elemento = new Text('formacion_institucion',array('maxlength'=>50,'class'=>'form-control','required'=>'true','placeholder'=>'Ingrese el nombre de la institución'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Institución');\n $elemento->setFilters(array('striptags', 'string'));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'El nombre de la institución es requerido'\n ))\n ));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Select('formacion_gradoId', \\Curriculum\\Grado::find(), array(\n 'using' => array('grado_id', 'grado_nombre'),\n 'useEmpty' => true,\n 'emptyText' => 'Seleccionar ',\n 'emptyValue' => '',\n 'class'=>'form-control','required'=>'true'\n ));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Seleccione el nivel'\n ))\n ));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Nivel');\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Text('formacion_titulo',array('maxlength'=>50,'class'=>'form-control','placeholder'=>'Ingrese el nombre del Titulo','required'=>'true'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Titulo');\n $elemento->setFilters(array('striptags', 'string'));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Select('formacion_estadoId', \\Curriculum\\Estado::find(), array(\n 'using' => array('estado_id', 'estado_nombre'),\n 'useEmpty' => true,\n 'emptyText' => 'Seleccionar ',\n 'emptyValue' => '',\n 'class'=>'form-control','required'=>'true'\n ));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Seleccione el estado'\n ))\n ));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Estado');\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Date('formacion_fechaInicio',array('class'=>'form-control','required'=>'true'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Fecha de Inicio');\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'La fecha de inicio es requerida.'\n ))\n ));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Date('formacion_fechaFinal',array('class'=>'form-control', 'disabled'=>''));\n $elemento->setLabel('Fecha Final');\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'La fecha final es requerida.'\n ))\n ));\n $this->add($elemento);\n\n }", "public function init() {\n $this->setMethod('post');\n $this->setAction($this->getView()->url());\n $this->_view->headScript()->appendFile($this->_view->baseUrl('media/js/collapsiblefields.js', 'text/javascript'));\n $this->_view->headScript()->appendFile($this->_view->baseUrl('media/js/toggledetails.js', 'text/javascript'));\n $this->_view->headScript()->appendFile($this->_view->baseUrl('media/js/erga/ypoerga/ypoerga.js', 'text/javascript'));\n\n // Επιστημονικά Υπεύθυνος\n $this->addSubForm(new Application_Form_Subforms_SupervisorSelect($this->_defaultSupervisor, $this->_view), 'subprojectsupervisor');\n $this->getSubForm('subprojectsupervisor')->setLegend('Στοιχεία Επιστημονικά Υπεύθυνου');\n $this->addExpandImg('subprojectsupervisor');\n\n $this->addSubProjectFields();\n\n //$this->addContractFields($dg);\n\n $this->addSubmitFields();\n }", "public function __construct()\n {\n $this->middleware('auth');\n //$this->field_list = ['nombre' => 'Nombre', 'direccion' => 'Dirección', 'telefono' => 'Teléfono', 'imglogo' => 'Logo', 'total_facturas' => 'Facturas', 'total_timbres' => 'Timbres', 'activo' => 'Activo', 'id' => 'Acciones'];\n $this->field_list = ['nombre' => 'Nombre', 'direccion' => 'Dirección', 'telefono' => 'Teléfono', 'id' => 'Acciones'];\n $this->name = 'Empresas';\n $this->name_plural = 'Empresas';\n $this->form = 'App\\Core\\Forms\\Admin\\EmpresaForm';\n $this->model = 'App\\Models\\Catalogos\\Empresas';\n $this->url_prefix = 'empresas';\n $validation_add = [];\n $validation_edit = $validation_add;\n $this->setValidatorAdd($validation_add);\n $this->setValidatorEdit($validation_edit);\n }", "public function init() {\n $auth = Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session('admin'));\n $user = $auth->getIdentity();\n $this->setMethod('post');\n\n $num_membre = $user->num_membre;\n\n $this->addElement(\n 'text', 'code_demand', array(\n 'label' => 'Code *',\n 'required' => true,\n 'filters' => array('StringTrim'),\n ));\n\n $this->addElement('text', 'lib_demand', array(\n 'label' => 'Libellé *',\n 'required' => true,\n 'size' => 43,\n 'filters' => array('StringTrim'),\n ));\n\n $gac = array();\n $tab = new Application_Model_DbTable_EuGac();\n $sel = $tab->select();\n $sel->order('date_creation', 'DESC');\n $ngac = $tab->fetchAll($sel);\n foreach ($ngac as $value) {\n $gac[$value->num_gac] = ucfirst($value->num_gac) . '--' . $value->nom_gac;\n }\n $g_select = new Zend_Form_Element_Select('num_gac');\n $g_select->setLabel('Nom de la GAC *')->isRequired(true);\n $g_select->addMultiOption('', '');\n $g_select->addMultiOptions($gac);\n $this->addElement($g_select);\n\n $besoin = array();\n $table = new Application_Model_DbTable_EuBesoin();\n $select = $table->select();\n $select->where('num_client=?', $num_membre);\n $select->order('id_besoin', 'DESC');\n $bes = $table->fetchAll($select);\n foreach ($bes as $value) {\n $besoin[$value->id_besoin] = ucfirst($value->objet_besoin) . ' ' . $value->date_besoin;\n }\n $f_select = new Zend_Form_Element_Select('id_besoin');\n $f_select->setLabel('Expression de besoin ')->isRequired(false);\n $f_select->addMultiOption('', '');\n $f_select->addMultiOptions($besoin);\n $this->addElement($f_select);\n\n $this->addElement('textarea', 'desc_demand', array(\n 'label' => 'Description',\n 'required' => false,\n 'filters' => array('StringTrim'),\n ));\n\n $type_unite = array('' => '', 'jour' => 'Jour', 'mois' => 'Mois', 'annee' => 'Année');\n $unit_select = new Zend_Form_Element_Select('unite_mdv');\n $unit_select->setLabel('Unité de durée *')\n ->setRequired(true)\n ->addMultiOptions($type_unite);\n $this->addElement($unit_select);\n\n $this->addElement('text', 'mdv', array(\n 'label' => 'Durée du projet *',\n 'required' => true,\n 'size' => 8,\n 'filters' => array('StringTrim'),\n 'validators' => array('validator' => 'digits'),\n ));\n\n $this->addElement('text', 'mt_salaire', array(\n 'label' => 'Salaire',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array('validator' => 'digits'),\n ));\n\n $this->addElement('text', 'mt_investis', array(\n 'label' => 'Investissement',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'validators' => array('validator' => 'digits'),\n ));\n\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Valider',\n ));\n\n // Add the cancel button\n $this->addElement('button', 'cancel', array(\n 'ignore' => true,\n 'label' => 'Annuler',\n ));\n }", "public function initialize()\n {\n // attributes\n $this->setName('eventocontrarecibo');\n $this->setPhpName('Eventocontrarecibo');\n $this->setClassname('Eventocontrarecibo');\n $this->setPackage('aersa');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('ideventocontrarecibo', 'Ideventocontrarecibo', 'INTEGER', true, null, null);\n $this->addForeignKey('idcontrarecibo', 'Idcontrarecibo', 'INTEGER', 'contrarecibo', 'idcontrarecibo', true, null, null);\n $this->addColumn('eventocontrarecibo_fecha', 'EventocontrareciboFecha', 'TIMESTAMP', true, null, null);\n $this->addColumn('eventocontrarecibo_generador', 'EventocontrareciboGenerador', 'CHAR', true, null, null);\n $this->getColumn('eventocontrarecibo_generador', false)->setValueSet(array (\n 0 => 'proveedor',\n 1 => 'cliente',\n));\n $this->addColumn('eventocontrarecibo_evento', 'EventocontrareciboEvento', 'CHAR', true, null, null);\n $this->getColumn('eventocontrarecibo_evento', false)->setValueSet(array (\n 0 => 'generado',\n 1 => 'rechazado',\n 2 => 'revisado',\n 3 => 'validado',\n 4 => 'pago',\n 5 => 'pagado',\n 6 => 'recordatoriopago',\n 7 => 'pagocincompleto',\n));\n $this->addColumn('idempresa', 'Idempresa', 'INTEGER', true, null, null);\n $this->addColumn('idsucursal', 'Idsucursal', 'INTEGER', true, null, null);\n $this->addColumn('idusuario', 'Idusuario', 'INTEGER', true, null, null);\n $this->addColumn('eventocontrarecibo_nota', 'EventocontrareciboNota', 'LONGVARCHAR', true, null, null);\n // validators\n }", "function evt__agregar()\n\t{\n\t\t$this->set_pantalla('pant_edicion');\n\t}", "function __construct() {\n\n /**\n * Definicion de tipos de campos\n */\n $this->assignType(\"id\", \"ID\", BaseView::HIDDEN);\n $this->assignType(\"name\", JText::_(\"COM_CTC_NAME\"), BaseView::STRING);\n $this->assignType(\"description\", JText::_(\"COM_CTC_DESCRIPTION\"), BaseView::BIG_STRING);\n $this->assignType(\"package\", \"Paquete\", BaseView::STRING);\n $this->assignType(\"version\", \"Versión\", BaseView::STRING);\n $this->assignType(\"username\", JText::_(\"COM_CTC_USER\"), BaseView::STRING);\n $this->assignType(\"password\", JText::_(\"COM_CTC_PASSWORD\"), BaseView::PASSWORD);\n $this->assignType(\"process\", \"Proceso\", BaseView::PICKLIST, array(\n \"ATTENDANCE\" => \"Asignación de Turno (ATTENDANCE)\",\n \"PAYROLL\" => \"Clasificación de Horas (PAYROLL)\",\n \"AFTERPAYROLL\" => \"Post Clasificación (AFTERPAYROLL)\",\n \"HOURPERIOD\" => \"Clasificación del Período (HOURPERIOD)\",\n ));\n\n $this->assignType(\"enterprises\", \"Empresas\", BaseView::ENTITIES, array(\n BaseView::ENT_FIELD => \"name\",\n BaseView::ENT_CLASS => \"Enterprise\",\n BaseView::ENT_FILTER => null));\n /**\n * Definicion de vistas y sus acciones\n */\n $this->addViewEx(\"form\", array());\n $this->addAction(\"form\", \"rule_form_submit\", JText::_(\"COM_CTC_SAVE\"), \"save.png\");\n $this->addAction(\"form\", \"rule_form_cancel\", JText::_(\"COM_CTC_CANCEL\"), \"remove.png\");\n\n //TODO agregar rule_status_id\n $this->addView(\"table\", array(\"name\",\n \"package\", \"version\", \"username\", \"process\"));\n $this->addAction(\"table\", \"rule_table_edit\", JText::_(\"COM_CTC_EDIT\"), \"edit.png\");\n //$this->addAction(\"table\", \"rule_table_remove\", JText::_(\"COM_CTC_DELETE\"), \"delete.png\");\n\n $this->addView(\"dialog\", array());\n $this->addAction(\"dialog\", \"rule_dialog_ok\", JText::_(\"COM_CTC_OK\"), \"accept.png\");\n $this->addAction(\"dialog\", \"rule_dialog_cancel\", JText::_(\"COM_CTC_CANCEL\"), \"remove.png\");\n\n $this->addView(\"aud\", array(\n \"name\",\n \"package\", \"version\", \"process\"));\n }", "public function __construct()\n\t{\n\t\t$this->inicializarSistemaExterno();\n\t}", "public function init()\n {\n $this->setName('applicant-mail');\n\n\n $this\n ->add(\n array(\n 'type' => 'hidden',\n 'name' => 'applicationId',\n )\n )\n ->add(\n array(\n 'type' => 'hidden',\n 'name' => 'status',\n )\n )\n ->add(\n array(\n 'name' => 'mailSubject',\n )\n )\n ->add(\n array(\n 'type' => 'textarea',\n 'name' => 'mailText'\n )\n );\n }", "function form_init_elements() \r\n {\r\n //we want an confirmation page for this form.\r\n //$this->set_confirm();\r\n\r\n // Course Info \r\n $elemT1 = new FEText( \"courseName\", true, 10);\r\n $elemT1->set_style_attribute('align', 'left');\r\n $elemT1->set_attribute(\"id\",\"coursename\");\r\n $elemT1->set_attribute(\"accesskey\",\"n\"); \r\n $this->add_element($elemT1);\r\n\r\n $elemP1 = new FETextArea(\"coursedataDescripcion\", true, 10, 50, null, 300);\r\n $elemP1->set_style_attribute('align', 'left');\r\n $elemP1->set_attribute(\"id\",\"coursedatadescripcion\"); \r\n $elemP1->set_attribute(\"accesskey\",\"d\"); \r\n $this->add_element($elemP1);\r\n\r\n include(Util::app_Path(\"andromeda/include/classes/nls.inc.php\"));\r\n $language = $this->_formatElem(\"FEListBox\", \"courseLanguage\", \"courseLanguage\", FALSE, \"100px\", NULL, $nls['languages_form']);\r\n $language->set_style_attribute('align', 'left');\r\n $language->set_attribute(\"id\",\"courselanguage\");\r\n $language->set_attribute(\"accesskey\",\"l\"); \r\n $this->add_element($language);\r\n \r\n $elemT2 = new FEText( \"coursedataVersion\", FALSE, 10);\r\n $elemT2->set_style_attribute('align', 'left');\r\n $elemT2->set_attribute(\"id\",\"coursedataversion\");\r\n $elemT2->set_attribute(\"accesskey\",\"v\"); \r\n $this->add_element($elemT2);\r\n \r\n $elemP2 = new FETextArea(\"coursedataPalabrasClaves\", false, 10, 50, null, 300);\r\n $elemP2->set_style_attribute('align', 'left');\r\n $elemP2->set_attribute(\"id\",\"coursedatapalabrasclaves\");\r\n $elemP2->set_attribute(\"accesskey\",\"w\"); \r\n $this->add_element($elemP2);\r\n\r\n $elemT3 = new FEText( \"coursedataDestinatarios\", FALSE, 10);\r\n $elemT3->set_style_attribute('align', 'left');\r\n $elemT3->set_attribute(\"id\",\"coursedatadestinatarios\");\r\n $elemT3->set_attribute(\"accesskey\",\"u\"); \r\n $this->add_element($elemT3);\r\n \r\n $elemP3 = new FETextArea(\"coursedataConocimientosPrevios\", false, 10, 50, null, 300);\r\n $elemP3->set_style_attribute('align', 'left');\r\n $elemP3->set_attribute(\"id\",\"coursedataconocimientosprevios\");\r\n $elemP3->set_attribute(\"accesskey\",\"k\"); \r\n $this->add_element($elemP3);\r\n\r\n $elemT4 = new FEText( \"coursedataMetodologia\", FALSE, 10);\r\n $elemT4->set_style_attribute('align', 'left');\r\n $elemT4->set_attribute(\"id\",\"coursedatametodologia\");\r\n $elemT4->set_attribute(\"accesskey\",\"m\"); \r\n $this->add_element($elemT4);\r\n\r\n $elemCB1 = new FECheckBox('courseActive', agt('Poner el curso activo.') );\r\n $elemCB1->set_style_attribute('align', 'left');\r\n $elemCB1->set_attribute(\"id\",\"courseactive\"); \r\n $elemCB1->set_attribute(\"accesskey\",\"o\"); \r\n $this->add_element( $elemCB1 );\r\n\r\n $elemCB2 = new FECheckBox('courseAccess', agt('Poner el curso accesible.') ); \r\n $elemCB2->set_style_attribute('align', 'left');\r\n $elemCB2->set_attribute(\"id\",\"courseaccess\");\r\n $elemCB2->set_attribute(\"accesskey\",\"p\"); \r\n $this->add_element( $elemCB2 ); \r\n\r\n $submit = $this->_formatElem(\"base_SubmitButton\", \"Aceptar\", \"submit\", agt(\"Insertar Curso\"));\r\n $submit->set_attribute(\"id\",\"submit\"); \r\n $submit->set_attribute(\"accesskey\",\"e\"); \r\n $this->add_element($submit);\r\n }", "public function __construct() \r\n {\r\n \t$this->con = new cConexion();\r\n\t\t$this->tabla = \"evento\";\r\n\t\t//$this->con->Conectar();\r\n }", "public function __construct()\n\t{\n\t\t$this->data['modal'] \t\t= 'providers';\n\t\t\n\t\t// Route for the routes file\n\t\t$this->data['ruta'] \t\t= 'providers';\n\t\t\n\t\t// Model Name\n\t\t$this->data['model'] \t\t= 'Providers';\n\n\t\t// Module that appears at the view\n\t\t$this->data['modulo'] \t\t= 'Proveedores';\n\t\t\n\t\t// Variable that tells where to go according to the function, edit, new, delete\n\t\t$this->data['seccion']\t\t= '';\n\n\t\t$this->search_by = array('name','last_name','dni','email','company_name','cuit');\n\t}", "public function initEvents()\n\t{\n\t\t$this->collEvents = new PropelObjectCollection();\n\t\t$this->collEvents->setModel('Event');\n\t}", "public function init() {\n $this->setMethod('post');\n\n // Ein Email Element hinzufügen\n $this->addElement('text', 'name', array(\n 'label' => 'Dein Name:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n ));\n $this->addElement('text', 'mail', array(\n 'label' => 'Deine Mail Adresse:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array('validator' => 'EmailAddress', null)\n )\n ));\n // Das Kommentar Element hinzufügen\n $this->addElement('textarea', 'message', array(\n 'label' => 'Bitte ein Kommentar:',\n 'required' => true,\n 'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, 2000))\n )\n ));\n\n $this->addElement('select', 'subject', array(\n 'label' => 'Betreff',\n 'required' => true,\n 'multiOptions' => array(\n 'service' => 'Allgemeine Fragen',\n 'shooting' => 'Shooting',\n 'error' => 'Fehler auf der Seite'\n )\n ));\n \n $this->addElement('text', 'datum', array(\n 'label' => 'Datum:',\n 'required' => false,\n 'filters' => array('StringTrim'),\n ));\n \n // Den Submit Button hinzufügen\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Absenden',\n ));\n\n /*\n // Und letztendlich etwas CSRF Protektion hinzufügen\n $this->addElement('hash', 'csrf', array(\n 'ignore' => true,\n ));\n */\n }", "public function init() {\n\t\t\t\t\t\t$this->view->controller = $this->_request->getParam ( 'controller' );\n\t\t\t\t\t\t$this->view->action = $this->_request->getParam ( 'action' );\n\t\t\t\t\t\t$this->getLibBaseUrl = new Zend_View_Helper_BaseUrl ();\n\t\t\t\t\t\t$this->GetModelOrganize = new Application_Model_ModOrganizeDb ();\n\t\t\t\t\t\t$this->_helper->ajaxContext->addActionContext('deleteOrganisme1','json')->initContext();\n\t\t\t\t\t\t// call function for dynamic sidebar\n\t\t\t\t\t\t$this->_Categories = new Application_Model_ModCatTerm ();\n\t\t\t\t\t\t$parent_id = $this->_getParam ( 'controller' );\n\t\t\t\t\t\t$this->view->secondSideBar = $this->_Categories->showCateParent ( $parent_id );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public function initialize()\n {\n // attributes\n $this->setName('proveedormarca');\n $this->setPhpName('Proveedormarca');\n $this->setClassname('Proveedormarca');\n $this->setPackage('zarely');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('idproveedormarca', 'Idproveedormarca', 'INTEGER', true, null, null);\n $this->addForeignKey('idproveedor', 'Idproveedor', 'INTEGER', 'proveedor', 'idproveedor', true, null, null);\n $this->addForeignKey('idmarca', 'Idmarca', 'INTEGER', 'marca', 'idmarca', true, null, null);\n // validators\n }", "public function __construct()\n {\n $this->view = new \\stdClass();\n $this->auth = new AuthUser();\n\n // Variável que recebe as configurações padrões da aplicação\n $this->config = self::findDataSettings();\n\n // Inicializando flash mensagem da aplicação\n\n // Mensagem padrão para operações de sucesso\n if (Session::getSession('success')) {\n $this->success = Session::getSession('success');\n Session::destroySession('success');\n }//end if\n // Mensagem padrão para operações de erros\n if (Session::getSession('errors')) {\n $this->errors = Session::getSession('errors');\n Session::destroySession('errors');\n }//end if\n // Mensagem padrão para operações de info\n if (Session::getSession('info')) {\n $this->info = Session::getSession('info');\n Session::destroySession('info');\n }//end if\n // Captura padrão de dados inseridos nos campos dos formulários\n if (Session::getSession('inputs')) {\n $this->inputs = Session::getSession('inputs');\n Session::destroySession('inputs');\n }//endif\n }", "function __construct() {\n\t //llamo al contructor de Controller.php\n\t parent::__construct();\n\n\t //instancio el modelo\n $this->modelo(array('cortos','ediciones','categorias'));\n\n\n\t}", "public function __construct() {\n\t\t$this->empleadoModel = $this->model('Empleado');\n\t}", "function __construct()\n\t{\n\n\t\t$this->PantallaElectronicaModel = new PantallaElectronicaModel();\n\t\t$this->PantallaElectronicaModel->connect();\n\t}", "function __construct()\n {\n parent::__construct('rs_Widget_Agenda', 'Eventos', 'Exibe uma lista com os próximos eventos.');\n }", "public function init(){\r\n\t\t$this->_data = $this->_request->getParams();\r\n $controller = $this->_data['controller']; //Get controller\r\n $action = $this->_data['action']; //Get action\r\n \r\n $loadfunction = new Default_Model_Common();\r\n foreach($loadfunction->loadFunction($controller) as $value){\r\n if($action == $value['action']){\r\n $load = new $value['model_load']();\r\n $this->view->$value['varname'] = $load->$value['function_load']();\r\n }\r\n }\r\n\r\n $this->view->lang = Zend_Registry::get(\"lang\"); //load language\r\n \r\n //List menu\r\n $listmenu = Zend_Registry::get(\"listmenu\");\r\n $this->view->listmenu = $listmenu;\r\n \r\n $this->view->selectaccount = ' class=\"selected\"';\r\n }", "public function __construct()\n {\n parent::__construct();\n \n parent::setTargetContainer('adianti_right_panel');\n \n // creates the form\n $this->form = new BootstrapFormBuilder('form_event');\n $this->form->setFormTitle('Event');\n $this->form->setProperty('style', 'margin-bottom:0;box-shadow:none');\n \n $hours = array();\n $minutes = array();\n for ($n=0; $n<24; $n++)\n {\n $hours[$n] = str_pad($n, 2, '0', STR_PAD_LEFT);\n }\n \n for ($n=0; $n<=55; $n+=5)\n {\n $minutes[$n] = str_pad($n, 2, '0', STR_PAD_LEFT);\n }\n \n // create the form fields\n $view = new THidden('view');\n $id = new TEntry('id');\n $color = new TColor('color');\n $start_date = new TDate('start_date');\n $start_hour = new TCombo('start_hour');\n $start_minute = new TCombo('start_minute');\n $end_date = new TDate('end_date');\n $end_hour = new TCombo('end_hour');\n $end_minute = new TCombo('end_minute');\n $title = new TEntry('title');\n $description = new TText('description');\n $color->setValue('#3a87ad');\n \n $start_hour->addItems($hours);\n $start_minute->addItems($minutes);\n $end_hour->addItems($hours);\n $end_minute->addItems($minutes);\n \n $id->setEditable(FALSE);\n \n // define the sizes\n $id->setSize(40);\n $color->setSize(100);\n $start_date->setSize(120);\n $end_date->setSize(120);\n $start_hour->setSize(70);\n $end_hour->setSize(70);\n $start_minute->setSize(70);\n $end_minute->setSize(70);\n $title->setSize(400);\n $description->setSize(400, 50);\n \n $start_hour->setChangeAction(new TAction(array($this, 'onChangeStartHour')));\n $end_hour->setChangeAction(new TAction(array($this, 'onChangeEndHour')));\n $start_date->setExitAction(new TAction(array($this, 'onChangeStartDate')));\n $end_date->setExitAction(new TAction(array($this, 'onChangeEndDate')));\n\n // add one row for each form field\n $this->form->addFields( [$view] );\n $this->form->addFields( [new TLabel('ID:', null, null, 'b')]);\n $this->form->addFields( [$id] );\n $this->form->addFields( [new TLabel('Color:', null, null, 'b')] );\n $this->form->addFields( [$color] );\n $this->form->addFields( [new TLabel('Start time:', null, null, 'b')]);\n $this->form->addFields( [$start_date, $start_hour, ':', $start_minute] );\n $this->form->addFields( [new TLabel('End time:', null, null, 'b')]);\n $this->form->addFields( [$end_date, $end_hour, ':', $end_minute] );\n $this->form->addFields( [new TLabel('Title:', null, null, 'b')]);\n $this->form->addFields( [$title] );\n $this->form->addFields( [new TLabel('Description:', null, null, 'b')]);\n $this->form->addFields( [$description] );\n \n $this->form->addAction( _t('Save'), new TAction(array($this, 'onSave')), 'fa:save green');\n $this->form->addAction( _t('Clear'), new TAction(array($this, 'onEdit')), 'fa:eraser orange');\n $this->form->addAction( _t('Delete'), new TAction(array($this, 'onDelete')), 'far:trash-alt red');\n $this->form->addHeaderActionLink( _t('Close'), new TAction(array($this, 'onClose')), 'fa:times red');\n \n parent::add($this->form);\n }", "public function __construct(array $medico = null, array $cuarto = null)\n {\n parent::__construct('AdmisionForm');\n $this->setAttribute('method', 'post');\n\n // medicos\n $this->add(array(\n 'name' => 'idmedico',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Medicos',\n 'empty_option' => 'Seleccione un medico',\n 'value_options' => $medico,\n ),\n 'attributes' => array(\n 'id' => 'idmedicoadmision'\n )\n ));\n // cuarto\n $this->add(array(\n 'name' => 'idcuarto',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Cuarto',\n 'empty_option' => 'Seleccione un cuarto',\n 'value_options' => $cuarto,\n ),\n 'attributes' => array(\n 'id' => 'idcuarto'\n )\n ));\n // paciente\n $this->add(array(\n 'name' => 'idpaciente',\n 'type' => 'Text',\n 'attributes' => array(\n 'id' => 'idpacienteadmision'\n )\n ));\n\n $this->add(array(\n 'name' => 'admision_fechaadmision',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Fecha de admisión',\n ),\n 'attributes' => array(\n 'id' => 'admision_fechaadmision'\n )\n ));\n $this->add(array(\n 'name' => 'admision_fechasalida',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Fecha de salida',\n ),\n 'attributes' => array(\n 'id' => 'admision_fechasalida'\n )\n ));\n $this->add(array(\n 'name' => 'admision_diagnostico',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Diagnostico',\n ),\n 'attributes' => array(\n 'id' => 'admision_diagnostico'\n )\n ));\n $this->add(array(\n 'name' => 'admision_observaciones',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Observaciones',\n ),\n 'attributes' => array(\n 'id' => 'admision_observaciones'\n )\n ));\n $this->add(array(\n 'name' => 'admision_status',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Status',\n 'empty_option' => 'Seleccione su estado civil',\n 'value_options' => array('pagada' => 'pagada','no pagada' => 'no pagada','pendiente' => 'pendiente'),\n ),\n 'attributes' => array(\n 'id' => 'admision_status'\n )\n ));\n $this->add(array(\n 'name' => 'admision_total',\n 'required' => true,\n 'validators' => array(\n array(\n 'name' => 'Float',\n 'options' => array(\n 'min' => 0,\n 'locale' => 'es_MX',\n ),\n ),\n ),\n 'options' => array(\n 'label' => 'Admisión Total'\n ),\n 'attributes' => array(\n 'id' => 'admision_total'\n )\n ));\n $this->add(array(\n 'name' => 'admision_pagadaen',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Pagada en',\n ),\n 'attributes' => array(\n 'id' => 'admision_pagadaen'\n )\n ));\n $this->add(array(\n 'name' => 'admision_tipodepago',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Tipo de pago',\n 'empty_option' => 'Seleccione tipo de pago',\n 'value_options' => array('efectivo', 'tarjeta debito','tarjeta credito','cheque','no identificado'),\n ),\n 'attributes' => array(\n 'id' => 'admision_tipodepago'\n )\n ));\n $this->add(array(\n 'name' => 'admision_referenciapago',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Referencia de pago (4 últimos dígitos)',\n ),\n 'attributes' => array(\n 'id' => 'admision_referenciapago'\n )\n ));\n $this->add(array(\n 'name' => 'admision_facturada',\n 'type' => 'Text',\n 'options' => array(\n 'label' => '¿Facturada?',\n ),\n 'attributes' => array(\n 'id' => 'admision_facturada'\n )\n ));\n $this->add(array(\n 'name' => 'admision_registrada',\n 'type' => 'Text',\n 'options' => array(\n 'label' => '¿Registrada?',\n ),\n 'attributes' => array(\n 'id' => 'admision_registrada'\n )\n ));\n }", "public function init()\n {\n $this->setName('autores');\n\n //campo hidden para guardar id de album\n $id = new Zend_Form_Element_Hidden('id');\n $id->addFilter('Int');\n\n //creamos <input text> para escribir nombre album\n $nombre = new Zend_Form_Element_Text('nombre');\n $nombre->setLabel('Nombre del autor:')->setRequired(true)->\n addFilter('StripTags')->addFilter('StringTrim')->\n addValidator('NotEmpty');\n\n //creamos select para seleccionar artista\n /*$artista = new Zend_Form_Element_Select('artista_id');\n $artista->setLabel('Seleccione artista:')->setRequired(true);\n //cargo en un select los tipos de usuario\n $table = new Application_Model_DbTable_Artista();\n //obtengo listado de todos los artistas y los recorro en un\n //arreglo para agregarlos a la lista\n foreach ($table->listar() as $c)\n {\n $artista->addMultiOption($c->id, $c->nombre);\n }*/\n\n //descripcion album\n $descripcion = new Zend_Form_Element_Text('descripcion');\n $descripcion->setLabel('Descripcion:')->setRequired(false)->addFilter('StripTags')->addFilter('StringTrim');\n //Email\n $email = new Zend_Form_Element_Text('email');\n $email->setLabel('E-mail:')->setRequired(true)->addFilter('StripTags')->\n addFilter('StringTrim')->addValidator('NotEmpty');\n //fecha lanzamiento\n $fecha = new Zend_Form_Element_Text('fecha');\n $fecha->setLabel('Fecha lanzamiento:')->setRequired(true)->addFilter('StripTags')->\n addFilter('StringTrim')->addValidator('NotEmpty');\n //creo un validador de formato de fecha\n $valiDate = new Zend_Validate_Date();\n $valiDate->setFormat('dd-mm-YYYY');\n $fecha->addValidator($valiDate);\n $fecha->setValue(date(\"d-m-Y\"));\n\n //boton para enviar formulario\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setAttrib('id', 'submitbutton');\n\n //agregolos objetos creados al formulario\n $this->addElements(array($id, $nombre,\n $descripcion, $email, $fecha, $submit));\n }", "public function init()\n {\n /* Initialize action controller here */\n }", "public function init()\n {\n /* Initialize action controller here */\n }", "public function __construct()\n {\n $this->middleware('auth');\n $this->field_list = ['identificador'=>'Folio','number_usuario'=>'Membresía','conta'=>'Número','premio'=>'Premio','dtip'=>'Tipo', 'name'=>'Lugar','punto'=>'Puntos','nombre'=>'Estado','estad_uno'=>'Fecha de elaboración','id'=>'Acciones'];\n //$this->field_list = ['folio'=>'Folio','id_product'=>'Producto','name'=>'Estacion','points'=>'Puntos','value'=>'Valor','qr_memberships'=>'Membresia','name_status'=>'Status','name_state'=>'Estado', 'name_exchange'=>'Tipo','todate'=>'Fecha','id'=>'Acciones'];\n $this->name = 'Recibido';\n $this->name_plural = 'fa fa-newspaper-o';\n $this->form = 'App\\Core\\Forms\\Lealtad\\RecibidoForm';\n $this->model = 'App\\Models\\Lealtad\\Exchange';\n $this->url_prefix = 'recibidoexchange';\n $validation_add = [\n // 'folio'=>'required|max:25',\n ];\n $validation_edit = $validation_add;\n $this->setValidatorAdd($validation_add);\n $this->setValidatorEdit($validation_edit);\n }", "public function _construct()\n {\n $this->_init('reembolso/reembolso', 'reembolso_id');\n }", "function __construct()\n {\n parent::__construct();\n \n // creates the form\n $this->form = new TQuickForm('form_historicotrabalho');\n $this->form->class = 'tform'; // change CSS class\n \n $this->form->style = 'display: table;width:100%'; // change style\n \n // Define Título da página\n $this->form->setFormTitle('Banco de Horas - Lançamento de Escalas');\n // Inicía ferramentas auxiliares\n $fer = new TFerramentas(); // Ferramentas diversas\n $sicad = new TSicadDados(); // Ferramentas de acesso ao SICAD\n //Realiza definições iniciais de acesso\n $profile = TSession::getValue('profile'); //Profile da Conta do usuário\n if ($this->opm_operador==false) //Carrega OPM do usuário\n {\n //Confere se já foi carregado a OPM, senão carrega...ou se o ambiente for de desenvolvimento usa a OPM = 140\n $this->opm_operador = ($fer->is_dev()==true) ? 140 : $profile['unidade']['id'];\n }\n if (!$this->nivel_sistema || $this->config_load == false) //Carrega OPMs que tem acesso\n {\n $this->nivel_sistema = $fer->getnivel (get_class($this));//Verifica qual nível de acesso do usuário\n $this->listas = $sicad->get_OpmsRegiao($this->opm_operador);//Carregas as OPMs que o usuário administra\n $this->config = $fer->getConfig($this->sistema); //Busca o Nível de acesso que o usuário tem para a Classe\n $this->config_load = true; //Informa que configuração foi carregada\n }\n \n // Cria os Itens do Formulário\n $rgmilitar = new TEntry('rgmilitar');\n \n //Monta ComboBox com OPMs que o Operador pode ver\n //echo $this->nivel_sistema.'---'.$this->opm_operador;\n if ($this->nivel_sistema>=80) //Adm e Gestor\n {\n $criteria = null;\n }\n else if ($this->nivel_sistema>=50 ) //Nível Operador (carrega OPM e subOPMs)\n {\n $criteria = new TCriteria;\n //Se não há lista de OPM, carrega só a OPM do usuário\n $lista = ($this->listas['valores']!='') ? $this->listas['valores'] : $profile['unidade']['id'];\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$lista.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n else if ($this->nivel_sistema<50) //nível de visitante (só a própria OPM)\n {\n $criteria = new TCriteria;\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$this->opm_operador.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n $opm = new TDBCombo('opm','sicad','OPM','id','nome','nome',$criteria);\n \n $ativo = new TCombo('ativo');\n $lista_opm = new TSelect('lista_opm');\n $lista_slc = new TSelect('lista_slc');\n //Critério para os Turnos de Serviço (Deve-se excluir os ocultos e o item id=13)\n $criteria = new TCriteria; \n $criteria->add(new TFilter('oculto', '=', 'f'));\n $criteria->add(new TFilter('id', '!=', 13));\n $turno = new TDBCombo('turno','sicad','turnos','id','nome','nome',$criteria);\n \n $datainicial = new TDate('dataInicial');\n $datafinal = new TDate('dataFinal');\n $horaIncialOrdinario = new TEntry('horaInicialOrdinario');\n $opm_id_info = new TDBCombo('opm_id_info','sicad','OPM','id','sigla','sigla');\n $opm_info_atual = new TCombo('OPM_info_Atual');\n $diasExtra = new TEntry('diasExtra');\n $mesExtra = new TCombo('mesExtra');\n $anoExtra = new TCombo('anoExtra');\n $horaInicioExtra = new TEntry('horaInicioExtra');\n $horasTrabalhadas = new TEntry('horasTrabalhadas');\n $tipoExtra = new TCombo('tipoExtra');\n $afasta_id = new TDBCombo('afasta_id','sicad','afastamentos','id','nome','nome');\n $dtinicioaf = new TDate('dtinicioaf');\n $dtfimaf = new TDate('dtfimaf');\n $bgaf = new TEntry('bgaf');\n $anobgaf = new TEntry('anobgaf');\n \n //Formatar Itens\n $rgmilitar->setSize(80);\n $opm->setSize(300);\n $lista_opm->setSize(280,256);\n $lista_slc->setSize(280,256);\n $turno->setSize(200);\n $datainicial->setSize(80);\n $datafinal->setSize(80);\n $horaIncialOrdinario->setSize(50);\n $opm_id_info->setSize(150);\n $opm_info_atual->setSize(80);\n $diasExtra->setSize(200);\n $mesExtra->setSize(80);\n $anoExtra->setSize(80);\n $horaInicioExtra->setSize(50);\n $horasTrabalhadas->setSize(50);\n $tipoExtra->setSize(120);\n $afasta_id->setSize(150);\n $dtinicioaf->setSize(80);\n $dtfimaf->setSize(80);\n $bgaf->setSize(80);\n $anobgaf->setSize(80);\n $ativo->setSize(80);\n //Style\n $lista_opm->style = \"font-size: 12px;\";\n $lista_slc->style = \"font-size: 12px;\";\n\n //Mascaras\n $datainicial->setMask('dd-mm-yyyy');\n $datafinal->setMask('dd-mm-yyyy');\n $dtinicioaf->setMask('dd-mm-yyyy');\n $dtfimaf->setMask('dd-mm-yyyy');\n $horaIncialOrdinario->setMask('99:99');\n $horaInicioExtra->setMask('99:99');\n $horasTrabalhadas->setMask('99');\n\n //Dados\n $opm_info_atual->addItems($fer->lista_sim_nao());//($item);\n $opm_info_atual->setValue('N');\n $ativo->addItems($fer->lista_sim_nao());//($item);\n $ativo->setValue('N');\n //\n $item = array (\"S\"=>\"Remunerada\",\"N\"=>\"Administrativa\");\n $tipoExtra->addItems($item);\n $tipoExtra->setValue('N');\n //\n $fer = new TFerramentas;\n $mesExtra->addItems($fer->lista_meses());\n $anoExtra->addItems($fer->lista_anos());\n //Tips\n $rgmilitar->setTip('Preencha com o RG do Militar pretendido...');\n $opm->setTip('Selecione a OPM para que possa preencher o campo de Lista da OPM com os componentes da Unidade.');\n $lista_opm->setTip('Lista dos Militares pertencente à Unidade Selecionada acima.<br>'.\n 'Vale lembrar que esta lista é atualizada diáriamente, assim os que estão aqui reflete as listas do SICAD.<br>' .\n 'Outro ponto a se considerar é a possibilidade de selecionar vários PMs, para isso basta usar<br>'.\n 'as teclas Control (ctrl) ou shift (seta pra cima);');\n $lista_slc->setTip('Militares Selecionados. Todos que estão nesta lista serão afetados, quer por uma escala ou por afastamentos...');\n $turno->setTip('Selecione uma Escala conforme a necessidade.');\n $datainicial->setTip('Selecione a data inicial da Escala Ordinária.');\n $datafinal->setTip('Selecione a data final da Escala Ordinária');\n $horaIncialOrdinario->setTip('Informe a hora de inicio do primeiro turno da Escala Ordinária.');\n $opm_id_info->setTip('Selecione qual foi a OPM informante da Escala.<br>É útil quando o militar está prestando serviços em uma OPM diferente da sua.');\n $opm_info_atual->setTip('A unidade Informante é a Unidade Atual? Se SIM, irei substituir a unidade que por ventura está na ficha do militar pela que foi informada...');\n $diasExtra->setTip('Defina os dias que o militar trabalhou podendo ser:<br> - Um dia apenas (Ex: 1);<br>- Alguns dias separados por vírgula(Ex: 2,5,8);<br>- Um intervalo de dias ligados por traço (Ex: 2-10);<br>- Um misto de combinações (Ex: 1,3-5,8,15-25). ');\n $mesExtra->setTip('Mês que ocorreu o serviço extra.');\n $anoExtra->setTip('Ano que ocorreu o serviço extra.');\n $horaInicioExtra->setTip('Hora que o serviço extra iniciou.');\n $horasTrabalhadas->setTip('Quantas horas foram trabalhadas neste serviço extra.');\n $tipoExtra->setTip('Defina se a escala foi Administrativa (sem remuneração AC-4) ou Remunerada (com pagamento de AC-4).');\n $afasta_id->setTip('Qual tipo de afastamento o militar fez jus.');\n $dtinicioaf->setTip('Data inicial do afastamento.');\n $dtfimaf->setTip('Data final do afastamento.');\n $bgaf->setTip('Numero do BG onde foi publicado o afastamento(Opcional).');\n $anobgaf->setTip('Ano de publicação do BG de Afastamento (Opcional).');\n $ativo->setTip('Se desejar que os militares inativos façam parte da seleção, marque como SIM para seleciona-los.'.\n '<br>Caso troque esta opção, não haverá a limpeza dos já selecionados.');\n //Ações\n //$change_action = new TAction(array($this, 'onSelectOpm_old'));//Ação de Popular lista de PMs\n //$opm->setChangeAction($change_action);\n //$ativo->setChangeAction($change_action);\n \n //Controle de Nível\n if ($this->nivel_sistema<$this->config[$this->cfg_chg_opm])\n {\n $opm_id_info->setEditable(FALSE);\n $opm_info_atual->setEditable(FALSE);\n }\n //Botões\n //Seleciona PMs\n $addPM = new TButton('addPM');\n $addPM->setImage('fa:arrow-down black');\n $addPM->class = 'btn btn-primary btn-sm';\n $Action = new TAction(array($this, 'onSelectMilitar'));\n $addPM->setAction($Action);\n $addPM->setLabel('Seleciona');\n \n //Botão Gera Escala Ordinária\n $runOrd = new TButton('runOrd');\n $runOrd->setImage('fa:floppy-o red');\n $runOrd->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ord]) ? new TAction(array($this, 'onGeraOrdinaria')) : new TAction(array($this, 'NoAcess'));\n $runOrd->setAction($Action);\n $runOrd->setLabel('Gera Escala');\n \n //Botão Gera Escala Extra\n $runExt = new TButton('runExt');\n $runExt->setImage('fa:floppy-o red');\n $runExt->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ext]) ? new TAction(array($this, 'onGeraExtra')) : new TAction(array($this, 'NoAcess'));\n $runExt->setAction($Action);\n $runExt->setLabel('Gera Escala');\n \n //Botão Gera Afastamento\n $runAfa = new TButton('runAfa');\n $runAfa->setImage('fa:floppy-o red');\n $runAfa->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_afa]) ? new TAction(array($this, 'onGeraAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runAfa->setAction($Action);\n $runAfa->setLabel('Gera Afastamento');\n \n //Botão Limpa Afastamento\n $runCls = new TButton('runCls');\n $runCls->setImage('fa:trash black');\n $runCls->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_afa]) ? new TAction(array($this, 'onLimpaAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runCls->setAction($Action);\n $runCls->setLabel('Limpa Afastamento');\n \n //Botão Verifica Escala\n $runVer = new TButton('runVer');\n $runVer->setImage('fa:eye black');\n $runVer->class = 'btn btn-info btn-sm';\n $Action = new TAction(array($this, 'onListaEscala'));\n $runVer->setAction($Action);\n $runVer->setLabel('Ver Escala');\n \n //Botão limpa Escalas\n $runLmp = new TButton('runLmp');\n $runLmp->setImage('fa:trash black');\n $runLmp->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_esc]) ? new TAction(array($this, 'onLimpaEscala')) : new TAction(array($this, 'NoAcess'));\n $runLmp->setAction($Action);\n $runLmp->setLabel('Limpa Escala');\n \n //Botão Carrega OPM na Lista da OPM\n $runOpm = new TButton('runOpm');\n $runOpm->setImage('fa:retweet');\n $runOpm->class = 'btn btn-success btn-sm';\n $Action = new TAction(array($this, 'onSelectOpm_old'));\n $runOpm->setAction($Action);\n $runOpm->setLabel('Carrega OPM');\n \n $table = new TTable();\n $table-> border = '0';\n $table-> cellpadding = '4';\n $table-> style = 'border-collapse:collapse; text-align: center;';\n\n //Monta selecionador\n $hbox1 = new THBox;\n $hbox1->addRowSet( new TLabel('RG:'),$rgmilitar,$addPM,new TLabel('Unidade:'),$opm,new TLabel('Seleciona Inativos?'),$ativo,$runOpm);\n $frame1 = new TFrame;\n $frame1->setLegend('Selecione os PMs ou a OPM');\n $frame1->add($hbox1);\n //Monta Labels das tabelas de distribuição\n $title4 = new TLabel('Listagem da OPM');\n $title4->setFontSize(12);\n $title4->setFontFace('Arial');\n $title4->setFontColor('black');\n $title4->setFontStyle('b');\n \n $title3 = new TLabel('Comandos');\n $title3->setFontSize(12);\n $title3->setFontFace('Arial');\n $title3->setFontColor('black');\n $title3->setFontStyle('b');\n \n $title2 = new TLabel('PMs Selecionados');\n $title2->setFontSize(12);\n $title2->setFontFace('Arial');\n $title2->setFontColor('black');\n $title2->setFontStyle('b');\n \n $title1 = new TLabel('Gestão da Escala');\n $title1->setFontSize(12);\n $title1->setFontFace('Arial');\n $title1->setFontColor('black');\n $title1->setFontStyle('b');\n \n //Botões de Serviço\n $add = new TButton('add_opm');\n $del = new TButton('del_opm');\n $cls = new TButton('clear');\n $ret = new TButton('return');\n \n //Tabelas Auxiliares de Cadastro\n $table_ord = new TTable;//Escalas Ordinárias\n $table_ext = new TTable;//Escalas Extras\n $table_afa = new TTable;//Afastamentos\n\n //Cria no Notebook \n $notebook = new TNotebook(200, 220);\n // Crias as Abas no notebook\n $notebook->appendPage('Ordinária' , $table_ord);\n $notebook->appendPage('Extra' , $table_ext);\n $notebook->appendPage('Afastamento', $table_afa);\n\n //Itens: Escala Ordinária\n $table_ord->addRowSet(array(new TLabel('Escala'),$turno));\n $table_ord->addRowSet(array(new TLabel('De'),$datainicial,new TLabel('A'),$datafinal));\n $table_ord->addRowSet(array(new TLabel('Hora Inicial'),$horaIncialOrdinario));\n $table_ord->addRowSet(array(new TLabel('OPM Informante'),$opm_id_info));\n $table_ord->addRowSet(array(new TLabel('Usar Informante com Atual'),$opm_info_atual));\n $table_ord->addRowSet(array($runLmp,$runOrd));\n //Itens: Escala Extra\n $table_ext->addRowSet(array(new TLabel('Dias'),$diasExtra));\n $table_ext->addRowSet(array(new TLabel('Mês'),$mesExtra,new TLabel('Ano'),$anoExtra));\n $table_ext->addRowSet(array(new TLabel('Hr Início'),$horaInicioExtra,new TLabel('Hrs. Trab.'),$horasTrabalhadas));\n $table_ext->addRowSet(array(new TLabel('Tipo Escala'),$tipoExtra));\n $table_ext->addRowSet($runExt);\n //Itens: Afastamento\n $table_afa->addRowSet(array(new TLabel('Afastamento'),$afasta_id));\n $table_afa->addRowSet(array(new TLabel('De'),$dtinicioaf,new TLabel('A'),$dtfimaf));\n $table_afa->addRowSet(array(new TLabel('BG'),$bgaf,new TLabel('/'),$anobgaf));\n $table_afa->addRowSet(array($runCls,$runAfa));\n\n //Ações\n $add->setAction(new TAction(array($this, 'onAddPMSelect')));\n $del->setAction(new TAction(array($this, 'onDelPMSelect')));\n $cls->setAction(new TAction(array($this, 'onClearSelect')));\n $ret->setAction(new TAction(array($this, 'onReturn')));\n //Labels\n $add->setLabel('Adiciona');\n $del->setLabel('Remove');\n $cls->setLabel('Limpa');\n $ret->setLabel('Volta ao Gerenciador');\n //Icones\n $add->setImage('fa:plus green');\n $del->setImage('fa:minus red');\n $cls->setImage('fa:file-o black');\n $ret->setImage('fa:backward black');\n //Classes\n $ret->class = 'btn btn-warning';\n //PopUps\n if ($this->popAtivo)\n {\n $addPM->popover = 'true';\n $addPM->popside = 'top';\n $addPM->poptitle = 'Seleciona Militar';\n $addPM->popcontent = 'Clique aqui ou tecle ENTER para selecionar o militar.';\n //\n $add->popover = 'true';\n $add->popside = 'top';\n $add->poptitle = 'Adiciona Seleção de Militares';\n $add->popcontent = 'Adiciona o(s) Militar(es) selecionado(s) da caixa Lista da OPM.';\n //\n $del->popover = 'true';\n $del->popside = 'top';\n $del->poptitle = 'Remove Seleção de Militares';\n $del->popcontent = 'Remove o(s) Militar(es) selecionado(s) da caixa Selecionados.';\n //\n $cls->popover = 'true';\n $cls->popside = 'top';\n $cls->poptitle = 'Limpa toda Seleção de Militares';\n $cls->popcontent = 'Remove TODOS os Militares selecionados da caixa Selecionados.';\n //\n $ret->popover = 'true';\n $ret->popside = 'top';\n $ret->poptitle = 'Retorno à Tela de Gerenciamento';\n $ret->popcontent = 'Retorna para a Tela de Gerenciamento do Banco de Horas.<br>A lista e Militares já selecionados permanecerá até o fechamento do sistema.';\n //\n $runOrd->popover = 'true';\n $runOrd->popside = 'top';\n $runOrd->poptitle = 'Gera Escala Ordinária.';\n $runOrd->popcontent = 'São campos necessários:<br>- Turno;<br>- Data inicial e final;<br>- Hora de Início da Escala.';//.\n //\n $runExt->popover = 'true';\n $runExt->popside = 'top';\n $runExt->poptitle = 'Gera Escala Extra';\n $runExt->popcontent = 'São Campos necessários:<br>- Dias (preencher com um ou mais);<br>- Mês e Ano;<br>- Hora Início;<br>'.\n '- Horas Trabalhadas;<br>- Tipo Escala.';\n //\n $runCls->popover = 'true';\n $runCls->popside = 'top';\n $runCls->poptitle = 'Limpa Afastamentos e Restrições (apenas)';\n $runCls->popcontent = 'Use os campos acima como filtro.';\n //\n $runAfa->popover = 'true';\n $runAfa->popside = 'top';\n $runAfa->poptitle = 'Gera Afastamentos e Restrições';\n $runAfa->popcontent = 'São Campos necessários:<br>- Afastamento;<br>- O intervalo de datas.';\n //\n $runVer->popover = 'true';\n $runVer->popside = 'top';\n $runVer->poptitle = 'Verifica a Escala';\n $runVer->popcontent = 'É necessário escolher um militar (um apenas) quer no Campo Lista da OPM quer no Campo Selecionados.';\n //\n $runLmp->popover = 'true';\n $runLmp->popside = 'top';\n $runLmp->poptitle = 'Limpa as Escalas e Afastamentos';\n $runLmp->popcontent = 'Limpa Escalas (ordinária e Extra) e Afastamentos dos militares Selecionados e no intervalo de datas';\n \n $runOpm->popover = 'true';\n $runOpm->popside = 'top';\n $runOpm->poptitle = 'Carrega os militares da Unidade';\n $runOpm->popcontent = 'Carrega os Militares da unidade escolhida filtrando os ativos e inativos conforme se escolhe Sim ou Não no campo Seleciona inativos:';\n }\n //Tabela com Comandos\n $frame_tempo = new TFrame();\n $hboxc = new THBox;\n $hboxc->addRowSet($add);\n $hboxc->addRowSet($del);\n $hboxc->addRowSet($cls);\n $hboxc->addRowSet($runVer);\n $hboxc->addRowSet($ret);\n\n $frame1->add($hboxc);\n $frame1->style = \"width: 100%; display: table-cell; vertical-align: top; text-align: center;\";\n\n //Frame com Lista da OPM\n $vbox2 = new TVBox;\n $frame4 = new TFrame(260,330);\n $frame4->setLegend('Lista de Militares da OPM');\n $frame4->add($lista_opm);\n $frame4->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox2->add($frame4);\n //Frame de Seleção\n $vbox4 = new TVBox;\n $frame6 = new TFrame(260,330);\n $frame6->setLegend('Militares Selecionados');\n $frame6->add($lista_slc);\n $frame6->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox4->add($frame6);\n //Frame de Geração\n $vbox5 = new TVBox;\n $frame3 = new TFrame(280,330);\n $frame3->setLegend('Funções de Geração');\n $frame3->add($notebook);\n $frame3->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox5->add($frame3);\n \n $frame2 = new TFrame;\n $frame2->style = \"width: 100%; display: table-cell; vertical-align: top;\";\n $frame2->add($vbox2);\n $frame2->add($vbox4);\n $frame2->add($vbox5);\n\n $this->form->setFields(array($rgmilitar,$opm,$addPM,$lista_opm,$lista_slc,$opm_info_atual,$opm_id_info,$turno,\n $datafinal,$datainicial,$dtinicioaf,$dtfimaf,$horaIncialOrdinario,$horaInicioExtra,$horasTrabalhadas,\n $diasExtra,$mesExtra,$anoExtra,$bgaf,$anobgaf,$tipoExtra,$afasta_id,$ativo,\n $add,$del,$cls,$ret,$runOrd,$runExt,$runAfa,$runCls,$runVer,$runLmp,$runOpm)); \n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 90%';\n $container->add(new TXMLBreadCrumb('menu.xml', 'bdhManagerForm'));\n $container->add($frame1);\n //$container->add($frame_tempo);\n $container->add($frame2);\n $this->form->add($container);\n\n //parent::add($container);\n parent::add($this->form);\n if ($opm->getValue())\n {\n self::onSelectOpm_old(array('opm'=>$opm->getValue(),'ativo'=>$ativo->getValue()));\n }\n $lista_slc = TSession::getValue(__CLASS__.'_lista_slc');\n self::onLoadPMSelect();\n self::popula_escalas();\n\n }", "public function init() {\n $element = new ZendX_JQuery_Form_Element_DatePicker(\n 'dp1', array('jQueryParams' => array('defaultDate' => '2007/10/10'))\n );\n\n $form->setDecorators(array(\n 'FormElements',\n array('AccordionContainer', array(\n 'id' => 'tabContainer',\n 'style' => 'width: 600px;',\n 'jQueryParams' => array(\n 'alwaysOpen' => false,\n 'animated' => \"easeslide\"\n ),\n )),\n 'Form'\n ));\n }", "public function init()\n {\n $this->sysConfig = Zend_Registry::get('sysConfig');\n\t\t$this->view->sysConfig = $this->sysConfig;\n\t\t\n\t\t$this->config = Zend_Registry::get('config');\n\t\t$this->view->config = $this->config;\n\t\t\n\t\t$this->db=Zend_Registry::get('db');\n\t\t\n\t\t//controller and action names\n\t\t$this->controllerName = $this->getRequest()->getControllerName();\n\t\t$this->view->controllerName = $this->controllerName;\n\t\t\n\t\t$this->actionName = $this->getRequest()->getActionName();\n\t\t$this->view->actionName = $this->actionName;\n\t\t\n\t\t$this->view->baseurl=$this->config->common->baseUrl.\"/\";\n\t\t$this->view->cssurl=$this->config->common->cssPath;\n\t\t$this->view->jsurl=$this->config->common->jsPath;\n\n $this->view->items = \"\";\n $this->view->dashboard = \"\";\n $this->view->cnews = \"\";\n $this->view->expenditure = \"\";\n \n \n }", "public function init()\n {\n\n // pega o idAgente do usu�rio logado\n $auth = Zend_Auth::getInstance(); // pega a autentica��o\n \n /* ========== IN�CIO PERFIL ==========*/\n // define os grupos que tem acesso\n $PermissoesGrupo = array();\n $PermissoesGrupo[] = 121; // T�cnico de Acompanhamento\n $PermissoesGrupo[] = 122; // Coordenador de Acompanhamento\n $PermissoesGrupo[] = 123; // Coordenador - Geral de Acompanhamento\n $PermissoesGrupo[] = 129; // T�cnico de Acompanhamento\n //$PermissoesGrupo[] = ; // Coordenador de Avalia��o\n //$PermissoesGrupo[] = 134; // Coordenador de Fiscaliza��o\n //$PermissoesGrupo[] = 124; // T�cnico de Presta��o de Contas\n //$PermissoesGrupo[] = 125; // Coordenador de Presta��o de Contas\n //$PermissoesGrupo[] = 126; // Coordenador - Geral de Presta��o de Contas\n parent::perfil(1, $PermissoesGrupo); // perfil novo salic\n\n if (isset($auth->getIdentity()->usu_codigo)) { // autenticacao novo salic\n $this->getIdUsuario = UsuarioDAO::getIdUsuario($auth->getIdentity()->usu_codigo);\n $this->getIdUsuario = ($this->getIdUsuario) ? $this->getIdUsuario['idAgente'] : 0;\n } else { // autenticacao espaco proponente\n $this->getIdUsuario = 0;\n }\n /* ========== FIM PERFIL ==========*/\n\n\n /* ========== IN�CIO �RG�O ========== */\n $GrupoAtivo = new Zend_Session_Namespace('GrupoAtivo'); // cria a sess�o com o grupo ativo\n $this->getIdGrupo = $GrupoAtivo->codGrupo; // id do grupo ativo\n $this->getIdOrgao = $GrupoAtivo->codOrgao; // id do �rg�o ativo\n\n parent::init();\n }", "function __construct()\n {\n parent::__construct();\n $this->load->helper('form');\n $this->load->model('Prospecto_model');\n $this->load->model('Proceso_model');\n $this->load->model('Documentos_model');\n $this->load->model('User');\n $this->load->model('Notificaciones_model');\n }", "function __construct() {\n\t //llamo al contructor de Controller.php\n\t parent::__construct();\n\n\t //instancio el modelo\n\t $this->Lenguajes = new Lenguajes();\n\t \n\n\t}", "public function init()\n {\n // Set the method for the display form to POST\n $this->setMethod('post');\n \n // Add table tag\n $this->setDecorators(array(\n 'FormElements',\n array('HtmlTag', array('tag' => 'table')),\n 'Form'\n ));\n \n $this->setElementDecorators(array(\n 'ViewHelper',\n 'Errors',\n array(array('data' => 'HtmlTag'), array('tag' => 'td')),\n array('Label', array('tag' => 'td')),\n array(array('row' => 'HtmlTag'), array('tag' => 'tr'))\n ));\n\n // Add the email element\n $this->addElement('text', 'email', array(\n 'label' => 'User email:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n 'NotEmpty',\n )\n ));\n\n // Add the submit button\n $this->addElement('submit', 'invite', array(\n 'ignore' => true,\n 'label' => 'invite',\n ));\n\n // And finally add some CSRF protection\n $this->addElement('hash', 'csrf', array(\n 'ignore' => true,\n ));\n }", "public function ezc_init(){}", "public function init() {\n $this->setMethod('post');\n $this->setAction($this->getView()->url());\n $this->_view->headScript()->appendFile($this->_view->baseUrl('media/js/collapsiblefields.js', 'text/javascript'));\n $this->_view->headScript()->appendFile($this->_view->baseUrl('media/js/toggledetails.js', 'text/javascript'));\n $this->_view->headScript()->appendFile($this->_view->baseUrl('media/js/erga/paketaergasias/paradotea.js', 'text/javascript'));\n\n $subform = new Dnna_Form_SubFormBase();\n $subform->setLegend('Στοιχεία Παραδοτέου');\n // Recordid\n $subform->addElement('hidden', 'recordid', array());\n // Κωδικός Παραδοτέου\n $subform->addElement('text', 'codename', array(\n 'label' => 'Κωδικός Παραδοτέου:',\n 'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, 15))\n ),\n 'required' => true,\n 'placeholder' => 'πχ. Π.1.1',\n )\n );\n // Τίτλος Παραδοτέου\n $subform->addElement('textarea', 'title', array(\n 'label' => 'Τίτλος Παραδοτέου:',\n 'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, $this->_textareaMaxLength))\n ),\n 'rows' => 1,\n 'cols' => $this->_textareaCols,\n 'required' => true,\n )\n );\n // Ποσό\n $subform->addElement('text', 'amount', array(\n 'label' => 'Ποσό:',\n 'validators' => array(\n array('validator' => 'Float')\n ),\n 'class' => 'formatFloat',\n 'required' => true,\n ));\n // Όρια ανα Κατηγορία Προσωπικού\n $project = $this->_view->getProject();\n if(isset($project) && $project->get_personnelcategories()->count() > 0) {\n $limitsform = new Dnna_Form_SubFormBase($this->_view);\n $i = 1;\n foreach($project->get_personnelcategories() as $curCategory) {\n $curlimitform = new Dnna_Form_SubFormBase($this->_view);\n // Recordid\n $curlimitform->addElement('hidden', 'recordid', array());\n // Id κατηγορίας\n $curlimitcategoryform = new Dnna_Form_SubFormBase($this->_view);\n $curlimitcategoryform->addElement('hidden', 'recordid', array(\n 'value' => $curCategory->get_recordid(),\n ));\n $curlimitform->addSubForm($curlimitcategoryform, 'personnelcategory', false);\n // Limit\n $curlimitform->addElement('text', 'limit', array(\n 'label' => 'Όριο ωρών για '.$curCategory->get_name().':',\n 'validators' => array(\n array('validator' => 'Float')\n ),\n 'required' => false,\n ));\n $curlimitform->set_empty(false);\n $limitsform->addSubForm($curlimitform, $i, false, 'default-limits');\n $i++;\n }\n $subform->addSubForm($limitsform, 'limits', false);\n }\n // Έναρξη\n $subform->addElement('text', 'startdate', array(\n 'label' => 'Ημερομηνία Έναρξης:',\n 'validators' => array(\n array('validator' => 'Date')\n ),\n 'class' => 'usedatepicker',\n 'required' => false,\n ));\n // Λήξη\n $subform->addElement('text', 'enddate', array(\n 'label' => 'Ημερομηνία Λήξης:',\n 'validators' => array(\n array('validator' => 'Date')\n ),\n 'class' => 'usedatepicker',\n 'required' => false,\n ));\n // Εγκριση αναθεσης απο επιτροπη ερευνων\n $subform->addElement('text', 'assignmentapprovaldate', array(\n 'label' => 'Έγκριση Ανάθεσης από Επιτροπή Ερευνών:',\n 'validators' => array(\n array('validator' => 'Date')\n ),\n 'class' => 'usedatepicker',\n ));\n // Εγκριση ολοκλήρωσης απο Επιτροπή Ερευνών\n $subform->addElement('text', 'completionapprovaldate', array(\n 'label' => 'Εγκριση Ολοκλήρωσης απο Επιτροπή Ερευνών:',\n 'validators' => array(\n array('validator' => 'Date')\n ),\n 'class' => 'usedatepicker',\n ));\n\n // Σχόλια\n $subform->addElement('textarea', 'comments', array(\n 'label' => 'Γενικές Πληροφορίες:',\n 'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, $this->_textareaMaxLength))\n ),\n 'rows' => $this->_textareaRows,\n 'cols' => $this->_textareaCols,\n ));\n\n $subsubform = new Dnna_Form_SubFormBase();\n if($this->_view->getSubProject()->get_subprojectdirectlabor() == \"1\") {\n $subsubform->setLegend('Συντάκτες');\n if(($this->_view->getSubProject()->get_employees() != null && count($this->_view->getSubProject()->get_employees()) > 0) ||\n ($this->_view->getProject() != null && $this->_view->getProject()->get_thisprojectemployees() != null && count($this->_view->getProject()->get_thisprojectemployees()) > 0)) {\n $this->addAuthorFields($subsubform, false);\n } else {\n $element = new Application_Form_Element_Note('noauthorsnote', array(\n 'value' => 'Δεν έχουν οριστεί απασχολούμενοι'\n ));\n $subsubform->addElement($element);\n }\n $subform->addSubForm($subsubform, 'authors');\n } else {\n $subsubform->setLegend('Ανάδοχος');\n if($this->_view->getSubProject()->get_contractors() != null && $this->_view->getSubProject()->get_contractors()->count() > 0) {\n $this->addContractorFields($subsubform, false);\n } else {\n $element = new Application_Form_Element_Note('noauthorsnote', array(\n 'value' => 'Δεν έχουν οριστεί ανάδοχοι'\n ));\n $subsubform->addElement($element);\n }\n $subform->addSubForm($subsubform, 'contractor');\n }\n $this->addSubForm($subform, 'default');\n $this->addSubmitFields();\n }", "public function init() {\n $this->_temporizador = new Trf1_Admin_Timer ();\n $this->_temporizador->Inicio();\n\n /* Initialize action controller here */\n $this->view->titleBrowser = 'e-Sisad';\n }", "function configurar_formulario (toba_ei_formulario $form){\n switch ($this->s__tipo){\n case \"Definitiva\" : $this->cargar_form_definitivo($form); break;\n case \"Periodo\" : $this->cargar_form_periodo($form); break;\n }\n }", "public function __construct() {\r\n\t\t$this->miGestor = new GestorDocumentos ();\r\n\t\t\r\n\t}", "public function init()\n {\n parent::init();\n $this->formModel = new GoodsForm();\n \n }", "function __construct() {\n\t\tparent::__construct();\n $this->includeModel('CursoEspecial');\n $this->vista->setTitle('Cursos Especiales');\n \n\t\t$this->CursoEspecial = new CursoEspecial();\n\t\t$this->TPrograma = new TPrograma();\n\t }", "public function init() {\n $this->setMethod('post');\n $this->setElementDecorators($this->elementDecorators);\n \n //get delivery types from delivery master\n $deliveryMapper = new Application_Model_DeliveryTypeMasterMapper();\n //get service types list\n $serviceMaster = new Application_Model_ServiceMasterMapper();\n $packageMaster = new Application_Model_PackagesMapper();\n \n $this->addElement('text', 'order_mobile_number', array(\n 'label' => 'User\\'s Phone Number',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'placeholder' => \"Enter User's Contact number\",\n 'class' => 'mws-textinput required',\n ));\n \n $this->addElement('hidden', 'order_user_id', array(\n ));\n \n \n \n $this->addElement('text', 'order_first_name', array(\n 'label' => 'User\\'s First Name',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'placeholder' => \"Enter User's First Name\",\n 'class' => 'mws-textinput required',\n ));\n \n $this->addElement('text', 'order_last_name', array(\n 'label' => 'User\\'s Last Name',\n 'filters' => array('StringTrim'),\n 'placeholder' => \"Enter User's Last Name\",\n 'class' => 'mws-textinput',\n ));\n \n $this->addElement('text', 'order_user_email', array(\n 'label' => 'User\\'s Email',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'placeholder' => \"Enter User's Email\",\n 'class' => 'mws-textinput',\n ));\n \n $this->addElement('text', 'order_address', array(\n 'label' => 'User\\'s House/Apartment #',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'placeholder' => \"Enter User's House/Apartment #\",\n 'class' => 'mws-textinput',\n ));\n \n $this->addElement('text', 'order_city', array(\n 'label' => 'City',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'placeholder' => \"Enter City\",\n 'class' => 'mws-textinput',\n ));\n \n// $this->addElement('text', 'order_pincode', array(\n// 'label' => 'Pincode',\n// 'filters' => array('StringTrim'),\n// 'placeholder' => \"Enter Pincode\",\n// 'class' => 'mws-textinput',\n// ));\n \n $orderType = array('service'=>'service','package'=>'package');\n $this->addElement('select', 'order_type', array(\n 'label' => 'Order Type',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'placeholder' => \"Select Order type\",\n 'class' => 'mws-textinput',\n 'multiOptions' => $orderType,\n 'onchange'=>'changeOrderType(this.value)'\n ));\n \n \n //============== Service Type\n //get service list\n $serviceList = $serviceMaster->getAllServiceMasters();\n foreach($serviceList as $serviceVal){\n $serviceType[$serviceVal->service_id] = $serviceVal->service_name;\n }\n// $serviceType = array(3=>\"laundry\",4=>\"dryclean\",5=>\"ironing\",6=>\"washandfold\",0=>\"other\");\n $this->addElement('multiselect', 'order_service_type', array(\n 'label' => 'Service Type',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'placeholder' => \"Select Service Type\",\n 'class' => 'mws-textinput',\n 'multiOptions' => $serviceType,\n 'onchange'=>'updateDeliveryType(this.value)'\n ));\n \n \n \n //=========== Delivery Type\n $deliveryTypes = $deliveryMapper->getAllDeliveryTypeMaster();\n \n foreach($deliveryTypes as $delVal){\n $delivery_types[$delVal->delivery_type_id] = $delVal->delivery_type_name;\n }\n// $delivery_types = array(\"Regular\", \"Express\");\n \n $this->addElement('select', 'order_delivery_type', array(\n 'label' => 'Delivery Type',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'placeholder' => \"Select Delivery type\",\n 'class' => 'mws-textinput',\n 'multiOptions' => $delivery_types\n ));\n\n \n $packageList = $packageMaster->getAllPackages();\n $packageArr = array();\n foreach($packageList as $packageVal){\n $packageArr[$packageVal->package_id] = $packageVal->package_name;\n }\n// $delivery_types = array(\"Regular\", \"Express\");\n \n $this->addElement('select', 'order_package', array(\n 'label' => 'Package',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'placeholder' => \"Select Package\",\n 'class' => 'mws-textinput',\n 'multiOptions' => $packageArr\n ));\n \n \n// $payment_methods = array(\"Credit Card\", \"Debit Card\", \"Net Banking\", \"Cash On Delivery\", \"Wallet\");\n// $this->addElement('select', 'order_payment_type', array(\n// 'label' => 'Payment Method',\n// 'required' => true,\n// 'filters' => array('StringTrim'),\n// 'placeholder' => \"Select Payment Method\",\n// 'class' => 'mws-textinput',\n// 'multiOptions' => $payment_methods\n// ));\n \n// $payment_statuses = array(\"Paid\",\"Unpaid\");\n// $this->addElement('select', 'order_payment_status', array(\n// 'label' => 'Payment Status',\n// 'required' => true,\n// 'filters' => array('StringTrim'),\n// 'placeholder' => \"Select Payment Status\",\n// 'class' => 'mws-textinput',\n// 'multiOptions' => $payment_statuses\n// ));\n \n// $order_statuses = array(\"New\",\"Picked\",\"Processed\",\"Dispatched\",\"Delivered\");\n// $this->addElement('select', 'order_status', array(\n// 'label' => 'Order Status',\n// 'required' => true,\n// 'filters' => array('StringTrim'),\n// 'placeholder' => \"Select Order Status\",\n// 'class' => 'mws-textinput',\n// 'multiOptions' => $order_statuses\n// ));\n \n// // TO DO - from db\n// $serviceType = array(3=>\"laundry\",4=>\"dryclean\",5=>\"ironing\",6=>\"washandfold\",0=>\"other\");\n// $this->addElement('select', 'order_service_type', array(\n// 'label' => 'Service Type',\n// 'required' => true,\n// 'filters' => array('StringTrim'),\n// 'placeholder' => \"Select Service Type\",\n// 'class' => 'mws-textinput',\n// 'multiOptions' => $order_statuses\n// ));\n \n// $this->addElement('text', 'order_amount', array(\n// 'label' => 'Total Price',\n// 'required' => true,\n// 'filters' => array('StringTrim'),\n// 'placeholder' => \"Enter Total Price\",\n// 'class' => 'mws-textinput',\n// ));\n }", "public function __construct()\n {\n $this->middleware('auth');\n //$this->field_list = ['affair'=>'Asunto','message'=>'Mensaje','archivo'=>'Archivo','id'=>'Acciones'];\n $this->field_list = ['number'=>'Folio','affair'=>'Asunto','message'=>'Mensaje','archivob'=>'Archivo del cliente','name'=>'Nombre','last_name'=>'Apellidos','phone'=>'Telefono','email'=>'Correo electronico','address'=>'Dirección','created_at'=>'Fecha de reporte','id'=>'Acciones'];\n $this->name = 'Canalizacion';\n $this->name_plural = 'Canalizacion';\n $this->form = 'App\\Core\\Forms\\Admin\\CanalizacionForm';\n $this->model = 'App\\Models\\Catalogos\\Ticket';\n $this->url_prefix = 'ticket';\n $validation_add = [\n ];\n $validation_edit = $validation_add;\n $this->setValidatorAdd($validation_add);\n $this->setValidatorEdit($validation_edit);\n }", "public function definition() {\n \n $mform = $this->_form; // Don't forget the underscore! \n \n $datetimeSettings=array(\n 'startyear' => date('Y')-5, \n 'stopyear' => date('Y')+5,\n 'timezone' => 99,\n 'step' =>1\n );\n $mform->addElement('date_time_selector', 'incident_datetime', \"Incident Date/Time\",$datetimeSettings);\n $mform->addRule('incident_datetime', \"Incident Date/Time is required\", 'required', null, 'server');\n $classificationList=$this->getClassifications(); \n $classifications=$this->formatClassificationArray($classificationList);\n $mform->addElement('select', 'classification_id', \"Classification\",$classifications);\n $mform->addRule('classification_id', \"Classification is required\", 'required', null, 'server');\n $mform->addElement('textarea', 'description', \"Description\", 'wrap=\"virtual\" rows=\"10\" cols=\"80\"'); \n $mform->addRule('description', \"Description is required\", 'required', null, 'server');\n $mform->addElement('hidden','id','Incident ID');\n $mform->setType('id',PARAM_INT);\n $mform->addElement('html', '<div><strong>NOTE: Clicking Continue will create this incident prior to assignment to a certification.</strong></div><br>');\n $this->add_action_buttons(true,'Continue');\n }", "function __construct() {\n\n\t\t$this->InventariosModel = new InventariosModel();\n\t\t$this->InventariosModel->connect();\n\t}", "function __construct() {\n require_once Parametre::$MVC_BASE.'/bak/modules/module_referencement/controleur/Cont_ref.php';\n $this->control = new Cont_ref();\n \n \n if(isset($_GET[\"action\"]) && !empty($_GET[\"action\"])){\n $action = $_GET[\"action\"]; \n }else{\n $action =\"\";\n }\n \n switch ($action) {\n\n case \"modification\":\n $this->control->aff_form_modif();\n break;\n case \"update\":\n $this->control->action_modif();\n break;\n case \"selection\":\n $this->control->action_suprimer();\n break;\n\n default:\n $this->control->aff_ref();\n break;\n }\n }", "public function agregaElementoAdicional(Request $request)\n {\n if($request->isMethod('post'))\n {\n $fuente = $request->input('adicionalFuente', \"\");\n $link = $request->input('adicionalLink', \"\");\n $descripcion= $request->input('adicionalDescripcion', \"\");\n $medio = $request->input('adicionalMedio', \"\");\n\n if( !empty($descripcion) && !empty($fuente) && !empty($link) )\n {\n $nuevoElemento = [\n 'subcategoria'=>\"complemento\",\n 'fuente'=>$fuente,\n 'link'=>$link,\n 'descripcion'=>$descripcion,\n 'medio'=>$medio,\n 'evidencia'=>[]\n ];\n try{\n $evento = Resevento::project([\n 'id'=>1,\n 'complemento_digital'=>1\n ])->findOrFail($request->input('evento_id', null));\n\n if(isset($evento->complemento_digital))\n {\n $elementos = array($nuevoElemento);\n foreach($evento->complemento_digital as $item)\n array_push($elementos, $item);\n $evento->complemento_digital = $elementos;\n }else{\n $evento->complemento_digital = array( $nuevoElemento );\n }\n\n if($evento->save())\n {\n return redirect()->route('coordinadorEventoDetalles', [\n 'id'=>$evento->id\n ]);\n }else{\n return view('shared.complete.404')\n ->with('mensaje', 'Evento no actualizado');\n }\n }catch(ModelNotFoundException $e)\n {\n return view('shared.complete.404')\n ->with('mensaje', 'Evento no localizado');\n }\n }else{\n return view('shared.complete.404')\n ->with('mensaje', 'Los datos del elemento adicional son incorrectos');\n }\n }else{\n return view('shared.complete.404')\n ->with('mensaje', 'Metodo no aceptado');\n }\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->load->database();\n \t\t$this->load->helper('form');\n }", "public function init()\n {\n\n $this->setMethod('post');\n\n // Add the name element\n $this->addElement('text','name', array(\n 'label' => 'Sub-Section Name'\n , 'size' => 50\n , 'required' => true\n , 'filters' => array('StringTrim')\n ));\n\n My_Plugin_Form::setDefaultLayout($this->getElement('name'));\n\n // Add the submit button\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Save Changes',\n 'disableLoadDefaultDecorators' => true,\n ));\n\n $label = $this->getElement('submit');\n $label->addDecorators(array(\n array('ViewHelper'),\n array('HtmlTag')\n ));\n\n // Add a hidden field to handle the application id\n $this->addElement('hidden','application_id');\n\n // Add a hidden field to handle the sub-section id\n $this->addElement('hidden','id');\n\n // And finally, add some CSRF protection\n $this->addElement('hash','csrf', array(\n 'ignore' => 'true',\n ));\n\n }", "function conf__cuadro (toba_ei_cuadro $cuadro){\n if(isset($this->s__where)){\n $cuadro->descolapsar();\n $fecha=date('Y-m-d');\n $anio_lectivo=date('Y');\n $periodos=$this->dep('datos')->tabla('periodo')->get_periodo_calendario($fecha, $anio_lectivo);\n $cuadro->set_datos($this->procesar_periodo($periodos, \"hr\"));\n $cuadro->set_titulo(\"Listado de asignaciones\");\n }\n else{\n $cuadro->colapsar();\n }\n }", "private function __construct() {\n\t\t$action = isset($_GET['action']) ? sanitize_key($_GET['action']) : '';\n\t\t$copy = isset($_GET['copy']) ? intval($_GET['copy']) : 0;\n\t\tif(!empty($copy)) {\n\t\t\t$this->copy_event = new EL_Event($copy);\n\t\t\tadd_filter('get_object_terms', array(&$this, 'set_copied_categories'));\n\t\t}\n\n\t\t$this->options = &EL_Options::get_instance();\n\t\t$this->is_new = 'edit' !== $action;\n\n\t\tadd_action('add_meta_boxes', array(&$this, 'add_eventdata_metabox'));\n\t\tadd_action('edit_form_top', array(&$this, 'form_top_content'));\n\t\tadd_action('edit_form_after_title', array(&$this, 'form_after_title_content'));\n\t\tadd_action('admin_print_scripts', array(&$this, 'embed_scripts'));\n\t\tadd_action('save_post_el_events', array(&$this, 'save_eventdata'), 10, 3);\n\t\tadd_filter('enter_title_here', array(&$this, 'change_default_title'));\n\t\tadd_filter('post_updated_messages', array(&$this, 'updated_messages'));\n\t}", "public function init()\n {\n $this->addElement(\n new Zend_Form_Element_Text(\n 'title',\n array(\n 'required' => true,\n 'label' => 'Название проекта',\n 'size' => '80',\n 'class' => 'iText',\n 'decorators' => array('ViewHelper'),\n )\n )\n );\n\n $this->addElement(\n new Zend_Form_Element_Select(\n 'manager_id',\n array(\n 'multiOptions' => $this->getUsers(),\n 'required' => true,\n 'label' => 'Менеджер проекта',\n 'decorators' => array('ViewHelper'),\n )\n )\n );\n\n $this->viewScript = '_forms/project.phtml';\n }" ]
[ "0.61406106", "0.60513276", "0.59761506", "0.57787544", "0.57582146", "0.57295805", "0.57013893", "0.5510478", "0.5491748", "0.5490587", "0.54772645", "0.54466814", "0.5382834", "0.53792", "0.53725076", "0.53625643", "0.53622353", "0.5359263", "0.53490335", "0.534296", "0.5341003", "0.5338768", "0.5337296", "0.53360933", "0.5335634", "0.53284556", "0.5323872", "0.5306985", "0.53068036", "0.53058976", "0.5296635", "0.5292176", "0.528794", "0.5273007", "0.5271632", "0.52681184", "0.5265829", "0.52529633", "0.524281", "0.5224469", "0.52228516", "0.5218517", "0.5209474", "0.5207931", "0.5202995", "0.51999027", "0.5192428", "0.5186293", "0.51760596", "0.5173494", "0.51682633", "0.51644313", "0.5159527", "0.51563364", "0.5149079", "0.51414657", "0.5138933", "0.5136526", "0.51358235", "0.5132714", "0.51289755", "0.51265943", "0.5121746", "0.51212686", "0.51141167", "0.51135784", "0.51128113", "0.51070523", "0.51063985", "0.5102591", "0.5102073", "0.5098378", "0.5098378", "0.5092862", "0.5090444", "0.50884646", "0.5084469", "0.507984", "0.5078744", "0.507851", "0.50756615", "0.5073147", "0.50712574", "0.5069434", "0.5069154", "0.50657225", "0.5063762", "0.506368", "0.50604296", "0.5053542", "0.5049017", "0.5038572", "0.5037412", "0.5034704", "0.5029717", "0.50253993", "0.50234264", "0.50151074", "0.5009241", "0.5008141", "0.5006323" ]
0.0
-1
Creates data provider instance with search query applied
public function search($params) { $query = WeekdayReading::find(); $dataProvider = new ActiveDataProvider([ 'query' => $query, ]); $this->load($params); if (!$this->validate()) { // uncomment the following line if you do not want to any records when validation fails // $query->where('0=1'); return $dataProvider; } $query->andFilterWhere([ 'id' => $this->id, 'weekday_daynum' => $this->weekday_daynum, 'weekday_cycle_num' => $this->weekday_cycle_num, 'weekday_weeknum' => $this->weekday_weeknum, ]); $query->andFilterWhere(['like', 'weekday_name', $this->weekday_name]) ->andFilterWhere(['like', 'weekday_day', $this->weekday_day]) ->andFilterWhere(['like', 'weekday_first_reading', $this->weekday_first_reading]) ->andFilterWhere(['like', 'weekday_first_audio', $this->weekday_first_audio]) ->andFilterWhere(['like', 'weekday_alleluia_verse', $this->weekday_alleluia_verse]) ->andFilterWhere(['like', 'weekday_alleluia_audio', $this->weekday_alleluia_audio]) ->andFilterWhere(['like', 'weekday_responsorial_psalm', $this->weekday_responsorial_psalm]) ->andFilterWhere(['like', 'weekday_responsorial_audio', $this->weekday_responsorial_audio]) ->andFilterWhere(['like', 'weekday_gospel', $this->weekday_gospel]) ->andFilterWhere(['like', 'weekday_gospel_audio', $this->weekday_gospel_audio]) ->andFilterWhere(['like', 'weekday_reading_type', $this->weekday_reading_type]) ->andFilterWhere(['like', 'weekday_first_optional', $this->weekday_first_optional]) ->andFilterWhere(['like', 'weekday_responsorial_optional', $this->weekday_responsorial_optional]) ->andFilterWhere(['like', 'weekday_alleluia_optional', $this->weekday_alleluia_optional]) ->andFilterWhere(['like', 'weekday_gospel_optional', $this->weekday_gospel_optional]); return $dataProvider; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchQueryDataProvider() {}", "public function search()\n {\n $q = $this->getQuery();\n $dataProvider = new ActiveDataProvider([\n 'query' => $q,\n ]);\n\n return $dataProvider;\n }", "public function getQueryDataProvider() {}", "public function search() {\n // Get CDbCriteria instance\n $dbCriteria = new CDbCriteria;\n // Search for client name\n $dbCriteria->compare('name', Yii::app()->request->getQuery('name', ''), true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $dbCriteria,\n 'pagination' => array(\n 'pageSize' => 10,\n ),\n ));\n }", "protected function getDataProviders()\n {\n $searchModel = $this->getSearchModel();\n $queryParams = Yii::$app->request->queryParams;\n $dataProvider = $searchModel->search($queryParams);\n return [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider\n ];\n }", "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('url', $this->url);\n $criteria->compare('type', $this->type);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 100),\n ));\n }", "public function backendSearch()\n {\n $criteria = new CDbCriteria();\n\n return new CActiveDataProvider(\n __CLASS__,\n array(\n 'criteria' => $criteria,\n )\n );\n }", "public function search() {\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $this->getSearchCriteria(),\n\t\t\t'sort' => array(\n\t\t\t\t'defaultOrder' => 't.id DESC',\n\t\t\t\t'attributes' => array(\n\t\t\t\t\t'client_id' => array(\n\t\t\t\t\t\t'asc' => 'client_name asc',\n\t\t\t\t\t\t'desc' => 'client_name desc',\n\t\t\t\t\t),\n\t\t\t\t\t'*',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'pagination' => array(\n\t\t\t\t'pageSize' => Yii::app()->config->get('global.per_page'),)\n\t\t));\n\t}", "public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('id', $this->id, true);\n $criteria->compare('level', $this->level);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('ip_create', $this->ip_create, true);\n\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function createSearchQuery()\n {\n $query = new SearchQuery($this->elastic);\n $query->listeners = $this->listeners;\n return $query;\n }", "public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('state', $this->state);\n $criteria->compare('type','0');\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function prepareDataProvider()\n\t{\n\t $searchModel = new \\app\\models\\ClearanceSearch(); \n\t\treturn $searchModel->search(\\Yii::$app->request->queryParams);\n\n\t}", "public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('authorname', $this->authorname, true);\n return new CActiveDataProvider($this, array('criteria' => $criteria, ));\n }", "public function getDataProvider(array $query = []);", "protected function prepareDataProvider()\n {\n if ($this->prepareDataProvider !== null) {\n return call_user_func($this->prepareDataProvider, $this);\n }\n\n\t\t/* @var $modelClass \\yii\\db\\BaseActiveRecord */\n $modelClass = $this->modelClass;\n\t\t$query = $modelClass::find();\n\t\t\n\t\t$filters = ActionHelpers::getFilter();\n\t\t\n\t\tforeach($filters as $filter) {\n\t\t\t$query->andFilterWhere($filter);\n\t\t}\n\t\t\n\t\tif($with = ActionHelpers::getWith()) {\n $query->with($with);\n }\n\n return new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [\n 'pageSize' => ActionHelpers::getLimit()\n ],\n 'sort'=> ActionHelpers::getSort()\n // 'sort'=> ['defaultOrder' => ['id'=>SORT_DESC]]\n ]);\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria = new \\CDbCriteria;\n\n\t\tforeach (array_keys($this->defineAttributes()) as $name)\n\t\t{\n\t\t\t$criteria->compare($name, $this->$name);\n\t\t}\n\n\t\treturn new \\CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria\n\t\t));\n\t}", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('memo',$this->memo,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n $query = Hotel::find();\n // add conditions that should always apply here\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n \n // grid filtering conditions\n $query->availables($this->quantity_of_guests);\n $query->andFilterWhere([\n 'hotel_id' => $this->hotel_id,\n 'price_per_guest' => $this->price_per_guest,\n ]);\n $query->andFilterWhere(['like', 'city_name', $this->city_name]);\n return $dataProvider;\n \n }", "public function search()\n\t{\n\t $criteria=new CDbCriteria;\n\t\t\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('projection',$this->projection,true);\n\t\t$criteria->compare('username',Yii::app()->user->id);\n\t\t$criteria->compare('title',$this->title);\n\t\t$criteria->compare('url',$this->url);\n\t return new CActiveDataProvider(get_class($this), array(\n\t 'criteria'=> $criteria,\n\t 'sort'=>array(\n\t 'defaultOrder'=>'name ASC',\n\t ),\n\t 'pagination'=>array(\n\t 'pageSize'=>10\n\t ),\n\t ));\n\t}", "private function _getDataProvider($query, $params){\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n if (!($this->load($params) && $this->validate())) {\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'user_id' => $this->user_id,\n 'profile_id' => $this->profile_id,\n 'authentication_method_id' => $this->authentication_method_id,\n 'status' => $this->status,\n 'created_at' => $this->created_at,\n 'updated_at' => $this->updated_at,\n ]);\n\n $query->andFilterWhere(['like', 'username', $this->username])\n ->andFilterWhere(['like', 'auth_key', $this->auth_key])\n ->andFilterWhere(['like', 'password_hash', $this->password_hash])\n ->andFilterWhere(['like', 'password_reset_token', $this->password_reset_token])\n ->andFilterWhere(['like', 'email', $this->email]);\n\n return $dataProvider;\n }", "public function getMetadataQueryProviderWrapper();", "protected function prepareDataProvider()\n {\n \t$modelClass = $this->modelClass;\n\n $orderBy='id';\n if (isset($_GET['orderBy'])) $orderBy=$_GET['orderBy'];\n\n $orderByDir='DESC';\n if (isset($_GET['orderByDir'])) $orderByDir=$_GET['orderByDir'];\n\n $limit=20;\n if (isset($_GET['limit'])) $limit=$_GET['limit'];\n\n $order = \"$orderBy $orderByDir\";\n\n \t$dataProvider = new ActiveDataProvider([\n 'query' => $modelClass::find()->limit($limit)->with('supplier')->orderBy($order),\n 'pagination' => [\n 'pageSize' => $limit,\n ],\n ]);\n\n \treturn $dataProvider;\n }", "public function makeSearch() \n {\n $this->setSelect($this->qb);\n $this->setAssociations($this->qb);\n $this->setWhere($this->qb);\n $this->setOrderBy($this->qb);\n $this->setLimit($this->qb);\n\n return $this;\n }", "public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\t\t//TODO: update search criteria\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('event_id', $this->event_id, true);\n\t\t$criteria->compare('standard_intervention_exists', $this->standard_intervention_exists);\n\t\t$criteria->compare('details', $this->details);\n\t\t$criteria->compare('interventions_id', $this->interventions_id);\n\t\t$criteria->compare('description', $this->description);\n\t\t$criteria->compare('patient_factors', $this->patient_factors);\n\t\t$criteria->compare('patient_factor_details', $this->patient_factor_details);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('keywords',$this->keywords,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public static function new_search_record()\n\t{\n\t\treturn new user_record_search();\n\t}", "public function search() {\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('content', $this->content, true);\n\t\t$criteria->compare('score', $this->score);\n\t\t$criteria->compare('author', $this->author, true);\n\t\t$criteria->compare('type', $this->type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('uid', $this->uid);\n $criteria->compare('token', $this->token, true);\n $criteria->compare('created', $this->created, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n\n $this->entity = $this->name;\n $this->conditions = $this->_getSearchConditions();\n $this->joins = $this->_getSearchJoins();\n $this->orders = $this->_getSearchOrder();\n $this->limit = $this->_getSearchLimit();\n $this->maxLimit = $this->_getSearchMaxLimit();\n $this->offset = $this->_getSearchOffset();\n $this->fields = $this->_getSearchFields();\n $this->group = $this->_getSearchGroup();\n\n// $this->setVar('entity', $this->name);\n// $this->setVar('conditions', $this->_getSearchConditions());\n// $this->setVar('joins', $this->_getSearchJoins());\n// $this->setVar('orders', $this->_getSearchOrder());\n// $this->setVar('limit', $this->_getSearchLimit());\n// $this->setVar('maxLimit', $this->_getSearchMaxLimit());\n// $this->setVar('offset', $this->_getSearchOffset());\n// $this->setVar('fields', $this->_getSearchFields());\n// $this->setVar('group', $this->_getSearchGroup());\n//\n// $this->setVar('baseAdditionalElements', $this->additionalElements);\n $this->getFieldsForSearchFunction = '_extractSearchFields';\n\n return $this->baseSearch();\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('keyword_id', $this->keyword_id);\n $criteria->compare('visits', $this->visits);\n $criteria->compare('page_views', $this->page_views);\n $criteria->compare('parsing', $this->parsing);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 50),\n ));\n }", "protected function getNewSearchModel()\n {\n $searchModelName = $this->getSearchModelName();\n return new $searchModelName;\n }", "public function search()\n\t{\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function searchdatas(){\r\n\t\t// should not be searched.\r\n\t\t$conditions=array();\r\n\t\t$params=array();\r\n\t\t$page_params=array();\r\n\t\t$criteria=new CDbCriteria;\r\n\t\t$sort=new CSort();\r\n \t$sort->attributes=array();\r\n \t$sort->defaultOrder=\"t.create_time ASC\";\r\n \t$sort->params=$page_params;\r\n\t\treturn new CActiveDataProvider(get_class($this), array(\r\n\t\t\t'criteria'=>array(\r\n\t\t\t 'condition'=>'',\r\n\t\t\t 'params'=>array(),\r\n\t\t\t 'with'=>array(\"User\",\"District\"),\r\n\t\t\t),\r\n\t\t\t'pagination'=>array(\r\n 'pageSize'=>'20',\r\n 'params'=> $page_params,\r\n ),\r\n 'sort'=>$sort,\r\n\t\t));\r\n\t}", "public function search()\n {\n\n $query = Board::find()->where(['user_id' => $this->user_id]);\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [\n 'pageSize' => 10,\n ],\n 'sort' => [\n 'defaultOrder' => [\n 'created_at' => SORT_DESC,\n\n ]\n ],\n ]);\n\n return $dataProvider;\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('post_id', $this->post_id);\n $criteria->compare('language_id', $this->language_id);\n $criteria->compare('header', $this->header, true);\n $criteria->compare('text', $this->text, true);\n\t\t$criteria->compare('rating',$this->rating);\n\t\t$criteria->compare('author_id',$this->author_id);\n\t\t$criteria->compare('date_add',$this->date_add,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('t.id', $this->id);\n $criteria->compare('who', $this->who);\n $criteria->compare('date', $this->date, true);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('rate', $this->rate);\n $criteria->compare('knowledge', $this->knowledge);\n $criteria->compare('behavior', $this->behavior);\n $criteria->compare('motivation', $this->motivation);\n $criteria->compare('rate', $this->who_ip);\n $criteria->compare('is_checked', $this->is_checked);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => '50',\n ),\n 'sort' => array(\n 'defaultOrder' => array(\n 'date' => CSort::SORT_DESC,\n ),\n ),\n ));\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('name', $this->name, true);\n $criteria->compare('latitude', $this->latitude);\n $criteria->compare('longitude', $this->longitude);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('vicinity', $this->vicinity, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function parametersAndQueriesDataProvider() {}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('region_id', $this->region_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t $this->StateProcess(get_class($this).'_'.Y::app()->params['cfgName']);\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('title',$this->title,true);\n $criteria->compare('title_adm',$this->title,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'sort'=>array('defaultOrder'=>'id DESC'),\n 'pagination'=>array('pageSize'=>Config::$data['base']->pageSize)\n\t\t));\n\t}", "public function search($params,$query=null)\n {\n if(!$query) $query = RestClient::find();\n\n $query = $query->joinWith(['hospital']) \n ->joinWith(['hospital.sales']);\n //$query = $query->joinWith('mingrui_comments');\n // add conditions that should always apply here\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n $this->load($params);\n \n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n //var_dump($params);exit;\n return $dataProvider;\n }\n \n // grid filtering conditions\n $query->andFilterWhere([\n 'rest_client.id' => $this->id, \n 'age' => $this->age, \n 'hospital_id' => $this->hospital_id, \n ]);\n\n $query->andFilterWhere(['like', 'rest_client.name', $this->name])\n ->andFilterWhere(['like', 'sex', $this->sex])\n ->andFilterWhere(['like', 'birthplace', $this->birthplace])\n ->andFilterWhere(['like', 'email', $this->email])\n ->andFilterWhere(['like', 'tel', $this->tel])\n ->andFilterWhere(['like', 'school', $this->school])\n ->andFilterWhere(['like', 'education', $this->education])\n ->andFilterWhere(['like', 'experience', $this->experience])\n ->andFilterWhere(['like', 'employed', $this->employed])\n ->andFilterWhere(['like', 'department', $this->department])\n ->andFilterWhere(['like', 'worktime', $this->worktime])\n ->andFilterWhere(['like', 'position', $this->position])\n ->andFilterWhere(['like', 'speciality', $this->speciality])\n ->andFilterWhere(['like', 'hobby', $this->hobby])\n ->andFilterWhere(['like', 'notes', $this->notes])\n ->andFilterWhere(['like', 'zhuren', $this->zhuren])\n ->andFilterWhere(['like', 'pianhao', $this->pianhao]) \n ->andFilterWhere(['like', 'rest_danwei.name', $this->hospitalname])\n ->andFilterWhere(['like', 'rest_sales.name', $this->salesname])\n ;\n\n // echo $query->createCommand()->getRawSql(); exit; \n return $dataProvider;\n }", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('agreement',$this->agreement);\n\t\t$criteria->compare('date',$this->date,true);\n\t\t$criteria->compare('user',$this->user);\n\t\t$criteria->compare('new_status',$this->new_status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n\n\t\t$criteria = $this->getDbCriteria();\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('subject', $this->subject, true);\n\t\t$criteria->compare('status', $this->status);\n\t\t$criteria->compare('template.name', $this->template_id, true);\n\n\t\t$sort = new CSort;\n\t\t$sort->defaultOrder = 'id DESC';\n\n\t\treturn new NActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t\t'sort' => $sort,\n\t\t\t\t\t'pagination' => array(\n\t\t\t\t\t\t'pageSize' => 20,\n\t\t\t\t\t),\n\t\t\t\t));\n\t}", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id,true);\n $criteria->compare('query_id',$this->query_id,true);\n $criteria->compare('se_id',$this->se_id,true);\n $criteria->compare('se_page',$this->se_page,true);\n $criteria->compare('se_url',$this->se_url,true);\n $criteria->compare('visits',$this->visits);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination' => array('pageSize' => 25),\n ));\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('acquisition_date_id', $this->acquisition_date_id);\n $criteria->compare('acquisition_type_id', $this->acquisition_type_id);\n $criteria->compare('location_id', $this->location_id);\n $criteria->compare('number', $this->number, true);\n $criteria->compare('annotation', $this->annotation, true);\n $criteria->compare('location_coordinates_id', $this->location_coordinates_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "protected function _initSearch()\n {\n $this->where['is_del'] = array('eq', 1);\n $this->order = 'create_time desc';\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('id_client', $this->id_client);\n $criteria->compare('first_name', $this->first_name, true);\n $criteria->compare('last_name', $this->last_name, true);\n $criteria->compare('date_birth', $this->date_birth, true);\n $criteria->compare('gender', $this->gender);\n\n return new CActiveDataProvider(get_class($this), array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('domain', $this->domain, true);\n $criteria->compare('ru_domain', $this->ru_domain, true);\n $criteria->compare('page', $this->ru_domain);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function applyDefaultSearchQuery(\\yii\\data\\ActiveDataProvider &$dataProvider);", "protected function _initSearch()\n {\n $this->where['is_del'] = array('eq', 0);\n $this->order = 'create_time desc';\n }", "public static function new_search_record()\n\t{\n\t\treturn new league_record_search();\n\t}", "public function search()\n {\n $query = Story::find()\n ->owner()\n ->globalChannel()\n ->orderBy(['_id' => SORT_ASC])\n ->active();\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => false\n ]);\n\n return $dataProvider;\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('project_id', $this->project_id);\n $criteria->compare('num', $this->num);\n $criteria->compare('team_strength', $this->team_strength);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "private function instantiate_search_page() {\n // Build the search_types_fields and search_types_label arrays out of post_types_defs\n $search_types_fields = array();\n $search_types_label = array();\n foreach ( $this->post_type_defs as $post_type ) {\n $search_types_fields[ $post_type[ 'slug' ] ] = $post_type[ 'fields' ];\n $search_types_label[ $post_type[ 'slug' ] ] = $post_type[ 'plural_name' ];\n }\n $this->search_page = new HRHS_Search( array(\n // Using the default slug and title for now\n 'search_types_fields' => $search_types_fields,\n 'search_types_label' => $search_types_label\n ) );\n }", "public function search()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('title',$this->title,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search($query);", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('sex', $this->sex);\n $criteria->compare('mobile', $this->mobile, true);\n $criteria->compare('idcard', $this->idcard, true);\n $criteria->compare('password', $this->password, true);\n $criteria->compare('place_ids', $this->place_ids, true);\n $criteria->compare('depart_id', $this->depart_id);\n $criteria->compare('bank', $this->bank, true);\n $criteria->compare('bank_card', $this->bank_card, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('education', $this->education, true);\n $criteria->compare('created', $this->created);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('summ', $this->summ, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('company_id', Yii::app()->user->company_id);\n $criteria->compare('zone_id', $this->zone_id, true);\n $criteria->compare('low_qty_threshold', $this->low_qty_threshold);\n $criteria->compare('high_qty_threshold', $this->high_qty_threshold);\n $criteria->compare('created_date', $this->created_date, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->compare('updated_date', $this->updated_date, true);\n $criteria->compare('updated_by', $this->updated_by, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('nrs', $this->nrs, true);\n $criteria->compare('supplier_name', $this->supplier_name, true);\n $criteria->compare('npwp', $this->npwp, true);\n $criteria->compare('bank_name', $this->bank_name, true);\n $criteria->compare('bank_account_number', $this->bank_account_number, true);\n $criteria->compare('created_at', $this->created_at, true);\n $criteria->compare('created_by', $this->created_by);\n $criteria->compare('updated_at', $this->updated_at, true);\n $criteria->compare('updated_by', $this->updated_by);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(\n 'defaultOrder' => 'id DESC',\n ),\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('code',$this->code,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('did',$this->did);\n\t\t$criteria->compare('date_prod',$this->date_prod,true);\n\t\t$criteria->compare('kind',$this->kind,true);\n\t\t$criteria->compare('len',$this->len,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('code', $this->code, true);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('printable_name', $this->printable_name, true);\n\t\t$criteria->compare('iso3', $this->iso3, true);\n\t\t$criteria->compare('numcode', $this->numcode);\n\t\t$criteria->compare('is_default', $this->is_default);\n\t\t$criteria->compare('is_highlight', $this->is_highlight);\n\t\t$criteria->compare('is_active', $this->is_active);\n\t\t$criteria->compare('date_added', $this->date_added);\n\t\t$criteria->compare('date_modified', $this->date_modified);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function search($params)\n {\n $this->__search($params);\n\n // grid filtering conditions\n $this->query\n\t ->andFilterWhere([\n\t 'id' => $this->id,\n\t 'ord' => $this->ord,\n\t 'type' => $this->type,\n\t ])\n\t ->andFilterWhere(['like', 'code', $this->code])\n ->andFilterWhere(['like', 'name', $this->name]);\n\n return $this->dataProvider;\n }", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n $criteria = new CDbCriteria();\n \n $criteria->compare('question_id', $this->question_id);\n $criteria->compare('student_id', $this->student_id);\n $criteria->compare('answer_id', $this->answer_id);\n $criteria->compare('answer_text', $this->answer_text, true);\n $criteria->compare('answer_number', $this->answer_number, true);\n $criteria->compare('exec_time', $this->exec_time);\n $criteria->compare('result', $this->result);\n $criteria->compare('test_result', $this->test_result);\n \n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria\n ));\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('createDate', $this->createDate);\n $criteria->compare('lastUpdated', $this->lastUpdated);\n $criteria->compare('trackingKey', $this->trackingKey);\n $criteria->compare('email', $this->email);\n $criteria->compare('leadscore', $this->leadscore);\n\n if (!Yii::app()->user->isGuest) {\n $pageSize = Profile::getResultsPerPage();\n } else {\n $pageSize = 20;\n }\n\n return new SmartActiveDataProvider(get_class($this), array(\n 'pagination' => array(\n 'pageSize' => $pageSize,\n ),\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n// @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('options', $this->options, true);\n $criteria->compare('autoreplys', $this->autoreplys, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function googleSearch()\n {\n $search = new \\Hoor\\Search\\Google(get_search_query(), $this->getIndex());\n $this->data['search'] = $search;\n $this->data['results'] = $search->results;\n }", "protected function addSearchConfigs()\n {\n\n $this['textQueryBuilder'] = function () {\n return new TextQueryBuilder();\n };\n\n $this['searchManager'] = function ($c) {\n return new SearchManager($c['databaseAdapter'], $c['queue'], $c['request'], array(\n $c['textQueryBuilder']\n ));\n };\n\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('tbl_customer_supplier', $this->tbl_customer_supplier, true);\n $criteria->compare('id_customer', $this->id_customer, true);\n $criteria->compare('id_supplier', $this->id_supplier, true);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('date_add', $this->date_add, true);\n $criteria->compare('date_upd', $this->date_upd, true);\n $criteria->compare('active', $this->active);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('district_id', $this->district_id);\n\t\t$criteria->compare('active', $this->active);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t));\n\t}", "public function search()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('issue_date', $this->issue_date, true);\n\n\t\treturn new CActiveDataProvider($this, array('criteria' => $criteria,));\n\t}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('hol_id', $this->hol_id);\n $criteria->compare('loc_id', $this->loc_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search($params)\n {\n $this->__search($params);\n\n // grid filtering conditions\n $this->query\n\t ->andFilterWhere(['id' => $this->id])\n\t ->andFilterWhere(['like', 'description', $this->description])\n ->andFilterWhere(['like', 'type', $this->type]);\n\n return $this->dataProvider;\n }", "public function search()\r\n\t{\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n\t\t$criteria = new CDbCriteria;\r\n\r\n\t\t$criteria->compare('doc_num', $this->doc_num, true);\r\n\t\t$criteria->compare('doc_num2', $this->doc_num2);\r\n\t\t$criteria->compare('doc_date', $this->doc_date, true);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria' => $criteria,\r\n\t\t));\r\n\t}", "public function search()\n {\n $criteria = new CDbCriteria();\n\n $criteria->compare('productCategoryId', $this->productCategoryId, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('level', $this->level);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('wikilink', $this->wikilink, true);\n\t\t$criteria->compare('picture', $this->picture, true);\n\t\t$criteria->compare('score', $this->score);\n\t\t$criteria->compare('modification_date', $this->modification_date, true);\n\t\t$criteria->compare('featured', $this->featured);\n\t\t$criteria->compare('users_found', $this->users_found);\n\t\t$criteria->compare('gpsdata', $this->gpsdata);\n\t\t$criteria->compare('category', $this->category);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function scopeSearch($query){\n if (request()->has('search_query') && !empty(request()->search_query) && request()->has('search_columns') && !empty(request()->search_columns) ) {\n \t$query = $this->getQuery($query , request()->search_columns , request()->search_query );\n }else{\n \tif (request()->has('search_query') && !empty(request()->search_query)) {\n \t\t$query = $this->getQuery($query , $this->fillable , request()->search_query );\n \t}\n }\n\n \n \n \n \n \n return $query;\n }", "public function search()\n {\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n $criteria->compare('title',$this->title,true);\n $criteria->compare('text',$this->text,true);\n $criteria->compare('author_id',$this->author_id);\n $criteria->compare('editor_id',$this->editor_id);\n $criteria->compare('crated_at',$this->crated_at,true);\n $criteria->compare('edited_at',$this->edited_at,true);\n $criteria->compare('publish_at',$this->publich_at,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('date_start',$this->date_start,true);\n\t\t$criteria->compare('date_end',$this->date_end,true);\n\t\t$criteria->compare('count_attempt',$this->count_attempt);\n\t\t$criteria->compare('count_questions',$this->count_questions);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('date_create',$this->date_create,true);\n\t\t$criteria->compare('author',$this->author,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('latitud',$this->latitud,true);\n\t\t$criteria->compare('longitud',$this->longitud,true);\n\t\t$criteria->compare('telefono',$this->telefono,true);\n\t\t$criteria->compare('direccion',$this->direccion,true);\n\t\t$criteria->compare('web',$this->web,true);\n\t\t$criteria->compare('activo',$this->activo);\n\t\t$criteria->compare('userId',$this->userId);\n\t\t$criteria->compare('ratingGeneral',$this->ratingGeneral);\n\t\t$criteria->compare('youtubeUrl',$this->youtubeUrl,true);\n\t\t$criteria->compare('esDestacado',$this->esDestacado);\n\t\t$criteria->compare('aprobado',$this->aprobado);\n $criteria->compare('regionId',$this->regionId);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('id_user',$this->id_user);\n\t\t$criteria->compare('id_answer',$this->id_answer);\n\t\t$criteria->compare('mark',$this->mark);\n\t\t$criteria->compare('comment',$this->comment,true);\n\t\t$criteria->compare('time',$this->time,true);\n\t\t$criteria->compare('read_mark',$this->read_mark,true);\n\t\t$criteria->compare('marked_by',$this->marked_by,true);\n\t\t\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n// $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n// $criteria->compare('alias', $this->alias, true);\n// $criteria->compare('module', $this->module, true);\n $criteria->compare('crud', $this->crud, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('UserID',$this->UserID);\n\t\t$criteria->compare('ProviderID',$this->ProviderID);\n\t\t$criteria->compare('Date',$this->Date,true);\n\t\t$criteria->compare('RawID',$this->RawID);\n\t\t$criteria->compare('Document',$this->Document,true);\n\t\t$criteria->compare('State',$this->State,true);\n\t\t$criteria->compare('Temperature',$this->Temperature,true);\n\t\t$criteria->compare('Conditions',$this->Conditions,true);\n\t\t$criteria->compare('Expiration',$this->Expiration,true);\n\t\t$criteria->compare('Comments',$this->Comments,true);\n\t\t$criteria->compare('Quantity',$this->Quantity,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n \t'pageSize'=>Yii::app()->params['defaultPageSize'], \n ),\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('sn',$this->sn,true);\n\t\t$criteria->compare('fn',$this->fn,true);\n\t\t$criteria->compare('region',$this->region);\n\t\t$criteria->compare('postal',$this->postal,true);\n\t\t$criteria->compare('inn',$this->inn,true);\n\t\t$criteria->compare('ogrn',$this->ogrn,true);\n\t\t$criteria->compare('okpo',$this->okpo,true);\n\t\t$criteria->compare('adress',$this->adress,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('fax',$this->fax,true);\n\t\t$criteria->compare('okved',$this->okved,true);\n\t\t$criteria->compare('oid',$this->oid,true);\n\t\t$criteria->compare('hits',$this->hits);\n\t\t$criteria->compare('st',$this->st);\n\t\t$criteria->compare('alias',$this->alias,true);\n\t\t$criteria->compare('alias2',$this->alias2,true);\n\t\t$criteria->compare('alias3',$this->alias3,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('cardid', $this->cardid, true);\n $criteria->compare('subclassid', $this->subclassid, true);\n $criteria->compare('cardname', $this->cardname, true);\n\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('pid', $this->pid, true);\n $criteria->compare('userName', $this->userName, true);\n $criteria->compare('userEmail', $this->userEmail, true);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('userId', $this->userId, true);\n $criteria->compare('visibility', $this->visibility);\n $criteria->compare('date', $this->date, true);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('recordId', $this->recordId, true);\n $criteria->compare('info', $this->info, true);\n $criteria->compare('new', $this->new, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('user', $this->user, true);\n $criteria->compare('amount', $this->amount);\n $criteria->compare('currency', $this->currency, true);\n $criteria->compare('valid_from', $this->valid_from, true);\n $criteria->compare('valid_to', $this->valid_to, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search () {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('title', $this->title, true);\n\t\t$criteria->compare('description', $this->description, true);\n\t\t$criteria->compare('type', $this->type);\n\t\t$criteria->compare('required', $this->required);\n\t\t$criteria->compare('cId', $this->cId);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t 'criteria' => $criteria,\n\t\t ));\n\t}", "private function new_search()\n {\n $this->template = FALSE;\n \n $articulo = new articulo();\n $codfamilia = '';\n if( isset($_REQUEST['codfamilia']) )\n {\n $codfamilia = $_REQUEST['codfamilia'];\n }\n \n $con_stock = isset($_REQUEST['con_stock']);\n $this->results = $articulo->search($this->query, 0, $codfamilia, $con_stock);\n \n /// añadimos la busqueda\n foreach($this->results as $i => $value)\n {\n $this->results[$i]->query = $this->query;\n $this->results[$i]->dtopor = 0;\n }\n \n header('Content-Type: application/json');\n echo json_encode($this->results);\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('frequency_band',$this->frequency_band,true);\n\n\t\t$criteria->compare('date_of_issue',$this->date_of_issue,true);\n\n\t\t$criteria->compare('date_of_renewal',$this->date_of_renewal,true);\n\n\t\t$criteria->compare('emission',$this->emission,true);\n\n\t\t$criteria->compare('tolerance',$this->tolerance,true);\n\n\t\t$criteria->compare('application_vsat_id',$this->application_vsat_id,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t/*\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('percent_discount',$this->percent_discount,true);\n\t\t$criteria->compare('taxable',$this->taxable);\n\t\t$criteria->compare('id_user_created',$this->id_user_created);\n\t\t$criteria->compare('id_user_modified',$this->id_user_modified);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_modified',$this->date_modified,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t*/\n\t}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('first_name', $this->first_name, true);\n $criteria->compare('last_name', $this->last_name, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('contact_number', $this->contact_number, true);\n $criteria->compare('city', $this->city, true);\n $criteria->compare('gender', $this->gender, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->select = 'createDate, employeeId';\n\t\t$criteria->distinct = true;\n\t\t$criteria->addCondition('employeeId=\"' . $this->employeeId . '\" AND createDate between \"' . $this->startDate . '\" AND \"' . $this->endDate . '\"');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}" ]
[ "0.7773856", "0.674291", "0.65721744", "0.6503215", "0.6472826", "0.6389071", "0.63745373", "0.6287255", "0.62671757", "0.62457365", "0.62425256", "0.62123144", "0.61969537", "0.6172912", "0.61250603", "0.6123412", "0.6116283", "0.61031115", "0.6101092", "0.608637", "0.6081774", "0.6081262", "0.6073599", "0.60723656", "0.60405684", "0.6040201", "0.6035497", "0.60331875", "0.60318124", "0.60199106", "0.6013893", "0.5998194", "0.59764904", "0.59671843", "0.59620416", "0.59579474", "0.59551156", "0.5941564", "0.5935285", "0.590389", "0.5899341", "0.5895071", "0.5894937", "0.5888715", "0.58834034", "0.5882613", "0.58762497", "0.58638185", "0.5860362", "0.5846486", "0.58438134", "0.5839541", "0.5829547", "0.5825096", "0.5821819", "0.5821492", "0.5816446", "0.5815201", "0.58059967", "0.58025193", "0.57952476", "0.5785819", "0.57808983", "0.57782406", "0.57766914", "0.5775805", "0.57744527", "0.57744527", "0.57744527", "0.57722074", "0.5771512", "0.5770783", "0.5769345", "0.57683945", "0.57675093", "0.576178", "0.57557786", "0.5747564", "0.5746954", "0.5745489", "0.5741678", "0.57375383", "0.57335705", "0.57302207", "0.57280165", "0.5726227", "0.57238483", "0.57218784", "0.5715393", "0.57136387", "0.5713353", "0.5711261", "0.5710481", "0.571002", "0.57075536", "0.57075375", "0.57060134", "0.5704971", "0.5703576", "0.57000446", "0.5696112" ]
0.0
-1
Static instant patch function
public static function patch($xml, array $patch) { $p = XMLPatcher::create($patch); return $p->apply_patch($xml); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetPatch() {\n\n // TODO:\n \n }", "function patch(Request &$request, Response &$response);", "public function isPatch();", "public function testJobPatch()\n {\n\n }", "public static function isPatch(): bool {\r\n return static :: isMethod('patch');\r\n }", "public function isPatch(): bool {}", "static function alter() {\n }", "public function patch($key=null,$value=null){\n return $this->methodsData(\"patch\",$key,$value);\n }", "public function hook();", "public function modify();", "public function inOriginal();", "public function getPatchPrefix() : string;", "public function testApplyPatch()\n {\n $patch = new Patch();\n $op = new Resources\\MockAtomic(function(Pointer $pointer){\n $value = 'baz';\n $pointer->set('/foo', $value);\n });\n $patch->addOperation($op);\n\n $target = ['foo'=>'bar'];\n $patch->apply($target);\n $this->assertEquals($target['foo'], 'baz');\n }", "protected function hook1(): void { }", "public function testPingTreePatchItem()\n {\n }", "protected function createFakeExtension() {}", "protected function _preupdate() {\n }", "protected function fixSelf() {}", "protected function fixSelf() {}", "public function replace_3rd_party_pugins_hooks(){\n }", "public function helper()\n\t{\n\t\n\t}", "protected function getUpdateBeforeFunction()\n {\n \n }", "public static function update(){\r\n }", "function _maybe_update_core()\n {\n }", "function api_app_modify_function() {\n\n}", "public function fix() {}", "public function fix() {}", "function propPatch($path, PropPatch $propPatch);", "private function static_things()\n\t{\n\n\t\t# code...\n\t}", "function fix() ;", "public function deprecatedMethod () {}", "abstract protected function update ();", "public static function update(){\n }", "function wp_rewrite_api_request_dev()\n{\n return WordPress_Rewrite_API_Request::instance();\n}", "protected function update() {}", "public function mutate();", "public function mutate();", "public function fakeVersion();", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "protected function getDifferenceHandler() {}", "public function testQuarantinePrototypeUpdateAttributes()\n {\n\n }", "public function freeze() {}", "public function extension() {}", "function freeze() ;", "public function setPatch(string $patch)\n\t{\n\t\tparent::setPatch($patch);\n\t}", "public function testPatchVoicemailMessage()\n {\n }", "protected function _update()\n\t{\n\t}", "function before_update() {}", "function runkit_method_redefine($classname, $methodname, $args, $code, $flags = RUNKIT_ACC_PUBLIC)\n{\n}", "public function render_stub() {}", "public function testAddRouteShorthandMethodPatch()\n {\n $this->collection->patch('name', '/', 'action');\n\n $this->assertCount(1, $this->collection->all());\n\n $routes = $this->collection->all();\n\n $this->assertArrayHasKey('0', $routes);\n\n $this->assertContains('PATCH', $routes[0]->getMethods());\n }", "function modified() { $this->_modified=1; }", "function modified() { $this->_modified=1; }", "function restPatch($url, $content) {\n\t$ch = curl_init();\n\t// Uses the URL passed in that is specific to the API used\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t// When posting to a Fuel API, content-type has to be explicitly set to application/json\n\t$headers = [\"Content-Type: application/json\", \"User-Agent: \" . getSDKVersion()];\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\t// The content is the JSON payload that defines the request\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $content);\n\t//Need to set ReturnTransfer to True in order to store the result in a variable\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t//Need to set the request to be a PATCH\n\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PATCH\");\n\t// Disable VerifyPeer for SSL\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t$outputJSON = curl_exec($ch);\n\t$responseObject = new \\stdClass();\n\t$responseObject->body = $outputJSON;\n\t$responseObject->httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\treturn $responseObject;\n}", "public function __clone() {\n\t\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'cyprus' ), $this->version );\n\t\t}", "abstract public function decorate();", "public function patch()\n {\n #HTTP method in uppercase (ie: GET, POST, PATCH, DELETE)\n $sMethod = 'PATCH';\n $sTimeStamp = gmdate('c');\n\n #Creating the hash\n\t\t$oHash = new Hash($this->getSecretKey());\n\t\t$oHash->addData($this->getPublicKey());\n\t\t$oHash->addData($sMethod);\n\t\t$oHash->addData($this->getApiResource());\n\t\t$oHash->addData($this->getData());\n\t\t$oHash->addData($sTimeStamp);\n\n\t\t$sHash = $oHash->hash();\n\n $rCurlHandler = curl_init();\n curl_setopt($rCurlHandler, CURLOPT_URL, $this->getApiRoot() . $this->getApiResource());\n curl_setopt($rCurlHandler, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($rCurlHandler, CURLOPT_POSTFIELDS, $this->getData());\n curl_setopt($rCurlHandler, CURLOPT_CUSTOMREQUEST, $sMethod);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYHOST, 0);\n\n curl_setopt($rCurlHandler, CURLOPT_HTTPHEADER, [\n \"x-date: \" . $sTimeStamp,\n \"x-hash: \" . $sHash,\n \"x-public: \" . $this->getPublicKey(),\n \"Content-Type: text/json\",\n ]);\n $sOutput = curl_exec($rCurlHandler);\n $iHTTPCode = curl_getinfo($rCurlHandler, CURLINFO_HTTP_CODE);\n curl_close($rCurlHandler);\n\n Log::write('WebRequest', 'PATCH::REQUEST', $this->getApiRoot() . $this->getApiResource());\n Log::write('WebRequest', 'PATCH::DATA', $this->getData());\n Log::write('WebRequest', 'PATCH::HTTPCODE', $iHTTPCode);\n Log::write('WebRequest', 'PATCH::RESPONSE', $sOutput);\n\n $this->setData('');\n\n if ($iHTTPCode !== 204) {\n throw new InvalidApiResponse('HttpCode was ' . $iHTTPCode . '. Expected 204');\n }\n return $sOutput;\n }", "public static function _before() : void {\n\t}", "abstract protected function _regenerate();", "protected function _refine() {\n\n\t}", "public function getModified() {}", "public function testDSTIdFillPatch()\n {\n }", "public function temporality();", "#[Pure]\n public function getRequestMethod() {}", "public function __clone() {\n\t\ttrigger_error('You can\\'t tune a fish! Or clone a singleton...', E_USER_ERROR);\n\t}", "protected function setUp()\n {\n global $header;\n $header = array();\n unset($_SERVER['IF_MODIFIED_SINCE']);\n $this->object = new LastModified(function () {\n return new \\DateTime('2011-11-11 11:11:12');\n\n });\n }", "public function getPatch()\n {\n return $this->patch;\n }", "public function getPatch()\n {\n return $this->patch;\n }", "public function allow_replacing_a_non_defined_non_namespaced_function()\n {\n $f = 'func' . uniqid(rand(1, 9999));\n\n $spy = FunctionMocker::replace($f, 2324);\n\n $this->assertTrue(function_exists($f));\n $this->assertEquals(2324,$f());\n $spy->wasCalledOnce();\n }", "public function allow_replacing_internal_functions()\n {\n FunctionMocker::replace('array_reduce', 2323);\n\n $this->assertEquals(2323, array_reduce([2, 3, 4, 5], function () {\n return 23;\n }));\n }", "private function public_hooks()\n\t{\n\t}", "public static function spy()\n {\n }", "public static function spy()\n {\n }", "public static function spy()\n {\n }", "public static function spy()\n {\n }", "protected function beforeUpdating()\n {\n }", "protected static function boot()\n {\n parent::boot();\n\n self::updated(function () {\n self::reCache();\n });\n }", "protected function defineLegacyConstants() {}", "protected function defineLegacyConstants() {}", "protected function makeWrapper()\n {\n parent::makeWrapper();\n }", "protected function defineLegacyConstants() {}", "final private function __clone() {\n\t}", "public function setPatch($patch) : self\n {\n $this->initialized['patch'] = true;\n $this->patch = $patch;\n return $this;\n }", "protected function __clone()\n {\n\n }", "public function runDefaultUpdates()\n {\n }", "public function testMagicMethod()\n {\n $this->magicMethodTestClass =\n new MagicMethodTestClass();\n }", "public function testSystemMembersTypesIdPatch()\n {\n\n }", "public function testCompanyManagementBackupsIdPatch()\n {\n\n }", "public function testParallelPatchPatchSame(): void {\n $location = $this->createMetadataResource();\n $prop = 'http://foo';\n\n $txId = $this->beginTransaction();\n $headers = [\n self::$config->rest->headers->transactionId => $txId,\n 'Eppn' => 'admin',\n 'Content-Type' => 'application/n-triples',\n ];\n $req1 = new Request('patch', $location . '/metadata', $headers, \"<$location> <$prop> \\\"value1\\\" .\");\n $req2 = new Request('patch', $location . '/metadata', $headers, \"<$location> <$prop> \\\"value2\\\" .\");\n list($resp1, $resp2) = $this->runConcurrently([$req1, $req2], 50000);\n $codes = [$resp1->getStatusCode(), $resp2->getStatusCode()];\n $this->assertContains(200, $codes);\n $this->assertContains(409, $codes);\n }", "public static function dummy() {}", "public function test_updateLegacyLowstockContact() {\n\n }", "private function __clone() {\r\n\t}", "public function testUpdateTimesheet()\n {\n }", "public function __clone () {\n _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?' ), $this->_version );\n }", "public function __clone () {\n _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?' ), $this->_version );\n }", "public function preflight()\n\t{\n\t\t$this->logger->truncate();\n\t\t$this->logger->log('Maximum execution time: '.@ini_get('max_execution_time'));\n\t\t$this->logger->log('Memory limit: '.@ini_get('memory_limit'));\n\n\t\t$preflight = ee('Updater/Preflight');\n\t\t$preflight->checkPermissions();\n\t\t$preflight->cleanUpOldUpgrades();\n\t\t$preflight->checkDiskSpace();\n\t\t$preflight->stashConfig();\n\t}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}" ]
[ "0.64708567", "0.611548", "0.6110251", "0.59530455", "0.5863524", "0.5819903", "0.57037914", "0.5570252", "0.55487585", "0.54917645", "0.542843", "0.5388357", "0.53574467", "0.53566617", "0.5355179", "0.5344666", "0.52645814", "0.5242443", "0.5242443", "0.5239338", "0.5235829", "0.5235773", "0.52196985", "0.52094823", "0.5196506", "0.5193655", "0.5193277", "0.5190853", "0.51753795", "0.5175112", "0.5173321", "0.5160551", "0.5144995", "0.513946", "0.5126601", "0.5125974", "0.5125974", "0.51251286", "0.51226074", "0.51226074", "0.5106172", "0.51057017", "0.5101406", "0.51008093", "0.5080901", "0.5070902", "0.5051043", "0.50474393", "0.5030439", "0.5028305", "0.5024514", "0.5007899", "0.50062066", "0.50062066", "0.50039464", "0.49934655", "0.49853802", "0.49800077", "0.497247", "0.4966079", "0.49594858", "0.4956687", "0.49534574", "0.49507028", "0.49390537", "0.49365306", "0.49234685", "0.49219355", "0.49219355", "0.49185562", "0.4915208", "0.49078202", "0.49027058", "0.49027058", "0.49027058", "0.49027058", "0.4898042", "0.4889973", "0.4877759", "0.48767456", "0.487541", "0.4874727", "0.48705837", "0.48633832", "0.48580244", "0.48553044", "0.48504132", "0.4849342", "0.48477706", "0.48342666", "0.4832375", "0.48313543", "0.48295993", "0.48206776", "0.4819947", "0.4819947", "0.48170096", "0.48164582", "0.48164582", "0.48164582", "0.48164582" ]
0.0
-1
Replace one or more nodes from the document, with a new element.
private function replace($old_xpath, $new_xml, $insert_ns = FALSE) { $hits = $this->xpath->query($old_xpath, null, false); if ($hits && count($hits) > 0) { if ($insert_ns) { $new_xml = XMLPatcher::insert_namespaces($new_xml, $this->namespaces); } foreach ($hits as $hit) { $parent = $hit->parentNode; //error_log('new_xml is ' . $new_xml); $replace = dom_import_simplexml(simplexml_load_string($new_xml)); if ($replace !== FALSE) { $replace = $this->dom->importNode($replace, TRUE); $parent->replaceChild($replace, $hit); $this->changed = TRUE; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function replaceDomElement(\\DOMElement &$element, string $new_xml): void\n {\n // create a blank document fragment\n $fragment = $this->dom->createDocumentFragment();\n $fragment->appendXML($new_xml);\n\n // replace parent nodes child element with new fragment\n $element->parentNode->replaceChild($fragment, $element);\n }", "protected function replace(Node $node)\n {\n }", "private function _replaceElementTexts()\n {\n $collection = $this->_record;\n // If this option is set, it will loop through the $elementTexts provided,\n // find each one and manually update it (provided it exists).\n // The rest of the element texts will get added as per usual.\n foreach ($this->_elementTexts as $elementSetName => $textArray) {\n foreach ($textArray as $elementName => $elementTextSet) {\n $etRecordSet = $collection->getElementTexts($elementSetName, $elementName);\n foreach ($elementTextSet as $elementTextIndex => $textAttr) {\n // If we have an existing ElementText record, use that\n // instead of adding a new one.\n if (array_key_exists($elementTextIndex, $etRecordSet)) {\n $etRecord = $etRecordSet[$elementTextIndex];\n $etRecord->text = $textAttr['text'];\n $etRecord->html = $textAttr['html'];\n $etRecord->save();\n } else {\n // Otherwise we should just append the new text to the\n // pre-existing ones.\n $elementRecord = $collection->getElement($elementSetName, $elementName);\n $collection->addTextForElement($elementRecord, $textAttr['text'], $textAttr['html']);\n }\n }\n }\n }\n }", "private function _replaceElementTexts()\n {\n $item = $this->_record;\n // If this option is set, it will loop through the $elementTexts provided,\n // find each one and manually update it (provided it exists).\n // The rest of the element texts will get added as per usual.\n foreach ($this->_elementTexts as $elementSetName => $textArray) {\n foreach ($textArray as $elementName => $elementTextSet) {\n $etRecordSet = $item->getElementTexts($elementSetName, $elementName);\n foreach ($elementTextSet as $elementTextIndex => $textAttr) {\n // If we have an existing ElementText record, use that\n // instead of adding a new one.\n if (array_key_exists($elementTextIndex, $etRecordSet)) {\n $etRecord = $etRecordSet[$elementTextIndex];\n $etRecord->text = $textAttr['text'];\n $etRecord->html = $textAttr['html'];\n $etRecord->save();\n } else {\n // Otherwise we should just append the new text to the\n // pre-existing ones.\n $elementRecord = $item->getElement($elementSetName, $elementName);\n $item->addTextForElement($elementRecord, $textAttr['text'], $textAttr['html']);\n }\n }\n }\n }\n }", "public function replaceWith ($content) {\r\n\t\t\r\n\t\tif ($this->length === 0) return null;\r\n\t\t\r\n\t\t$content = $this->process($content);\r\n\t\t\r\n\t\tif (!isset($content)) return null;\r\n\t\t\r\n\t\tif (get_class($content) === 'XDTNodeList') {\r\n\t\t\t$clone = $content[0]->cloneNode(true);\r\n\t\t\t$content->remove();\r\n\t\t} else {\r\n\t\t\t$clone = $content->cloneNode(true);\r\n\t\t\tif (get_class($content) === 'DOMElement') $content->parentNode->removeChild($content);\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($this as $node) \r\n\t\t\t$node->parentNode->replaceChild($clone->cloneNode(true), $node);\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "function change_node_content(&$dom, &$node, $new_txt_content){\n\t\t// to accomplish changing the content\n\t\t// of a node, we delete the child\n\t\t// text node of the node passed in and\n\t\t// add a new text node with the given value\n\t\t$txt_node = $node->child_nodes();\n\t\t$txt_node = $txt_node[0];\n\t\t$node->remove_child($txt_node);\n\t\t// now create the new node\n\t\t$new_txt = $dom->create_text_node($new_txt_content);\n\t\t$node->append_child($new_txt);\n\t}", "function setInnerXML($node,$xml) {\n\t\t$doc=$node->ownerDocument;\n\t\t$f = $doc->createDocumentFragment();\n\t\t$f->appendXML($xml);\n\t\t$node->parentNode->replaceChild($f,$node);\n\t}", "function edit_elements($element, $sentence)\n {\n $element->nodeValue = '';\n foreach($sentence as $node)\n {\n /* Appends a new HTML element at the end of the old one. */\n $element->appendChild($node);\n }\n }", "public function replaceBlockDocumentElements($content){\n\t\t//regular expression indiicating what a document block looks like\n\t\t$document_block_string = \"/\\{arch:document\\}(.*?)\\{\\/arch:document\\}/s\";\n\t\t\n\t\t//array to hold blocks that need to be replaced\n\t\t$document_array = array();\n\t\t\n\t\t//fill the array\n\t\tpreg_match_all($document_block_string, $content, $document_array);\n\t\t\n\t\t//parse document block array\n\t\tforeach($document_array[0] as $block){\n\t\t\t//start block content and fill it with all of the content in the block\n\t\t\t$block_content = $block;\n\n\t\t\t//array to hold elements in the block\n\t\t\t$element_array = array();\n\t\t\t\n\t\t\t//string to match document elements against\n\t\t\t$document_elements_string = \"/{arch:[a-zA-Z0-9\\s]*\\/}/\";\n\t\t\t\n\t\t\t//fill array\n\t\t\tpreg_match_all($document_elements_string, $block, $element_array);\n\t\t\t\n\t\t\t//parse element array\n\t\t\tforeach($element_array[0] as $element){\n\t\t\t\t//strip name out of the element string\n\t\t\t\t$element_name = explode(':', $element);\n\t\t\t\t$element_name = explode('/', $element_name[1]);\n\t\t\t\t//final element name\n\t\t\t\t$element_name = $element_name[0];\n\t\t\t\t\n\t\t\t\t//inline editing variables\n\t\t\t\t$element_editing_type = \"\";\n\t\t\t\t\n\t\t\t\tif(in_array($element_name, $this->document_default_fields)){//if it is a default element\n\t\t\t\t\tif($element_name == \"title\"){//switch to inline definition to remove extra tags generated by ckeditor\n\t\t\t\t\t\t$element_editing_type = \" arch-inline_element\";\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t//document element name\n\t\t\t\t\t$element_name = 'document_'.$element_name.'_'.getCurrentLanguage();\n\t\t\t\t\t\n\t\t\t\t\t//grab tag parser\n\t\t\t\t\trequire_once(constant(\"ARCH_BACK_END_PATH\").'modules/tag_parser.php');\n\n\t\t\t\t\t//variable to hold content with rendered tags filled with content\n\t\t\t\t\t$tag_rendered_content = $this->document[$element_name];\n\t\t\t\t\t//build handler and pass it the content to be rendered\n\t\t\t\t\t$tag_rendered_content_handler = new tagParser($tag_rendered_content, true, true, false);\n\t\t\t\t\t\n\t\t\t\t\t//retrieve the rendered content\n\t\t\t\t\t$tag_rendered_content = $tag_rendered_content_handler->getContent();\n\t\t\n\t\t\t\t\tob_start();\n\t\t\t\t\t//evaluate string as php append closing and open php tags to comply with expected php eval format\n\t\t\t\t\t//http://php.net/eval\n eval(\"?>\".$tag_rendered_content.\"<?\");\n\t\t\t\t\t$evaluated_content = ob_get_clean();\n\t\t\t\t\t\n\t\t\t\t\t$element_content = $evaluated_content;\n\t\t\t\t}else{//if it is not a default element\n\t\t\t\t\t$field_id = mysql_query('SELECT additional_field_ID \n\t\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_fields\n\t\t\t\t\t\t\t\t\t\t\tWHERE additional_field_name = \"'.clean($element_name).'\"\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\t\n\t\t\t\t\tif(mysql_num_rows($field_id) > 0){//if the field exsists\n\t\t\t\t\t\t$field_id = mysql_fetch_assoc($field_id);\n\t\t\t\t\t\t$field_id = $field_id['additional_field_ID'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$field_value = mysql_query('SELECT additional_field_value_'.getCurrentLanguage().'\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_field_values\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE additional_field_value_additional_field_FK = \"'.clean($field_id).'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tAND additional_field_value_document_FK = \"'.clean($this->document['document_ID']).'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(mysql_num_rows($field_value) > 0){//if the field has value\n\t\t\t\t\t\t\t$field_value = mysql_fetch_assoc($field_value);\n\t\t\t\t\t\t\t$field_value = $field_value['additional_field_value_'.getCurrentLanguage()];\n\n\t\t\t\t\t\t\t$element_content = $field_value;\n\t\t\t\t\t\t}else{//the field has no value\n\t\t\t\t\t\t\t$element_content = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{//field dosn't exsist\n\t\t\t\t\t\t$element_content = '';\n\t\t\t\t\t}\n\t\t\t\t}//end non default element\n\n\t\t\t\tif($this->edit_mode == true){//check for editing mode\n\t\t\t\t\tif(trim($element_content) == ''){//check for empty elements in edit mode\n\t\t\t\t\t\t$element_content = $element;\n\t\t\t\t\t}\n\t\t\t\t\t$element_content = '<div class=\"arch-content_element'.$element_editing_type.'\" id=\"'.$element_name.'\" style=\"display:inline;\" contenteditable=\"true\">'.$element_content.'</div>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//grab content for element out of the database and replace it in the block\n\t\t\t\t$block_content = preg_replace(\"{\".$element.\"}\", $element_content, $block_content, 1);\n\t\t\t\t//echo $block_content;\n\t\t\t}\n\t\t\t\n\t\t\t//clean out document start and end tags\n\t\t\t$block_content = str_replace(\"{arch:document}\", \"\", $block_content);\n\t\t\t$block_content = str_replace(\"{/arch:document}\", \"\", $block_content);\n\t\t\t\n\t\t\t//preform actual replacement\n\t\t\t$content = preg_replace(\"{\".$block.\"}\", $block_content, $content, 1);\n\t\t}//end document block parsing\n\t\t\n\t\treturn $content;\n\t}", "public function replaceInlineDocumentElements($content){\n\t\t//regular expression indicating what a document inline element looks like\n\t\t$inline_document_expression = \"/\\{arch:document:(.*)\\/\\}/\";\n\t\t\n\t\t//array to hold blocks that need to be replaced\n\t\t$document_array = array();\n\t\t\n\t\t//fill the array\n\t\tpreg_match_all($inline_document_expression, $content, $document_array);\n\t\t\n\t\t//parse inline document elements array\n\t\tforeach($document_array[0] as $element){\n\t\t\t//strip name out of the block string\n\t\t\t$element_name = explode(':', $element);\n\t\t\t$element_name = explode('/', $element_name[2]);\n\t\t\t//final block name\n\t\t\t$element_name = $element_name[0];\n\t\t\t\n\t\t\t//inline editing variables\n\t\t\t$element_editing_type = \"\";\n\t\t\t\n\t\t\tif(in_array($element_name, $this->document_default_fields)){//if it is a default element\n\t\t\t\tif($element_name == \"title\"){//switch to inline definition to remove extra tags generated by ckeditor\n\t\t\t\t\t$element_editing_type = \" arch-inline_element\";\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//document element name\n\t\t\t\t$element_name = 'document_'.$element_name.'_'.getCurrentLanguage();\n\t\t\t\n\t\t\t\t//grab tag parser\n\t\t\t\trequire_once(constant(\"ARCH_BACK_END_PATH\").'modules/tag_parser.php');\n\n\t\t\t\t//variable to hold content with rendered tags filled with content\n\t\t\t\t$tag_rendered_content = $this->document[$element_name];\n\t\t\t\t//build handler and pass it the content to be rendered\n\t\t\t\t$tag_rendered_content_handler = new tagParser($tag_rendered_content, true, true, false);\n\t\t\t\t\n\t\t\t\t//retrieve the rendered content\n\t\t\t\t$tag_rendered_content = $tag_rendered_content_handler->getContent();\n\t\n\t\t\t\tob_start();\n\t\t\t\t//evaluate string as php append closing and open php tags to comply with expected php eval format\n\t\t\t\t//http://php.net/eval\n\t\t\t\teval(\"?>\".$tag_rendered_content.\"<?\");\n\t\t\t\t$evaluated_content = ob_get_contents();\n\t\t\t\tob_end_clean();\n\t\t\t\t\n\t\t\t\t$element_content = $evaluated_content;\n\t\t\t}else{//if it is not a default element\n\t\t\t\t$field_id = mysql_query('SELECT additional_field_ID \n\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_fields\n\t\t\t\t\t\t\t\t\t\tWHERE additional_field_name = \"'.clean($element_name).'\"\n\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\n\t\t\t\tif(mysql_num_rows($field_id) > 0){//if the field exsists\n\t\t\t\t\t$field_id = mysql_fetch_assoc($field_id);\n\t\t\t\t\t$field_id = $field_id['additional_field_ID'];\n\t\t\t\t\t\n\t\t\t\t\t$field_value = mysql_query('SELECT additional_field_value_'.getCurrentLanguage().'\n\t\t\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_field_values\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE additional_field_value_additional_field_FK = \"'.clean($field_id).'\"\n\t\t\t\t\t\t\t\t\t\t\t\tAND additional_field_value_document_FK = \"'.clean($this->document['document_ID']).'\"\n\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\t\n\t\t\t\t\tif(mysql_num_rows($field_value) > 0){//if the field has value\n\t\t\t\t\t\t$field_value = mysql_fetch_assoc($field_value);\n\t\t\t\t\t\t$field_value = $field_value['additional_field_value_'.getCurrentLanguage()];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$element_content = $field_value;\n\t\t\t\t\t}else{//the field has no value\n\t\t\t\t\t\t$element_content = '';\n\t\t\t\t\t}\n\t\t\t\t}else{//field dosn't exsist\n\t\t\t\t\t$element_content = '';\n\t\t\t\t}\n\t\t\t}//end non default element\n\t\t\t\n\t\t\tif($this->edit_mode == true){//check for editing mode\n\t\t\t\tif(trim($element_content) == ''){//check for empty elements in edit mode\n\t\t\t\t\t$element_content = $element;\n\t\t\t\t}\n\t\t\t\t$element_content = '<div class=\"arch-content_element'.$element_editing_type.'\" id=\"'.$element_name.'\" style=\"display:inline;\" contenteditable=\"true\">'.$element_content.'</div>';\n\t\t\t}\n\t\t\t\n\t\t\t//preform actual replacement\n\t\t\t$content = preg_replace(\"{\".$element.\"}\", $element_content, $content, 1);\n\t\t}//end inline document parsing\n\t\t\n\t\t//return parsed content\n\t\treturn $content;\n\t}", "private function _replacementNode($old_node, $value)\n {\n $new_node = $this->_xml->createElementNS(\n self::XMLNAMESPACE, $old_node->tagName\n );\n $text = $this->_xml->createTextNode($value);\n $new_node->appendChild($text);\n return $new_node;\n }", "public function applyToNode(Node $node);", "public function replaceDoc($var, \\DOMDocument $doc, $preserveAttr = true)\n {\n if (!$this->isWritable('var', $var))\n return;\n $nodes = $this->findVar($var);\n if (!$doc->documentElement) {\n return $this;\n }\n foreach ($nodes as $i => $node) {\n $newNode = $this->document->importNode($doc->documentElement, true);\n $node->parentNode->replaceChild($newNode, $node);\n if (is_string($var)) {\n $this->var[$var][$i] = $newNode;\n }\n }\n return $this;\n }", "public function replaceDocument($file);", "function setNodeHtml($node, $content) {\n\t\twhile ($node->childNodes->length) $node->removeChild($node->childNodes->item(0));\n\t\tlibxml_use_internal_errors(true);\n\t\t$nodeXml = new DOMDocument('1.0', 'UTF-8');\n\t\tif(!$nodeXml->loadHTML('<?xml encoding=\"UTF-8\"><html><body><div xml:id=\"hyphaImport\">'.preg_replace('/\\r/i', '', $content).'</div></body></html>')) return __('error-loading-html');\n\t\tlibxml_clear_errors();\n\t\tlibxml_use_internal_errors(false);\n\t\tforeach($nodeXml->getElementById('hyphaImport')->childNodes as $child) $node->appendChild($node->ownerDocument->importNode($child, true));\n\t}", "public function testUpdate()\n\t{\n\t\t$xml = '<node id=\"2\"><content><name>fips</name><sort>fips</sort><raw>fips <b>test1</b></raw></content></node>';\n\t\t$doc = new DOMDocument();\n\t\t$doc->loadXML( $xml );\n\t\t\n\t\t$result = $this->contentHandler->update( $doc );\n\t\t$this->assertTrue( $result );\n\n\t\t// update valid content with text nodes and comment nodes\n\t\t$xml =\n'<node id=\"2\">\n\t<!-- Comment -->\n\t<content>\n\t\t<name>fips</name>\n\t\t<sort>fips</sort>\n\t\t<raw>fips <b>test1</b></raw>\n\t</content>\n</node>';\n\t\t\r\n\t\t$doc = new DOMDocument();\r\n\t\t$doc->loadXML( $xml );\r\n\t\t\r\n\t\t$result = $this->contentHandler->update( $doc );\r\n\t\t$this->assertTrue( $result );\r\n\t\t\n\t\t// update valid content xml but non-existing node id\n\t\t/* TODO: need something like this:\n\t\t * try {\n // ... Code that is expected to raise an exception ...\n }\n \n catch (InvalidArgumentException $expected) {\n return;\n }\n \n $this->fail('An expected exception has not been raised.');\n\t\t$xml = '<node id=\"-1\"><content><name>fips</name><sort>fips</sort><raw>fips <b>test</b></raw></content></node>';\r\n\t\t$doc = new DOMDocument();\r\n\t\t$doc->loadXML( $xml );\r\n\t\t\r\n\t\t$result = $contentHandler->update( $doc );\r\n\t\t$this->assertTrue( $result );\r\n\n\t\t */\n\t\t\n\t\t//$contentHandler->update( '<node></noded>' );\r\n\t}", "public function replace($selector, $replacement);", "function parse_content($node){\n $result = $node->xpath('//content'); // replace this with the XPath of the node\n if (!empty($result[0])) {\n // Optional replacements to convert custom XML tags to HTML equivalent\n $find_xml = array('section_title','section_content','section', 'texteparagraphe','titreparagraphe');\n $replace_html = array('h1','p','div','p','h2');\n $html = str_replace($find_xml, $replace_html, $result[0]->asXML());\n $node->addChild('content_html', $html);\n }\n return $node;\n}", "public function insertBefore (DOMNode $newnode , $refnode = null) {}", "public function replace(string $key, $element): void;", "function transformDOM(DOMDocument $doc)\n{\n return transformWithProcessor(createInkyProcessor(), $doc);\n}", "function updateDomElement( &$appctx )\n\t\t{\n\t\t$appctx->Indent() ; echo( \"cmsnodes[$this->idx].updateDomElement() ;\\n\" ) ;\n\t\t}", "protected static function replaceContent($node)\n {\n self::setter($node, 'firstName', Faker::getName());\n self::setter($node, 'lastName', Faker::getSurname());\n self::setter($node, 'sdnType', Faker::randomElement(['Entity', 'Individual']));\n self::setter($node, 'uid', mt_rand(10000, 900000));\n self::setter($node, 'title', Faker::randomElement(['Aerospace Engineer', 'Agricultural Engineer', 'Automotive Engineer', 'Biological Engineer', 'Biomedical Engineer']));\n }", "public function appendTo(Element $parentNode): void {\n foreach ($this->_document->childNodes as $node) {\n if ($node instanceof \\DOMElement) {\n $this->addNode($parentNode, $node);\n }\n }\n }", "public function processFindReplace ()\n {\n\n if ( $this->replaceQuery ) {\n\n $this->replace ();\n\n } else {\n\n $this->find ();\n\n }\n\n }", "public function removeChild (DOMNode $oldnode ) {}", "function replace($data, &$element, $c)\r\n \t{\r\n \t\treturn $data;\r\n \t}", "public function replace( $old, $new );", "protected function setHtmlFromDomDocument()\n {\n // retain the modified html\n $this->html = trim($this->doc->saveHtml($this->doc->documentElement));\n\n // strip the html and body tags added by DomDocument\n $this->html = substr(\n $this->html,\n strlen('<html><body>'),\n -1 * strlen('</body></html>')\n );\n\n // still may be whitespace all about\n $this->html = trim($this->html) . PHP_EOL;\n }", "public function setXml($domDocumentOrXml) {}", "public function replaceVariable()\n {\n $args = func_get_args();\n $cloneDom = '';\n $domParent = '';\n\n if (is_string($args[0])) {\n // Sometimes Word splits tags. Find and replace all of them with\n // new string surrounded by template symbol value\n $documentSymbol =\n explode(self::$_templateSymbol, self::$_document);\n foreach ($documentSymbol as $documentSymbolValue) {\n if (strip_tags($documentSymbolValue) == $args[0]) {\n self::$_document = str_replace(\n $documentSymbolValue, $args[0], self::$_document\n );\n }\n }\n }\n\n // Replace VAR within DOCX.\n if ($args[2] == 'docx' && is_string($args[0]) && is_string($args[1])) {\n if (!$this->_isDOCX) {\n $this->addContentTypes('<Default Extension=\"zip\" ContentType=\"application/vnd.openxmlformats'\n . '-officedocument.wordprocessingml.document.main+xml\"> </Default>');\n $this->_isDOCX = true;\n }\n $this->addRelationship('<Relationship Id=\"rDOCXId' . $this->_idDOCX .\n '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/' .\n 'aFChunk\" Target=\"docx' . $this->_idDOCX .\n '.zip\" TargetMode=\"Internal\"></Relationship>');\n // add source and dest filepath\n self::$embedFiles[] = array(\n 'src_file' => $args[1],\n 'dest_file' => 'docx' . $this->_idDOCX . '.zip'\n );\n $args[1] = '<' . CreateElement::NAMESPACEWORD . ':altChunk r:id=\"rDOCXId' . $this->_idDOCX . '\" ' .\n 'xmlns:r=\"http://schemas.openxmlformats.org/' . 'officeDocument/2006/relationships\" ' .\n 'xmlns:w=\"http://schemas.openxmlformats.org/' . 'wordprocessingml/2006/main\" />';\n $this->_idDOCX++;\n }\n\n // Replace VAR within MHT.\n if ($args[2] == 'mht' && is_string($args[0]) && is_string($args[1])) {\n if (!$this->_isMHT) {\n $this->addContentTypes('<Default Extension=\"mht\" ContentType=\"message/rfc822\"> </Default>');\n $this->_isMHT = true;\n }\n $this->addRelationship('<Relationship Id=\"rMHTId' . $this->_idMHT .\n '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/' .\n 'relationships/aFChunk\" Target=\"mht' . $this->_idMHT .\n '.mht\" TargetMode=\"Internal\"></Relationship>');\n // add source string and dest filepath\n self::$embedFiles[] = array(\n 'src_file' => $args[1],\n 'dest_file' => 'mht' . $this->_idMHT . '.mht'\n );\n $args[1] = '<' . CreateElement::NAMESPACEWORD . ':altChunk r:id=\"rMHTId' . $this->_idMHT . '\" ' .\n 'xmlns:r=\"http://schemas.openxmlformats.org/' . 'officeDocument/2006/relationships\" ' .\n 'xmlns:w=\"http://schemas.openxmlformats.org/' . 'wordprocessingml/2006/main\" />';\n $this->_idMHT++;\n }\n\n // Replace VAR within HTML.\n if ($args[2] == 'html' && is_string($args[0]) && is_string($args[1])) {\n if (!$this->_isHTML) {\n $this->addContentTypes('<Default Extension=\"htm\" ContentType=\"application/xhtml+xml\"> </Default>');\n $this->_isHTML = true;\n }\n $this->addRelationship('<Relationship Id=\"rHTMLId' . $this->_idHTML .\n '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/' .\n 'relationships/aFChunk\" Target=\"html' . $this->_idHTML .\n '.htm\" TargetMode=\"Internal\"></Relationship>');\n // add source string and dest filepath\n self::$embedFiles[] = array(\n 'src_string' => '<html>' . $args[1] . '</html>',\n 'dest_file' => 'html' . $this->_idHTML . '.htm'\n );\n $args[1] = '<' . CreateElement::NAMESPACEWORD . ':altChunk r:id=\"rHTMLId' . $this->_idHTML . '\" ' .\n 'xmlns:r=\"http://schemas.openxmlformats.org/' . 'officeDocument/2006/relationships\" ' .\n 'xmlns:w=\"http://schemas.openxmlformats.org/' . 'wordprocessingml/2006/main\" />';\n $this->_idHTML++;\n }\n\n // Replace VAR within an image.\n if ($args[2] == 'image' && is_string($args[0]) && is_string($args[1])) {\n // transform image to MHT file to embed it\n $imageToMHT = new MhtFileMaker();\n list($imgWidth, $imgHeight, $imgType, $imgAttr) = getimagesize($args[1]);\n $imageToMHT->AddContents('file:///C:/2673C891/Doc1.htm', 'text/html; charset=\"us-ascii\"', chunk_split('<html xmlns:v=3D\"urn:schemas-microsoft-com:vml\" xmlns:o=3D\"urn:schemas-microsoft-com:office:office\" xmlns:w=3D\"urn:schemas-microsoft-com:office:word\" xmlns:m=3D\"http://schemas.microsoft.com/office/2004/12/omml\" xmlns=3D\"http://www.w3.org/TR/REC-html40\"><head></head><body lang=3DEN-US style=3D\\'tab-interval:36.0pt\\'><div class=3DSection1><p class=3DMsoNormal><span style=3D\\'mso-no-proof:yes\\'><!--[if gte vml 1]><v=:shapetype id=3D\"_x0000_t75\" coordsize=3D\"21600,21600\" o:spt=3D\"75\" o:preferrelative==3D\"t\" path=3D\"m@4@5l@4@11@9@11@9@5xe\" filled=3D\"f\" stroked=3D\"f\"> <v:stroke joinstyle=3D\"miter\"/> <v:formulas><v:f eqn=3D\"if lineDrawn pixelLineWidth 0\"/><v:f eqn=3D\"sum @0 1 0\"/><v:f eqn=3D\"sum 0 0 @1\"/><v:f eqn=3D\"prod @2 1 2\"/><v:f eqn=3D\"prod @3 21600 pixelWidth\"/><v:f eqn=3D\"prod @3 21600 pixelHeight\"/><v:f eqn=3D\"sum @0 0 1\"/><v:f eqn=3D\"prod @6 1 2\"/><v:f eqn=3D\"prod @7 21600 pixelWidth\"/><v:f eqn=3D\"sum @8 21600 0\"/><v:f eqn=3D\"prod @7 21600 pixelHeight\"/><v:f eqn=3D\"sum @10 21600 0\"/></v:formulas><v:path o:extrusionok=3D\"f\" gradientshapeok=3D\"t\" o:connecttype=3D\"rect\"/><o:lock v:ext=3D\"edit\" aspectratio=3D\"t\"/></v:shapetype><v:shape id=3D\"Picture_x0020_1\" o:spid=3D\"_x0000_i1025\" type=3D\"#_x0000_t75\" style=3D\\'width:' . $imgWidth . 'pt;height:' . $imgHeight . 'pt;visibility:visible;mso-wrap-style:square\\'><v:imagedata src=3D\"Doc1_files/image001.' . $imageToMHT->GetExtension($args[1]) . '\" o:title=3D\"\"/></v:shape><![endif]--></span></p></div></body></html>', 5000), 'quoted-printable');\n $imageToMHT->AddFile($args[1]);\n if (!$this->_isMHT) {\n $this->addContentTypes('<Default Extension=\"mht\" ContentType=\"message/rfc822\"> </Default>');\n $this->_isMHT = true;\n }\n $this->addRelationship('<Relationship Id=\"rMHTId' . $this->_idMHT .\n '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/' .\n 'relationships/aFChunk\" Target=\"mht' . $this->_idMHT .\n '.mht\" TargetMode=\"Internal\"></Relationship>');\n // add source string and dest filepath\n self::$embedFiles[] = array(\n 'src_string' => $imageToMHT->GetFile(),\n 'dest_file' => 'mht' . $this->_idMHT . '.mht'\n );\n $args[1] = '<' . CreateElement::NAMESPACEWORD . ':altChunk r:id=\"rMHTId' . $this->_idMHT . '\" ' .\n 'xmlns:r=\"http://schemas.openxmlformats.org/' . 'officeDocument/2006/relationships\" ' .\n 'xmlns:w=\"http://schemas.openxmlformats.org/' . 'wordprocessingml/2006/main\" />';\n $this->_idMHT++;\n }\n\n // Replace VAR within RTF.\n if ($args[2] == 'rtf' && is_string($args[0]) && is_string($args[1])) {\n if (!$this->_isRTF) {\n $this->addContentTypes('<Default Extension=\"rtf\" ContentType=\"application/rtf\"> </Default>');\n $this->_isRTF = true;\n }\n $this->addRelationship('<Relationship Id=\"rRTFId' . $this->_idRTF .\n '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/' .\n 'aFChunk\" Target=\"rtf' . $this->_idRTF . '.rtf\" TargetMode=\"Internal\">' .\n '</Relationship>');\n // add source and dest filepath\n self::$embedFiles[] = array(\n 'src_file' => $args[1],\n 'dest_file' => 'rtf' . $this->_idRTF . '.rtf'\n );\n $args[1] = '<' . CreateElement::NAMESPACEWORD .\n ':altChunk r:id=\"rRTFId' . $this->_idRTF . '\" ' .\n 'xmlns:r=\"http://schemas.openxmlformats.org/' .\n 'officeDocument/2006/relationships\" ' .\n 'xmlns:w=\"http://schemas.openxmlformats.org/' .\n 'wordprocessingml/2006/main\" />';\n $this->_idRTF++;\n }\n\n // Only lists and tables are supported.\n if (($args[1] == 'list' || $args[1] == 'table') && is_array($args[0])) {\n $domDocument = new DomDocument();\n $domDocument->loadXML(self::$_document);\n\n $xmlWP = $domDocument->getElementsByTagNameNS(\n 'http://schemas.openxmlformats.org/wordprocessingml/2006/main',\n 'p'\n );\n $xpath = new DOMXPath($domDocument);\n $query = 'w:r/w:t';\n $length = $xmlWP->length;\n $itemsWP = array();\n for ($i = 0; $i < $length; $i++) {\n $itemsWP[$i] = $xmlWP->item($i);\n }\n for ($i = 0; $i < $length; $i++) {\n $variables = $xpath->query($query, $itemsWP[$i]);\n foreach ($variables as $entry) {\n if (isset($args[2]['header'])) {\n foreach ($args[0] as $valuesArray) {\n foreach ($valuesArray as $keys => $values) {\n if (empty($entry->nodeValue)) {\n continue;\n }\n if (\n strpos(\n $entry->nodeValue,\n self::$_templateSymbol . $keys .\n self::$_templateSymbol\n ) !== false\n ) {\n if ($args[1] == 'list') {\n $domP = $entry->parentNode->parentNode;\n $domParent = $entry->parentNode->\n parentNode->parentNode;\n $cloneDom = $entry->\n parentNode->parentNode->cloneNode(true);\n try {\n $domP->parentNode->insertBefore(\n $cloneDom, $domP\n );\n }\n catch (Exception $e) {\n CreateDocx::$log->fatal(\n $e->getMessage()\n );\n exit();\n }\n } elseif ($args[1] == 'table') {\n $domTR = $entry->parentNode->\n parentNode->parentNode->\n parentNode;\n if (\n $entry->parentNode->\n parentNode->parentNode->\n parentNode->nodeName == 'w:tr'\n ) {\n $domParent = $entry->parentNode->\n parentNode->parentNode->\n parentNode->parentNode;\n $cloneDom = $entry->parentNode->\n parentNode->parentNode->\n parentNode->cloneNode(true);\n try {\n $domTR->parentNode->insertBefore(\n $cloneDom, $domTR\n );\n }\n catch (Exception $e) {\n CreateDocx::$log->fatal(\n $e->getMessage()\n );\n exit();\n }\n }\n }\n }\n /* Only the first key is needed to iterate over\n * DOM and clone the required nodes.\n */\n break;\n }\n }\n } else {\n if ($args[1] == 'list') {\n $domP = $entry->parentNode->parentNode;\n $domParent = $entry->parentNode->\n parentNode->parentNode;\n $cloneDom = $entry->\n parentNode->parentNode->cloneNode(true);\n try {\n $domP->parentNode->insertBefore(\n $cloneDom, $domP\n );\n }\n catch (Exception $e) {\n CreateDocx::$log->fatal(\n $e->getMessage()\n );\n exit();\n }\n } elseif ($args[1] == 'table') {\n $domTR = $entry->parentNode->\n parentNode->parentNode->\n parentNode;\n if (\n $entry->parentNode->\n parentNode->parentNode->\n parentNode->nodeName == 'w:tr'\n ) {\n $domParent = $entry->parentNode->\n parentNode->parentNode->\n parentNode->parentNode;\n $cloneDom = $entry->parentNode->\n parentNode->parentNode->\n parentNode->cloneNode(true);\n try {\n $domTR->parentNode->insertBefore(\n $cloneDom, $domTR\n );\n }\n catch (Exception $e) {\n CreateDocx::$log->fatal(\n $e->getMessage()\n );\n exit();\n }\n }\n }\n /* Only the first key is needed to iterate over\n * DOM and clone the required nodes.\n */\n break;\n }\n }\n }\n /* A last element is created due to number of values plus the first\n * used as placeholder. Just remove it.\n */\n if (is_object($domParent)) {\n $domParent->removeChild($cloneDom);\n }\n self::$_document = $domDocument->saveXML();\n }\n\n // Iterate text array.\n if (is_string($args[0]) && is_array($args[1])) {\n $domDocument = new DomDocument();\n $domDocument->loadXML(self::$_document);\n\n $xmlWP = $domDocument->getElementsByTagNameNS(\n 'http://schemas.openxmlformats.org/wordprocessingml/2006/main',\n 'p'\n );\n $xpath = new DOMXPath($domDocument);\n $query = 'w:r/w:t';\n $length = $xmlWP->length;\n $itemsWP = array();\n for ($i = 0; $i < $length; $i++) {\n $itemsWP[$i] = $xmlWP->item($i);\n }\n for ($i = 0; $i < $length; $i++) {\n $variables = $xpath->query($query, $itemsWP[$i]);\n foreach ($variables as $entry) {\n foreach ($args[1] as $values) {\n if (\n self::$_templateSymbol . $args[0] .\n self::$_templateSymbol ==\n $entry->nodeValue\n && $entry->nodeValue != '$'\n ) {\n $domP = $entry->parentNode->parentNode;\n $domParent = $entry->parentNode->\n parentNode->parentNode;\n $cloneDom = $entry->\n parentNode->parentNode->cloneNode(true);\n try {\n $domP->parentNode->insertBefore(\n $cloneDom, $domP\n );\n }\n catch (Exception $e) {\n CreateDocx::$log->fatal(\n $e->getMessage()\n );\n exit();\n }\n }\n }\n }\n }\n /* A last element is created due to number of values plus the first\n * used as placeholder. Just remove it.\n */\n if (is_object($domParent)) {\n $domParent->removeChild($cloneDom);\n }\n self::$_document = $domDocument->saveXML();\n }\n\n if (is_string($args[0])) {\n // Text string or array of texts\n if (is_string($args[1])) {\n // if text string escape chars\n if (empty($args[2])) {\n $args[1] = htmlspecialchars($args[1]);\n }\n // Single text string\n self::$_document = str_replace(\n self::$_templateSymbol . $args[0]\n . self::$_templateSymbol,\n $args[1],\n self::$_document\n );\n $i = 0;\n foreach (self::$_footer as $footer) {\n self::$_footer[$i] = str_replace(self::$_templateSymbol . $args[0] . self::$_templateSymbol,\n $args[1], $footer);\n $i++;\n }\n $i = 0;\n foreach (self::$_header as $header) {\n self::$_header[$i] = str_replace(self::$_templateSymbol . $args[0] . self::$_templateSymbol,\n $args[1], $header);\n $i++;\n }\n } elseif (is_array($args[1])) {\n // Text array\n foreach ($args[1] as $values) {\n // if text string escape chars\n if (empty($args[2])) {\n $values = htmlspecialchars($values);\n }\n self::$_document = preg_replace(\n '/\\\\' . self::$_templateSymbol . $args[0]\n . '\\\\' . self::$_templateSymbol . '/',\n $values,\n self::$_document,\n 1\n );\n $i = 0;\n foreach (self::$_footer as $footer) {\n self::$_footer[$i] = preg_replace('/\\\\' . self::$_templateSymbol . $args[0] . '\\\\' .\n self::$_templateSymbol . '/', $values, $footer, 1);\n $i++;\n }\n $i = 0;\n foreach (self::$_header as $header) {\n self::$_header[$i] = preg_replace('/\\\\' . self::$_templateSymbol . $args[0] . '\\\\' .\n self::$_templateSymbol . '/', $values, $header, 1);\n $i++;\n }\n }\n }\n } elseif (is_array($args[0])) {\n // List or table\n foreach ($args[0] as $values) {\n foreach ($values as $keys => $textValue) {\n // escape chars\n $textValue = htmlspecialchars($textValue);\n $documentSymbol =\n explode(self::$_templateSymbol, self::$_document);\n foreach ($documentSymbol as $documentSymbolValue) {\n if (strip_tags($documentSymbolValue) == $keys) {\n self::$_document = str_replace(\n $documentSymbolValue, $keys, self::$_document\n );\n }\n }\n self::$_document = preg_replace(\n '/\\\\' . self::$_templateSymbol . $keys . '\\\\' .\n self::$_templateSymbol . '/',\n $textValue,\n self::$_document,\n 1\n );\n $i = 0;\n foreach (self::$_footer as $footer) {\n self::$_footer[$i] = preg_replace('/\\\\' . self::$_templateSymbol . $keys . '\\\\' .\n self::$_templateSymbol . '/', $textValue, $footer, 1);\n $i++;\n }\n $i = 0;\n foreach (self::$_header as $header) {\n self::$_header[$i] = preg_replace('/\\\\' . self::$_templateSymbol . $keys . '\\\\' .\n self::$_templateSymbol . '/', $textValue, $header, 1);\n $i++;\n }\n }\n }\n }\n }", "public function replaceNode(Node $node, $replacement)\n {\n list($start, $length) = $this->nodeRange($node);\n\n # make sure we don't remove the semicolon\n if ($replacement instanceof Property) {\n $length -= 1;\n }\n\n $this->replace($start, $length, $replacement);\n }", "public function replaceImage()\n {\n $args = func_get_args();\n\n $domDocument = new DomDocument();\n $domDocument->loadXML(self::$_document);\n\n $domImages = $domDocument->getElementsByTagNameNS('http://schemas.openxmlformats.org/drawingml/2006/' .\n 'wordprocessingDrawing', 'docPr');\n $domImagesId = $domDocument->getElementsByTagNameNS(\n 'http://schemas.openxmlformats.org/drawingml/2006/main',\n 'blip'\n );\n\n for ($i = 0; $i < $domImages->length; $i++) {\n if ($domImages->item($i)->getAttribute('descr') ==\n self::$_templateSymbol . $args[0] . self::$_templateSymbol) {\n $ind = $domImagesId->item($i)->getAttribute('r:embed');\n self::$placeholderImages[$ind] = $args[1];\n }\n }\n }", "public function removeNodeNewContent()\n\t{\n\t\t$this->removeNode( 'new-content' );\n\t}", "function dbReplace()\n {\n $args = [\n 'id' => $this->id,\n 'parent' => $this->parent,\n 'lecture_id' => $this->lecture_id,\n 'type' => $this->type,\n 'title' => $this->title,\n 'mtitle' => $this->mtitle,\n 'text' => $this->text,\n 'position' => $this->position,\n 'redirect' => $this->redirect,\n 'lastmodified' => null,\n 'ival1' => $this->ival1\n ];\n dibi::query('REPLACE `section`', $args);\n $this->updateId();\n }", "private function add($parent_xpath, $new_xml, $insert_ns = FALSE) {\n if ($insert_ns) {\n $new_xml = XMLPatcher::insert_namespaces($new_xml, $this->namespaces);\n }\n $hits = $this->xpath->query($parent_xpath);\n foreach ($hits as $hit) {\n $new_node = dom_import_simplexml(simplexml_load_string($new_xml));\n if ($new_node !== FALSE) {\n $new_node = $this->dom->importNode($new_node, TRUE);\n $hit->appendChild($new_node);\n $this->changed = TRUE;\n }\n }\n }", "static function replaceHtmlDom($element, $html, $encoding = 'UTF-8', $preserveAttr = true)\n {\n if ($html == null) {\n return;\n }\n\n $html = self::cleanXml($html, $encoding);\n if (substr($html, 0, 5) == '<?xml') {\n $html = substr($html, strpos($html, \"\\n\", 5) + 1);\n }\n $elementDoc = $element->ownerDocument;\n\n $contentNode = self::makeContentNode($html);\n $contentNode = $contentNode->firstChild;\n $contentNode = $elementDoc->importNode($contentNode, true);\n if ($element->hasAttributes() && $preserveAttr && $contentNode->nodeType == \\XML_ELEMENT_NODE) {\n foreach ($element->attributes as $attr) {\n $contentNode->setAttribute($attr->nodeName, $attr->nodeValue);\n }\n }\n $element->parentNode->replaceChild($contentNode, $element);\n return $contentNode;\n }", "public function replaceTextNode($path, $value)\n {\n if ($node = $this->findNode($path)) {\n $this->_xml->documentElement->replaceChild(\n $this->_replacementNode($node, $value), $node\n );\n }\n }", "public function replaceContent() {\n \treturn $this->_doReplacement();\n\t}", "function apachesolr_add_node_document(&$documents, $nid, $namespace) {\r\n if ($document = apachesolr_node_to_document($nid, $namespace)) {\r\n $documents[] = $document;\r\n }\r\n}", "function replaceContent($regex, $replacement){\n\t\t$this->html_result=preg_replace($regex, $replacement, $this->html_result);\n\t}", "public function replaceElement(Element $newElement, Element $oldElement)\n {\n $this->contentManager->replaceElement($newElement, $oldElement);\n\n return $this;\n }", "public function replaceValue(&$node, $name, $value) {\n\t\t$domElement = $this->getChildNode($node, $name);\n\t\tif (!is_null($domElement)) {\n\t\t\t$node->removeChild($domElement);\n\t\t\t$this->setValue($node, $value, $name, true);\n\t\t}\n\t}", "public function replaceOther($content){\n\t\t$content = $this->replaceInlineDocumentElements($content);\n\t\t$content = $this->replaceBlockDocumentElements($content);\n\t\t\n\t\t//if the document is going to be edited add supporting scripts\n\t\tif($this->edit_mode == true){\n\t\t\t$editing_scripts .= '<script type=\"text/javascript\">';\n\n\t\t\t$editing_scripts .= 'var CKEDITOR_BROWSE_PATH = \"'.constant(\"ARCH_INSTALL_PATH\").''.constant(\"ARCH_HANDLER_MANAGE\").'/publish/media/media_browser/\";';\n\t\t\t$editing_scripts .= 'var CKEDITOR_BROWSE_UPLOAD_PATH = \"'.constant(\"ARCH_INSTALL_PATH\").''.constant(\"ARCH_HANDLER_MANAGE\").'/publish/media/media_browser_upload/\";';\n\n\t\t\t$editing_scripts .= 'var ckEditor_custom_styles = \"default\";';\n\t\t\t$editing_scripts .= '</script>';\n\t\t\t$editing_scripts .= '<script src=\"'.constant(\"ARCH_INSTALL_PATH\").'scripts/ckeditor/ckeditor.js\"></script>';\n\t\t\t\n\t\t\t$content = str_replace('</head>', $editing_scripts.'</head>', $content);\n\t\t}\n\t\t\n\t\t//return parsed content\n\t\treturn $content;\n\t}", "public function replaceWithGhostData(ArticleDocument $document, string $locale): void;", "public function replaceChild($old, Element $new): Element\n {\n if (!is_int($old) && !($old instanceof Element)) {\n throw new \\InvalidArgumentException(\n 'argument one must be an index or element'\n );\n }\n\n $index = is_int($old) ? $old : $this->getChildIndex($old);\n\n if ($index === false || !array_key_exists($index, $this->children)) {\n throw new \\OutOfBoundsException(\n 'argument one must be a valid key or child element'\n );\n }\n\n $this->beforeInsert($new);\n\n $slice = array_splice($this->children, $index, 1, [$new]);\n\n $replaced = reset($slice);\n\n $this->afterDelete($replaced);\n\n return $replaced;\n }", "function openReplace($file, $find, $replace){\r\r\n\r\r\n\r\r\n\r\r\n\techo \"modifying $file\";\r\r\n\r\r\n\t$contents = file_get_contents($file);\r\r\n\r\r\n\r\r\n\r\r\n\t// Avoid modifying the head of the file.\r\r\n\r\r\n\tif(preg_match(\"/<\\/\\bhead\\b *>/\", $contents)){\r\r\n\r\r\n\t\t//$contents = explode(\"</head>\", $contents);\r\r\n\r\r\n\t\t$contents = preg_split(\"/<\\/\\bhead\\b *>/\", $contents);\r\r\n\r\r\n\t\t$head = $contents[0];\r\r\n\r\r\n\t\t$body = $contents[1];\r\r\n\r\r\n\r\r\n\r\r\n\t\t//Clean first, so you don't get doubles\r\r\n\r\r\n\t\t$body = str_replace($replace, $find, $body); \r\r\n\r\r\n\t\t$contents = $head.\"</head>\".str_replace($find, $replace, $body);\r\r\n\r\r\n\t\techo \" <b>Head File Dectected</b>\";\r\r\n\r\r\n\t}\r\r\n\r\r\n\telse{\r\r\n\r\r\n\t\t$contents = str_replace($replace, $find, $contents);\r\r\n\r\r\n\t\t$contents = str_replace($find, $replace, $contents);\r\r\n\r\r\n\t}\r\r\n\r\r\n\tfile_put_contents($file, $contents);\r\r\n\r\r\n\techo \"<br />\";\r\r\n\r\r\n}", "function createXmlContent($DomDocument, $content, $DomNode, $object = '')\r\n {\r\n $contentDoc = new DOMDocument();\r\n $contentDoc->formatOutput = true;\r\n $contentDoc->preserveWhiteSpace = false;\r\n\r\n $DomDocument->formatOutput = true;\r\n $DomDocument->preserveWhiteSpace = false;\r\n\r\n $content = preg_replace(\"/(?s)(<img(\\\"[^\\\"]*\\\"|'[^']*'|[^'\\\">\\/])*)(>)/\", \"$1/>\", $content); // need the self closing tag to prevent mismatching tag error from loadXML\r\n $content = str_replace(\"<br>\", \"<br/>\", $content); // need the self closing tag to prevent mismatching tag error from loadXML\r\n $content = str_replace(\"<em>\", \"<emphasis>\", $content);\r\n $content = str_replace(\"<b>\", \"<strong>\", $content);\r\n $content = str_replace(\"</em>\", \"</emphasis>\", $content);\r\n $content = str_replace(\"</b>\", \"</strong>\", $content);\r\n $content = preg_replace('/<ol style=\"list-style-type:([a-zA-Z-]+);\">/', '<ol type=\"$1\">', $content);\r\n $content = preg_replace('/<ul style=\"list-style-type:([a-zA-Z-]+);\">/', '<ul bullet=\"$1\">', $content);\r\n\r\n $contentDoc->loadXML($content);\r\n $divNode = $contentDoc->documentElement;\r\n\r\n foreach ($divNode->childNodes as $child)\r\n {\r\n if ($child->nodeType == XML_ELEMENT_NODE)\r\n {\r\n if ($child->tagName == \"p\")\r\n {\r\n if (!empty($object))\r\n {\r\n // replace all anchored elements as subordinates\r\n $atags = $child->getElementsByTagName(\"a\");\r\n\r\n $alength = $atags->length;\r\n\r\n for ($i = 0; $i < $alength; $i++)\r\n {\r\n $a = $atags->item(0);\r\n $targetSub = null;\r\n if (!empty($a))\r\n {\r\n $id = $a->getAttribute(\"id\");\r\n\r\n foreach ($object->subordinates as $subordinate)\r\n {\r\n $hotInfo = explode(\"||\", $subordinate->hot);\r\n\r\n if (trim($id) == trim($hotInfo[0]))\r\n {\r\n $targetSub = $subordinate;\r\n break;\r\n }\r\n }\r\n\r\n if (!empty($targetSub))\r\n {\r\n $initsubordinateNode = $targetSub->exportData();\r\n $subordinateNode = $contentDoc->importNode($initsubordinateNode, true);\r\n if (!empty($a->parentNode))\r\n {\r\n $a->parentNode->replaceChild($subordinateNode, $a);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // replace all img tags with media\r\n $imgTags = $child->getElementsByTagName(\"img\");\r\n\r\n foreach ($imgTags as $key => $img)\r\n {\r\n if (isset($object->medias))\r\n {\r\n if (sizeof($object->medias) > 0)\r\n {\r\n foreach ($object->medias as $media)\r\n {\r\n $imgAttr = $img->getAttribute('src');\r\n $imgFileNameInfo = explode(\"/\", $imgAttr);\r\n\r\n $mediaSrcInfo = explode(\"||\", $media->img->src);\r\n\r\n $srcInfo = explode(\"/\", $mediaSrcInfo[0]);\r\n\r\n if ($imgFileNameInfo[sizeof($imgFileNameInfo) - 1] == $srcInfo[sizeof($srcInfo) - 1])\r\n {\r\n $mediaNode = $media->exportData();\r\n $mediaElement = $contentDoc->importNode($mediaNode, true);\r\n $img->parentNode->replaceChild($mediaElement, $img);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $this->exportMath($child, $contentDoc);\r\n }\r\n $newChildNode = $this->replacePTags($DomDocument, $child); \r\n $childNode = $DomDocument->importNode($newChildNode, true);\r\n }\r\n else\r\n {\r\n $ptags = $contentDoc->getElementsByTagName(\"p\");\r\n\r\n foreach ($ptags as $p)\r\n {\r\n $newpNode = $this->replacePTags($DomDocument, $p);\r\n $pNode = $contentDoc->importNode($newpNode, true);\r\n $p->parentNode->replaceChild($pNode, $p);\r\n }\r\n\r\n // li needs to be processed separately as the p tags in li are not detected by the \r\n // getElementByTagName method above (when there are more than one, it only detects first one for some reason)\r\n $litags = $child->getElementsByTagName(\"li\");\r\n\r\n $newPTag = null;\r\n foreach ($litags as $li)\r\n {\r\n $liDoc = new DOMDocument();\r\n $liDoc->formatOutput = true;\r\n $liDoc->preserveWhiteSpace = false;\r\n $newliTag = $liDoc->createElement(\"li\");\r\n\r\n foreach ($li->childNodes as $liChild)\r\n {\r\n if ($liChild->nodeType == XML_ELEMENT_NODE)\r\n {\r\n if ($liChild->tagName == \"para\")\r\n { // could have para if the above method detected it\r\n $newPTag = $liDoc->importNode($liChild, true);\r\n }\r\n else if ($liChild->tagName == \"p\")\r\n {\r\n $newpNode = $this->replacePTags($liDoc, $liChild);\r\n $newPTag = $liDoc->importNode($newpNode, true);\r\n }\r\n }\r\n // if the DOMText is not blank, then add para tag --> the content created from \r\n // the authoring tool TinyMCE editor does not have p tags as default so need to add it\r\n // when exporting\r\n else if (!preg_match(\"/\\s+/\", $liChild->wholeText))\r\n {\r\n $newPTag = $liDoc->createElement(\"para\");\r\n $newPbodyTag = $liDoc->createElement(\"para.body\");\r\n $lichildNode = $liDoc->importNode($liChild, true);\r\n $newPbodyTag->appendChild($lichildNode);\r\n $newPTag->appendChild($newPbodyTag);\r\n }\r\n // can have DOMText with whitespace so in this case, no need for the para tag\r\n else if (preg_match(\"/\\s+/\", $liChild->wholeText))\r\n {\r\n $newPTag = $liDoc->importNode($liChild, true);\r\n }\r\n\r\n if (!empty($newPTag))\r\n {\r\n $newliTag->appendChild($newPTag);\r\n }\r\n }\r\n\r\n $newLi = $contentDoc->importNode($newliTag, true);\r\n\r\n $li->parentNode->replaceChild($newLi, $li);\r\n }\r\n if (!empty($object))\r\n {\r\n $atags = $child->getElementsByTagName(\"a\");\r\n\r\n $alength = $atags->length;\r\n\r\n// foreach ($anchorArray as $a) {\r\n for ($i = 0; $i < $alength; $i++)\r\n {\r\n $a = $atags->item(0);\r\n $targetSub = null;\r\n if (!empty($a))\r\n {\r\n $id = $a->getAttribute(\"id\");\r\n\r\n foreach ($object->subordinates as $subordinate)\r\n {\r\n $hotInfo = explode(\"||\", $subordinate->hot);\r\n\r\n if (trim($id) == trim($hotInfo[0]))\r\n {\r\n $targetSub = $subordinate;\r\n break;\r\n }\r\n }\r\n\r\n if (!empty($targetSub))\r\n {\r\n $initsubordinateNode = $targetSub->exportData();\r\n $subordinateNode = $contentDoc->importNode($initsubordinateNode, true);\r\n if (!empty($a->parentNode))\r\n {\r\n $a->parentNode->replaceChild($subordinateNode, $a);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $imgTags = $child->getElementsByTagName(\"img\");\r\n\r\n foreach ($imgTags as $key => $img)\r\n {\r\n if (isset($object->medias))\r\n {\r\n if (sizeof($object->medias) > 0)\r\n {\r\n foreach ($object->medias as $media)\r\n {\r\n $imgAttr = $img->getAttribute('src');\r\n $imgFileNameInfo = explode(\"/\", $imgAttr);\r\n\r\n $srcInfo = explode(\"/\", $media->img->src);\r\n\r\n if ($imgFileNameInfo[sizeof($imgFileNameInfo) - 1] == $srcInfo[sizeof($srcInfo) - 1])\r\n {\r\n $mediaNode = $media->exportData();\r\n $mediaElement = $contentDoc->importNode($mediaNode, true);\r\n $img->parentNode->replaceChild($mediaElement, $img);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n $this->exportMath($child, $contentDoc);\r\n \r\n $childNode = $DomDocument->importNode($child, true);\r\n } \r\n $DomNode->appendChild($childNode);\r\n }\r\n else\r\n { // info captions saved from imported XML does not have any tags other than top div tags --> b/c only takes textContent\r\n $childNode = $DomDocument->importNode($child, true);\r\n $DomNode->appendChild($childNode);\r\n }\r\n }\r\n\r\n return $DomNode;\r\n }", "public function setElement($element, $content){\n \t$buffer = ob_get_contents();\n\t\tob_end_clean();\n\t\t$buffer=str_replace($element, $content, $buffer);\n\t\techo $buffer;\n\t}", "private function _import(DOMElement $element, DOMNodeList $nodes)\n\t{\n\t\tforeach ($nodes as $node)\n\t\t{\n\t\t\t$imported = $this->_doc->importNode($node, true);\n\t\t\t$element->appendChild($imported);\n\t\t}\n\t}", "protected function setElementContent($node, $value)\n\t{\n\t\tif ($node->tagName == 'input') {\n\t\t\t$node->setAttribute('value', $value);\n\t\t} else if ($node->tagName == 'img') {\n\t\t\t$node->setAttribute('src', $value);\n\t\t} else if ($node->tagName == 'a') {\n\t\t\t$node->setAttribute('href', $value);\n\t\t} else if ($node->tagName == 'meta') {\n\t\t\t$node->setAttribute('content', $value);\n\t\t} else {\n\t\t\t$node->nodeValue = htmlentities($value);\n\t\t}\n\t}", "final public function replaceChild(CtkBuildable $node, CtkBuildable $replace) {\n\t\tthrow new CakeException(sprintf('Unknown child %s', get_class($replace)));\n\t}", "public function updateTemplateByReplace($doc, $aTokens) {\n foreach ($aTokens as $tok) {\n $extraFlags = isset($tok[2]) ? $tok[2] : '';\n $pattern = \"/$tok[0]/m\" . $extraFlags;\n $doc = preg_replace($pattern , $tok[1], $doc);\n }\n return $doc;\n }", "public function transferFromDOM($node)\n {\n $this->_ccrDom = $node;\n }", "public static function replaceImages(&$docxTemplate)\n {\n $domRelsDocumentXMLRels = new DomDocument();\n $domRelsDocumentXMLRels->loadXML(self::$_relsDocumentXMLRels);\n\n $domRelationships = $domRelsDocumentXMLRels->getElementsByTagName(\n 'Relationship'\n );\n\n foreach ($domRelationships as $domRelationship) {\n $id = $domRelationship->getAttribute('Id');\n if (self::$placeholderImages[$id]) {\n $docxTemplate->addFile(\n self::$placeholderImages[$id],\n 'word/' . $domRelationship->getAttribute('Target')\n );\n }\n }\n }", "protected function fixDocument(DOMDocument $document)\n {\n $rootElement = $document->firstChild;\n\n $xp = new DOMXPath($document);\n\n $nodes = $xp->query(\"/testsuites/testsuite\");\n\n foreach ($nodes as $node) {\n $children = $xp->query(\"./testsuite\", $node);\n\n if ($children->length) {\n /** @var $child DOMElement */\n foreach ($children as $child) {\n $rootElement->appendChild($child);\n\n if ($child->hasAttribute('package')) {\n continue;\n }\n\n if ($child->hasAttribute('namespace')) {\n $child->setAttribute('package', $child->getAttribute('namespace'));\n continue;\n }\n\n $package = 'default';\n $refClass = new ReflectionClass($child->getAttribute('name'));\n\n if (preg_match('/@package\\s+(.*)\\r?\\n/m', $refClass->getDocComment(), $matches)) {\n $package = end($matches);\n } elseif (method_exists($refClass, 'getNamespaceName')) {\n $namespace = $refClass->getNamespaceName();\n\n if ($namespace !== '') {\n $package = $namespace;\n }\n }\n\n $child->setAttribute('package', trim($package));\n }\n\n $rootElement->removeChild($node);\n }\n }\n }", "function domRenameElement(DOMElement $node, $name)\n {\n $renamed = $node->ownerDocument->createElement($name);\n \n foreach ($node->attributes as $attribute) {\n $renamed->setAttribute($attribute->nodeName, $attribute->nodeValue);\n }\n \n while ($node->firstChild) {\n $renamed->appendChild($node->firstChild);\n }\n \n return $node->parentNode->replaceChild($renamed, $node);\n }", "public function replace($items);", "public function rewriteXML()\n\t{\n if( $this->isDynamic() )\n derr('unsupported');\n\n\t\tif( $this->owner->owner->version >= 60 )\n\t\t\tDH::Hosts_to_xmlDom($this->membersRoot, $this->members, 'member', false);\n\t\telse\n\t\t\tDH::Hosts_to_xmlDom($this->xmlroot, $this->members, 'member', false);\n\n\t}", "public function add_or_replace()\n {\n $this->insert_replace('table', array('foo' => 'bar'));\n\n // you can also do\n $this->replace();\n $this->insert('table', array('foo' => 'bar'));\n }", "public function populate(Entries $entries): void\n {\n $entries->append($this->parentEntries);\n\n // populate with discovered\n $names = array_filter(\n $this->resolveNamesFromDocBlocks(),\n function (string $name) use ($entries): bool {\n return ! $entries->hasName($name);\n }\n );\n foreach ($names as $name) {\n $newValue = $this->overrideValue($name) ?? $name;\n if (null !== $entries->findEntryByValue($newValue)) {\n throw ValueOverrideException::create($this->getClassName(), $newValue);\n }\n\n $newIndex = $this->overrideIndex($name) ?? $entries->nextIndex();\n if (null !== $entries->findEntryByIndex($newIndex)) {\n throw IndexOverrideException::create($this->getClassName(), strval($newIndex));\n }\n\n $entries->put($name, new Entry($newValue, $newIndex));\n }\n }", "function bub_simple_replace($src_block, $target_html) {\n return $target_html;\n}", "private function renameElement(&$node, $name, $ns=NULL, $prefix=NULL) {\r\n //create new node\r\n if ($ns) {\r\n $newNode=$node->ownerDocument->createElementNS($ns, ($prefix ? $prefix.':' : '').$name);\r\n } else {\r\n $newNode=$node->ownerDocument->createElement($name);\r\n }\r\n\r\n //copy attributes\r\n foreach($node->attributes as $attribute) {\r\n $newNode->setAttributeNode($attribute->cloneNode(true));\r\n }\r\n\r\n //copy child nodes\r\n foreach($node->childNodes as $childNode) {\r\n $newNode->appendChild($childNode->cloneNode(true));\r\n }\r\n\r\n //replace nodes\r\n $node->parentNode->replaceChild($newNode, $node);\r\n\r\n return $node=$newNode;\r\n }", "public function withReplace() {\n $this->replace = true;\n return $this;\n }", "private function pushNode(\\DOMElement $node)\r\n {\r\n $this->currentNode = $this->currentNode->appendChild($node);\r\n }", "function simplexml_merge (SimpleXMLElement &$xml1, SimpleXMLElement $xml2) {\n $dom1 = new DomDocument();\n $dom2 = new DomDocument();\n $dom1->loadXML($xml1->asXML());\n $dom2->loadXML($xml2->asXML());\n // pull all child elements of second XML\n $xpath = new domXPath($dom2);\n $xpathQuery = $xpath->query('/*/*');\n for ($i = 0; $i < $xpathQuery->length; $i++)\n {\n // and pump them into first one\n $dom1->documentElement->appendChild(\n $dom1->importNode($xpathQuery->item($i), true));\n }\n $xml1 = simplexml_import_dom($dom1);\n}", "public function modifyTextContainer($oldName, $newName, $content, $language);", "public function prependDoc($var, \\DOMDocument $doc)\n {\n if (!$this->isWritable('var', $var))\n return;\n $nodes = $this->findVar($var);\n foreach ($nodes as $el) {\n $node = $this->document->importNode($doc->documentElement, true);\n if ($el->firstChild) {\n $el->insertBefore($node, $el->firstChild);\n } else {\n $el->appendChild($node);\n }\n }\n return $this;\n }", "public function testReplace()\n {\n // test data\n $this->fixture->query('INSERT INTO <http://original/> {\n <http://s> <http://p1> \"baz\" .\n <http://s> <http://xmlns.com/foaf/0.1/name> \"label1\" .\n }');\n\n $res = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n $this->assertEquals(2, \\count($res['result']['rows']));\n\n $this->assertEquals(\n [\n 'http://original/'\n ],\n $this->getGraphs()\n );\n\n // replace graph\n $returnVal = $this->fixture->replace(false, 'http://original/', 'http://replacement/');\n\n // check triples\n $res = $this->fixture->query('SELECT * FROM <http://original/> WHERE {?s ?p ?o.}');\n $this->assertEquals(0, \\count($res['result']['rows']));\n\n // get available graphs\n $this->assertEquals(0, \\count($this->getGraphs()));\n\n $res = $this->fixture->query('SELECT * FROM <http://replacement/> WHERE {?s ?p ?o.}');\n // TODO this does not makes sense, why are there no triples?\n $this->assertEquals(0, \\count($res['result']['rows']));\n\n $res = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n // TODO this does not makes sense, why are there no triples?\n $this->assertEquals(0, \\count($res['result']['rows']));\n\n // check return value\n $this->assertEquals(\n [\n [\n 't_count' => 2,\n 'delete_time' => $returnVal[0]['delete_time'],\n 'index_update_time' => $returnVal[0]['index_update_time']\n ],\n false\n ],\n $returnVal\n );\n }", "public static function fromNodeElement(NodeElement $node_element, IPageFactory $page_factory);", "abstract public function replace($translations);", "function ilDOMXML ()\n\t{\n\t\t$num = func_num_args();\n\t\t$args = func_get_args();\n\t\t\n\t\tif (($num == 1) && is_object($args[0]))\n\t\t{\n\t\t\t$this->doc = $args[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->initNewDocument($args[0],$args[1],$args[2]);\n\t\t}\n\t}", "public function insertDoc($var, \\DOMDocument $doc)\n {\n if (!$this->isWritable('var', $var))\n return;\n $nodes = $this->findVar($var);\n foreach ($nodes as $node) {\n $this->removeChildren($node);\n if (!$doc->documentElement)\n continue;\n $newChild = $this->document->importNode($doc->documentElement, true);\n $node->appendChild($newChild);\n }\n return $this;\n }", "private function addRawElement($newElement)\n {\n $this->elements[] = $newElement;\n }", "public function settitle($title,$newtitle){\n $xpath = new DOMXpath(self::$xmldoc);\n $changes = $xpath->query(\"channel/item[g:title = '$title' ]/g:title\");\n // $this->title = $newtitle;\n // echo $changes->count();\n $DOMnode = $changes->item(0);\n // echo $DOMnode->getNodePath();\n // echo 'DOMnode<br>' . $DOMnode->nodeValue;\n // echo 'DOMnode<br>' . $DOMnode->nodeName;\n\n $DOMnode->nodeValue = $newtitle;\n echo '<br><br>' . self::$xmldoc->saveXML();\n }", "abstract protected function addNode(\\DOMNode $target, \\DOMNode $source);", "private function setNode(\n SimpleXMLElement $rootNode,\n $nodeName,\n $value = null,\n $attributes = array(),\n $cnss = array(),\n $anss = array(),\n $position = null\n ) {\n $node = $this->findNode($rootNode, $nodeName, $attributes, array_merge($cnss, $anss));\n\n if (isset($node)) {\n if ($value !== null) {\n $node[0] = $value;\n }\n\n return $node;\n }\n\n return $this->addNode($rootNode, $nodeName, $value, $attributes, $cnss, $anss, $position);\n }", "function apply($node)\r\n\t\t{\r\n\t\t\t$this->address = $node->address;\r\n\t\t\t$this->elements = $node->elements;\r\n\t\t\t$this->size = $node->size;\r\n\t\t\t$this->parent = $node->parent;\r\n\t\t\t$this->less = $node->less;\r\n\t\t\t$this->previous = $node->previous;\r\n\t\t\t$this->next = $node->next;\r\n\t\t}", "function wpai_xml_row($xml_node)\n{\n // Modify simpleXML object as needed\n return $xml_node;\n}", "public function replacePlaceholders($mixed, $params = array(), $document = null,$enableLayoutOnPlaceholderReplacement = true)\r\n {\r\n if (is_string($mixed)) {\r\n $contentString = $mixed;\r\n } elseif ($mixed instanceof Document) {\r\n $contentString = Document\\Service::render($mixed, $params, $enableLayoutOnPlaceholderReplacement);\r\n }\r\n if ($document instanceof Document === false) {\r\n $document = null;\r\n }\r\n\r\n //detects the placeholders\r\n $placeholderStack = $this->detectPlaceholders($contentString, $params, $document);\r\n\r\n //replaces the placeholders if any were found\r\n if (!empty($placeholderStack)) {\r\n $replacedString = $this->replacePlaceholdersFromStack($placeholderStack);\r\n return $replacedString;\r\n } else {\r\n return $contentString;\r\n }\r\n }", "public function testReplace()\n {\n $documentHandler = new DocumentHandler($this->connection);\n $result = $documentHandler->save($this->collection1->getName(), [ '_key' => 'test', 'value' => 'test' ]);\n static::assertEquals('test', $result);\n\n $trx = new StreamingTransaction($this->connection, [\n TransactionBase::ENTRY_COLLECTIONS => [\n TransactionBase::ENTRY_WRITE => [ $this->collection1->getName() ]\n ]\n ]);\n\n $trx = $this->transactionHandler->create($trx);\n $this->_shutdown[] = $trx;\n static::assertInstanceOf(StreamingTransaction::class, $trx);\n \n static::assertTrue(is_string($trx->getId()));\n\n $trxCollection = $trx->getCollection($this->collection1->getName());\n static::assertEquals($this->collection1->getName(), $trxCollection->getName());\n\n // document should be present inside transaction\n $doc = $documentHandler->getById($trxCollection, \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('test', $doc->value);\n\n // replace document inside transaction\n unset($doc->value);\n $doc->hihi = 'hoho';\n $result = $documentHandler->replaceById($trxCollection, 'test', $doc);\n static::assertTrue($result);\n\n // transactional lookup should find the modified document\n $doc = $documentHandler->getById($trxCollection, \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('hoho', $doc->hihi);\n static::assertObjectNotHasAttribute('value', $doc);\n \n // non-transactional lookup should still see the old document\n $doc = $documentHandler->getById($this->collection1->getName(), \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('test', $doc->value);\n static::assertObjectNotHasAttribute('hihi', $doc);\n \n // now commit\n static::assertTrue($this->transactionHandler->commit($trx->getId()));\n\n $doc = $documentHandler->getById($this->collection1->getName(), \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('hoho', $doc->hihi);\n static::assertObjectNotHasAttribute('value', $doc);\n }", "function appendXmlNode($domDocument, $parentNode, $name, $value){\n \t$childNode = $domDocument->createElement($name);\n \t$childNodeValue = $domDocument->createTextNode($value);\n \t$childNode->appendChild($childNodeValue);\n \t$parentNode->appendChild($childNode);\n}", "function SetOriginalNode($node)\r\n\t{\r\n\t\tparent::SetOriginalNode($node);\r\n\t\t\r\n\t\t//now load controls for this row element\r\n\t\tParser::ParseForControls($this, $node);\r\n\t\t\r\n\t\t\r\n\t}", "function wp_replace_in_html_tags($haystack, $replace_pairs)\n {\n }", "public static function replaceChart()\n {\n $args = func_get_args();\n $documentSymbol = explode(self::$_templateSymbol, self::$_document);\n foreach ($documentSymbol as $documentSymbolValue) {\n if (strip_tags($documentSymbolValue) == $args[0]) {\n self::$_document = str_replace($documentSymbolValue, strip_tags($documentSymbolValue), self::$_document);\n }\n }\n\n $domDocument = new DomDocument();\n $domDocument->loadXML(self::$_document);\n\n $xmlWP = $domDocument->getElementsByTagNameNS(\n 'http://schemas.openxmlformats.org/wordprocessingml/2006/main',\n 'p'\n );\n $xpath = new DOMXPath($domDocument);\n $query = 'w:r/w:t';\n for ($i = 0; $i < $xmlWP->length; $i++) {\n $xmlGraphics = $xpath->query($query, $xmlWP->item($i));\n foreach ($xmlGraphics as $entry) {\n if (\n self::$_templateSymbol . $args[0] .\n self::$_templateSymbol ==\n $entry->nodeValue\n ) {\n $domChart = $entry->parentNode->parentNode;\n $xmlR = $domChart->getElementsByTagNameNS(\n 'http://schemas.openxmlformats.org/wordprocessingml/' .\n '2006/main',\n 'r'\n )->item(0);\n\n $domChart->removeChild($xmlR);\n $domVarChart = $domDocument->createElement(\n 'varchart_' . CreateDocx::$intIdWord\n );\n $domChart->appendChild($domVarChart);\n }\n }\n }\n self::$_document = $domDocument->saveXML();\n self::$totalTemplateCharts++;\n }", "public function replace($identifier, $value)\n {\n if (!$this->isRegistered($identifier)) {\n throw new RegistryException(\n $this->drupalCommonConnector->t(RegistryException::MODIFICATION_ATTEMPT_FAILED_TEXT),\n RegistryException::MODIFICATION_ATTEMPT_FAILED_CODE\n );\n }\n\n $this->adaptor->updateDocument($identifier, array('doc' => $value), $this->section);\n }", "private function replacePostContent()\n\t\t{\n\t\t\t//use wpdb\n\t\t\tglobal $wpdb;\n\t\t\t\n\t\t\t//Préparation de la requête\n\t\t\t$postContentSql = $wpdb->prepare(\n\t\t\t\t\"\n\t\t\t\tUPDATE $wpdb->posts \n\t\t\t\tSET post_content = replace(\n\t\t\t\t\tpost_content, \n\t\t\t\t\t%s, \n\t\t\t\t\t%s\n\t\t\t\t) \n\t\t\t\t\",\n\t\t\t\t$this->settings['oldurl_value'],\n\t\t\t\t$this->settings['newurl_value']\n\t\t\t);\n\n\t\t\t//Requête\n\t\t\t$postContentRequete = $wpdb->query($postContentSql,OBJECT);\n\n\t\t\t//Erreur\n\t\t\tif($postContentRequete === false){\n\t\t\t\tdo_action('DFWPNotice',__('Posts content replace error',$this->settings['textdomain']),true);\n\t\t\t}\n\n\t\t\t//Tout est bon\n\t\t\telse{\n\t\t\t\tdo_action('DFWPNotice',sprintf(__('%d replacements in posts content',$this->settings['textdomain']),$postContentRequete),false);\n\t\t\t}\n\t\t}", "private function ensureExistenceOfBodyElement(\\DOMDocument $document)\n {\n if ($document->getElementsByTagName('body')->item(0) !== null) {\n return;\n }\n\n $htmlElement = $document->getElementsByTagName('html')->item(0);\n $htmlElement->appendChild($document->createElement('body'));\n }", "function apachesolr_add_tags_to_document(&$document, $text) {\r\n $tags_to_index = variable_get('apachesolr_tags_to_index', array(\r\n 'h1' => 'tags_h1',\r\n 'h2' => 'tags_h2_h3',\r\n 'h3' => 'tags_h2_h3',\r\n 'h4' => 'tags_h4_h5_h6',\r\n 'h5' => 'tags_h4_h5_h6',\r\n 'h6' => 'tags_h4_h5_h6',\r\n 'u' => 'tags_inline',\r\n 'b' => 'tags_inline',\r\n 'i' => 'tags_inline',\r\n 'strong' => 'tags_inline',\r\n 'em' => 'tags_inline',\r\n 'a' => 'tags_a'\r\n ));\r\n\r\n // Strip off all ignored tags.\r\n $text = strip_tags($text, '<'. implode('><', array_keys($tags_to_index)) .'>');\r\n\r\n preg_match_all('@<('. implode('|', array_keys($tags_to_index)) .')[^>]*>(.*)</\\1>@Ui', $text, $matches);\r\n foreach ($matches[1] as $key => $tag) {\r\n $tag = strtolower($tag);\r\n // We don't want to index links auto-generated by the url filter.\r\n if ($tag != 'a' || !preg_match('@(?:http://|https://|ftp://|mailto:|smb://|afp://|file://|gopher://|news://|ssl://|sslv2://|sslv3://|tls://|tcp://|udp://|www\\.)[a-zA-Z0-9]+@', $matches[2][$key])) {\r\n $document->{$tags_to_index[$tag]} .= ' '. $matches[2][$key];\r\n }\r\n }\r\n}", "public function run($new =Null){\r\n\t\t\tif(!is_null($new)){\r\n\t\t\t\tif(is_a($new,jqmel)){\r\n\t\t\t\t\t$new = $new->get()[0];\r\n\t\t\t\t\tif(!$new)return;\r\n\t\t\t\t}else if(is_a($new,jqmdoc)){\r\n\t\t\t\t$new = $html->__toString();\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t$d = $this->__toDomElement();\r\n\t\t\t\t$d->nodeValue = '';\r\n\t\t\t\tif(is_string($new)){\r\n\t\t\t\t$in = $d->ownerDocument->createDocumentFragMent();\r\n\t\t\t\t$in->appendxml($new);\r\n\t\t\t\t}else if(is_a($new,'DOMNode')){\r\n\t\t\t\t$in = $d->ownerDocument->importNode($new,true);\r\n\t\t\t\t}\r\n\t\t\t\t$d->appendChild($in);\r\n\t\t\t\t$this->node->exportNode($d,null,true);\r\n\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t$dom = ($this->node->__toDomElement());\r\n\t\t\t\t$inner = '';\r\n\t\t\t\tfor($i=0;$dom->childNodes->length > $i;$i++){\r\n\t\t\t\t\tif($this->node->isxml()){\r\n\t\t\t\t\t\t$inner .=$dom->childNodes[$i]->ownerDocument->saveXml($dom->childNodes[$i]);\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$inner .=$dom->childNodes[$i]->ownerDocument->saveHtml($dom->childNodes[$i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$this->node->_innerHtml = $inner;\r\n\t\t\t\tunset($inner);\r\n\t\t\t\treturn $inner;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public function completeNode() {\n $this->current = $this->current->parent();\n }", "public function setChildren(NodeList $children) {\n\t\t$this->children = $children;\n\t}", "function addNode( $nodeValue, $nodeName)\n\t{\n\t\t$GLOBALS['xml_api']->AttachToXml( $nodeValue, $nodeName);\n\t}", "public function setChildNodes(array $childNodes) : ElementInterface\n {\n return new NormalElement($this->localName, $this->attributes, $childNodes);\n }", "function replaceInnerText($haystack, $startNeedle, $endNeedle, $needle, $newneedle, $loopthru=0)\n{\n\t$pstr=$haystack;\n\t$pos=getInnerStrpos($haystack,$startNeedle, $endNeedle);\n\tif(is_numeric($pos[0]) && is_numeric($pos[1])){\n\t\tif($loopthru){\n\t\t\t$tstr=$haystack;\n\t\t\t$pstr=\"\";\n\t\t\twhile(is_numeric($pos[0]) && is_numeric($pos[1]))\n\t\t\t{\n\t\t\t\t$istr=substr($tstr,$pos[0],$pos[1]);\n\t\t\t\t\n\t\t\t\t//echo \"<pre>$istr</pre>\";\n\t\t\t\t\n\t\t\t\t$istr=ereg_replace($needle,$newneedle,$istr);\n\t\t\t\t\n\t\t\t\t$pstr.=substr($tstr,0,$pos[0]).$istr;\n\t\t\t\t$tstr=substr($tstr,$pos[0]+$pos[1],strlen($tstr));\n\t\n\t\t\t\t$pos=getInnerStrpos($tstr, $startNeedle, $endNeedle);\n\t\t\t}\n\t\t\t\n\t\t\t$pstr.=substr($tstr,0,strlen($tstr));\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\t$pstr=substr($haystack,$pos[0],$pos[1]);\n\t\t\t$pstr=ereg_replace($needle,$newneedle,$pstr);\n\t\t\t$pstr=substr($haystack,0,$pos[0]).$pstr.substr($haystack,$pos[1]+$pos[0],strlen($haystack));\t\t\n\t\t}\n\t}\n\treturn $pstr;\n}", "public function replace(array $data);", "public function replaceChildren($parent, $startChildIndex, $stopChildIndex, $t);", "public function setValue($search, $replace, $limit = -1)\n {\n $pattern = '|\\$\\{([^\\}]+)\\}|U';\n preg_match_all($pattern, $this->_documentXML, $matches);\n foreach ($matches[0] as $value) {\n $valueCleaned = preg_replace('/<[^>]+>/', '', $value);\n $valueCleaned = preg_replace('/<\\/[^>]+>/', '', $valueCleaned);\n $this->_documentXML = str_replace($value, $valueCleaned, $this->_documentXML);\n }\n\n if (substr($search, 0, 2) !== '${' && substr($search, -1) !== '}') {\n $search = '${' . $search . '}';\n }\n\n if (!is_array($replace)) {\n if (!PHPWord_Shared_String::IsUTF8($replace)) {\n $replace = utf8_encode($replace);\n }\n $replace = htmlspecialchars($replace);\n } else {\n foreach ($replace as $key => $value) {\n $replace[$key] = htmlspecialchars($value);\n }\n }\n\n $regExpDelim = '/';\n $escapedSearch = preg_quote($search, $regExpDelim);\n $this->_documentXML = preg_replace(\"{$regExpDelim}{$escapedSearch}{$regExpDelim}u\", $replace, $this->_documentXML, $limit);\n }", "public function appendChild($item, ?\\SetaPDF_Core_Document $document = null, $mode = null) {}", "public function addOrReplaceOne($id,$document) {}" ]
[ "0.6479389", "0.61649334", "0.60330516", "0.5986537", "0.59789294", "0.5768618", "0.5758014", "0.57560825", "0.5727133", "0.5595905", "0.55881244", "0.5581427", "0.5540645", "0.5527353", "0.5436673", "0.53428674", "0.5264431", "0.5257504", "0.52039105", "0.51962835", "0.5105181", "0.50828856", "0.5082282", "0.5043467", "0.50248384", "0.50190437", "0.4987988", "0.49814245", "0.4976766", "0.49704373", "0.49602553", "0.49470663", "0.4928774", "0.4910545", "0.4901381", "0.48949695", "0.48896214", "0.48854202", "0.48674226", "0.48634845", "0.48554477", "0.48378506", "0.48336494", "0.4825717", "0.48071504", "0.47973666", "0.4786515", "0.47861496", "0.47171614", "0.47154325", "0.47062442", "0.46840867", "0.468356", "0.4678793", "0.46723953", "0.46587577", "0.4638512", "0.4637064", "0.46298683", "0.46214703", "0.46133524", "0.4612274", "0.45953822", "0.45933965", "0.45860478", "0.45782053", "0.45762524", "0.45629492", "0.45532194", "0.45416814", "0.45321566", "0.45296577", "0.45221105", "0.45109618", "0.45070517", "0.4505539", "0.4483473", "0.44830683", "0.44830188", "0.44808525", "0.44786555", "0.44687358", "0.44583365", "0.44484597", "0.4434859", "0.44214272", "0.4408311", "0.44048953", "0.43998975", "0.43961576", "0.4395686", "0.43907362", "0.4386342", "0.4385424", "0.438208", "0.43811452", "0.4374126", "0.43637693", "0.4361701", "0.43615603" ]
0.59050566
5
Remove one or more nodes from the document.
private function remove($old_xpath) { $hits = $this->xpath->query($old_xpath); $dom_to_remove = array(); foreach ($hits as $hit) { $dom_to_remove[] = $hit; } foreach ($dom_to_remove as $hit) { $hit->parentNode->removeChild($hit); $this->changed = TRUE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove () {\r\n\t\t\r\n\t\tforeach ($this as $node) \r\n\t\t $node->parentNode->removeChild($node);\r\n\t}", "public function removeChildNodes() {}", "public static function removeNode()\n {\n }", "public function clear(): void\n {\n unset($this->root);\n unset($this->nodes);\n\n $this->root = null;\n $this->nodes = [];\n }", "public function removeNodeUpdates()\n\t{\n\t\t$this->removeNode( 'updates' );\n\t}", "function deleteChildren($node)\n{\n while (isset($node->firstChild)) {\n deleteChildren($node->firstChild);\n $node->removeChild($node->firstChild);\n }\n}", "public function removeAllTags() {}", "public function removeNodeSearch()\n\t{\n\t\t$this->removeNode( 'search' );\n\t}", "function remove_children(&$node) {\n\twhile ($node->firstChild) {\n\t\twhile ($node->firstChild->firstChild) {\n\t\t\tremove_children($node->firstChild);\n\t\t}\n\t\t$node->removeChild($node->firstChild);\n\t}\n}", "public function removeChild (DOMNode $oldnode ) {}", "public function deleteXMLElement(){\r\n \r\n if(isset($this->xmlselect)){\r\n \r\n foreach ($this->xmlselect as $node) { \r\n $node->parentNode->removeChild($node);\r\n }\r\n \r\n $this->save();\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "public function removeNodeMenus()\n\t{\n\t\t$this->removeNode( 'menus' );\n\t}", "public function removeNodeComments()\n\t{\n\t\t$this->removeNode( 'comments' );\n\t}", "public function prune()\n {\n if (!$this->isEmpty()) {\n $this->root->prune();\n $this->root = null;\n }\n }", "public function deleteAllElements()\n\t\t{\n\t\t\t//Borramos todos los elementos para despues insertarlos\n\t\t\t$deleteAllElements = 'TRUNCATE TABLE `BreakingNews';\n\n\t\t\t$result = $this->connection->query($deleteAllElements);\n\t\t}", "public function removeAll()\n {\n if ($this->nodes !== null) {\n foreach ($this->nodes as $node) {\n $node->parent = null;\n }\n }\n $this->nodes = [];\n\n return $this;\n }", "public function deleteAllBlocks()\n {\n // Sometimes Word splits tags. Find and replace all of them with\n // new string surrounded by template symbol value\n $documentSymbol = explode(self::$_templateSymbol, self::$_document);\n foreach ($documentSymbol as $documentSymbolValue) {\n if (strpos(strip_tags($documentSymbolValue), 'BLOCK_') !== false) {\n self::$_document = str_replace($documentSymbolValue, strip_tags($documentSymbolValue), self::$_document);\n }\n }\n $domDocument = new DomDocument();\n $domDocument->loadXML(self::$_document);\n\n $xmlWP = $domDocument->getElementsByTagNameNS('http://schemas.openxmlformats.org/wordprocessingml/2006/main',\n 'p');\n $xpath = new DOMXPath($domDocument);\n $length = $xmlWP->length;\n $itemsWP = array();\n for ($i = 0; $i < $length; $i++) {\n $itemsWP[$i] = $xmlWP->item($i);\n }\n $query = 'w:r/w:t';\n for ($i = 0; $i < $length; $i++) {\n $variables = $xpath->query($query, $itemsWP[$i]);\n foreach ($variables as $entry) {\n $deleteCurrent = false;\n if (\n strpos($entry->nodeValue,\n self::$_templateSymbol . 'BLOCK_'\n ) !== false\n ) {\n //when we find a placeholder, we delete it\n $deleteCurrent = true;\n break;\n }\n }\n if ($deleteCurrent) {\n $padre = $itemsWP[$i]->parentNode;\n $padre->removeChild($itemsWP[$i]);\n self::$_document = $domDocument->saveXML();\n }\n }\n }", "public function clear() {\n\t\t\n\t\t$queryString = \"\n\t\t\tMATCH (n)-[r]-()\n\t\t\tDELETE n, r\n\t\t\";\n\t\t\n\t\t$result = $this->query($queryString);\n\t\t\n\t\t$queryString = \"\n\t\t\tMATCH (n)\n\t\t\tDELETE n\n\t\t\";\n\t\t\n\t\t$result = $this->query($queryString);\n\t}", "public function removeNodes($content)\r\n\t{\r\n\t\treturn preg_replace($this->_patterns['node'], '', $content);\r\n\t}", "function cleanup()\n {\n if (is_object( $this->roottag )) {\n $this->roottag->clear_subtags();\n }\n }", "public function removeNodeNewContent()\n\t{\n\t\t$this->removeNode( 'new-content' );\n\t}", "public function removeAll();", "public function removeAll();", "public function __destruct() {\n unset($this->domDocument); \n }", "public function clear () {\n\t\t$this->root = null;\n\t}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll(): void;", "protected function removeChildren($node)\n {\n while ($node->hasChildNodes()) {\n $node->removeChild($node->childNodes->item(0));\n }\n }", "public function removeAll()\n {\n foreach ($this->findAll() as $object) {\n $this->remove($object);\n }\n }", "function deleteNode(DOMElement $node)\n{\n deleteChildren($node);\n /**\n * @var DOMElement $parent\n */\n $parent = $node->parentNode;\n $parent->removeChild($node);\n}", "final public function removePages(): void\n {\n $this->pages = [];\n $this->index = [];\n }", "public function remove($document)\n {\n $visited = array();\n $this->doRemove($document, $visited);\n }", "function removeAll() ;", "function removeAll() ;", "public function clearRecord($rid){\n $oldRecord = $this->domDocument->getElementById($rid); //get Root\n $this->domDocument->documentElement->removeChild($oldRecord); // remove root\n // save back to disk \n $this->domDocument->save($this->xmlPath);\n }", "public function deleteNode()\n {\n \n $arra_sub_tree=$this->getSubTree($this->int_my_position);\n \n $this->setPositionToParent();\n \n foreach($arra_sub_tree as $node)\n { \n $index=$this->getIndexById($node['my_id']);\n $this->arra_node_to_delete[]=$node['my_id'];\n unset($this->arra_tree[$index]);\n }\n\n }", "function cerrar_documento()\n\t{\n\t $this->xml->endDocument();\n\t $this->xml->flush();\n\t}", "protected function deleteChildren() {}", "public function removeNode($name)\n {\n unset($this->nodes[$name]);\n }", "public static function removeNodes(array $nodes = [])\n {\n if (count($nodes)) {\n add_filter('admin_bar_menu', function ($toolbar) use ($nodes) {\n foreach ($nodes as $node) {\n $toolbar->remove_node($node);\n }\n\n return $toolbar;\n }, 100);\n }\n }", "function cleanup()\n {\n $db = eZDB::instance();\n $db->begin();\n $db->query( \"DELETE FROM ezsphinx\" );\n $db->query( \"DELETE FROM ezsphinx_pathnodes\" );\n $db->commit();\n }", "abstract public function removeAll();", "public function removeAll($rewriteXml = true)\n\t{\n\n\t\tif( $this->isDynamic )\n\t\t\tderr('cannot be called on Dynamic Address Group');\n\n\t\tforeach( $this->members as $a)\n\t\t{\n\t\t\t$a->removeReference($this);\n\t\t}\n\t\t$this->members = Array();\n\n\n\t\tif( $rewriteXml )\n\t\t{\n\t\t\t$this->rewriteXML();\n\t\t}\n\n\t}", "public function removeVisitor(NodeVisitor $visitor);", "public function clear()\n {\n if (null !== $this->getDraft()) {\n $this->getDraft()->clear();\n } else {\n $this->_subcontent->clear();\n $this->subcontentmap = array();\n $this->_data = array();\n $this->index = 0;\n }\n }", "public function rm($filename)\n {\n $nodes = $this->idx_tree->nodes();\n unset($nodes[$filename]);\n $this->idx_tree->nodes($nodes);\n }", "public function _unset() {\r\n\t\t$index = 0;\r\n\t\t$children = $this->_parent()->_children();\r\n\t\tforeach ($children as $child) {\r\n\t\t\tif ($child->identifier() == $this->identifier()) {\r\n\t\t\t\t$this->_parent()->_removeChildAtIndex($index);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$index++;\r\n\t\t}\r\n\t\t\r\n\t\treturn $index;\r\n\t}", "public function popNode();", "public function clearXmlPlugins()\n {\n $this->collXmlPlugins = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clearRIssuesXmlplugins()\n {\n $this->collRIssuesXmlplugins = null; // important to set this to NULL since that means it is uninitialized\n }", "function clear_subtags()\n {\n $numtags = sizeof($this->tags);\n $keys = array_keys( $this->tags );\n foreach( $keys as $k ) {\n $this->tags[$k]->clear_subtags();\n unset($this->tags[$k]->parent);\n }\n\n # Clear the tags array\n $this->tags = array();\n unset( $this->curtag );\n }", "function trim ($a_node)\n\t{\n\t\tif ($a_node->has_child_nodes()) {\n\t\t\t$childs = $a_node->child_nodes();\n\n\t\t\tforeach ($childs as $child) {\n\t\t\t\t$content = trim($child->get_content());\n\n\t\t\t\tif (empty($content)) {\n\t\t\t\t\t$child->unlink_node();\n\t\t\t\t} else {\n\t\t\t\t\t$this->trim($child);\n\t\t\t\t} \n\t\t\t} \n\t\t} \n\t}", "public function removeChildren($from, $to = null, $forceDelete = false);", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function detach()\r\n {\r\n $this->_parentNode->removeChild($this);\r\n }", "public function clear(): void {\n\t\t$this->m_elements = [];\n\t}", "public function removeNodeThemes()\n\t{\n\t\t$this->removeNode( 'themes' );\n\t}", "public function removeLastChild();", "protected function resetElementsToBeDeleted() {}", "function undo()\n {\n $this->document->eraseLast();\n }", "public function removeNodeWordpress()\n\t{\n\t\t$this->removeNode( 'wp-logo' );\n\t}", "function deleteArticleTree() {\n\t\tparent::rmtree($this->filesDir);\n\t}", "function filecabinet_document_delete($node) {\n $files = db_query(\"SELECT DISTINCT afid FROM {org_documents} WHERE nid = %d\", $node->nid);\n // Then delete the document node\n db_query(\"DELETE FROM {org_documents} WHERE nid = %d\", $node->nid);\n // delete and doclinks that exist\n db_query(\"DELETE FROM {org_doclinks} WHERE dnid = %d\", $node->nid);\n // Now delete the files if they are not used\n module_load_include('inc', 'filecabinet', 'filecabinet_file');\n while ($file = db_fetch_object($files)) {\n filecabinet_delete_file($file->afid);\n }\n}", "public function emptyNode() {\r\n\t\t\r\n\t\tforeach ($this as $node) $node->nodeValue = '';\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "private function popNode()\r\n {\r\n $this->currentNode = $this->currentNode->parentNode;\r\n }", "public function unloadDocument() {\n\t\tphpQuery::unloadDocuments($this->getDocumentID());\n\t}", "public function unloadDocument() {\n\t\tphpQuery::unloadDocuments($this->getDocumentID());\n\t}", "public function clearCMDTDocs()\n {\n $this->collCMDTDocs = null; // important to set this to NULL since that means it is uninitialized\n }", "public function remove()\n \t{\n \t\tforeach( $this->pages as $page ) {\n\n \t\t\t$page->update( ['menu_id' => null] );\n\n \t\t}\n\n \t\treturn $this->delete();\n \t}", "public function detach($document);", "private function _prune()\n {\n if (empty($this->_files) && empty($this->_subdirectories)) {\n $this->_element->delete();\n if ($this->_parent instanceOf Horde_Pear_Package_Xml_Directory) {\n $this->_parent->_deleteSubdirectory($this->_element->getName());\n }\n }\n }", "public function deleteNode(){\n\t\tparent::deleteNode();\n\n\t\t//Delete Langs\n\t\t$relMetaLang = new XlyreRelMetaLangs();\n\t\t$results = $relMetaLang->find(\"IdRel\", \"IdNode=%s\", array($this->nodeID), MONO);\n\t\tif ($results) {\n\t\t\tforeach ($results as $idRel) {\n\t\t\t\t$objectToDelete = new XlyreRelMetaLangs($idRel);\n\t\t\t\t$objectToDelete->delete();\n\t\t\t}\n\t\t}\n\n\t\t//Delete Tags\n\t\t$relMetaLang = new XlyreRelMetaTags();\n\t\t$results = $relMetaLang->find(\"IdRel\", \"IdNode=%s\", array($this->nodeID), MONO);\n\t\tif ($results) {\n\t\t\tforeach ($results as $idRel) {\n\t\t\t\t$objectToDelete = new XlyreRelMetaTags($idRel);\n\t\t\t\t$objectToDelete->delete();\n\t\t\t}\n\t\t}\n\n\t\t//Delete dataset\n\t\t$dataset = new XlyreDataset($this->nodeID);\n\t\treturn $dataset->delete();\n\t}", "public function clear() {\n $this->_documentBoost = FALSE;\n\n $this->_fields = array();\n $this->_fieldBoosts = array();\n }", "public function clearChildren(): void\n {\n if ($this->children instanceof Collection) {\n $this->children = new Collection;\n return;\n }\n\n $this->children = [];\n }", "public function removeDocuments(array $documents = array())\n {\n # DELETE /accounts/{accountId}/envelopes/{envelopeId}/documents\n }", "function deleteDocument() {\n \tglobal $synAbsolutePath;\n global ${$this->name}, ${$this->name.\"_name\"}, ${$this->name.\"_old\"}; // ${$this->name} = ${\"surname\"} = $surname\n include_once(\"../../includes/php/utility.php\");\n $ext=$this->translate($this->getValue());\n $mat=$this->translatePath($this->mat);\n $filename=$this->createFilename(false);\n $documentRoot=$synAbsolutePath.\"/\";\n $fileToBeRemoved=$documentRoot.$mat.$filename.\"*\";\n foreach (glob($fileToBeRemoved) as $filename)\n unlink($filename);\n }", "function destroy() {\n xml_parser_free($this->xml_parser);\n }", "protected function clearNoneHumanTags()\n {\n $filter = $this->DOM->filter('script');\n\n $filter->each(function (Crawler $crawler) {\n foreach ($crawler as $node) {\n $node->parentNode->removeChild($node);\n }\n });\n }", "protected function clear()\n {\n $this->innerHtml = null;\n $this->outerHtml = null;\n $this->text = null;\n }", "private function removeChildren()\n {\n /** @var Node $node */\n foreach ($this->getNode()->getChildren() as $node) {\n $handler = $this->createSelf();\n $handler->setNode($node);\n $handler->removeWithChildrenAndAssociations();\n }\n\n return $this;\n }", "public function clear() \r\n {\r\n unset($this->elements);\r\n $this->elements = array();\r\n }", "public function removeAllComments() {}", "function removeElementsByTagName($tag, $dom)\n {\n $list = $this->dom->getElementsByTagName($tag);\n while ($node = $list->item(0)) {\n $node->parentNode->removeChild($node);\n }\n }", "public function removeNodeArchive()\n\t{\n\t\t$this->removeNode( 'archive' );\n\t}", "private function removeIrrelevantChildren(\\DOMNode $node)\n {\n if ($node->hasChildNodes()) {\n foreach ($node->childNodes as $child) {\n if (is_a($child, \\DOMText::class) && strlen(trim($child->wholeText)) === 0) {\n $node->removeChild($child);\n $this->removeIrrelevantChildren($node);\n }\n }\n }\n }", "public function deleteElement(OpenDocument_Element $element)\n {\n $this->cursor->removeChild($element->getNode());\n unset($element);\n }", "public function clear_current_docs()\n\t{\n\t\t$this->_EE->db->empty_table('exp_dd_doc_sections');\n\t}", "public function removeNode( $node )\n\t{\n\t\t$this->nodes_to_remove[] = $node;\n\t}", "protected function clearEmptyXMLData()\n {\n $emptyFields = array();\n foreach ($this->xml as $field => $value) {\n if ($value == '') {\n $emptyFields[] = $field;\n }\n }\n\n foreach ($emptyFields as $field) {\n unset($this->xml->{$field});\n }\n }", "public function clear() {\n $this->elements = array();\n }", "public function removeElements() {\n\t\t$this->elements = array();\n\t\treturn $this;\n\t}", "public function __destruct() {\n //echo 'alert(\"destruct\")'; echo '</script>';\n unset($this->domDocument);\n }" ]
[ "0.7337993", "0.7081535", "0.6392106", "0.62779856", "0.6179613", "0.61547625", "0.59911853", "0.5943876", "0.5903179", "0.5902701", "0.58569896", "0.5840626", "0.57483983", "0.5729424", "0.57074845", "0.57011503", "0.56562954", "0.5648564", "0.56301224", "0.5584295", "0.55511576", "0.553256", "0.553256", "0.55066305", "0.55033356", "0.5496177", "0.5496177", "0.5496177", "0.5496177", "0.549579", "0.549579", "0.5475953", "0.5470289", "0.5455114", "0.54473126", "0.5425573", "0.54254043", "0.5412289", "0.5412289", "0.5384029", "0.53423005", "0.53295076", "0.53286105", "0.53246874", "0.5319431", "0.53110266", "0.53085303", "0.529532", "0.52905244", "0.52865696", "0.52751", "0.5254217", "0.5229531", "0.5228396", "0.52275884", "0.52218777", "0.52162117", "0.52053386", "0.51997536", "0.51997536", "0.51997536", "0.51997536", "0.51714975", "0.5158289", "0.5155648", "0.51500773", "0.5145166", "0.51417017", "0.5140475", "0.51337737", "0.51322466", "0.5129408", "0.51264876", "0.5125874", "0.5125874", "0.5111248", "0.51005644", "0.51004386", "0.50977784", "0.50954515", "0.508395", "0.5077834", "0.50776595", "0.50765735", "0.50725174", "0.50701624", "0.5065998", "0.50329053", "0.50297076", "0.5024532", "0.50114805", "0.50043166", "0.5003035", "0.49822366", "0.4981529", "0.4979124", "0.4974348", "0.4964686", "0.4963196", "0.4956553" ]
0.5211648
57
Add a node to the document.
private function add($parent_xpath, $new_xml, $insert_ns = FALSE) { if ($insert_ns) { $new_xml = XMLPatcher::insert_namespaces($new_xml, $this->namespaces); } $hits = $this->xpath->query($parent_xpath); foreach ($hits as $hit) { $new_node = dom_import_simplexml(simplexml_load_string($new_xml)); if ($new_node !== FALSE) { $new_node = $this->dom->importNode($new_node, TRUE); $hit->appendChild($new_node); $this->changed = TRUE; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function pushNode( $node );", "public function addNode($node, $action = self::NODE_ADD);", "public function insert(Node $node)\n {\n $this->root->insert($node);\n }", "public function addChild(Node $child);", "private function pushNode(\\DOMElement $node)\r\n {\r\n $this->currentNode = $this->currentNode->appendChild($node);\r\n }", "abstract protected function addNode(\\DOMNode $target, \\DOMNode $source);", "function addNode( $nodeValue, $nodeName)\n\t{\n\t\t$GLOBALS['xml_api']->AttachToXml( $nodeValue, $nodeName);\n\t}", "public function add (DOMElement $node) {\r\n\t \r\n\t if (array_push($this->list, $node)) {\r\n\t\t\t$this->length++;\r\n\t\t\treturn true;\r\n\t\t} else return false;\r\n\t}", "public function addNode($node)\n {\n $this->_tree->addNode($node);\n\n /* If any extra columns included here add them now. */\n if (!empty($node['right'])) {\n $this->addNodeExtra($node['id'],\n Horde_Tree_Renderer::EXTRA_RIGHT,\n $node['right']);\n }\n if (!empty($node['left'])) {\n $this->addNodeExtra($node['id'],\n Horde_Tree_Renderer::EXTRA_LEFT,\n $node['left']);\n }\n }", "public function appendChild(Node $node)\n {\n $this->_children[] = $node;\n }", "public function add($document) {}", "function apachesolr_add_node_document(&$documents, $nid, $namespace) {\r\n if ($document = apachesolr_node_to_document($nid, $namespace)) {\r\n $documents[] = $document;\r\n }\r\n}", "public function addNode(self $node) : self\n {\n $this->append($node);\n return $this;\n }", "function addChild( $node )\n\t\t{\n\t\t$this->childs[] = $node ;\n\t\t}", "function appendChild ($a_node)\n\t{\n\t\treturn $this->doc->append_child($a_node);\n\t}", "function createElement ($a_node)\n\t{\n\t\treturn $this->doc->create_element($a_node);\n\t}", "public function enterNode(Node $node)\n {\n }", "private function append ($node) {\n\n if(empty($node->id)) {\n Debug::printMsg('<li><span style=\"color:orange\">No predefined id found, so creating node</span> ('.$node->className.$node->tableName.')</li>');\n }\n\n // if this record is required then make sure it is valid (error==0) and non-empty\n if($this->isRequired($node)) {\n\n Debug::printMsg('<li><span style=\"color:orange\">Property is required</span> ('.$node->classId.$node->tableName.')</li>');\n\n // required but has errors or is empty and has no id\n if(($node->hasErrors() || $node->isEmpty()) && empty($node->id)) {\n\n if($node->hasErrors()) {\n\n $this->errors[] = $node->getErrors();\n Debug::printMsg('<span style=\"color:red\">...but has errors!</span>');\n\n } else if ($node->isEmpty()) {\n\n Debug::printMsg('<span style=\"color:red\">...but is empty!</span>');\n }\n \n\n // required, no errors and non-empty -> accept\n } else {\n\n $this->data[] = $node;\n // mark to template that this was found\n Debug::printMsg('<li><span style=\"color:green\">...and found!</span> </li>');\n $this->markIsRequired($node);\n }\n\n // not required but has errors\n } else if($node->hasErrors()) {\n \n $this->errors[] = $node->errors;\n\n // not required but is non-empty or has id -> accept\n } else if (!$node->isEmpty() || !empty($node->id)) {\n\n $this->data[] = $node;\n }\n\n }", "public function addNode(string $name, string $value) : self\n {\n $this->xml->addChild($name, $value);\n\n return $this;\n }", "public function appendNode($type) {\n $node = new Node($type, $this->current);\n $this->current->append($node);\n $this->current = $node;\n }", "public function addChildNode(\\F3\\Fluid\\Core\\Parser\\SyntaxTree\\NodeInterface $childNode);", "public function add($node, $weight = null) {\n // last wins, thus the order in which nodes are added is significant.\n // TODO: self::DEFAULT_WEIGHT does not work for inherited classes that \n // override the DEFAULT_WEIGHT constant.\n $this->_nodes[] = array(\n 'object' => $node, \n 'weight' => (int) ($weight !== null ? $weight : self::DEFAULT_WEIGHT), \n );\n $this->reset();\n }", "function add_node($page){\n\t\t$this->nodes['l'.$page->id]=new socialwiki_node($page);\n\t}", "public function addChild(Node $child)\n {\n $this->children[] = $child;\n }", "function appendXmlNode($domDocument, $parentNode, $name, $value){\n \t$childNode = $domDocument->createElement($name);\n \t$childNodeValue = $domDocument->createTextNode($value);\n \t$childNode->appendChild($childNodeValue);\n \t$parentNode->appendChild($childNode);\n}", "public function add($data)\n \n {\n if ($this->head == null)\n {\n $this->head = new Node($data);\n }\n else\n {\n $n = $this->head;\n while ($n->next != null) \n {\n $n = $n->next;\n }\n $n->next = new Node($data);\n }\n self::$size++;\n }", "public function addNode(string $name, NodeInterface $node): NodeInterface\n {\n $this->nodes[$name] = $node;\n\n return $this;\n }", "public function insertBefore (DOMNode $newnode , $refnode = null) {}", "public function addNode($string) {\r\n $id = $this->stringToIdentifier($string);\r\n\r\n if ($id == null) {\r\n $id = ++$this->nodeCount;\r\n\r\n $this->stringToIdentifier[$string] = $id;\r\n $this->identifierToString[$id] = $string;\r\n $this->inLinks[$id] = array();\r\n $this->outLinks[$id] = array();\r\n }\r\n }", "public function addChild(Node $node)\n {\n $node->setParent($this);\n\n $this->child[] = $node;\n\n return $this;\n\n }", "private function addNode(Node $node, Bid $bid): void\n {\n // If the new node is larger then then pass to the left subtree, else pass to the right\n $direction = strcmp($bid->bidId, $node->bid->bidId) < 0 ? 'left' : 'right';\n\n // If no subtree exists for the given direction, create a new subtree in that direction\n if ($node->$direction === null) {\n // Set the node's subtree to a new node\n $node->$direction = new Node($bid);\n } else {\n // A subtree in this direction exists, so we need\n // to recursively traverse it to insert it into the\n // correct position within that tree.\n $this->addNode($node->$direction, $bid);\n }\n }", "public function applyToNode(Node $node);", "function addNode($nodename, $nodeaddress) {\n\t$query = sprintf(\"INSERT INTO Nodes VALUES('%s','%s')\",\n\t\tmysql_real_escape_string($nodename),\n\t\tmysql_real_escape_string($nodeaddress)\n\t);\n\t\n\tdb_query($query);\n}", "public function add(){\n msg('Please send your note to be added to your pad :');\n bindNode('addNote');\n }", "public function addChild(Node $node, $pos = null) {\n //set the child node level\n $node->level = $this->level+1;\n\n //set the parent node\n $node->parent = $this;\n\n //if the position is unset, add the node at the endding\n if(is_null($pos)) {\n $this->nodes->push($node);\n } else {\n if($pos < 0) {\n //if the position is less than 0, add the node at the beginning\n $pos = 0;\n } else if($pos > $this->nodes->count()) {\n //if the position is greater than the node count, add the node at the endding\n $pos = $this->nodes->count();\n }\n\n $this->nodes->add($pos, $node);\n }\n\n return $this->clearFindCache();\n }", "public function append(Node $node)\n {\n\n if (!is_array($this->_children)) {\n $this->_children = [];\n }\n\n $this->_children[] = $node;\n return $this;\n }", "public function appendChild(Pagemill_Node $node) {\r\n\t\t$tmp = new Pagemill_Stream(true);\r\n\t\t$node->rawOutput($tmp);\r\n\t\t$this->_text .= $tmp->peek();\r\n\t}", "public static function setNode($node) {\r\n static::$node = $node;\r\n }", "public function addnode($node, $opts = 'add'){\n return $this->bitcoin->addnode($node, $opts);\n }", "public static function fromNode(Node $node);", "function &AppendNode($Name)\n {\n //$node =& new XMLNode($Name);\n $node = new XMLNode($Name); // FRC\n $node->SetParent($this);\n\n // Do not use array_push with pass-by-reference any more to avoid\n // allow_call_time_pass_reference warning (Oliver Grahl, 2006-08-31)\n //array_push($this->ChildNodes, &$node);\n $this->ChildNodes[] =& $node;\n\n return $node;\n }", "public function add( $text ) {\n\t\t$this->page->append( $text );\n\t}", "public function set_addChildNode($param)\n\t{\n\t\t$this->addChildNode = $param; return $this;\n\t}", "function create_dom_node(&$dom, &$parent_node, $node_name, $node_value = NULL){\n\t\t$node = $dom->create_element($node_name);\n\t\t$new_node = $parent_node->append_child($node);\n\t\tif($node_value != NULL){\n\t\t\t$txt_node = $dom->create_text_node($node_value);\n\t\t\t$new_node->append_child($txt_node);\n\t\t}\n\t\treturn $new_node;\n\t}", "function addNode($inparms){\n if ($this->_query->sizeof()) {\n $this->_query->append(new queryElement($_SESSION['global_currentOperator'], 'o'));\n }\n $this->_query->append(new queryNode($inparms['title'],$inparms['id']));\n\n return $this->output(NULL);\n }", "public function addValue(&$node, $value, $name = null) {\n\t\t$this->setValue($node, $value, $name, true);\n\t}", "public function add_child(HTMLNode $node): int\n {\n return $this -> children -> add($node);\n }", "public function add(HTMLNode $node): int\n {\n array_push($this -> nodes, $node);\n return key(array_slice($this -> nodes, -1, 1, true));\n }", "public function addChildNode( SimpleXMLElement $oChild ) \n\t\t{\n\t\t\t$oParentDOM = dom_import_simplexml( $this );\n\t\t\t$oChildDOM = dom_import_simplexml( $oChild );\n\t\t\t$oNewParentDOM = $oParentDOM->ownerDocument->importNode( $oChildDOM, true );\n\t\t\t$oParentDOM->appendChild( $oNewParentDOM );\n\t\t\n\t\t}", "public function actionCreate()\n\t{\n\t\t$model = new CmsNode();\n\n\t\tif (isset($_POST['CmsNode']))\n\t\t{\n\t\t\t$model->attributes = $_POST['CmsNode'];\n\n\t\t\tif ($model->save())\n\t\t\t{\n\t\t\t\tYii::app()->user->setFlash(Yii::app()->cms->flashes['success'], Yii::t('CmsModule.core', 'Node created.'));\n\t\t\t\t$this->redirect(array('update', 'id'=>$model->id));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create', array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function addConfiguration(NodeDefinition $node)\n {\n }", "public function addCategory(CategoryInterface $category): NodeInterface;", "public static function add($document, $node, $type, $data, $callback = null) {\n\t\tphpQuery::debug(\"Binding '$type' event\");\n\t\t$documentID = phpQuery::getDocumentID($document);\n//\t\tif (is_null($callback) && is_callable($data)) {\n//\t\t\t$callback = $data;\n//\t\t\t$data = null;\n//\t\t}\n\t\t$eventNode = self::getNode($documentID, $node);\n\t\tif (! $eventNode)\n\t\t\t$eventNode = self::setNode($documentID, $node);\n\t\tif (!isset($eventNode->eventHandlers[$type]))\n\t\t\t$eventNode->eventHandlers[$type] = array();\n\t\t$eventNode->eventHandlers[$type][] = array(\n\t\t\t'callback' => $callback,\n\t\t\t'data' => $data,\n\t\t);\n\t}", "public function addChild(Node $child) {\n return $this->root->addChild($child);\n }", "function node_add($type) {\n global $user;\n\n $types = node_get_types();\n $type = isset($type) ? str_replace('-', '_', $type) : NULL;\n // If a node type has been specified, validate its existence.\n if (isset($types[$type]) && node_access('create', $type)) {\n // Initialize settings:\n $node = array('uid' => $user->uid, 'name' => (isset($user->name) ? $user->name : ''), 'type' => $type, 'language' => '');\n\n drupal_set_title(t('Create @name', array('@name' => $types[$type]->name)));\n $output = drupal_get_form($type .'_node_form', $node);\n }\n\n return $output;\n}", "final public function add(CtkBuildable $node) {\n\t\tthrow new CakeException('Cannot add children to node');\n\t}", "function append($content) {\r\n\t\tif (is_string($content)) {\r\n\t\t\t$this->append($this->domFragment->createTextNode($content));\r\n\t\t} else {\r\n\t\t\t$this->root->appendChild($content);\r\n\t\t}\r\n\t}", "private function createRootNode()\n {\n $this->_rootNode = $this->_dom->createElement($this->_rootElement, '');\n $this->_dom->appendChild($this->_rootNode);\n }", "public function add(NodeTranslationInterface $translation, $save = false);", "function add($val){\n\t\t\t//check to see if there is not a head because then, we can create the head node\n\t\t\tif($this->head == null){\n\t\t\t\t//point head to that new node\n\t\t\t\t$this->head = new Node($val);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//we have a head, so lets navigate through the linked list till we get to the end\n\t\t\t\t//add the new node at the end\n\n\t\t\t\t//this is a temp to help us navigate the linked list\n\t\t\t\t$current = $this->head;\n\t\t\t\twhile($current->next){\n\t\t\t\t\t//moving the pointer forward to the next node\n\t\t\t\t\t$current = $current->next;\n\t\t\t\t}\n\t\t\t\t$current->next = new Node($val);\n\t\t\t}\n\t\t}", "function add_node($child_id, tree_node $tt) {\n $this->triples[$child_id] = $tt;\n $this->children[$tt->parent_id][$child_id] = true;\n }", "public function appendChild($item, ?\\SetaPDF_Core_Document $document = null, $mode = null) {}", "public function append(?Node $node): bool {\n if ($node === null) {\n return false;\n }\n $head = $this->getHead();\n if ($head === null) {\n $this->setHead($node);\n return true;\n }\n while ($head->getNext() !== null) {\n $head = $head->getNext();\n }\n $head->setNext($node);\n return true;\n }", "public function add($content);", "public function addRoute($route, RouteDocument $routeDocument);", "public function add();", "public function add();", "public function insertNode($data)\n {\n $link = new ListNode($data);\n\n if ($this->firstNode != NULL) {\n $this->lastNode->next = $link;\n $link->next = NULL;\n $this->lastNode = &$link;\n } else {\n $link->next = $this->firstNode;\n $this->firstNode = &$link;\n if ($this->lastNode == NULL) {\n $this->lastNode = &$link;\n }\n }\n $this->count++;\n }", "public function add(){\n\t\t\n\t\t// Open or create file\n\t\t$f = fopen($this->file, 'wb');\n\t\tfclose($f);\n\t}", "public function insert($val) {\n // Make sure element being inserted is type of Node.\n if (!is_object($val) || getclass($val) !== \"Node\") {\n $node = new Node($val);\n } else {\n $node = $val;\n }\n\n $this->_head->setPrev($node);\n\n $node->setNext($this->_head);\n $node->setPrev($this->_sentinel);\n $this->_head = $node;\n }", "public function add()\n {\n $data = [\n 'user_id' => $this->CurrentUser->getId(),\n 'entry_id' => $this->request->getData('entry_id'),\n ];\n\n $bookmark = $this->Bookmarks->createBookmark($data);\n if (!$bookmark) {\n throw new GenericApiException('The bookmark could not be created.');\n }\n\n $this->set('bookmark', $bookmark);\n }", "public function add($item)\n {\n $this->addArray('content', $item, 'Element');\n }", "private function XML_addDate() {\n\t\t$dateEntity = $this->xmlHandler->createElement('date');\n\t\t$dateEntity->appendChild($this->xmlHandler->createTextNode(date(\"F j, Y, g:i a\")));\n\n\t\t$this->xmlRoot->appendChild($dateEntity);\n\t}", "public function add($element);", "public function add($element);", "public function add($element);", "function addNode(&$params, $item)\n\t{\n\t\t$data = $this->_getItemData($params, $item);\n\n\t\t// Create the node and add it\n\t\t$node = new JMenuNode($item->id, $item->name, $item->access, $data);\n\n\t\tif (isset($item->mid)) {\n\t\t\t$nid = $item->mid;\n\t\t} else {\n\t\t\t$nid = $item->id;\n\t\t}\n\t\t$this->_nodeHash[$nid] =& $node;\n\t\t$this->_current =& $this->_nodeHash[$item->parent];\n\n\t\tif ($item->type == 'menulink' && !empty($item->query['Itemid'])) {\n\t\t\t$node->mid = $item->query['Itemid'];\n\t\t}\n\n\t\tif ($this->_current) {\n\t\t\t$this->addChild($node, true);\n\t\t} else {\n\t\t\t// sanity check\n\t\t\tJError::raiseError( 500, 'Orphan Error. Could not find parent for Item '.$item->id );\n\t\t}\n\t}", "function append($node) {\n\t\tif (!is_array($node)) {\n\t\t\t$this->child[]=$node;\n\t\t} else if (is_array($node)) {\n\t\t\tfor ($childIdx=0; $childIdx<count($node); $childIdx++)\n\t\t\t\t$this->child[]=$node[$childIdx];\n\t\t}\n\t}", "public function add()\r\n {\r\n $this->start();\r\n $this->write_to_db();\r\n }", "protected function addHeading(DomNode $node)\n {\n $heading = $this->newHeading($node);\n $this->headings[] = $heading;\n\n $number = new DomText();\n\n switch ($this->numbering) {\n case false:\n $number->nodeValue = '';\n break;\n case 'decimal':\n default:\n $number->nodeValue = $heading->getNumber() . ' ';\n break;\n }\n\n $node->insertBefore($number, $node->firstChild);\n\n $node->setAttribute('id', $heading->getAnchor());\n }", "public function add()\n\t{\n\n\t}", "public function add()\n\t{\n\n\t}", "public function appendToDom($doc, $parentNode, $parent=NULL)\n\t{\n\t\t$node = $doc->createElement($this->dom->nodeName);\n\t\t\n\t\t// Apply the style to this node\n\t\t$node->setAttribute(\"style\", $this->getStyle()->getHTMLStyleAttributeValue());\n\n\t\t// Apply the shape attributes to this node\n\t\t$node->setAttribute(\"type\", $this->dom->getAttribute(\"type\"));\n\t\t$node->setAttribute(\"values\", $this->dom->getAttribute(\"values\"));\n\n\t\t// Append this node to the parentNode\n\t\t$parentNode->appendChild($node);\n\t}", "public function setValue(&$node, $value, $name = null, $asNode = false) {\n\t\tif (!($node instanceof \\DOMElement)) {\n\t\t\tthrow new ArgumentException($node, '\\DOMElement', 1);\n\t\t}\n\t\tif ($value instanceof \\DOMNode) {\n\t\t\tif ($node->ownerDocument !== $value->ownerDocument) {\n\t\t\t\t$value = $node->ownerDocument->importNode($value, true);\n\t\t\t}\n\t\t\t$node->appendChild($value);\n\t\t} else {\n\t\t\tif ($asNode) {\n\t\t\t\t$childNode = $node->appendChild($node->ownerDocument->createElement($name));\n\t\t\t\tif (is_null($value)) {\n\t\t\t\t\t$this->setNodeAsNull($childNode);\n\t\t\t\t} else {\n\t\t\t\t\t$childNode->appendChild($childNode->ownerDocument->createTextNode($value));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (is_null($value)) {\n\t\t\t\t\t$childNode = $node->appendChild($node->ownerDocument->createElement($name));\n\t\t\t\t\t$this->setNodeAsNull($childNode);\n\t\t\t\t} else {\n\t\t\t\t\t$node->setAttribute($name, $value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function registerNode(\\DOMNode $node)\n {\n if ($node->nodeType == XML_ELEMENT_NODE) {\n /** @var \\DOMElement $node */\n $localContext = $this->elementProcessor->processElement($node, $this->initialContext);\n\n // Register the node context\n $localContextId = spl_object_hash($localContext);\n if (empty($this->contexts[$localContextId])) {\n $this->contexts[$localContextId] = $localContext;\n }\n\n $this->contextMap[$node->getNodePath()] = $localContextId;\n }\n\n return $node;\n }", "public function add()\n {\n }", "public function add()\n {\n }", "public function add()\n {\n }", "function add_title_node($node)\n{\n $result = $node->xpath('//mydata[1]/*[1]');\n\n if (!empty($result[0])) {\n $name = $result[0]->getName();\n $node->addChild('title', $name);\n }\n\n return $node;\n}", "public function add ($elType, $param = NULL, $place = 'head');", "private function addNode($i,$args=null) {\n return $this->_add($i,$args);\n }", "function add() {\n }", "public function appendChild($childNode)\r\n {\r\n $this->_childNodes[$childNode->id] = $childNode;\r\n $childNode->setParentNode($this);\r\n }", "public function appendTo(Element $parentNode): void {\n foreach ($this->_document->childNodes as $node) {\n if ($node instanceof \\DOMElement) {\n $this->addNode($parentNode, $node);\n }\n }\n }", "public function appendElement($name, $content = null) {\n $node = $this->ownerDocument->createElement($name, $content);\n $this->appendChild($node);\n return $node;\n }", "function apachesolr_index_node_solr_document(ApacheSolrDocument $document, $node, $entity_type, $env_id) {\n // None of these get added unless they are explicitly in our schema.xml\n $document->label = apachesolr_clean_text($node->title);\n\n // Build the node body.\n $language = !empty($node->language) ? $node->language : LANGUAGE_NONE;\n $build = node_view($node, 'search_index', $language);\n // Remove useless html crap out of the render.\n unset($build['#theme']);\n // Allow cache if it's present\n $build['#cache'] = true;\n // Render it into html\n $text = drupal_render($build);\n $document->content = apachesolr_clean_text($text);\n\n // Adding the teaser\n if (isset($node->teaser)) {\n $document->teaser = apachesolr_clean_text($node->teaser);\n }\n else {\n // If there is no node teaser we will have to generate the teaser\n // ourselves. We have to be careful to not leak the author and other\n // information that is normally also not visible.\n if (isset($node->body[$language][0]['safe_summary'])) {\n $document->teaser = apachesolr_clean_text($node->body[$language][0]['safe_summary']);\n }\n else {\n $document->teaser = truncate_utf8($document->content, 300, TRUE);\n }\n }\n\n // Author information\n if ($node->uid == 0 || strlen($node->name) == 0) {\n // @see user_validate_name(). !'0' === TRUE.\n $document->ss_name = '0';\n }\n else {\n $document->ss_name = $node->name;\n // We want the name to be searchable for keywords.\n $document->tos_name = $node->name;\n }\n // Index formatted username so it can be searched and sorted on.\n $account = (object) array('uid' => $node->uid, 'name' => $node->name);\n $username = format_username($account);\n $document->ss_name_formatted = $username;\n $document->tos_name_formatted = $username;\n $document->is_uid = $node->uid;\n $document->bs_status = $node->status;\n $document->bs_sticky = $node->sticky;\n $document->bs_promote = $node->promote;\n $document->is_tnid = $node->tnid;\n $document->bs_translate = $node->translate;\n\n // Timestamp of the node\n $document->ds_created = apachesolr_date_iso($node->created);\n $document->ds_changed = apachesolr_date_iso($node->changed);\n\n // Comment counts + time\n if (isset($node->last_comment_timestamp) && !empty($node->comment_count)) {\n $document->ds_last_comment_timestamp = apachesolr_date_iso($node->last_comment_timestamp);\n $document->ds_last_comment_or_change = apachesolr_date_iso(max($node->last_comment_timestamp, $node->changed));\n $document->is_comment_count = $node->comment_count;\n }\n else {\n $document->ds_last_comment_or_change = apachesolr_date_iso($node->changed);\n }\n\n // Fetch extra data normally not visible, including comments.\n // We do this manually (with module_implements instead of node_invoke_nodeapi)\n // because we want a keyed array to come back. Only in this way can we decide\n // whether to index comments or not.\n $extra = array();\n $excludes = variable_get('apachesolr_exclude_nodeapi_types', array());\n $exclude_nodeapi = isset($excludes[$node->type]) ? $excludes[$node->type] : array();\n\n foreach (module_implements('node_update_index') as $module) {\n // Invoke nodeapi if this module has not been excluded, for example,\n // exclude 'comment' for a type to skip indexing its comments.\n if (empty($exclude_nodeapi[$module])) {\n $function = $module . '_node_update_index';\n if ($output = $function($node)) {\n $extra[$module] = $output;\n }\n }\n }\n\n // Adding the text of the comments\n if (isset($extra['comment'])) {\n $comments = $extra['comment'];\n // Remove comments from the extra fields\n unset($extra['comment']);\n $document->ts_comments = apachesolr_clean_text($comments);\n // @todo: do we want to reproduce apachesolr_add_tags_to_document() for comments?\n }\n // If there are other extra fields, add them to the document\n if (!empty($extra)) {\n // Use an omit-norms text field since this is generally going to be short; not\n // really a full-text field.\n $document->tos_content_extra = apachesolr_clean_text(implode(' ', $extra));\n }\n\n // Add additional indexing based on the body of each record.\n apachesolr_index_add_tags_to_document($document, $text);\n\n // Generic use case for future reference. Callbacks can\n // allow you to send back multiple documents\n $documents = array();\n $documents[] = $document;\n return $documents;\n}", "public function add($child, $type = null, array $options = array());", "abstract protected function add(Comment $comment);", "public function addChildAsLast(Node $node)\n {\n if(null === $this->children)\n {\n $this->children = array();\n }\n\n $this->children[] = $node;\n }", "public function _addNode(array $data, $tableColumn, $nodeName, SimpleXMLElement $xml)\n\t{\n\t\tswitch($nodeName)\n\t\t{\n\t\t\tcase 'name':\n\t\t\tcase 'admin_name':\n\t\t\t\tif($this->nodeExists($xml, $nodeName, array('language_id', $data['language_id'])) === false)\n\t\t\t\t{\n\t\t\t\t\t$xml->addChild($nodeName);\n\t\t\t\t\t$xml->{$nodeName}[count($xml->{$nodeName}) - 1] = $this->wrapValue($data[$tableColumn]);\n\t\t\t\t\t$coo_child = $xml->{$nodeName}[count($xml->{$nodeName}) - 1];\n\t\t\t\t\t$coo_child['language_id'] = $data['language_id'];\n\t\t\t\t\t\n\t\t\t\t\t$languageIso = ''; \n\t\t\t\t\tif(isset($this->languageArray[$data['language_id']]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$languageIso = $this->languageArray[$data['language_id']]['iso']; \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$coo_child['language_iso'] = $languageIso;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tif($this->nodeExists($xml, $nodeName) === false)\n\t\t\t\t{\n\t\t\t\t\t$xml->{$nodeName} = $data[$tableColumn];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function add_node($p_mode,$node_id,$p_caption)\n\t\t{\n\t\t\t// MySQL injection protection\n\t\t\t$caption= str_replace(\"'\",\"''\",$this->mysql_protect($p_caption));\n\t\n\t\t\tswitch ($p_mode)\n\t\t\t{\n\t\t\t\tcase \"B\": // Insert a brother item\n\t\t\t\t\t// Get id parent\n\t\t\t\t\t$query = \"\tSELECT\n\t\t\t\t\t\t\t\t\t`MTN`.`parent` AS 'parent',\n\t\t\t\t\t\t\t\t\t`MTN`.`order` AS 'order'\n\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\t`\".$this->tree_node.\"` `MTN`\n\t\t\t\t\t\t\t\tWHERE 1 = 1\n\t\t\t\t\t\t\t\tAND `MTN`.`application_release` = '\".$this->application_release.\"'\n\t\t\t\t\t\t\t\tAND `MTN`.`id` = \".$node_id.\"\n\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\";\n\t\t\t\t\t\n\t\t\t\t\t$result = $this->link_mt->query($query);\n\t\t\t\t\t\n\t\t\t\t\t$row = $result->fetch_array(MYSQLI_ASSOC);\n\t\t\n\t\t\t\t\t//==================================================================\n\t\t\t\t\t// If no item in tree, force initialization\n\t\t\t\t\t//==================================================================\n\t\t\t\t\tif($row['parent'] == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t$row['parent'] = 0;\n\t\t\t\t\t\t$row['order'] = -1;\n\t\t\t\t\t}\n\t\t\t\t\t//==================================================================\n\t\t\t\t\t\n\t\t\t\t\t$id_parent = $row['parent'];\n\t\t\t\t\t$id_order = $row['order'];\n\t\t\t\tbreak;\n\t\t\t\tcase \"C\": // Insert a children item\n\t\t\t\t\t$id_parent = $node_id; // Current item is the futur parent\n\t\t\t\t\t$id_order = -1; // First item\n\t\t\t\tbreak;\t\n\t\t\t}\n\t\t\n\t\t\t// Add a place for new element in current tree level\n\t\t\t$query = \"UPDATE `\".$this->tree_node.\"`\n\t\t\t\t\t\tSET `order` = `order` + 1\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t`application_release` = '\".$this->application_release.\"'\n\t\t\t\t\t\t\tAND `parent` = \".$id_parent.\"\n\t\t\t\t\t\t\tAND `order` > \".$id_order.\"\n\t\t\t\t\t\tORDER BY `order` desc\";\n\t\t\t\n\t\t\t$result = $this->link_mt->query($query);\n\t\t\n\t\t\t//==================================================================\n\t\t\t// Add new element in table\n\t\t\t//==================================================================\n\t\t\t// No flag setup by default\n\t\t\t$new_order = $id_order+1;\n\t\t\t// Nodes table\n\t\t\t$query = \" INSERT INTO `\".$this->tree_node.\"`\n\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t `application_release`,\n\t\t\t\t\t\t\t `id`,\n\t\t\t\t\t\t\t `parent`,\n\t\t\t\t\t\t\t `order`,\n\t\t\t\t\t\t\t `mark`\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t VALUES \n\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t '\".$this->application_release.\"',\n\t\t\t\t\t\t\t NULL,\n\t\t\t\t\t\t\t \".$id_parent.\",\n\t\t\t\t\t\t\t \".$new_order.\",\n\t\t\t\t\t\t\t NULL\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\";\n\t\t\t\n\t\t\t$result = $this->link_mt->query($query);\n\t\t\t\n\t\t\t// Recover auto increment id\n\t\t\t$this->myfocus = $this->link_mt->insert_id;\n\t\t\t\n\t\t\t// Caption table\n\t\t\t$query = \" INSERT INTO `\".$this->tree_caption.\"`\n\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t `application_release`,\n\t\t\t\t\t\t\t `id`,\n\t\t\t\t\t\t\t `language`,\n\t\t\t\t\t\t\t `title`,\n\t\t\t\t\t\t\t `description`\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t VALUES\n\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t '\".$this->application_release.\"',\n\t\t\t\t\t\t\t '\".$this->myfocus.\"',\n\t\t\t\t\t\t\t '\".$this->language.\"',\n\t\t\t\t\t\t\t '\".$caption.\"',\n\t\t\t\t\t\t\t '\".$caption.\"'\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\";\n\t\t\t\n\t\t\t$result = $this->link_mt->query($query);\n\t\t\n\t\t\t// Extra features table ( optional )\n\t\t\tif(isset($this->tree_extra) && $this->tree_extra != '')\n\t\t\t{\n\t\t\t\t$query = \" INSERT INTO `\".$this->tree_extra.\"`\n\t\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t\t `application_release`,\n\t\t\t\t\t\t\t\t `id`\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t VALUES\n\t\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t\t '\".$this->application_release.\"',\n\t\t\t\t\t\t\t\t '\".$this->myfocus.\"'\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\";\n\t\t\t\t\n\t\t\t\t$result = $this->link_mt->query($query);\n\t\t\t}\n\n\t\t$this->total_node = $this->count_node();\n\t\t\n\t\t// Return id of new item and setup focus\n\t\techo $this->myfocus;\n\t\t}" ]
[ "0.706289", "0.6945849", "0.6696333", "0.6371246", "0.631106", "0.62089795", "0.60931015", "0.6071698", "0.6061207", "0.60587245", "0.60512984", "0.60226697", "0.6017472", "0.59265924", "0.59107363", "0.5863472", "0.5794405", "0.5729038", "0.5665903", "0.5661694", "0.5640544", "0.5622929", "0.55947745", "0.5488619", "0.54735094", "0.54681027", "0.5441022", "0.54272455", "0.5422488", "0.5418794", "0.5391724", "0.5380735", "0.5374546", "0.5344046", "0.5333534", "0.53275084", "0.5316538", "0.52995527", "0.5298335", "0.5284196", "0.5275746", "0.5265899", "0.52648485", "0.5258321", "0.5255257", "0.52353996", "0.52127653", "0.52077955", "0.5194111", "0.5183957", "0.5171088", "0.5143729", "0.5140925", "0.5140922", "0.5137074", "0.5129269", "0.51175463", "0.5100791", "0.50932056", "0.50890577", "0.5082351", "0.5070943", "0.5068065", "0.50519085", "0.5051865", "0.50475466", "0.50475466", "0.50274235", "0.49979702", "0.49956137", "0.4983124", "0.49682", "0.4928801", "0.49265257", "0.49265257", "0.49265257", "0.4925794", "0.49043757", "0.4898046", "0.48780954", "0.485656", "0.485656", "0.48539963", "0.4840424", "0.48402447", "0.48379233", "0.48379233", "0.48379233", "0.48217985", "0.4806215", "0.4796957", "0.47815222", "0.47787163", "0.47773615", "0.47560632", "0.47522286", "0.4749344", "0.4735589", "0.47354263", "0.4727022", "0.471884" ]
0.0
-1
Insert the namespaces to the element to allow us to parse an entire element.
protected static function insert_namespaces($element, array $namespaces) { $pos = strpos($element, '>'); if (strpos(substr($element, 0, $pos), '/') !== FALSE) { // We may have an empty element, parse to see if the // backslash is inside an attribute. for ($x = $pos; $x > 0; $x -= 1) { if (substr($element, $x, 1) == "/") { $pos = $x; break; } elseif (substr($element, $x, 1) == "\"" || substr($element, $x, 1) == "'") { break; } } } $add_string = ""; foreach ($namespaces as $prefix => $uri) { if (strpos($element, "xmlns:$prefix") === FALSE) { $add_string .= " xmlns:$prefix=\"$uri\""; } } return substr($element, 0, $pos) . $add_string . substr($element, $pos); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addNamespaces(array $namespaces);", "function addNamespace($namespace);", "private function appendNamespaces(array $namespaces): void\n {\n $normalized = [];\n foreach ($namespaces as $key => $value) {\n $namespace = self::serializeNamespace($key);\n $normalized[$namespace] = $value;\n }\n\n $this->appendAttributes($normalized);\n }", "public function registerNamespace ($prefix, $namespaceURI) {}", "public function registerNamespaces(Ns $ns): void;", "abstract protected function registerNamespaces();", "protected function registerNamespaces() {\n\t\t$this->registerNamespace(parent::getCode(), parent::getUsedNamespace(parent::getSupportedNamespaces())); // OWS\n\t\t$this->registerNamespace($this->getCode(), $this->getUsedNamespace()); // SOS\n\t\t$this->registerNamespace('gml', 'http://www.opengis.net/gml'); // GML\n\t}", "protected function add_namespace_to_xml(SimpleXmlWriter $xw) {\n $xw->create_attribute('xmlns:unit', 'urn:proforma:tests:unittest:v1.1');\n $xw->create_attribute('xmlns:cs', 'urn:proforma:tests:java-checkstyle:v1.1');\n }", "public function addNamespace($namespace, $hints);", "function xpath_register_ns($xpath_context, $prefix, $uri)\n{\n}", "public function __construct($element = null)\n {\n foreach (\\Zend\\GData\\Health::$namespaces as $nsPrefix => $nsUri) {\n $this->registerNamespace($nsPrefix, $nsUri);\n }\n }", "public function appendElementNS($ns, $name, $content = null) {\n $node = $this->ownerDocument->createElementNS($ns, $name, $content);\n $this->appendChild($node);\n return $node;\n }", "function setNamespace($namespace);", "public function initializeNamespaces ( ) {\n\n $stream = $this->getStream();\n $this->_namespaces = $stream->getDocNamespaces();\n\n if(empty($this->_namespaces))\n throw new Exception\\NamespaceMissing(\n 'The XML document %s must have a default namespace at least.',\n 4, $this->getInnerStream()->getStreamName());\n\n if(1 == count($this->_namespaces))\n $stream->registerXPathNamespace(\n '__current_ns',\n current($this->_namespaces)\n );\n else\n foreach($this->_namespaces as $prefix => $namespace) {\n\n if('' == $prefix)\n $prefix = '__current_ns';\n\n $stream->registerXPathNamespace($prefix, $namespace);\n }\n\n return;\n }", "public function prependNamespace($namespace, $hints);", "public function addNamespace(string $namespace, $hints);", "public function addNamespace( $namespace )\n\t{\n\t\t$this->namespaces[] = $namespace;\n\t}", "public function setNamespace($name);", "public function setNamespaceName($namespace);", "public function appendNamespace($namespace)\r\n {\r\n $this->namespace .= (string) $namespace;\r\n\r\n return $this;\r\n }", "function setNamespace ($name);", "public static /*internal*/ function registerPrefixes()\n\t{\n\t\tif(count(self::$namespaces))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tself::$namespaces = array();\n\t\tself::$namespaces[self::xml] = 'xml';\n\t\tself::$namespaces[self::xmlns] = 'xmlms';\n\t\tself::$namespaces[self::rdf] = 'rdf';\n\t\tself::$namespaces[self::rdfs] = 'rdfs';\n\t\tself::$namespaces[self::owl] = 'owl';\n\t\tself::$namespaces[self::foaf] = 'foaf';\n\t\tself::$namespaces[self::skos] = 'skos';\n\t\tself::$namespaces[self::time] = 'time';\n\t\tself::$namespaces[self::dc] = 'dc';\n\t\tself::$namespaces[self::dcterms] = 'dct';\n\t\tself::$namespaces[self::rdfg] = 'rdfg';\n\t\tself::$namespaces[self::geo] = 'geo';\n\t\tself::$namespaces[self::frbr] = 'frbr';\n\t\tself::$namespaces[self::xhtml] = 'xhtml';\n\t\tself::$namespaces[self::xhv] = 'xhv';\n\t\tself::$namespaces[self::dcmit] = 'dcmit';\n\t\tself::$namespaces[self::xsd] = 'xsd';\n\t\tself::$namespaces[self::gn] = 'gn';\n\t\tself::$namespaces[self::exif] = 'exif';\n\t\tself::$namespaces[self::void] = 'void';\n\t\tself::$namespaces[self::olo] = 'olo';\t\t\n\t}", "public function registerNamespaces(array $namespaces)\n {\n $this->namespaces = array_merge($this->namespaces, $namespaces);\n return $this;\n }", "public function prependNamespace(string $namespace, $hints);", "function wpfc_podcast_add_namespace() {\n\techo 'xmlns:itunes=\"http://www.itunes.com/dtds/podcast-1.0.dtd\"';\n}", "public function namespaces($namespaces = NULL): Namespaces {\n if (NULL !== $namespaces) {\n $this->_namespaces->assign([]);\n foreach($namespaces as $prefix => $namespaceURI) {\n $this->registerNamespace($prefix, $namespaceURI);\n }\n }\n return $this->_namespaces;\n }", "public function get_namespaces()\n {\n }", "public function setDefaultNamespace($namespace);", "public function registerNamespaces(array $namespaces)\n\t{\n\t\tforeach($namespaces as $namespace => $locations)\n\t\t{\n\t\t\t$this->namespaces[$namespace] = (array) $locations;\n\t\t}\n\t}", "public function setNamespaces($namespaces)\n {\n $this->_namespaces = (array) $namespaces;\n }", "public function testLookupNamespaceReturnsStringWhenAddedToElementElementAndParentPrefixBoundToNamespace(): void\n {\n $parent = new ElementElement();\n $parent->setTypeElement($this->sut);\n $parent->bindNamespace('foo', 'http://example.org/foo');\n self::assertSame('http://example.org/foo', $this->sut->lookupNamespace('foo'));\n }", "public static function addNamespace(string $gml, array $namespaces = self::GML_NAMESPACES)\n {\n if (($gml != null) and (1 === preg_match('/gml/', $gml))) {\n $doc = new \\DomDocument('1.0', 'UTF-8');\n\n $doc->loadXML($gml, LIBXML_NOERROR);\n $rootNode = $doc->documentElement;\n if (null !== $rootNode) {\n foreach ($namespaces as $key => $value) {\n $rootNode->setAttribute($key, $value);\n }\n $gml = $doc->saveXML();\n $cleanXML = new \\SimpleXMLElement($gml, LIBXML_NOERROR);\n $dom = dom_import_simplexml($cleanXML);\n $gml = $dom->ownerDocument->saveXML($dom->ownerDocument->documentElement);\n } else {\n //append namespaces to string using regex\n $strNameSpaces = '';\n foreach ($namespaces as $key => $value) {\n $strNameSpaces .= ' ' . $key . '=\"' . $value . '\"';\n }\n $regEx = '/^<gml:\\S*/';\n $gml = preg_replace($regEx, \"$0$strNameSpaces\", $gml);\n }\n }\n return $gml;\n }", "public function testParseProcessNamespaceDeclarations(): void\n {\n $sch = $this->sut->parse($this->getXs('attribute_0006.xsd'));\n \n self::assertElementNamespaceDeclarations(\n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n ], \n $sch\n );\n self::assertSchemaElementHasNoAttribute($sch);\n self::assertCount(1, $sch->getElements());\n \n $attr = $sch->getAttributeElements()[0];\n self::assertElementNamespaceDeclarations(\n [\n '' => 'http://example.org', \n 'foo' => 'http://example.org/foo', \n ], \n $attr\n );\n self::assertAttributeElementHasNoAttribute($attr);\n self::assertSame([], $attr->getElements());\n }", "protected function registerNamespaces()\n {\n $this->app['themes']->registerNamespaces();\n }", "public function addNamespaces(array $namespaces)\n {\n $this->_namespace->addNamespaces($namespaces);\n\n return $this;\n }", "public function registerNamespace(string $prefix, string $namespaceURI): void {\n $this->_namespaces[$prefix] = $namespaceURI;\n if (NULL !== $this->_xpath && $prefix !== '#default') {\n $this->_xpath->registerNamespace($prefix, $namespaceURI);\n }\n }", "protected function decorateImsManifestRootElement(DOMElement $rootElement)\n {\n $xsdLocation = 'http://www.imsglobal.org/xsd/imscp_v1p1 http://www.imsglobal.org/xsd/qti/qtiv2p1/qtiv2p1_imscpv1p2_v1p0.xsd http://www.w3.org/Math/XMLSchema/mathml2/mathml2.xsd';\n $xmlns = \"http://www.imsglobal.org/xsd/imscp_v1p1\";\n $rootElement->setAttribute('xmlns', $xmlns);\n $rootElement->setAttribute(\"xmlns:xsi\", \"http://www.w3.org/2001/XMLSchema-instance\");\n $rootElement->setAttribute(\"xsi:schemaLocation\", $xsdLocation);\n\t\t\n }", "public function setNamespace($var)\n {\n GPBUtil::checkString($var, True);\n $this->namespace = $var;\n\n return $this;\n }", "public function setNamespace($var)\n {\n GPBUtil::checkString($var, True);\n $this->namespace = $var;\n\n return $this;\n }", "public function setNamespace($var)\n {\n GPBUtil::checkString($var, True);\n $this->namespace = $var;\n\n return $this;\n }", "public function setNamespace($var)\n {\n GPBUtil::checkString($var, True);\n $this->namespace = $var;\n\n return $this;\n }", "public function setNamespace($var)\n {\n GPBUtil::checkString($var, True);\n $this->namespace = $var;\n\n return $this;\n }", "public function setNamespace($var)\n {\n GPBUtil::checkString($var, True);\n $this->namespace = $var;\n\n return $this;\n }", "public static function addNamespace($namespace)\n {\n if (!in_array($namespace, static::$namespaces)) {\n static::$namespaces[] = $namespace;\n }\n }", "public function testParseProcessNamespaceDeclarations(): void\n {\n $sch = $this->sut->parse($this->getXs('extension_0006.xsd'));\n \n self::assertElementNamespaceDeclarations(\n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n ], \n $sch\n );\n self::assertSchemaElementHasNoAttribute($sch);\n self::assertCount(1, $sch->getElements());\n \n $ct = $sch->getComplexTypeElements()[0];\n self::assertElementNamespaceDeclarations([], $ct);\n self::assertComplexTypeElementHasNoAttribute($ct);\n self::assertCount(1, $ct->getElements());\n \n $sc = $ct->getContentElement();\n self::assertElementNamespaceDeclarations([], $sc);\n self::assertSimpleContentElementHasNoAttribute($sc);\n self::assertCount(1, $sc->getElements());\n \n $ext = $sc->getDerivationElement();\n self::assertElementNamespaceDeclarations(\n [\n '' => 'http://example.org', \n 'foo' => 'http://example.org/foo', \n ], \n $ext\n );\n self::assertSimpleContentExtensionElementHasNoAttribute($ext);\n self::assertSame([], $ext->getElements());\n }", "public function appendNamespaceStub(array $replacements = [])\n {\n\t\treturn array_merge(['NAMESPACE' => $this->getNamespace()], $replacements); \t\n }", "public function getNamespace();", "public function getNamespace();", "public function getNamespace();", "public function addNamespace(string $sNamespace, string $sDirectory, string $sExtension = '')\n {}", "public function addNamespaces(array $namespaces)\n {\n foreach ($namespaces as $prefix => $dir) {\n $this->addNamespace($prefix, $dir);\n }\n return $this;\n }", "public function formatElement()\n {\n if ($this->namespace == '*') {\n return $this->element;\n }\n \n return sprintf('%s|%s', $this->namespace, $this->element);\n }", "public function registerNamespace( $namespace ) {\n $this->namespaces[] = $namespace;\n return $this->namespaces;\n }", "public function setNamespace(ckXsdNamespace $value)\r\n {\r\n $this->namespace = $value;\r\n }", "public function testLookupNamespaceReturnsStringWhenAddedToRedefineElementAndParentPrefixBoundToNamespace(): void\n {\n $parent = new RedefineElement();\n $parent->addComplexTypeElement($this->sut);\n $parent->bindNamespace('foo', 'http://example.org/foo');\n self::assertSame('http://example.org/foo', $this->sut->lookupNamespace('foo'));\n }", "public function testLookupNamespaceReturnsStringWhenAddedToSchemaElementAndParentPrefixBoundToNamespace(): void\n {\n $parent = new SchemaElement();\n $parent->addAttributeElement($this->sut);\n $parent->bindNamespace('foo', 'http://example.org/foo');\n self::assertSame('http://example.org/foo', $this->sut->lookupNamespace('foo'));\n }", "function flipboard_namespace() {\n echo 'xmlns:media=\"http://search.yahoo.com/mrss/\"\n xmlns:georss=\"http://www.georss.org/georss\"';\n}", "public static function resetNamespaces()\n {\n self::$namespaces = self::$initial_namespaces;\n }", "public function getNamespace($namespaceName);", "public function addNullNamespaceURI(\\DOMElement $node) {\n\t\tif ($node->hasAttribute(self::NS_XSI)) {\n\t\t\treturn;\n\t\t}\n\t\t// first solution found, create real attribute namespace\n\t\t// there is perhaps a more simple way\n\t\tif ($node->ownerDocument->firstChild === $node) {\n\t\t\t// no need to update Dom\n\t\t\t$node->ownerDocument->createAttributeNS(self::NIL_URI, self::NS_NULL_VALUE);\n\t\t}else {\n\t\t\t// node must be appended at first place to DomDocument before create attribute ns\n\t\t\t// and node must be replaced at original place if needed\n\t\t\t$parent = $node->parentNode;\n\t\t\t$next = $node->nextSibling;\n\t\t\tif (is_null($node->ownerDocument->firstChild)) {\n\t\t\t\t$node->ownerDocument->appendChild($node);\n\t\t\t} else {\n\t\t\t\t$node->ownerDocument->insertBefore($node, $node->ownerDocument->firstChild);\n\t\t\t}\n\t\t\t$node->ownerDocument->createAttributeNS(self::NIL_URI, self::NS_NULL_VALUE);\n\t\t\t$node->ownerDocument->removeChild($node);\n\t\t\t\n\t\t\tif ($parent) {\n\t\t\t\tif ($next) {\n\t\t\t\t\t$parent->insertBefore($node, $next);\n\t\t\t\t} else {\n\t\t\t\t\t$parent->appendChild($node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// second solution found, create fake attribute namespace\n\t\t// more simple but not recognized as attribute namespace\n\t\t// and we cannot get it with getAttribute()\n\t\t// $node->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');\n\t}", "public function testLookupNamespaceReturnsStringWhenAddedToSchemaElementAndParentPrefixBoundToNamespace(): void\n {\n $parent = new SchemaElement();\n $parent->addComplexTypeElement($this->sut);\n $parent->bindNamespace('foo', 'http://example.org/foo');\n self::assertSame('http://example.org/foo', $this->sut->lookupNamespace('foo'));\n }", "public function registerNamespaces(array $namespaces)\n\t{\n\t\tforeach($namespaces as $namespace => $path)\n\t\t{\n\t\t\t$this->registerNamespace($namespace, $path);\n\t\t}\n\t}", "public function getNamespaces() {}", "public function _get_namespaces($type);", "public function declareNamespace( $namespace ){\n \n $this->namespace_heap[ $namespace ] = null;\n \n return $this;\n \n }", "public function getNamespaces(\\DOMElement $element = null)\n {\n if ($this->xpath === null) {\n $this->xpath = new \\DOMXPath($this);\n }\n\n if ($element === null) {\n $nodes = $this->xpath->query('namespace::*');\n $element = $this->documentElement;\n } else {\n $nodes = $this->xpath->query('namespace::*', $element);\n }\n\n $ns = array();\n\n if ($nodes) {\n foreach ($nodes as $node) {\n $arr = $element->getAttribute($node->nodeName);\n\n if ($arr) {\n $ns[$node->nodeName] = $arr;\n }\n }\n\n $nodes = null;\n }\n\n return $ns;\n }", "private function createRootElement(): \\DOMElement {\n $attribute = [\n 'office:version' => '1.2',\n 'xmlns:office' => 'urn:oasis:names:tc:opendocument:xmlns:office:1.0',\n 'xmlns:style' => 'urn:oasis:names:tc:opendocument:xmlns:style:1.0',\n 'xmlns:text' => 'urn:oasis:names:tc:opendocument:xmlns:text:1.0',\n 'xmlns:table' => 'urn:oasis:names:tc:opendocument:xmlns:table:1.0',\n 'xmlns:draw' => 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0',\n 'xmlns:fo' => 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0',\n 'xmlns:xlink' => 'http://www.w3.org/1999/xlink',\n 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/',\n 'xmlns:meta' => 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0',\n 'xmlns:number' => 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0',\n 'xmlns:svg' => 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0',\n 'xmlns:chart' => 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0',\n 'xmlns:dr3d' => 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0',\n 'xmlns:math' => 'http://www.w3.org/1998/Math/MathML',\n 'xmlns:form' => 'urn:oasis:names:tc:opendocument:xmlns:form:1.0',\n 'xmlns:script' => 'urn:oasis:names:tc:opendocument:xmlns:script:1.0',\n 'xmlns:ooo' => 'http://openoffice.org/2004/office',\n 'xmlns:ooow' => 'http://openoffice.org/2004/writer',\n 'xmlns:oooc' => 'http://openoffice.org/2004/calc',\n 'xmlns:dom' => 'http://www.w3.org/2001/xml-events',\n 'xmlns:rpt' => 'http://openoffice.org/2005/report',\n 'xmlns:of' => 'urn:oasis:names:tc:opendocument:xmlns:of:1.2',\n 'xmlns:xhtml' => 'http://www.w3.org/1999/xhtml',\n 'xmlns:grddl' => 'http://www.w3.org/2003/g/data-view#',\n 'xmlns:tableooo' => 'http://openoffice.org/2009/table',\n 'xmlns:css3t' => 'http://www.w3.org/TR/css3-text/',\n 'xmlns:xforms' => 'http://www.w3.org/2002/xforms',\n 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema',\n 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',\n 'xmlns:field' => 'urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0',\n 'xmlns:formx' => 'urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0'];\n\n $rootElement = $this->createNewElement('office:document-content', $attribute);\n $bodyElement = $this->createNewElement('office:body', $attribute);\n $textElement = $this->createNewElement('office:text');\n\n $this->getDocument()->appendChild($rootElement);\n $rootElement->appendChild($bodyElement);\n $bodyElement->appendChild($textElement);\n\n return $textElement;\n }", "public function getNamespaceName();", "function getNamespace();", "function getNamespace();", "public static function copyElement(DOMElement $element, DOMElement $parent = NULL)\n {\n if ($parent === NULL) {\n $document = new DOMDocument();\n } else {\n $document = $parent->ownerDocument;\n }\n\n $namespaces = array();\n for ($e = $element; $e !== NULL; $e = $e->parentNode) {\n foreach (SAML2_Utils::xpQuery($e, './namespace::*') as $ns) {\n $prefix = $ns->localName;\n if ($prefix === 'xml' || $prefix === 'xmlns') {\n continue;\n }\n $uri = $ns->nodeValue;\n if (!isset($namespaces[$prefix])) {\n $namespaces[$prefix] = $uri;\n }\n }\n }\n\n /** @var DOMElement $newElement */\n $newElement = $document->importNode($element, TRUE);\n if ($parent !== NULL) {\n /* We need to append the child to the parent before we add the namespaces. */\n $parent->appendChild($newElement);\n }\n\n foreach ($namespaces as $prefix => $uri) {\n $newElement->setAttributeNS($uri, $prefix . ':__ns_workaround__', 'tmp');\n $newElement->removeAttributeNS($uri, '__ns_workaround__');\n }\n\n return $newElement;\n }", "public function _set_namespace_item($item, $section);", "public function namespaceAlias() {}", "public function __construct($element = null)\n {\n $this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces);\n parent::__construct($element);\n }", "public function __construct($element = null)\n {\n $this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces);\n parent::__construct($element);\n }", "public function updateXmp($namespace, $tagName, $value) {}", "function __setRoot() {\r\n\t\t$this->root = $this->domFragment->createElementNS(self :: TEXT, 'text:user-field-decls');\r\n\t}", "public function setNamespace($namespace)\n {\n // check if the namespace is valid\n if (!in_array($namespace, $this->_getNamespaces())) {\n throw Faett_Channel_Exceptions_InvalidNamespaceException::create(\n \t'Invalid namespace ' . $namespace\n );\n }\n // initialize the namespace\n $this->_namespace = 'http://pear.php.net/dtd/' . $namespace;\n }", "public function visitNamespaceData(\n /*INamespaceData*/ $node) /*: mixed*/ {\n $nested_namespaces = Vector {};\n foreach ($node->getNestedNamespaces() as $nested_namespaces_elem) {\n $nested_namespaces[] = /*(string)*/$nested_namespaces_elem->accept($this);\n }\n $types = Vector {};\n foreach ($node->getTypes() as $types_elem) {\n $types[] = /*(string)*/$types_elem->accept($this);\n }\n $functions = Vector {};\n foreach ($node->getFunctions() as $functions_elem) {\n $functions[] = /*(string)*/$functions_elem->accept($this);\n }\n\n $result = $this->visitVector($node->getComments(), $this->indent,\n \"\\n\".$this->indent, \"\\n\".$this->indent, '');\n $result .= 'namespace '.$node->getName().\" {\\n\";\n $this->indent .= ' ';\n $result .= $this->visitVector(\n $functions, $this->indent, \"\\n\\n\".$this->indent, \"\\n\\n\");\n $result .= $this->visitVector(\n $types, $this->indent, \"\\n\\n\".$this->indent, \"\\n\\n\");\n $result .= $this->visitVector(\n $nested_namespaces, $this->indent, \"\\n\\n\".$this->indent, \"\\n\\n\");\n $this->indent = /*(string)*/substr($this->indent, 2);\n $result .= \"\\n\".$this->indent.'}';\n\n return $result;\n }", "function startNameSpace($parser,$prefix,$uri=NULL)\n\t{\n\t\tunset($parser);\n\t\tunset($prefix);\n\n\t\tarray_push($this->namespace_stack,strtolower($uri));\n\t}", "public function replaceNamespace(string $namespace, $hints);", "public function appendElementPrefix($prefix, $name, $content = null, $asTextnode = FALSE) {\n $node = $this->ownerDocument->createElementPrefix($prefix, $name, $content, $asTextnode);\n $this->appendChild($node);\n return $node;\n }", "public function addLoadNamespace($ns) {\r\n\t\t$this->_loadNamespaces[]=(string)$ns;\r\n\t\treturn $this;\r\n\t}", "public function identifiedByNamespace(string $namespace): self\n {\n $this->getCurrent()->addNamespace($namespace);\n return $this;\n }", "public function removeXmlnsViewHelperNamespaceDeclarationsDataProvider() {}", "private function updateNamespace(): void\n {\n //now path is totally sorted, update namespace based on path\n foreach ($this->filesCreated as $filePath) {\n $this->findAndReplaceHelper->setNamespaceFromPath(\n $filePath,\n $this->srcSubFolderName,\n $this->projectRootNamespace\n );\n }\n }", "public function AddContentTypeElement(DOMElement $element) {\n\t\t$this->_DocumentRoot->appendChild($element);\n\t}", "function getNamespace ();", "public function setNamespacing( $namespace )\n {\n $this->namespacing = $namespace;\n }", "protected function appendRootNamespace()\n {\n return '\\\\Models\\\\Filters';\n }", "public function setNamespaceSeparator($separator)\n\t{\n\t\t$this->_namespaceSeparator = $separator;\n\t\treturn $this;\n\t}", "public function __construct(array $namespaces = array())\n\t{\n\t\t$this->namespaces = $namespaces;\n\t}", "function getNamespaces ()\n {\n if (isset($this->_index['NS'])) return $this->_index['NS'];\n else return array();\n }", "public function setNamespace(array $namespace)\n\t{\n\t\t$this->_namespace = $namespace;\n\t\treturn $this;\n\t}", "function _StartElement($parser, $name, $attrs) {\n $this->_CurrentNode =& $this->_CurrentNode->AppendNode($name);\n }", "public function add(string $path, string $namespace): self;", "public function setNamespace($namespace) {\n $this->namespace = $namespace;\n }", "public function set($namespace, $tagName, $value) {}", "public function getAttributeNamespaceURI($index = null);", "public function __construct( $namespace ){ \n \n $this->setNamespace( $namespace );\n \n }" ]
[ "0.66407657", "0.65517014", "0.6223382", "0.62108576", "0.61992115", "0.6158079", "0.6137923", "0.6093903", "0.59161717", "0.58535856", "0.58509105", "0.5779897", "0.576871", "0.5742723", "0.57398623", "0.57291967", "0.5670539", "0.56684786", "0.56622654", "0.5642368", "0.5611311", "0.5609293", "0.5603309", "0.5526523", "0.55156577", "0.5507198", "0.54729056", "0.54421157", "0.543185", "0.5402791", "0.5394256", "0.5367188", "0.5364114", "0.5330355", "0.53163844", "0.53074175", "0.5307327", "0.5301957", "0.5301957", "0.5301957", "0.5301957", "0.5301957", "0.5301957", "0.52966464", "0.5290333", "0.52859294", "0.52159154", "0.52159154", "0.52159154", "0.5202853", "0.5186749", "0.51560265", "0.513319", "0.51282525", "0.5125829", "0.5112824", "0.5067708", "0.5036527", "0.50312877", "0.50085795", "0.49884716", "0.49852362", "0.49420282", "0.49270067", "0.49230868", "0.4912791", "0.49077782", "0.4902038", "0.48769876", "0.48769876", "0.48691502", "0.4865101", "0.48598805", "0.4850996", "0.4850996", "0.48446676", "0.4836142", "0.48254812", "0.4820974", "0.48170084", "0.48094857", "0.47958392", "0.47914216", "0.47904465", "0.47868174", "0.47844747", "0.47803888", "0.47721255", "0.47621673", "0.47485447", "0.47464266", "0.47208822", "0.47079125", "0.47073445", "0.4701969", "0.46987456", "0.46851566", "0.46786505", "0.46733359", "0.46717653" ]
0.6944918
0
Validate that the patch has been constructed correctly and populates the $this>operations array.
private function validate_patch(array $patch) { $namespaces = array(); if (isset($patch['ns'])) { if (!is_array($patch['ns'])) { throw new XMLPatcherException('Namespaces section of patch must contain an array', 904); } else { foreach ($patch['ns'] as $prefix => $uri) { if (is_int($prefix)) { throw new XMLPatcherException('Namespaces in patch must be an associative array of prefix => URI.', 904); } if (isset($namespaces[$prefix]) && $namespaces[$prefix] != $uri) { throw new XMLPatcherException(sprintf('More than one namespace has the prefix (%s) but has different URIs.', $prefix), 904); } $namespaces[$prefix] = $uri; } } } if (isset($patch['changes'])) { if (is_array($patch['changes'])) { foreach ($patch['changes'] as $change) { if (!isset($change['type'])){ throw new XMLPatcherException('Patch has a change without a "type": ' . implode(' - ', $change)); } if ($change['type'] == 'replace' && !(isset($change['old']) && isset($change['new']))) { throw new XMLPatcherException('Replace patch is missing a required element (old|new)', 903); } else if ($change['type'] == 'add' && !(isset($change['parent']) && isset($change['new']))) { throw new XMLPatcherException('Add patch is missing a required element (parent|new)', 903); } else if ($change['type'] == 'remove' && !(isset($change['old']))) { throw new XMLPatcherException('Remove patch is missing a required element (old)', 903); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAddOperation()\n {\n $patch = new Patch();\n $op = new Resources\\MockAtomic();\n $patch->addOperation($op);\n\n $this->assertNotEmpty(json_decode($patch));\n }", "public function __invoke(string $name, $_): ValidationResult\n {\n // used as anything other than first in list.\n $value = $this->input->get();\n if (is_array($value) !== true) {\n $message = sprintf(\n \"Patch '%s' must be an array of values, each with op, path and value set\",\n $name\n );\n\n return ValidationResult::errorResult($message);\n }\n\n $errorMessages = [];\n $patchEntries = [];\n\n $count = 0;\n foreach ($value as $patchEntryInput) {\n $error = null;\n $patchEntry = null;\n\n // todo - do we want to support both array and object decoded patches?\n // for now we will.\n if (is_array($patchEntryInput) === true) {\n [$error, $patchEntry] = $this->checkArrayEntryForValidity($patchEntryInput);\n }\n else if (is_object($patchEntryInput) === true) {\n [$error, $patchEntry] = $this->checkObjectEntryForValidity($patchEntryInput);\n }\n else {\n $error = \"Patch entry $count is neither an object or an array.\";\n }\n\n if ($error !== null) {\n $errorMessages[] = \"Error for entry $count: \" . $error;\n }\n if ($patchEntry !== null) {\n $patchEntries[] = $patchEntry;\n }\n\n $count++;\n }\n\n if (count($errorMessages) > 0) {\n $message = sprintf(\n 'Data for %s is invalid: %s',\n $name,\n implode(', ', $errorMessages)\n );\n\n return ValidationResult::errorResult($message);\n }\n\n return ValidationResult::valueResult(new PatchEntries(...$patchEntries));\n }", "public function getOperations()\r\n {\r\n return $this->operations;\r\n }", "public function testEmptyPatch()\n {\n $patch = new Patch();\n\n $this->assertEquals('[]', (string)$patch);\n }", "public function getOperations()\n {\n return $this->operations;\n }", "protected function setupUpdateOperation()\n {\n// $this->setupCreateOperation();\n $this->addUserFields();\n $this->crud->setValidation(UpdateRequest::class);\n }", "public function testApplyPatch()\n {\n $patch = new Patch();\n $op = new Resources\\MockAtomic(function(Pointer $pointer){\n $value = 'baz';\n $pointer->set('/foo', $value);\n });\n $patch->addOperation($op);\n\n $target = ['foo'=>'bar'];\n $patch->apply($target);\n $this->assertEquals($target['foo'], 'baz');\n }", "protected function c_parseOperationAttributes() {\n\n //if ($this->clientoutput->status != \"successfull-ok\")\n // return false;\n \n $op = -1;\n for ($i = 0 ; $i < count($this->clientoutput->response) ; $i++) {\n\t\t\n if ($this->clientoutput->response[$i]['attributes'] == \"operation-attributes\")\n $op ++;\n\t\t\t\t\n $k = -1; \n for ($j = 0 ; $j < (count($this->clientoutput->response[$i]) - 1) ; $j ++)\n if (!empty($this->clientoutput->response[$i][$j]['name'])) {\n $k++;\n $l = 0;\n $this->parsed[$op][$k]['range'] = $this->clientoutput->response[$i]['attributes'];\n $this->parsed[$op][$k]['name'] = $this->clientoutput->response[$i][$j]['name'];\n $this->parsed[$op][$k]['type'] = $this->clientoutput->response[$i][$j]['type'];\n $this->parsed[$op][$k][$l] = $this->clientoutput->response[$i][$j]['value'];\n } else {\n $l ++;\n $this->parsed[$op][$k][$l] = $this->clientoutput->response[$i][$j]['value'];\n }\n }\n \n //$this->clientoutput->response = array();\n\n $this->client_operation_attributes = new stdClass();\n\t\t\n for ($op_nbr = 0 ; $op_nbr <= $op ; $op_nbr ++) {\n\t\t\n $op_index = \"op_\".$op_nbr;\n $this->client_operation_attributes->$op_index = new stdClass();\n\t\t\t\n for ($i = 0 ; $i < count($this->parsed[$op_nbr]) ; $i ++) {\n $name = $this->parsed[$op_nbr][$i]['name'];\n $php_name = str_replace('-','_',$name);\n $type = $this->parsed[$op_nbr][$i]['type'];\n $range = $this->parsed[$op_nbr][$i]['range'];\n $this->client_operation_attributes->$op_index->$php_name = new stdClass();\n $this->client_operation_attributes->$op_index->$php_name->_type = $type;\n $this->client_operation_attributes->$op_index->$php_name->_range = $range;\n for ($j = 0 ; $j < (count($this->parsed[$op_nbr][$i]) - 3) ; $j ++) {\n # This causes incorrect parsing of integer job attributes.\n # 2010-08-16\n # bpkroth\n #$value = self::_interpretAttribute($name,$type,$this->parsed[$job_nbr][$i][$j]);\n $value = $this->parsed[$op_nbr][$i][$j];\n $index = '_value'.$j;\n $this->client_operation_attributes->$op_index->$php_name->$index = $value;\n }\n }\n }\n \n $this->parsed = array();\n }", "public function testInvalidPatch($patchContent)\n {\n Patch::fromJSON($patchContent); \n }", "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "public function isPatch()\n {\n return $this->method === self::METHOD_PATCH;\n }", "protected function setupUpdateOperation()\n {\n $this->createUpdate();\n }", "public function isPatch() {\n return $this->method == self::METHOD_PATCH;\n }", "public function isPatch(): bool\n {\n return $this->getMethod() === self::METHOD_PATCH;\n }", "public function isPatch();", "protected function setupUpdateOperation()\n {\n return $this->setupCreateOperation();\n }", "public function testFromJSON()\n {\n $patch = new Patch();\n $patch->addOperation(new Operation\\Add('/foo', 'bar'));\n $patch->addOperation(new Operation\\Copy('/foo', '/bar'));\n $patch->addOperation(new Operation\\Move('/foo', '/bar'));\n $patch->addOperation(new Operation\\Remove('/foo'));\n $patch->addOperation(new Operation\\Replace('/foo', 'bar'));\n $patch->addOperation(new Operation\\Test('/foo', 'bar'));\n\n $this->assertEquals($patch, Patch::fromJSON($patch));\n }", "public function clearOperations()\n {\n $this->_operations = array();\n\n return $this;\n }", "public function patch()\n {\n #HTTP method in uppercase (ie: GET, POST, PATCH, DELETE)\n $sMethod = 'PATCH';\n $sTimeStamp = gmdate('c');\n\n #Creating the hash\n\t\t$oHash = new Hash($this->getSecretKey());\n\t\t$oHash->addData($this->getPublicKey());\n\t\t$oHash->addData($sMethod);\n\t\t$oHash->addData($this->getApiResource());\n\t\t$oHash->addData($this->getData());\n\t\t$oHash->addData($sTimeStamp);\n\n\t\t$sHash = $oHash->hash();\n\n $rCurlHandler = curl_init();\n curl_setopt($rCurlHandler, CURLOPT_URL, $this->getApiRoot() . $this->getApiResource());\n curl_setopt($rCurlHandler, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($rCurlHandler, CURLOPT_POSTFIELDS, $this->getData());\n curl_setopt($rCurlHandler, CURLOPT_CUSTOMREQUEST, $sMethod);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYHOST, 0);\n\n curl_setopt($rCurlHandler, CURLOPT_HTTPHEADER, [\n \"x-date: \" . $sTimeStamp,\n \"x-hash: \" . $sHash,\n \"x-public: \" . $this->getPublicKey(),\n \"Content-Type: text/json\",\n ]);\n $sOutput = curl_exec($rCurlHandler);\n $iHTTPCode = curl_getinfo($rCurlHandler, CURLINFO_HTTP_CODE);\n curl_close($rCurlHandler);\n\n Log::write('WebRequest', 'PATCH::REQUEST', $this->getApiRoot() . $this->getApiResource());\n Log::write('WebRequest', 'PATCH::DATA', $this->getData());\n Log::write('WebRequest', 'PATCH::HTTPCODE', $iHTTPCode);\n Log::write('WebRequest', 'PATCH::RESPONSE', $sOutput);\n\n $this->setData('');\n\n if ($iHTTPCode !== 204) {\n throw new InvalidApiResponse('HttpCode was ' . $iHTTPCode . '. Expected 204');\n }\n return $sOutput;\n }", "public function getIsPatch()\n {\n return $this->getMethod() === 'PATCH';\n }", "public function isPatch()\n {\n return $this->getMethod() === 'PATCH';\n }", "protected function validation($operation = 'create')\n {\n foreach($this->properties as $name => $property)\n {\n /** @var Property $property */\n $do_validation = ($operation == 'create') ? true : $property->initialized();\n if (!$property->isReadOnly() && $do_validation)\n {\n if (!$property->isValid())\n {\n $this->addError($property->name(), $property->getErrors());\n }\n }\n }\n return empty($this->errors);\n }", "public function isPatch() {\n return $this->method == 'PATCH';\n }", "public function resetPatch() {\n\n // TODO:\n \n }", "public function create() {\n $this->operationsModel->create($_POST);\n $this->response('',200,'Success');\n }", "public function setPatch($patch) : self\n {\n $this->initialized['patch'] = true;\n $this->patch = $patch;\n return $this;\n }", "public function isPatch()\n {\n return $this->isMethod('PATCH');\n }", "public function isPatch()\n {\n return $this->isMethod('PATCH');\n }", "public function getPatch()\n {\n return $this->patch;\n }", "public function getPatch()\n {\n return $this->patch;\n }", "public function testGetPatch(): void\n {\n $model = OsVersion::load([\n \"patch\" => 46290,\n ], $this->container);\n\n $this->assertSame(46290, $model->getPatch());\n }", "public function modify(string $section, PatchInterface $patch): array;", "protected function setupCreateOperation()\n {\n CRUD::setValidation(LocationRequest::class);\n\n CRUD::field('name');\n CRUD::field('bookinglink')->label('Booking URL');\n CRUD::field('phone')->label('Booking Phone');\n CRUD::field('provider_url')->label('Provider URL');\n CRUD::field('provider_phone');\n CRUD::field('address')\n ->type('textarea');\n CRUD::field('alternate_addresses')\n ->label('Alternate Addresses (first line of additional addresses for matching purposes only; one per line)')\n ->type('textarea');\n //CRUD::field('address2');\n //CRUD::field('city');\n //CRUD::field('state');\n CRUD::field('zip');\n CRUD::field('serves');\n CRUD::field('vaccinesoffered');\n CRUD::field('siteinstructions');\n CRUD::field('daysopen');\n CRUD::field('county');\n CRUD::field('latitude');\n CRUD::field('longitude');\n CRUD::field('system_type');\n CRUD::addField([\n 'name' => 'appointmentTypes',\n 'entity' => 'appointmentTypes',\n 'type' => 'relationship',\n 'attribute' => 'name',\n ]);\n CRUD::addField([\n 'name' => 'location_type_id',\n 'entity' => 'type',\n 'type' => 'relationship',\n 'attribute' => 'name',\n ]);\n CRUD::addField([\n 'name' => 'location_type_id',\n 'entity' => 'type',\n 'type' => 'relationship',\n 'attribute' => 'name',\n ]);\n CRUD::addField([\n 'name' => 'location_source_id',\n 'entity' => 'locationSource',\n 'type' => 'relationship',\n 'attribute' => 'name',\n ]);\n CRUD::addField([\n 'name' => 'data_update_method_id',\n 'entity' => 'dataUpdateMethod',\n 'type' => 'relationship',\n 'attribute' => 'name',\n ]);\n CRUD::addField([\n 'name' => 'collector_user_id',\n 'entity' => 'collectorUser',\n 'type' => 'relationship',\n 'attribute' => 'name',\n ]);\n CRUD::field('tags');\n\n /**\n * Fields can be defined using the fluent syntax or array syntax:\n * - CRUD::field('price')->type('number');\n * - CRUD::addField(['name' => 'price', 'type' => 'number'])); \n */\n }", "public function testPatchOnPopulated() {\n $sink = new Sink;\n $sink->table('ut_pop');\n $sink->initialize(TRUE);\n $sink->patch($available, $applied);\n\n $this->assertArrayHasKey('ut_pop', $available);\n $this->assertEquals(2, count($available['ut_pop']));\n\n $this->assertArrayHasKey('ut_pop', $applied);\n $this->assertEquals(2, count($applied['ut_pop']));\n $this->assertTrue($applied['ut_pop'][1]['result']);\n $this->assertTrue($applied['ut_pop'][2]['result']);\n\n $database = Database::instance();\n $columns = $database->list_columns('ut_pop');\n $this->assertArrayHasKey('editor', $columns);\n $this->assertArrayHasKey('modified', $columns);\n\n $items = DB::query(Database::SELECT, \"select * from ut_pop\")\n ->execute();\n $editors = $items->as_array('id', 'editor');\n $modified = $items->as_array('id', 'modified');\n $this->assertEquals('', $editors[1]);\n $this->assertEquals('Jan 2010', $modified[1]);\n $this->assertEquals('', $editors[3]);\n $this->assertEquals('Jan 2010', $modified[3]);\n }", "public function setOperations(array $operations): Options\n\t{\n\t\t$this->operations = $operations;\n\n\t\treturn $this;\n\t}", "public function getOperationParams()\n {\n return $this->operation_params;\n }", "public function setPatch($patch)\n {\n $this->patch = $patch;\n\n return $this;\n }", "public function addRequestChecks()\n {\n $data = $this->all();\n $data['is_post'] = $this->isPost();\n $data['is_update'] = $this->isPut();\n $data['is_editing'] = $this->isPost() || $this->isPut();\n $data['is_delete'] = $this->isDelete();\n\n $this->replace($data);\n\n return $this->all();\n }", "public function prepareForValidation(): void\n {\n $products = [];\n foreach ($this->products as $key => $product) {\n $products['products'][$key] = [\n 'id' => $product['id'],\n 'qty' => $product['qty'],\n 'product' => Product::find($product['id']),\n ];\n }\n\n $this->merge($products);\n }", "public function __clone () {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Invalid request.' ), $this->_version );\n\t}", "public function updateUserOperationAction()\n {\n /** @var Object_Operation $operation */\n $data = $this->getRequestData();\n if (isset($data['operation_id'])) {\n $operation = Object_Operation::getById($data['operation_id']);\n if (!$operation) {\n $this->setErrorResponse('no Operation with this operation_id!');\n } elseif ($this->getDeviceSession()->getUserId() != $operation->getCreator()->getId()) {\n $this->setErrorResponse('you have no rights to change this Operation!');\n } else {\n if (isset($data['title'])) {\n $operation->setTitle($data['title']);\n }\n if (isset($data['explanation'])) {\n $operation->setExplanation($data['explanation']);\n }\n if (isset($data['photo'])) {\n $operation->setPhoto(Asset_Image::getById($data['photo']));\n }\n if (isset($data['video'])) {\n $operation->setVideo(Asset_Video::getById($data['video']));\n }\n if (isset($data['latitude']) && isset($data['longtitude'])) {\n $geo = new Object_Data_Geopoint($data['longtitude'], $data['latitude']);\n $operation->setLocation($geo);\n }\n if (isset($data['activity_id'])) {\n $operation->setActivity(Object_Activity::getById($data['activity_id']));\n }\n if (!$operation->save()) {\n $this->setErrorResponse('cannot update Operation object');\n }\n }\n } else {\n $this->setErrorResponse('operation_id is mandatory field for this request!');\n }\n\n $this->_helper->json($operation);\n }", "public function isPatch(): bool {}", "protected function getSetUpOperation()\n {\n return new \\PHPUnit_Extensions_Database_Operation_Composite(array(\n new Db\\Operation\\Truncate(),\n new Db\\Operation\\Insert(),\n ));\n }", "public function loadLockedPatches()\n {\n $locked = $this->locker->isLocked();\n if (!$locked) {\n $filename = pathinfo($this->getLockFile()->getPath(), \\PATHINFO_BASENAME);\n $this->io->write(\"<warning>$filename does not exist. Creating a new $filename.</warning>\");\n $this->createNewPatchesLock();\n return;\n }\n\n $this->patchCollection = PatchCollection::fromJson($this->locker->getLockData());\n }", "private function init(): void {\n\t\t$this->required = $this->json['required'] ?? array();\n\t\t$this->additional_properties = $this->json['additionalProperties'] ?? false;\n\t\t$this->required = $this->json['required'] ?? array();\n\n\t\t$properties = $this->json['properties'] ?? array();\n\t\t$definitions = $this->json['definitions'] ?? array();\n\t\t$all_of = $this->json['allOf'] ?? array();\n\n\t\tforeach ( $definitions as $key => $definition ) {\n\t\t\t$this->definitions[ $key ] = self::from_json( $this->get_name() . '/definitions/' . $key, array( 'properties' => $definition ) );\n\t\t}\n\n\t\tforeach ( $properties as $key => $property ) {\n\t\t\t// If object, create a new schema.\n\t\t\tif ( 'object' === ( $property['type'] ?? '' ) ) {\n\t\t\t\t$this->properties[ $key ] = self::from_json( $this->get_name() . '/properties/' . $key, $property );\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( self::REF__KEY === $key ) {\n\t\t\t\t$this->properties[ $key ] = $this->get_reference( $property );\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$this->properties[ $key ] = Property::from_json( $this, $key, $property );\n\t\t}\n\n\t\tforeach ( $all_of as $one_key => $one_value ) {\n\t\t\t$key = array_key_first( $one_value );\n\t\t\t$value = $one_value[ $key ];\n\n\t\t\tswitch ( $key ) {\n\t\t\t\tcase self::REF__KEY:\n\t\t\t\t\t$reference = $this->get_reference( $value );\n\t\t\t\t\t$this->properties = array_merge( $this->properties, $reference->get_properties() );\n\t\t\t\t\t$this->required = array_merge( $this->required, $reference->get_required() );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'properties':\n\t\t\t\t\t$one_prop = self::from_json( $this->get_name() . '/oneof/' . $one_key, $one_value );\n\t\t\t\t\t$this->properties = array_merge( $this->properties, $one_prop->get_properties() );\n\t\t\t\t\t$this->required = array_merge( $this->required, $one_prop->get_required() );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "protected function prepareForValidation() {\n\n // converting date and hour to datetime\n if ($this->has(['start_date', 'start_time'])) {\n $start_datetime = Carbon::createFromFormat('Y-m-d H:i', $this->input('start_date').\" \".$this->input('start_time'));\n $start_datetime->setTimezone('Europe/London');\n $this->merge(['start_date' => $start_datetime]);\n }\n\n if ($this->has(['end_date', 'end_time'])) {\n $end_datetime = Carbon::createFromFormat('Y-m-d H:i', $this->input('end_date').\" \".$this->input('end_time'));\n $this->merge(['end_date' => $end_datetime]);\n }\n\n if ($this->has('starting_bid')) {\n $this->merge(['starting_bid' => ceil($this->input('starting_bid') * 100)]);\n }\n\n // determine if minimum increment is percentage or fixed\n if ($this->has('increment_val')) {\n if ($this->has('percent_check') && $this->input('percent_check')) // percentual\n $this->merge(['increment_percent' => $this->input('increment_val')]);\n else // fixed\n $this->merge(['increment_fixed' => ceil($this->input('increment_val') * 100)]);\n }\n }", "protected function getSetUpOperation()\n {\n return new \\PHPUnit_Extensions_Database_Operation_Composite(array(\n \\PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(),\n \\PHPUnit_Extensions_Database_Operation_Factory::INSERT()\n ));\n }", "protected function setupUpdateOperation()\n {\n // $this->crud->modifyField('status', 'Enabled');\n //$password = bcrypt('Password');\n //$this->crud->modifyField('password', bcrypt('Password'));\n $this->setupCreateOperation();\n }", "public function testAddRouteShorthandMethodPatch()\n {\n $this->collection->patch('name', '/', 'action');\n\n $this->assertCount(1, $this->collection->all());\n\n $routes = $this->collection->all();\n\n $this->assertArrayHasKey('0', $routes);\n\n $this->assertContains('PATCH', $routes[0]->getMethods());\n }", "function setOperation($operation) {\n $this->checkChange();\n\n $this->operation = $operation;\n return $this;\n }", "public function patch() {\n\t\t$this->method('PATCH');\n\t\treturn $this;\n\t}", "public function getOperationMade() {}", "public function getOperations()\n {\n $operations = [];\n foreach (static::attributes() as $attribute => $type) {\n if ($type === Operation::class && isset($this->$attribute)) {\n $operations[$attribute] = $this->$attribute;\n }\n }\n return $operations;\n }", "public function __construct(Operation $operation)\n {\n $this->operation = $operation;\n }", "public static function isPatch(): bool {\r\n return static :: isMethod('patch');\r\n }", "public function testRevertPatch()\n {\n $patch = new Patch();\n $op = new Resources\\MockAtomic(function(Pointer $pointer){\n $value = 'baz';\n $pointer->set('/foo', $value);\n }, function(Pointer $pointer){\n $value = 'reverted';\n $pointer->set('/foo', $value);\n });\n $patch->addOperation($op);\n $op = new Resources\\MockAtomic(function(Pointer $pointer){\n throw new Operation\\Exception('Forced Reversion');\n });\n $patch->addOperation($op);\n\n $target = ['foo'=>'bar'];\n try {\n $patch->apply($target);\n } catch (JSONPatch\\Exception $e) {\n\n }\n $this->assertEquals($target['foo'], 'reverted');\n }", "public function __clone()\n\t{\n\t\t$this->errors = array();\n\t\t$this->messages = array();\n\t}", "public function setOperations(Operations $v = null)\n {\n if ($v === null) {\n $this->setOpId(NULL);\n } else {\n $this->setOpId($v->getOpId());\n }\n\n $this->aOperations = $v;\n\n // Add binding for other direction of this n:n relationship.\n // If this object has already been added to the Operations object, it will not be re-added.\n if ($v !== null) {\n $v->addOperationPrimes($this);\n }\n\n\n return $this;\n }", "public function __clone() {\n $this->name = clone $this->name;\n $this->type = clone $this->type;\n $this->op = clone $this->op;\n\n $this->currentPeriod = clone $this->currentPeriod;\n $this->previousPeriod = clone $this->previousPeriod;\n\n $products = array();\n foreach ($this->products as $idx=>$product) {\n $products[] = clone $product;\n }\n $this->products = $products;\n }", "public function hasOperations()\n\t{\n\t\treturn count($this->operations) > 0;\n\t}", "protected function prepareForValidation()\n {\n $this->merge([\n self::ATTRIBUTE_REFERER => $this->prepareArray($this->input(self::ATTRIBUTE_REFERER)),\n self::ATTRIBUTE_IP => $this->prepareArray($this->input(self::ATTRIBUTE_IP)),\n ]);\n }", "public function updateRules()\n {\n return [\n 'coordinates' => [\n Rule::requiredIf(fn() => request()->has('photo')),\n new Coordinate()\n ],\n ];\n }", "abstract protected function requiredOperations1(): void;", "public function testJobPatch()\n {\n\n }", "protected function performCreate(): bool\n {\n // Abort if resource does not support create operations\n if (!$this->isCreatable()) {\n throw new UnsupportedOperation(sprintf('API does not support create operation for %s resources', $this->resourceNameSingular()));\n }\n\n $prepared = $this->prepareBeforeCreate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->post($this->endpoint(), $payload);\n\n // Extract and (re)populate resource\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "function getOperation() {\n return $this->operation;\n }", "public function checkOperationality()\n {\n }", "public function testPatchNoPatches() {\n $sink = new Sink;\n $sink->table('db_deltas');\n $sink->patch($available, $applied);\n $this->assertEquals(0, count($available));\n $this->assertEquals(0, count($applied));\n }", "protected function prepareForValidation(): void\n {\n // $this->merge([\n // 'created_by' => Auth::user()->id\n // ]);\n // $this->merge([\n // 'updated_by' => Auth::user()->id\n // ]);\n\n // $this->merge([\n // 'status' => 'Active',\n // 'name' => $this->input('display_name'),\n // 'password' => ''\n // ]);\n\n\n // $this->merge([\n // 'slug' => str_slug($this->input('title'))\n // ]);\n // $this->merge([\n // 'posted_at' => Carbon::parse($this->input('posted_at'))\n // ]);\n }", "private function givenServiceWithOperations()\n {\n // Response GetBook types\n $responseBookName = new ComplexType($this->config, 'Method_Get_Book_Response_BOOK_BOOK_NAME');\n $responseBookName->addMember('string', 'bookName', false);\n $responseBook = new ComplexType($this->config, 'Method_Get_Book_Response_BOOK');\n $responseBook->addMember('int', 'bookId', false);\n // Base type example\n $responseBook->setBaseType($responseBookName);\n $returnGetBookType = new ComplexType($this->config, 'Get_Book_Type_Response');\n $returnGetBookType->addMember('Method_Get_Book_Response_BOOK', 'book_response', false);\n // Request GetBook types\n $bookType = new Enum($this->config, 'Book_Type_Enumeration', 'string');\n $bookType->addValue('fiction');\n $bookType->addValue('comedy');\n $requestBook = new ComplexType($this->config, 'Method_Get_Book_Request_BOOK');\n $requestBook->addMember('int', 'bookId', false);\n $requestBook->addMember('Book_Type_Enumeration', 'genre', false);\n $requestGetBook = new ComplexType($this->config, 'Get_Book_Type_Request');\n $requestGetBook->addMember('Method_Get_Book_Request_BOOK', 'book_request', false);\n // Operation GetBook\n $getBookOperation = new Operation('GetBook', 'Get_Book_Type_Request $request', 'Get Book', 'Get_Book_Type_Response');\n // Response GetAuthors type\n $responseAuthor = new ComplexType($this->config, 'Get_Authors_Response_Author');\n $responseAuthor->addMember('int', 'authorId', false);\n $responseAuthor->addMember('string', 'authorName', false);\n $returnGetAuthors = new ComplexType($this->config, 'Method_Get_Authors_Response');\n $returnGetAuthors->addMember('Get_Authors_Response_Author[]', 'Get_Authors_Response_Author', false);\n // Request GetAuthors type\n $requestGetAuthor = new ComplexType($this->config, 'Method_Get_Authors_Request');\n $requestGetAuthor->addMember('Method_Get_Book_Request_BOOK', 'book_request', false);\n // Operation GetAuthors\n $getAuthorsOperator = new Operation('GetAuthor', 'Method_Get_Authors_Request $request', 'Get Authors', 'Method_Get_Authors_Response');\n // Request SetVersion\n $requestSetVersion = new ComplexType($this->config, 'Method_Set_Version_Request');\n // Operation SetVersion\n $setVersionOperator = new Operation('SetVersion', 'Method_Set_Version_Request $request', 'Set version', null);\n // Service creation\n $types = [\n $responseBookName,\n $responseBook,\n $returnGetBookType,\n $requestBook,\n $requestGetBook,\n $responseAuthor,\n $returnGetAuthors,\n $requestGetAuthor,\n $bookType,\n $requestSetVersion,\n ];\n $service = new Service($this->config, 'Book_Shell', $types, 'Book shells');\n $service->addOperation($getBookOperation);\n $service->addOperation($getAuthorsOperator);\n $service->addOperation($setVersionOperator);\n\n return $service;\n }", "protected function setupCreateOperation()\n {\n CRUD::setValidation(DeliveryNoteDetailRequest::class);\n\n CRUD::setFromDb(); // fields\n\n /**\n * Fields can be defined using the fluent syntax or array syntax:\n * - CRUD::field('price')->type('number');\n * - CRUD::addField(['name' => 'price', 'type' => 'number']));\n */\n }", "public function getOperationWithResponses(): Operation\n {\n $this->assignAnnotations();\n $this->assignDocBlockExceptions();\n $this->assignSchema();\n $this->assignDefaultResponses();\n\n return $this->operation;\n }", "protected function setupCreateOperation()\n {\n CRUD::setValidation(CommunicationRequest::class);\n $this->crud->setCreateContentClass('col-md-12');\n // $this->crud->addField([\n // 'label' => 'Case Number',\n // 'type' => 'text',\n // 'name' => 'code',\n // 'wrapper' => [\n // 'class' => 'form-group col-md-6'\n // ]\n // ]);\n $this->crud->addField([\n 'label' => 'Owner',\n 'type' => 'select',\n 'name' => 'user_id',\n 'attribute' =>'name',\n 'entity' => 'user',\n 'model' => 'App\\Models\\user',\n 'wrapper' => [\n 'class' => 'form-group col-md-6'\n ]\n ]);\n $this->crud->addField([\n\n 'label' => 'Company',\n 'type' => 'hidden',\n 'name' => 'person_id',\n 'attribute' =>'company_name',\n 'attributes' => [\n 'readonly' => 'readonly',\n ],\n 'default' => request()->input('person_id', ''),\n\n ]);\n $this->crud->addField([\n 'label' => 'Type',\n 'type' => 'select',\n 'name' => 'communication_types_id',\n 'type' => 'select_from_array',\n 'options' => [\n 'Out Of Stock' => 'Out Of Stock',\n 'Out Of List' => 'Out Of List',\n 'Complaint' => 'Complaint',\n 'Price' => 'Price',\n 'Evaluation' => 'Evaluation',\n ],\n 'allows_null' => true,\n 'wrapper' => [\n 'class' => 'form-group col-md-6'\n ]\n ]);\n $this->crud->addField([\n 'label' => 'Communication',\n 'type' => 'select_from_array',\n 'name' => 'communication_ways_id',\n 'allows_null' => true,\n 'options' => [\n 'Phone' => 'Phone',\n 'Telegram' => 'Telegram',\n 'Physical' => 'Physical',\n 'E-Mail' => 'E-Mail',\n 'Facebook' => 'Facebook',\n ],\n 'wrapper' => [\n 'class' => 'form-group col-md-6'\n ]\n ]);\n $this->crud->addField([\n 'label' => 'All Day(If Complaint)',\n 'type' => 'radio',\n 'name' => 'comp_type',\n 'options' => [\n 0 => \"product\",\n 1 => \"Service\",\n ],\n 'wrapper' => [\n 'class' => 'form-group col-md-6'\n ]\n ]);\n $this->crud->addField([\n 'label' => 'Product',\n 'type' => 'text',\n 'name' => 'product',\n 'wrapper' => [\n 'class' => 'form-group col-md-6'\n ]\n ]);\n $this->crud->addField([\n 'label' => 'Quantity',\n 'type' => 'number',\n 'name' => 'quantity',\n 'wrapper' => [\n 'class' => 'form-group col-md-6'\n ]\n ]);\n $this->crud->addField([\n 'label' => 'Second',\n 'type' => 'number',\n 'name' => 'second',\n 'wrapper' => [\n 'class' => 'form-group col-md-6'\n ]\n ]);\n $this->crud->addField([\n 'label' => 'Remarks',\n 'type' => 'textarea',\n 'name' => 'remarks',\n 'wrapper' => [\n 'class' => 'form-group col-md-12'\n ]\n ]);\n\n }", "public function validate()\r\n {\r\n //clean out the errors in the errors array\r\n $this->errors = array(); //set it equal to a new empty array to clear the items in the array\r\n\r\n // need find a way to check each property\r\n // lets uses a naming convention that any function that begins with 'validate_'\r\n //will be executed in this method\r\n $methods = get_class_methods($this);\r\n $validationResults = array();\r\n foreach($methods as $func)\r\n {\r\n //see if the function begins with the text 'validate_'\r\n if(strpos($func,'validate_')===0)\r\n {\r\n //call the method with the name stored in the $func variable\r\n $validationResults[] = call_user_func([$this,$func]);\r\n }\r\n }\r\n //check to see if any of the property validation functions returned false\r\n return !in_array(false,$validationResults);\r\n\r\n }", "public function update(): self\n {\n /** @var self $data */\n $data = $this;\n\n if(!$this->validate(\"patch\", $missing))\n {\n throw new \\Exception(\"[MVQN\\REST\\Endpoints\\Endpoint] Annotations for the '\".get_class($this).\"' class require valid values be set \".\n \"on all of the following properties before attempting an update():\\n> \".implode(\"\\n> \", $missing).\"\\n\");\n }\n\n /** @var self $endpoint */\n $endpoint = self::patch($data, [ \"id\" => $this->getId() ]);\n\n return $endpoint;\n }", "private function checkObjectsErrorsOrConfirmations()\n\t{\n\t\tif (!empty(self::$obj_ts_common->errors))\n\t\t\t$this->errors = array_merge($this->errors, self::$obj_ts_common->errors);\n\n\t\tif (!empty(self::$obj_ts_common->confirmations))\n\t\t\t$this->confirmations = array_merge($this->confirmations, self::$obj_ts_common->confirmations);\n\t}", "public function getOperation();", "public function parseCalculations() {\n foreach($this->calculations as $calculation) {\n $this->parseCalculation($calculation);\n }\n $calculationResult = $this->calculationResults[count($this->calculationResults)-1];\n $calculationResultMethod = $calculationResult->getMethod();\n if ($this->parserMethodsExtra->isGMethod($calculationResultMethod)) {\n $calculationResult->insert();\n } else {\n foreach ($this->calculationResults as $calculationResult) {\n $calculationResult->insert();\n }\n }\n }", "public function validateAndParseArgs() {\n $areParamsValid = true;\n \n // Validate Command\n if(!in_array($this->cmd, $this->validCommands)) {\n throw new \\Exception(\"Invalid Command '\" . $this->cmd . \"'.\");\n }\n \n // Validate Command Parameters\n switch($this->cmd) {\n case 'add':\n // Param order should be: pet_type, item_type, name, color, lifespan, age, price\n if(count($this->cmdParams) !== 7) { $areParamsValid = false; }\n if(!is_numeric($this->cmdParams[4]) || !is_numeric($this->cmdParams[5]) || !is_numeric($this->cmdParams[6])) {\n $areParamsValid = false;\n }\n // Do not allow negative values\n if($this->cmdParams[4][0] === \"-\" || $this->cmdParams[5][0] === \"-\" || $this->cmdParams[6][0] === \"-\") {\n $areParamsValid = false;\n }\n break;\n case 'update':\n // Param order should be: id, pet_type, item_type, name, color, lifespan, age, price\n if(count($this->cmdParams) !== 8) { $areParamsValid = false; }\n if(!is_numeric($this->cmdParams[0]) || !is_numeric($this->cmdParams[5]) || !is_numeric($this->cmdParams[6]) || !is_numeric($this->cmdParams[7])) {\n $areParamsValid = false;\n }\n // Do not allow negative values\n if($this->cmdParams[5][0] === \"-\" || $this->cmdParams[6][0] === \"-\" || $this->cmdParams[7][0] === \"-\") {\n $areParamsValid = false;\n }\n break;\n case 'delete':\n if(count($this->cmdParams) !== 1) { $areParamsValid = false; }\n if(!is_numeric($this->cmdParams[0])) {\n $areParamsValid = false;\n }\n break;\n case 'list':\n // 'list' can come with a 'sort' and/or 'filter parameter\n if(isset($this->cmdParams[0])) {\n if($this->cmdParams[0] === \"filters\") {\n $this->arg_list_filters = ((isset($this->cmdParams[1])) ? $this->cmdParams[1] : null);\n } elseif($this->cmdParams[0] === \"sort\") {\n $this->arg_list_sort = ((isset($this->cmdParams[1])) ? $this->cmdParams[1] : null);\n } else {\n $areParamsValid = false;\n }\n }\n if(isset($this->cmdParams[2])) {\n if($this->cmdParams[2] === \"filters\") {\n $this->arg_list_filters = ((isset($this->cmdParams[3])) ? $this->cmdParams[3] : null);\n } elseif($this->cmdParams[2] === \"sort\") {\n $this->arg_list_sort = ((isset($this->cmdParams[3])) ? $this->cmdParams[3] : null);\n } else {\n $areParamsValid = false;\n }\n }\n break;\n case 'help':\n break;\n default:\n throw new \\Exception(\"This line should not have been reached; bug in code.\");\n }\n \n if(!$areParamsValid) {\n throw new \\Exception(\"Invalid parameters passed to script.\");\n }\n }", "public function rules()\n {\n \n return [\n 'operation_reference' => 'required|exists:operations,id',\n ];\n }", "protected function postValidation()\n {\n $errors = array();\n\n // \"Length of reference\" field.\n if (!($length = Tools::getValue('ORDERREF_LENGTH'))) {\n $errors[] = $this->l('The \"Length of reference\" field is required.');\n }\n elseif (!Validate::isInt($length)) {\n $errors[] = $this->l('The \"Length of reference\" field must be an integer number.');\n }\n elseif (!($length >= self::ORDERREF_LENGTH_MIN && $length <= self::ORDERREF_LENGTH_MAX)) {\n $errors[] = $this->l('The \"Length of reference\" field limits exceed. Value must be between')\n . ' ' . self::ORDERREF_LENGTH_MIN . ' '\n . $this->l('and')\n . ' ' . self::ORDERREF_LENGTH_MAX;\n }\n \n // \"How to generate\" field.\n if (!($mode = Tools::getValue('ORDERREF_MODE'))) {\n $errors[] = $this->l('The \"How to generate order references\" field is required.');\n }\n elseif (!(Validate::isInt($mode) &&\n ($mode == self::ORDERREF_MODE_RANDOM\n || $mode == self::ORDERREF_MODE_CONSEQUENT\n || $mode == self::ORDERREF_MODE_PS))) {\n $errors[] = $this->l('The \"How to generate order references\" field has illegal value.');\n }\n\n return $errors;\n }", "public function __clone() {\n $this->actions = clone $this->actions;\n $this->actions->setRoot($this->getRoot());\n $this->conditions = clone $this->conditions;\n $this->conditions->setRoot($this->getRoot());\n }", "protected function setupCreateOperation()\n {\n CRUD::setValidation(StoreRequest::class);\n\n /**\n * Fields can be defined using the fluent syntax or array syntax:\n * - CRUD::field('price')->type('number');\n * - CRUD::addField(['name' => 'price', 'type' => 'number']));\n */\n }", "protected function validatePatch(InputFilterInterface $inputFilter, $data, $isCollection)\n {\n if ($isCollection) {\n $validationGroup = $data;\n foreach ($validationGroup as &$subData) {\n $subData = array_keys($subData);\n }\n } else {\n $validationGroup = array_keys($data);\n }\n\n try {\n $inputFilter->setValidationGroup($validationGroup);\n return $inputFilter->isValid();\n } catch (InputFilterInvalidArgumentException $ex) {\n $pattern = '/expects a list of valid input names; \"(?P<field>[^\"]*)\" was not found/';\n $matched = preg_match($pattern, $ex->getMessage(), $matches);\n if ($matched === 0) {\n return new ApiProblemResponse(\n new ApiProblem(400, $ex)\n );\n }\n\n return new ApiProblemResponse(\n new ApiProblem(400, 'Unrecognized field \"' . $matches['field'] . '\"')\n );\n }\n }", "protected function setupUpdateOperation()\n {\n $plugin = $this->crud->getEntryWithLocale($this->crud->getCurrentEntryId());\n\n $fields = $plugin->options;\n\n CRUD::addField(['name' => 'fields', 'type' => 'hidden', 'value' => collect($fields)->implode('name', ',')]);\n\n foreach ($fields as $field) {\n CRUD::addField($field);\n }\n }", "public function checkIsValidForAdd_Update() {\n $errors = false;\n $building = new BUILDING_Model($this->idBuilding);\n if (strlen(trim($this->idBuilding)) == 0) {\n $errors= \"Building identifier is mandatory\";\n }else if (strlen(trim($this->idBuilding)) < 5) {\n $errors = \"Building identifier can't be less than 5 characters\";\n }else if (strlen(trim($this->idBuilding)) > 5) {\n $errors = \"Building identifier can't be larger than 5 characters\";\n }else if(!preg_match('/[A-Z0-9]/', $this->idBuilding)){\n $errors = \"Building identifier format is invalid\";\n }else if(!$building->existsBuilding()){\n $errors = \"There isn't a building with that identifier\";\n }else if (strlen(trim($this->idFloor)) == 0) {\n $errors= \"Floor identifier is mandatory\";\n }else if (strlen(trim($this->idFloor)) < 2) {\n $errors = \"Floor identifier can't be less than 2 characters\";\n }else if (strlen(trim($this->idFloor)) > 2) {\n $errors = \"Floor identifier can't be larger than 2 characters\";\n }else if(!preg_match('/[A-Z0-9]/', $this->idFloor)){\n $errors = \"Floor identifier format is invalid\";\n }else if (strlen(trim($this->nameFloor)) == 0) {\n $errors= \"Floor name is mandatory\";\n }else if (strlen(trim($this->nameFloor)) > 225) {\n $errors = \"Floor name can't be larger than 255 characters\";\n }else if(!preg_match('/[A-Za-zñÑ-áéíóúÁÉÍÓÚ\\s\\t-]/', $this->nameFloor)){\n $errors = \"Floor name format is invalid\";\n }else if (!preg_match('/^[0-9]{1,8}([.][0-9]{1,2}){0,1}?$/', $this->builtSurfaceFloor)) {\n $errors = \"Floor building surface can't be long than 99999999.99\";\n }else if (!preg_match('/^[0-9]{1,8}([.][0-9]{1,2}){0,1}?$/', $this->surfaceUsefulFloor)) {\n $errors = \"Floor useful surface can't be long than 99999999.99\";\n }else if($this->surfaceUsefulFloor > $this->builtSurfaceFloor){\n $errors = \"The usable surface can't be greater than the building surface\";\n }else if($this->getplanFloor(\"name\") !== ''){\n if(!$this->validateExtensionplan()){\n $errors = \"Floor plan extension is invalid\";\n }\n }\n return $errors;\n }", "function __do_mutate($service, $operations) {\n\n $request = '<mutate xmlns=\"'.$this->__xml($this->namespace).'\">\n '.implode(' ', $operations).'\n </mutate>';\n\n $result = $this->__call_service($service, $request, 'mutate');\n\n /* Make sure we always return a list of result values */\n if (isset($result['value']) && !$result['value'][0]) {\n $result['value'] = array($result['value']);\n }\n\n return $result;\n\n}", "protected function prepareForValidation()\n {\n $this->merge([\n 'insumos' => json_decode($this->insumos, true),\n ]);\n }", "public function rules()\n {\n $method = $this->getMethod();\n\n if ($method == 'PATCH' || $method == 'PUT') {\n $id = $this->delivery_load;\n\n if($this->exists('nodata')) return [];\n }\n else $id = null;\n\n return [\n 'number' => ($id ? 'required' : 'nullable') .'|unique:delivery_loads,number,'. ($id) .',id',\n 'customer_id' => 'required|exists:customers,id',\n 'transaction' => 'required|in:REGULER,RETURN',\n 'date' => 'required',\n 'trip_time' => 'required_if:is_untriped,=,0',\n 'vehicle_id' => 'required',\n 'delivery_load_items' => 'required|array|min:1',\n 'delivery_load_items.*.item_id' => 'required',\n 'delivery_load_items.*.quantity' => 'required|gt:0',\n 'delivery_load_items.*.unit_id' => 'required',\n 'delivery_load_items.*.unit_rate' => 'required',\n ];\n }", "public function createUserOperationAction()\n {\n /** @var Object_Operation $operation */\n $data = $this->getRequestData();\n if (isset($data['title']) && isset($data['activity_id'])) {\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n\n $folder = Object_Folder::getByPath('/operations/' . $user->getKey() . \"-operations\");\n if (!$folder) {\n $folder = new Object_Folder();\n $folder->setKey($user->getKey() . \"-operations\");\n $folder->setParentId(4);\n $folder->save();\n }\n\n $geo = new Object_Data_Geopoint($data['longtitude'], $data['latitude']);\n\n $operation = new Object_Operation();\n $operation->setCreator($user);\n $operation->setTitle($data['title']);\n $operation->setExplanation(isset($data['explanation']) ? $data['explanation'] : \"\");\n $operation->setLocation($geo);\n $operation->setPhoto(isset($data['photo']) ? Asset_Image::getById($data['photo']) : \"\");\n $operation->setVideo(isset($data['video']) ? Asset_Video::getById($data['video']) : \"\");\n $operation->setActivity(Object_Activity::getById($data['activity_id']));\n $operation->setKey(Pimcore_File::getValidFilename($user->getKey() . \"-\" . $data['title'] . \"-\" . time()));\n $operation->setPublished(true);\n $operation->setParentId($folder->getId());\n if (!$operation->save()) {\n $this->setErrorResponse('cannot save Operation object');\n }\n } else {\n $this->setErrorResponse('title and activity_id is mandatory field for this request!');\n }\n\n $this->_helper->json($operation);\n }", "public function testGetOperationsFromArrayOfFilters() {\n $array = [];\n $operations = \\Depotwarehouse\\Toolbox\\Operations\\get_operations_from_array_of_filters($array);\n $this->assertEmpty($operations);\n\n // test with multiple operations\n $array = [ 'some_obj:mock_key' => '<9', 'other_key' => '=farts'];\n $operations = \\Depotwarehouse\\Toolbox\\Operations\\get_operations_from_array_of_filters($array);\n $this->assertEquals(2, count($operations));\n $this->assertAttributeEquals([ 'some_obj'], 'include_path', $operations[0]);\n $this->assertAttributeEquals('mock_key', 'key', $operations[0]);\n\n $this->assertAttributeEquals([], 'include_path', $operations[1]);\n $this->assertAttributeEquals('other_key', 'key', $operations[1]);\n }" ]
[ "0.57915217", "0.5273299", "0.5249006", "0.51984304", "0.5171587", "0.50771284", "0.50766027", "0.5073468", "0.50732696", "0.50133616", "0.50133616", "0.50133616", "0.50133616", "0.50133616", "0.50133616", "0.50133616", "0.50133616", "0.50133616", "0.50133616", "0.49863797", "0.4983544", "0.49698287", "0.49656647", "0.49624857", "0.49304733", "0.49194127", "0.49056283", "0.4904088", "0.4884818", "0.4860044", "0.48549047", "0.48363107", "0.4829823", "0.48228884", "0.48156047", "0.47929138", "0.47929138", "0.47819588", "0.47819588", "0.47366837", "0.4722009", "0.47084475", "0.46919224", "0.46564677", "0.4654833", "0.4652523", "0.46486828", "0.46458915", "0.46298724", "0.462707", "0.46184433", "0.46161622", "0.46105918", "0.46055776", "0.46012", "0.4584552", "0.45768517", "0.4572539", "0.45674014", "0.4562889", "0.4535583", "0.45265597", "0.45227474", "0.45189443", "0.45062456", "0.45007727", "0.44996184", "0.4498328", "0.4490439", "0.4483693", "0.4476426", "0.44743118", "0.4473474", "0.44705728", "0.4463084", "0.44598317", "0.44487327", "0.44472945", "0.44426396", "0.44409993", "0.44408837", "0.44381827", "0.44371107", "0.4435449", "0.44303733", "0.44150302", "0.44089726", "0.4408732", "0.44040734", "0.44037944", "0.43987715", "0.4395464", "0.4384544", "0.43801606", "0.4370778", "0.43705264", "0.43671688", "0.43642843", "0.43626225", "0.436133" ]
0.51520157
5
Validate the input XML.
private function validate_xml($xml) { // Validate the inserted XML libxml_use_internal_errors(true); $doc = simplexml_load_string($xml); $xml_lines = explode("\n", $xml); if ($doc === FALSE) { $errors = libxml_get_errors(); $exception = ""; foreach ($errors as $error) { $exception .= XMLPatcher::display_xml_error($error, $xml_lines); } libxml_clear_errors(); throw new XMLPatcherException("Invalid XML provided: \n$exception", 905); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validate()\n {\n $this->validateNode($this->tree);\n }", "public function validate($input) {\r\n $xml = parent::validate($input);\r\n \r\n if ($xml) {\r\n\r\n // very simple validation - just search for customers inside\r\n if (!count($xml->customers)) {\r\n Utils::log(\"Invalid input format. XML does not contain required 'customers' element.\");\r\n throw new \\Nette\\IOException(\"Invalid input format. XML does not contain required 'customers' element.\");\r\n }\r\n \r\n } \r\n \r\n return $xml; \r\n }", "public function is_valid_xml( $xml ) {\n libxml_use_internal_errors( true );\n $doc = new \\DOMDocument( '1.0', 'utf-8' );\n $doc->loadXML( $xml );\n $errors = libxml_get_errors();\n return empty( $errors );\n }", "private function is_valid_xml($xml) {\n\n libxml_use_internal_errors(true);\n $doc = new DOMDocument('1.0', 'utf-8');\n $doc->loadXML($xml);\n\n $errors = libxml_get_errors();\n \n return empty($errors);\n }", "public static function validateXML($xml) {\r\n \r\n libxml_use_internal_errors(true);\r\n \r\n $xml = utf8_encode($xml);\r\n\r\n $doc = new DOMDocument('1.0', 'utf-8');\r\n $doc->loadXML($xml);\r\n\r\n $errors = libxml_get_errors();\r\n if (empty($errors)) {\r\n return true;\r\n }\r\n\r\n $error = $errors[0];\r\n if ($error->level < 3) {\r\n return true;\r\n }\r\n\r\n $lines = explode(\"\\r\", $xml);\r\n $line = $lines[($error->line)-1];\r\n\r\n $message = $error->message.' at line '.$error->line.': '.htmlentities($line);\r\n\r\n return $message;\r\n }", "public function validate() {\n /* Make sure we're dealing with a valid tag */\n $tagValue = $this->node->getValue();\n if ($this->tagInfo === false) {\n array_push($this->errors, \"Invalid Tag [$tagValue]. Suggestions: <br/> \" \n . $this->getMisspelledSuggestion($tagValue, $this->validTags));\n $this->node->addErrors($this->errors);\n return;\n }\n \n /* Check if tag is deprecated */\n if ($this->tagInfo->isTagDeprecated()) {\n /* Deprecated Tag: Add the warning and skip further validation */\n array_push($this->warnings, \"Deprecated Tag \\\"&lt$tagValue&gt\\\": \" . $this->tagInfo->getDescription());\n $this->node->addWarnings($this->warnings);\n return;\n }\n \n /* Check if this tag has required attributes */\n if (count($this->tagInfo->getRequiredAttributes() > 0)) {\n $this->validateRequiredAttributes();\n }\n \n /* Check if the tag has attributes set, if so, validate them */\n foreach ($this->node->getAttr() as $att => $val) {\n if (!$this->validateAttributeValue($att,$val)) {\n array_push($this->errors, \"The '$att' attribute has an invalid value. The allowed values are: <br />\" \n . implode(\"<br />\", $this->attributeList->getAttributeInfo($att)->getValues()). \"<br />\");\n }\n }\n \n \n $this->node->addErrors($this->errors);\n $this->node->addWarnings($this->warnings);\n \n }", "protected function validateXmlAgainstXsd() : void\n {\n $dom = new DOMDocument();\n $dom->loadXML($this->xml->asXml());\n\n if (!@$dom->schemaValidate($this->xsdLocation.DIRECTORY_SEPARATOR.ucfirst($this->type).ucfirst($this->method).'.xsd')) {\n throw new InvalidXmlException('The generated XML for the API is not valid against the XSD.');\n }\n }", "public function testValidateDocumentXmlValidation()\n {\n }", "private function _isValidXML($xml){\n $doc = @simplexml_load_string($xml);\n if ($doc) {\n return true;\n } else {\n return false;\n }\n }", "public function testValidateDocumentXmlXxeThreatValidation()\n {\n }", "public function validator($data) {\n $data = trim ( $data );\n \n if (strlen ( $data ) === 0) {\n $err = new LibXMLError ();\n $err->level = 3;\n $err->code = 4;\n $err->column = 1;\n $err->message = 'Start tag expected, \\'<\\' not found';\n $err->file = '';\n $err->line = 1;\n $error [] = $err;\n } else {\n libxml_use_internal_errors ( true );\n $doc = new DOMDocument ( '1.0', 'utf-8' );\n $doc->loadXML ( $data );\n $error = libxml_get_errors ();\n }\n return isset ( $error ) && count ( $error ) > 0 ? $error : $data;\n }", "function validate(){\n\t\tif(!$this->validate_help()){\n\t\t\tfwrite(STDERR, \"error - nelze kombinovat --help\\n\");\n\t\t\t//chyby\n\t\t\texit(1);\n\t\t}\n\t\tif(isset($this->query) && isset($this->qf)){\n\t\t\tfwrite(STDERR, \"error - nelze kombinovat query a qf\\n\");\n\t\t\t//nelze kombinovat\n\t\t\texit(1);\n\t\t}\n\n\t\tif(!isset($this->query) && !isset($this->qf)){\n\t\t\tfwrite(STDERR, \"error - chybi dotaz uplne\\n\");\n\t\t\texit(1);\n\t\t\t//chybi dotaz uplne\n\t\t}\n\n\n\n\t\tif(isset($this->qf)){\n\t\t\t$file=file_get_contents($this->qf);\n\t\t\t$this->query = $file;\n\t\t}\n\t\tif(empty($this->input)){\n\t\t\t$stdin = fopen(\"php://stdin\",\"r\") or exit(2);\n\t\t\t$in = \"\";\n\t\t\twhile(!feof($stdin)){\n\t\t\t\t$in .=fgetc($stdin);\n\t\t\t}\n\t\t\tfclose($stdin);\n\t\t\t$xml = simplexml_load_string($in); \n\t\t}\n\t}", "public function isValidXml(string $xml)\n\t{\n\t\t\\libxml_use_internal_errors(true);\n\t\t$doc = new DOMDocument('1.0', 'utf-8');\n\t\t$doc->loadXML($xml);\n\t\t$errors = \\libxml_get_errors();\n\t\treturn empty($errors);\n\t}", "public function validateXML($schemePath)\n {\n $dom = new DOMDocument();\n $dom->loadXML($this->getXML()->asXML());\n\n libxml_use_internal_errors(true);\n if (!$dom->schemaValidate($schemePath)) {\n echo \"XML validation failed!\\n\";\n\n $errors = libxml_get_errors();\n for ($i = 0; $i < count($errors); $i++) {\n echo \"Error \" . $errors[$i]->code . \": \" . $errors[$i]->message . \"\\n\";\n }\n\n return false;\n }\n\n return true;\n }", "public function validate($xml)\n {\n if (!ini_get('allow_url_fopen')) {\n throw new EngineBlock_Exception(\n 'Failed validating XML, url_fopen is not allowed'\n );\n }\n\n // Load schema\n $schemaXml = @file_get_contents($this->_schemaLocation);\n if ($schemaXml === false) {\n throw new EngineBlock_Exception(\n sprintf('Failed validating XML, schema url could not be opened: \"%s\"', $this->_schemaLocation)\n );\n }\n\n $schemaXml = $this->_absolutizeSchemaLocations($schemaXml, $this->_schemaLocation);\n\n $dom = DOMDocumentFactory::fromString($xml);\n if (!@$dom->schemaValidateSource($schemaXml)) {\n $errorInfo = error_get_last();\n $errorMessage = $errorInfo['message'];\n // @todo improve parsing message by creating custom exceptions for which know that structure of messages\n $parsedErrorMessage = preg_replace('/\\{[^}]*\\}/', '', $errorMessage);\n echo '<pre>' . htmlentities(EngineBlock_Corto_XmlToArray::formatXml($xml)) . '</pre>';\n throw new EngineBlock_Exception(\n sprintf(\n 'Metadata XML doesn\\'t validate against schema at \"%s\", gives error: \"%s\"',\n $schemaXml,\n $parsedErrorMessage\n )\n );\n }\n }", "public function parseXml()\n {\n libxml_use_internal_errors(true);\n\n if ($this->getMimeType() == 'application/xml') {\n $elem = simplexml_load_string($this->contents);\n if ($elem !== false) {\n return $elem;\n } else {\n return libxml_get_errors();\n }\n }\n\n return false;\n }", "public function isValid()\n {\n $docType = get_class($this->source);\n if (isset($this->options['required'][$docType])) {\n $this->validateTags($docType);\n } else if (isset($this->options['required']['__ALL__'])) {\n $this->validateTags('__ALL__');\n }\n }", "private function _parseXml()\n {\n $temp = @simplexml_load_string( $this->input, \"SimpleXMLElement\", LIBXML_NOCDATA );\n $json = @json_encode( $temp );\n $data = @json_decode( $json, true );\n\n if( is_array( $data ) )\n {\n $_REQUEST = array_merge( $_GET, $this->_data( $data ) );\n return true;\n }\n return false;\n }", "public function isValid()\n\t{\n\t\tif ( !parent::isValid())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Return Break error\n\t\t$pattern = \"'<span id=\\\"sitemap404msg\\\">(.*?)<\\/span>'s\";\n\t\tpreg_match_all($pattern, $this->xmlContent, $matches);\n\n\t\tif( !empty($matches[1][0]) )\n\t\t{\n\t\t\t$errormsg = 'COM_COMMUNITY_VIDEOS_FETCHING_VIDEO_ERROR' . strip_tags( $matches[1][0] );\n\t\t\t$this->setError\t( JText::_($errormsg) );\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public static function isValidXml ($string) {\n try {\n DOMDocument::loadXML($string);\n return true;\n } \n catch (FrameEx $ex) {\n return false;\n }\n }", "public function validateSchema() : void {\n libxml_clear_errors();\n libxml_use_internal_errors(true);\n $oldEntityLoader = libxml_disable_entity_loader(false);\n $result = $this->schemaValidate($this->xsd);\n libxml_disable_entity_loader($oldEntityLoader);\n if(!$result) {\n $errors = [];\n foreach(libxml_get_errors() as $error) {\n $errors[] = \"[Line {$error->line}, Column {$error->column}] $error->message\";\n }\n throw new SamlDocumentSchemaValidationException($errors);\n }\n }", "function validateXml($pkg, $xml, $config, $fileXml)\n {\n self::$pkgDir = dirname($pkg->getPackageFile());\n\n if ($xml != '') {\n return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed');\n }\n return true;\n }", "abstract public function validate();", "abstract public function validate();", "function validate() {\n // @todo Remove module_load_include() call when moving to Drupal core.\n module_load_include('inc', 'fapitng', '/includes/fapitng.validate');\n foreach ($this->validate_callbacks as $callback => $info) {\n if (!call_user_func_array($callback, array_merge(array($this->value), $info['arguments']))) {\n $this->errors[] = $info['message'];\n }\n }\n if ($this->errors) {\n $this->request['invalid_elements'][$this->id] = $this;\n }\n $this->validateInputElements($this->children);\n\n if (!empty($this->request['invalid_elements'])) {\n $this->request['rebuild'] = TRUE;\n return FALSE;\n }\n return TRUE;\n }", "private static function xmlCheck($feed_url) {\n $xml = new \\XMLReader();\n $xml->open($feed_url);\n $xml->setParserProperty(\\XMLReader::VALIDATE, true);\n if( $xml->isValid()) {\n\n if( @simplexml_load_file($feed_url)) {\n return true;\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }", "function is_valid() {\n\t\treturn $this->_request_data($this->_existance_action, null, 'xml', true);\n\n\t}", "public function isXml() {}", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public static function validateXmlId()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\Validator\\Length(null, 255),\n\t\t);\n\t}", "public function testValidXml() {\r\n\t\t$xml=\"<xml><test>works</test></xml>\";\r\n\t\t$actual = Response::xml($xml);\r\n\t\r\n\t\t$this->assertEquals($actual->test, 'works');\r\n\t}", "public static function validateXmlId()\n{\n return array(\n new Main\\Entity\\Validator\\Length(null, 50),\n );\n}", "public static function validate() {}", "private static function _checkXmlParser()\n {\n if (!function_exists('simplexml_load_string') || !class_exists('SimpleXMLElement')) {\n throw new AllopassApiMissingXMLFeatureException();\n }\n }", "private static function _checkXmlParser()\n {\n if (!function_exists('simplexml_load_string') || !class_exists('SimpleXMLElement')) {\n throw new AllopassApiMissingXMLFeatureException();\n }\n }", "public static function isXml($str) {}", "protected function _validate() {\n\t}", "public function checkXmlString($value)\n {\n return new Result(\n $this->canParse($value),\n '{name} must be a valid xml document'\n );\n }", "public static function validate(DomElement $query)\n {\n\n }", "public function validate()\n {\n if (empty($this->schemeID)) {\n ISO6523ICD::verify($this->schemeID);\n }\n\n if ($this->address === null) {\n throw new \\InvalidArgumentException(\"Element 'cac:Address' MUST be provided\");\n }\n }", "protected function parseXmlFile() {}", "public function testXmlParser() {\n $xmlElement = new SimpleDOM('<?xml version=\"1.0\"?><test/>');\n $xml = $xmlElement->asXML();\n $this->assertNotFalse($xml);\n }", "protected function checkLibXmlBug() {}", "public function testValidateDocumentEmlValidation()\n {\n }", "public function isValidNode();", "protected function validate()\n {\n }", "function _wsdl_docs_validate_xml($wsdl) {\n $DOMDocument = new DOMDocument();\n // Validate XML when loading.\n libxml_use_internal_errors(true);\n $DOMDocument->loadXML($wsdl);\n $errors = libxml_get_errors();\n if (!empty($errors)) {\n return FALSE;\n }\n libxml_clear_errors();\n return $DOMDocument;\n}", "public function validated();", "public function validate()\n {\n // TODO implement this\n }", "function validate() {\n\t\t// If it's not required, there's nothing to validate\n\t\tif ( !$this->get_attribute( 'required' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$field_id = $this->get_attribute( 'id' );\n\t\t$field_type = $this->get_attribute( 'type' );\n\t\t$field_label = $this->get_attribute( 'label' );\n\n\t\t$field_value = isset( $_POST[$field_id] ) ? stripslashes( $_POST[$field_id] ) : '';\n\n\t\tswitch ( $field_type ) {\n\t\tcase 'email' :\n\t\t\t// Make sure the email address is valid\n\t\t\tif ( !is_email( $field_value ) ) {\n\t\t\t\t$this->add_error( sprintf( __( '%s requires a valid email address', 'jetpack' ), $field_label ) );\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault :\n\t\t\t// Just check for presence of any text\n\t\t\tif ( !strlen( trim( $field_value ) ) ) {\n\t\t\t\t$this->add_error( sprintf( __( '%s is required', 'jetpack' ), $field_label ) );\n\t\t\t}\n\t\t}\n\t}", "public function testInvalidXml() {\r\n\t\t$xml=\"non xml string\";\r\n\t\t$actual = Response::xml($xml);\r\n\t\t\r\n\t\t$this->assertEquals($actual->success, 'false');\r\n\t}", "public function htmlIsValid()\n {\n if (!$this->scan_attributes) {\n return false;\n }\n\n return $this->versionIsValid($this->scan_attributes->html_version);\n }", "public function validate()\n {\n $loader = new FileLoader(new Filesystem, 'lang');\n $translator = new Translator($loader, 'en');\n $validation = new Factory($translator, new Container);\n\n $rules = $this->rules();\n\n $this->_applyCustomValidationRules($validation);\n\n $validation->validate($this->attributes, $rules, $this->messages);\n }", "public static function validateXmlId()\n {\n return array(\n new Main\\Entity\\Validator\\Length(null, 255),\n );\n }", "function parseXML() {\n \n $xml_parser = xml_parser_create($this->encoding);\n xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 1);\n\n xml_set_object($xml_parser, $this);\n xml_set_element_handler($xml_parser, 'startElement', 'endElement');\n xml_set_character_data_handler($xml_parser, 'cDataHandler');\n\n xml_set_external_entity_ref_handler($xml_parser, 'externalEntityRefHandler');\n xml_set_processing_instruction_handler($xml_parser, 'piHandler');\n xml_set_unparsed_entity_decl_handler($xml_parser, 'unparsedEntityDeclHandler');\n xml_set_notation_decl_handler($xml_parser, 'entityDeclHandler');\n xml_set_default_handler($xml_parser, 'defaultHandler');\n \n if (!xml_parse($xml_parser, $this->contentBuffer, true)) {\n ($this->currentFile != '') ? $inFile = \"in file $this->currentFile\" : $inFile = '';\n if ($GLOBALS['SM_develState']) {\n echo \"XML dump: \\n\".$this->contentBuffer;\n }\n $this->fatalErrorPage(sprintf(get_class($this).\": XML error: %s at line %d $inFile\",\n xml_error_string(xml_get_error_code($xml_parser)),\n xml_get_current_line_number($xml_parser)));\n }\n\n xml_parser_free($xml_parser);\n\n }", "public function validateElement() {\r\n if (!$this->object->validate()) {\r\n /** @var modValidator $validator */\r\n $validator = $this->object->getValidator();\r\n if ($validator->hasMessages()) {\r\n foreach ($validator->getMessages() as $message) {\r\n $this->addFieldError($message['field'], $this->modx->lexicon($message['message']));\r\n }\r\n }\r\n }\r\n }", "public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }", "public function validate() {\n }", "public function validate() {\n }", "public static function validate(\\DOMDocument $doc)\n {\n if (!@$doc->loadXML($data, $validate && isset($doc->doctype) ? LIBXML_DTDLOAD | LIBXML_DTDVALID : 0)) {\n throw new XmlParseException(\"mb.wms.repository.parser.couldnotparse\");\n }\n // substitute xincludes\n $doc->xinclude();\n if ($doc->documentElement->tagName == \"ServiceExceptionReport\") {\n $message = $doc->documentElement->nodeValue;\n throw new WmsException($message);\n }\n\n if ($doc->documentElement->tagName !== \"WMS_Capabilities\"\n && $doc->documentElement->tagName !== \"WMT_MS_Capabilities\") {\n throw new NotSupportedVersionException(\"mb.wms.repository.parser.not_supported_document\");\n }\n\n $version = $doc->documentElement->getAttribute(\"version\");\n if ($version !== \"1.1.1\" && $version !== \"1.3.0\") {\n throw new NotSupportedVersionException('mb.wms.repository.parser.not_supported_version');\n }\n\n if ($validate) {\n if (isset($doc->doctype) && !@$doc->validate()) { // check with DTD\n throw new XmlParseException(\"mb.wms.repository.parser.not_valid_dtd\");\n } else if (!isset($doc->doctype)) {\n // TODO create CREATEDSCHEMA\n if ($version === '1.3.0' && !$doc->schemaValidate('CREATEDSCHEMA')) {\n throw new XmlParseException(\"mb.wms.repository.parser.not_valid_xsd\");\n }\n }\n }\n return $doc;\n }", "public function validate()\n\t{\n\t\t$errors = array();\n\t\t\n\t\t//make sure user is logged in\n\t\tif (empty($this->userid)) \n\t\t{\n\t\t\t$errors['userid'] = true;\n\t\t}\n\t\t\n\t\t//verify all info is provided\n\t\tif (isset($this->title))\n\t\t\t$this->title = strip_tags($this->title);\n\t\telse\n\t\t\t$errors['title'] = true;\n\t\t\t\n\t\tif (isset($this->description))\n\t\t\t$this->description = strip_tags($this->description);\n\t\telse\n\t\t\t$errors['description'] = true;\n\t\t\t\n\t\tif (isset($this->content))\n\t\t\t$this->content = strip_tags($this->content, \"<br><b>\");\n\t\telse\n\t\t\t$errors['content'] = true;\n\t\t\t\n\t\tif (isset($this->location))\n\t\t\t$this->location = strip_tags($this->location);\n\t\telse\n\t\t\t$errors['location'] = true;\n\t\t\n\t\tif (!isset($this->category))\n\t\t\t$errors['category'] = true;\n\t\t\t\n\t\tif (!isset($this->enddatetime))\n\t\t\t$errors['enddatetime'] = true;\n\t\t\n\t\t\n\t\t//If we made it here, all is valid\n\t\tif (count($errors) > 0)\n\t\t\treturn $errors;\n\t\telse\n\t\t\treturn NULL;\n\t}", "public function testBuildInvalidDataSimpleXml() {\n\t\t$input = '<derp';\n\t\t$xml = Xml::build($input, array('return' => 'simplexml'));\n\t}", "public function validates()\n {\n if( ! $this->hydrated)\n {\n $this->hydrate();\n }\n\n return $this->runValidation($this->elements, $this->rules);\n }", "public function validate()\n\t{\n\t\t$this->errors = [];\n\n\t\t$this->validateConfig();\n\n\t\t// there is no point to continue if config is not valid against the schema\n\t\tif($this->isValid()) {\n\t\t\t$this->validateRepetitions();\n\t\t\t$this->validateMode();\n\t\t\t$this->validateClasses();\n\t\t\t$this->validateTestData();\n\t\t}\n\t}", "public static function HandleXmlError($errno, $errstr, $errfile, $errline)\n\t{\n\t\tif ($errno == E_WARNING && substr_count($errstr, 'DOMDocument::loadXML()') > 0) {\n\t\t\tthrow new \\DOMException($errstr);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function validate()\r\n\t\t{\r\n\t\t\t\r\n\t\t\treturn true;\r\n\r\n\t\t}", "public abstract function validation();", "public static function canParse( DOMDocument $xml )\n {\n if ( $xml->documentElement->tagName !== 'feed' )\n {\n return false;\n }\n\n return true;\n }", "public function validate()\n {\n }", "public function validate()\n {\n }", "public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }", "public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }", "public function validate()\n {\n $this->validateRequiredParameters();\n\n if (!is_string($this->getType())) {\n throw new InvalidDocumentException(\"The type parameter must be a string\");\n }\n }", "function validate($domObj, $printXML = true) {\n\t\tif ($printXML) {\n\t\t\tprint \"<br /><br /><br />\" . nl2br(htmlentities($domObj->saveXML(),ENT_COMPAT,'UTF-8'));\n\t\t}\n\t\tprint \"Loading GRAMPS file... <br />\";\n\t\t$domObj->loadXML($domObj->saveXML());\n\t\t$res = $domObj->relaxNGValidate('includes/grampsxml.rng');\n\t\tif ($res)\n\t\t\tprint \"Validation: <em style=\\\"color:green;\\\"><h1> PASSED against the .RNG</h1></em>\";\n\t\telse\n\t\t\tprint \"Validation: <em style=\\\"color:red;\\\"><h1> FAILED against the .RNG</h1></em>\";\n\t}", "function validate()\n\t{\n\t}", "private function isValidXmlName($name): bool\n {\n try {\n new DOMElement($name);\n } catch (DOMException $e) {\n return false;\n }\n return true;\n }", "public static function checkXML ( $strScriptName, $xml, $strSecretKey )\n\t{\n\t\tif ( ! $xml instanceof SimpleXMLElement ) {\n\t\t\t$xml = new SimpleXMLElement($xml);\n\t\t}\n\t\t$arrFlatParams = self::makeFlatParamsXML($xml);\n\t\treturn self::check((string)$xml->pg_sig, $strScriptName, $arrFlatParams, $strSecretKey);\n\t}", "public function testGetXmlRootTagWithValidXML()\n {\n $tag = $this->mockTrait->getXmlRootTag($this->validXml);\n\n $this->assertEquals('note', $tag);\n }", "private function validate() {\n\t\n\t\t\treturn false;\n\t}", "public function parseXML(Request $request) {\n $xmlSource = $request->file('xmlfile');\n // Store XML File in Storage Folder\n $xmlPath = $request->file('xmlfile')->store('xml', 'public');\n\n // Parsing XML File\n $xmlDocument = new \\DOMDocument('1.0', 'utf-8');\n $xmlDocument->load(storage_path('app/public/').$xmlPath);\n $xPath = new \\DOMXPath($xmlDocument);\n\n if ($xPath->query('/elements')->length > 0) {\n $rootElement = '/elements/unit';\n }else {\n $rootElement = '/unit';\n }\n\n // Generating HTML Template with XML file\n $htmlTemplate = self::getTemplate($xPath);\n\n // Saving HTML file for testing\n Storage::put('public/html/test.html', $htmlTemplate, 'public');\n\n // Deleting XML File after Parsing Completed\n Storage::delete('public/'.$xmlPath);\n\n // Testing\n self::generateIonicPreview($htmlTemplate);\n\n return view('developer.xml.validator', compact('rootElement', 'xPath', 'htmlTemplate'));\n }", "public function validate() {\n\t\treturn false;\n\t}", "public function testConstructValidXML()\n {\n $parser = new Parser($this->createTwig(), '<?xml version=\"1.0\"?><test><name>Pedro</name></test>');\n $this->assertArrayHasKey('0', $parser->getReports());\n\n $parser = new Parser($this->createTwig(), __DIR__ . '/../phpunit.xml');\n $this->assertArrayHasKey('0', $parser->getReports());\n\n $parser = new Parser($this->createTwig());\n $parser->addXmlContent('<?xml version=\"1.0\"?><test><name>Pedro</name></test>');\n $this->assertArrayHasKey('0', $parser->getReports());\n\n $parser = new Parser($this->createTwig());\n $parser->addFileContent(__DIR__ . '/../phpunit.xml');\n $this->assertArrayHasKey('0', $parser->getReports());\n }", "public static function validate()\n\t{\n\t\tself::engine()->validate();\n\t}", "abstract public function validateData();", "public function parseXML($xml)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->dom_doc = new DOMDocument();\n\t\t\t$this->dom_doc->loadXML($xml);\n\t\t\t$this->xpath = new DOMXPath($this->dom_doc);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tthrow new TSS_Tribal_TransportException($e->getMessage(), 0);\n\t\t}\n\n\t\t//return !$this->searchForError();\n\t}", "function Parse()\n {\n //Create the parser resource\n $this->parser = xml_parser_create(\"UTF-8\");\n \n //Set the handlers\n xml_set_object($this->parser, $this);\n xml_set_element_handler($this->parser, 'StartElement', 'EndElement');\n xml_set_character_data_handler($this->parser, 'CharacterData');\n\n //Error handling\n if (!xml_parse($this->parser, $this->xml))\n $this->HandleError(xml_get_error_code($this->parser), xml_get_current_line_number($this->parser), xml_get_current_column_number($this->parser));\n\n //Free the parser\n xml_parser_free($this->parser);\n }", "public function validate($input);", "public function validate() {\r\n // Name - this is required\r\n if ($this->description == '') {\r\n $this->errors[] = 'Description is required';\r\n } \r\n \r\n // Category number - must be a number\r\n if (!is_numeric($this->category)) {\r\n $this->category = 0;\r\n } \r\n \r\n // Item number - must be a number\r\n if (!is_numeric($this->item)) {\r\n $this->item = 0;\r\n } \r\n }", "public function validate() {\n\t\treturn true;\n\t}" ]
[ "0.7008044", "0.68345875", "0.67447317", "0.66803414", "0.65806305", "0.6577348", "0.64889973", "0.64641654", "0.6355312", "0.6295257", "0.62886715", "0.6226436", "0.6196032", "0.6191542", "0.6052681", "0.60203004", "0.60157335", "0.6010046", "0.5995027", "0.5990739", "0.5960735", "0.5956923", "0.5936474", "0.5936474", "0.5931005", "0.5925564", "0.58830476", "0.58802456", "0.58712834", "0.58712834", "0.58712834", "0.58712834", "0.58712834", "0.58712834", "0.58712834", "0.58712834", "0.58712834", "0.58712834", "0.58712834", "0.58712834", "0.5831", "0.579917", "0.57977957", "0.5784211", "0.5741913", "0.5741913", "0.5739804", "0.573058", "0.5712962", "0.57093024", "0.56833506", "0.5683281", "0.56759834", "0.56574905", "0.56284565", "0.56113875", "0.56095564", "0.5588443", "0.55446047", "0.55442196", "0.5526248", "0.55220157", "0.5521979", "0.55141217", "0.5511066", "0.5481892", "0.54539645", "0.5421607", "0.54203165", "0.54203165", "0.54128134", "0.5408426", "0.53876746", "0.5386734", "0.53763676", "0.53722537", "0.53512", "0.53467214", "0.53424424", "0.53324723", "0.53324723", "0.53100115", "0.53100115", "0.5298533", "0.52980703", "0.52978903", "0.5295152", "0.52855355", "0.5284018", "0.5270549", "0.52686894", "0.5261452", "0.5260937", "0.5255133", "0.525374", "0.5251856", "0.5245636", "0.5243953", "0.52409446", "0.523407" ]
0.7067662
0
Format XML errors and match to lines in XML.
private function display_xml_error($error, $xml) { $return = $xml[$error->line - 1] . "\n"; $return .= str_repeat('-', $error->column) . "^\n"; switch ($error->level) { case \LIBXML_ERR_WARNING: $return .= "Warning $error->code: "; break; case \LIBXML_ERR_ERROR: $return .= "Error $error->code: "; break; case \LIBXML_ERR_FATAL: $return .= "Fatal Error $error->code: "; break; } $return .= trim($error->message) . "\n Line: $error->line" . "\n Column: $error->column"; if ($error->file) { $return .= "\n File: $error->file"; } return "$return\n\n--------------------------------------------\n\n"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayXMLValidationErrors($errors, $xml) {\n\t\techo '<h2>' . __('plugins.importexport.common.validationErrors') .'</h2>';\n\n\t\tforeach ($errors as $error) {\n\t\t\tswitch ($error->level) {\n\t\t\t\tcase LIBXML_ERR_ERROR:\n\t\t\t\tcase LIBXML_ERR_FATAL:\n\t\t\t\t\techo '<p>' .trim($error->message) .'</p>';\n\t\t\t}\n\t\t}\n\t\tlibxml_clear_errors();\n\t\techo '<h3>' . __('plugins.importexport.common.invalidXML') .'</h3>';\n\t\techo '<p><pre>' .htmlspecialchars($xml) .'</pre></p>';\n\t}", "function display_xml_error($error, $xml)\n {\n $return = $xml[$error->line - 1] . \"\\n\";\n $return .= str_repeat('-', $error->column) . \"^\\n\";\n switch ($error->level) {\n case LIBXML_ERR_WARNING:\n $return .= \"Warning $error->code: \";\n break;\n case LIBXML_ERR_ERROR:\n $return .= \"Error $error->code: \";\n break;\n case LIBXML_ERR_FATAL:\n $return .= \"Fatal Error $error->code: \";\n break;\n }\n $return .= trim($error->message) .\n \"\\n Line: $error->line\" .\n \"\\n Column: $error->column\";\n\n if ($error->file) {\n $return .= \"\\n File: $error->file\";\n }\n return \"$return\\n\\n--------------------------------------------\\n\\n\";\n }", "private function getXmlErrors()\n {\n $errors = array();\n foreach (libxml_get_errors() as $error) {\n $errors[] = sprintf('[%s %s] %s (in %s - line %d, column %d)',\n LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR',\n $error->code,\n trim($error->message),\n $error->file ? $error->file : 'n/a',\n $error->line,\n $error->column\n );\n }\n\n libxml_clear_errors();\n\n return $errors;\n }", "private function getXmlErrors()\n {\n $errors = array();\n foreach (libxml_get_errors() as $error) {\n $errors[] = sprintf('[%s %s] %s (in %s - line %d, column %d)',\n LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR',\n $error->code,\n trim($error->message),\n $error->file ? $error->file : 'n/a',\n $error->line,\n $error->column\n );\n }\n\n libxml_clear_errors();\n\n return $errors;\n }", "private function validate_xml($xml) {\n // Validate the inserted XML\n libxml_use_internal_errors(true);\n\n $doc = simplexml_load_string($xml);\n $xml_lines = explode(\"\\n\", $xml);\n\n if ($doc === FALSE) {\n $errors = libxml_get_errors();\n\n $exception = \"\";\n foreach ($errors as $error) {\n $exception .= XMLPatcher::display_xml_error($error, $xml_lines);\n }\n libxml_clear_errors();\n throw new XMLPatcherException(\"Invalid XML provided: \\n$exception\", 905);\n }\n }", "protected function setXMLerror($method, $line) {\n $err_str = '<p>Failed loading XML<br />';\n foreach (libxml_get_errors() as $error) {\n $err_str .= sprintf(\"[%s at %d:%d] %s<br />\", $this->XMLerrorLevel2string($error->level), $error->line, $error->column, $error->message);\n }\n $err_str .= \"</p>\";\n $this->setError(sprintf('[%s - %s] %s', $method, $line, $err_str));\n }", "function libxml_display_errors()\n {\n $ret = \"\";\n $errors = libxml_get_errors();\n foreach ($errors as $error) {\n $ret .= $this->libxml_display_error($error);\n }\n libxml_clear_errors();\n return $ret;\n }", "public function libxml_display_errors() { \r\n\t\r\n\t\t$errors = libxml_get_errors(); \r\n\t\t$retorno = \"\";\r\n\t\tforeach ($errors as $error) { \r\n\t\t\t$retorno .= $this->libxml_display_error($error); \r\n\t\t} \r\n\t\t\r\n\t\t// Limpa os erros da memoria\r\n\t\tlibxml_clear_errors();\r\n\t\t\r\n\t\t// Retorna os erros\r\n\t\treturn $retorno;\r\n\t}", "private function analyseATDresult($XML, $type_error, $text)\n\t{\n\t\t$mistakes = array();\n\t\t\n\t\t$data = simplexml_load_string($XML);\n\n\t\tforeach ($data->error as $error) {\n\t\t\tif ($error->type == $type_error) {\n\t\t\t\tif ((string) $error->{'precontext'} != '')\n\t\t\t\t\t$start = strpos($text,\n\t\t\t\t\t\t\t(string) $error->precontext . ' ' . (string) $error->string)\n\t\t\t\t\t\t+ strlen($error->precontext) + 1;\n\t\t\t\telse\n\t\t\t\t\t$start = strpos($text, (string) $error->string);\n\t\t\t\t \n\t\t\t\t$sugg = array();\n\t\t\t\t/* Get the list of suggestions */\n\t\t\t\tforeach ($error->children() as $child1) {\n\t\t\t\t\tforeach ($child1->children() as $child2)\n\t\t\t\t\t\t$sugg[] = $child2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$one_mistake = array(\n\t\t\t\t\t'text' => $error->string,\n\t\t\t\t\t'desc' => $error->description,\n\t\t\t\t\t'sugg' => $sugg,\n\t\t\t\t\t'start' => $start,\n\t\t\t\t\t'end' => $start + strlen($error->string) - 1);\n\t\t\t\t$mistakes[] = $one_mistake;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $mistakes;\n\t}", "protected function parse_errors() {\n\t\tif ( count ( $this->_errors ) > 0 ) {\n\t\t\tforeach ( $this->_errors as $k => $v ) {\n\t\t\t\tadd_settings_error( $this->token . '-errors', $k, $v, 'error' );\n\t\t\t}\n\t\t} else {\n\t\t\t$message = sprintf( __( '%s settings updated', '{plugin_jump_starter_textdomain}' ), $this->name );\n\t\t\tadd_settings_error( $this->token . '-errors', $this->token, $message, 'updated' );\n\t\t}\n\t}", "public static function validateXML($xml) {\r\n \r\n libxml_use_internal_errors(true);\r\n \r\n $xml = utf8_encode($xml);\r\n\r\n $doc = new DOMDocument('1.0', 'utf-8');\r\n $doc->loadXML($xml);\r\n\r\n $errors = libxml_get_errors();\r\n if (empty($errors)) {\r\n return true;\r\n }\r\n\r\n $error = $errors[0];\r\n if ($error->level < 3) {\r\n return true;\r\n }\r\n\r\n $lines = explode(\"\\r\", $xml);\r\n $line = $lines[($error->line)-1];\r\n\r\n $message = $error->message.' at line '.$error->line.': '.htmlentities($line);\r\n\r\n return $message;\r\n }", "protected function fix_xmlelement_errors(\\SimpleXMLElement $xml) {\n /* iframe hack, if the iframe is empty, a space is inserted,\n * so no self-closing tag appears in the output. */\n foreach ($xml->xpath(\".//iframe\") as $iframe) {\n if ((string) $iframe == \"\" && count($iframe->children()) == 0) {\n $src = $iframe->attributes()['src'];\n $this->app->logger->log(\"<iframe></iframe> fixed: %s\", $src);\n $iframe[0] = \" \";\n }\n }\n }", "public function executeXml(AgaviRequestDataHolder $rd)\n {\n $errors = $this->getAttribute('errors');\n\n // Create the xml response saying that there was a server error\n $xml = new DomDocument('1.0', 'utf-8');\n $xml->formatOutput = true;\n $root = $xml->createElement(\"response\");\n $xml->appendChild($root);\n $status = $xml->createElement(\"status\", \"invalid\");\n\n $root->appendChild($status);\n \n if (isset($errors['usernameErrors']))\n {\n $usernameErrorRoot = $xml->createElement(\"usernameErrors\");\n foreach ($errors['usernameErrors'] as $usernameError)\n {\n $error = $xml->createElement(\"error\", $usernameError);\n $usernameErrorRoot->appendChild($error);\n }\n $root->appendChild($usernameErrorRoot);\n }\n if (isset($errors['passwordErrors']))\n {\n $passwordErrorRoot = $xml->createElement(\"passwordErrors\");\n foreach ($errors['passwordErrors'] as $passwordError)\n {\n $error = $xml->createElement(\"error\", $passwordError);\n $passwordErrorRoot->appendChild($error);\n }\n $root->appendChild($passwordErrorRoot);\n }\n if (isset($errors['emailErrors']))\n {\n $emailErrorRoot = $xml->createElement(\"emailErrors\");\n foreach ($errors['emailErrors'] as $emailError)\n {\n $error = $xml->createElement(\"error\", $emailError);\n $emailErrorRoot->appendChild($error);\n }\n $root->appendChild($emailErrorRoot);\n }\n if (isset($errors['firstNameErrors']))\n {\n $firstNameErrorRoot = $xml->createElement(\"firstNameErrors\");\n foreach ($errors['firstNameErrors'] as $firstNameError)\n {\n $error = $xml->createElement(\"error\", $firstNameError);\n $firstNameErrorRoot->appendChild($error);\n }\n $root->appendChild($firstNameErrorRoot);\n }\n if (isset($errors['lastNameErrors']))\n {\n $lastNameErrorRoot = $xml->createElement(\"lastNameErrors\");\n foreach ($errors['lastNameErrors'] as $lastNameError)\n {\n $error = $xml->createElement(\"error\", $lastNameError);\n $lastNameErrorRoot->appendChild($error);\n }\n $root->appendChild($lastNameErrorRoot);\n }\n\n // Set the status code to 200 and return the xml response\n $this->getResponse()->setHttpStatusCode('200');\n $this->getResponse()->setContent($xml->saveXML());\n }", "function SendErrorXML($number, $fileUrl = '', $fileName = '', $text = '')\n{\n SetXmlHeaders();\n\n // Create the XML document header\n echo '<?xml version=\"1.0\" encoding=\"utf-8\" ?>';\n\n echo '<Connector><Error number=\"' . $number . '\" text=\"' . htmlspecialchars($text) . '\" /></Connector>';\n\n exit;\n}", "public function generateXMLFromErrors ($errors)\n {\n $cbXML = $this->loadXMLFromString($this->cbXMLBasic);\n $sortedErrors = $this->sortErrorList($errors);\n \n foreach ($sortedErrors as $key => $name) {\n \n $xmlFileNode = $errors[$key];\n $file = $cbXML->addChild('file');\n $file->addAttribute('name', $name);\n \n foreach ($xmlFileNode as $xmlItemNode) {\n \n // add childs to root file node\n $item = $file->addChild('item');\n \n $item->addAttribute('description', $xmlItemNode['description']);\n $item->addAttribute('line', $xmlItemNode['line']);\n $item->addAttribute('to-line', $xmlItemNode['to-line']);\n $item->addAttribute('source', $xmlItemNode['source']);\n $item->addAttribute('severity', $xmlItemNode['severity']);\n }\n }\n \n return $cbXML;\n }", "protected function checkLibXmlBug() {}", "function SendErrorXML($number, $fileUrl = '', $fileName = '', $text = '')\n{\n SetXmlHeaders() ;\n\n // Create the XML document header\n echo '<?xml version=\"1.0\" encoding=\"utf-8\" ?>' ;\n\n echo '<Connector><Error number=\"' . $number . '\" text=\"' . htmlspecialchars($text) . '\" /></Connector>' ;\n\n exit ;\n}", "protected function assertErrorLogEntries() {}", "protected function parseLinterOutput(array $paths, $err, $stdout, $stderr) {\n // The next two lines strip out the non-XML text following the XML document.\n $endOfCheckstyle = strpos($stdout, '</checkstyle>');\n $xml = substr($stdout, 0, $endOfCheckstyle + strlen('</checkstyle>'));\n\n $dom = new DOMDocument();\n libxml_clear_errors();\n $ok = $dom->loadXML($xml);\n\n if ($ok === false) {\n print_r(libxml_get_errors());\n return false;\n }\n\n $files = $dom->getElementsByTagName('file');\n $messages = array();\n foreach ($files as $file) {\n $errors = $file->getElementsByTagName('error');\n foreach ($errors as $error) {\n $message = new ArcanistLintMessage();\n $message->setPath($file->getAttribute('name'));\n $message->setLine($error->getAttribute('line'));\n $message->setCode($this->getLinterName());\n\n // source is the module's fully-qualified classname\n // attempt to simplify it for readability\n $source = $error->getAttribute('source');\n if ($this->fullyQualifySourcename == false) {\n $source = idx(array_slice(explode('.', $source), -1), 0);\n }\n $message->setName('Checkstyle::' . $source);\n\n // checkstyle's XMLLogger escapes these five characters\n $description = $error->getAttribute('message');\n $description = str_replace(\n ['&lt;', '&gt;', '&apos;', '&quot;', '&amp;'],\n ['<', '>', '\\'', '\"', '&'],\n $description);\n $message->setDescription($description);\n\n $column = $error->getAttribute('column');\n if ($column) {\n $message->setChar($column);\n }\n\n $severity = $this->getLintMessageSeverity($error->getAttribute('severity'));\n $message->setSeverity($severity);\n \n $messages []= $message;\n }\n }\n\n return $messages;\n }", "protected function useXMLInternalErrors()\n {\n \\libxml_clear_errors();\n $this->initialUseInternalErrorsValue = \\libxml_use_internal_errors(true);\n }", "public static function HandleXmlError($errno, $errstr, $errfile, $errline)\n\t{\n\t\tif ($errno == E_WARNING && substr_count($errstr, 'DOMDocument::loadXML()') > 0) {\n\t\t\tthrow new \\DOMException($errstr);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function libxml_display_error($error)\n {\n $ret = \"\";\n switch ($error->level) {\n case LIBXML_ERR_WARNING:\n $ret .= \"Warning $error->code : \";\n break;\n case LIBXML_ERR_ERROR:\n $ret .= \"Error $error->code : \";\n break;\n case LIBXML_ERR_FATAL:\n $ret .= \"Fatal Error $error->code : \";\n break;\n default:\n $ret .= \"Unknown Error $error->code : \";\n break;\n }\n return $ret . trim($error->message) . \" on line $error->line\\n\";\n\n }", "protected function _checkErrors($source= NULL) {\n if ($error= libxml_get_last_error()) {\n libxml_clear_errors();\n if (LIBXML_ERR_FATAL != $error->level) return;\n \n throw new TransformerException(sprintf(\"Transformation failed: #%d: %s\\n at %s, line %d, column %d\",\n $error->code,\n trim($error->message),\n strlen($error->file) ? $error->file : xp::stringOf($source),\n $error->line,\n $error->column\n ));\n }\n }", "public function testCreateParseXml(): void\n {\n $saftDemoXml = \\simplexml_load_file(SAFT_DEMO_PATH);\n\n if($saftDemoXml === false){\n $this->fail(\\sprintf(\"Error opening file '%s'\", SAFT_DEMO_PATH));\n }\n\n $paymentsStack = $saftDemoXml\n ->{SourceDocuments::N_SOURCEDOCUMENTS}\n ->{Payments::N_PAYMENTS}\n ->{Payment::N_PAYMENT};\n\n if ($paymentsStack->count() === 0) {\n $this->fail(\"No Payment in XML\");\n }\n\n for ($i = 0; $i < $paymentsStack->count(); $i++) {\n $paymentXml = $paymentsStack[$i];\n $lineStack = $paymentXml->{Line::N_LINE};\n\n if ($lineStack->count() === 0) {\n $this->fail(\"No lines in Payment\");\n }\n\n for ($l = 0; $l < $lineStack->count(); $l++) {\n /* @var $lineXml \\SimpleXMLElement */\n $lineXml = $lineStack[$l];\n $line = new Line(new ErrorRegister());\n $line->parseXmlNode($lineXml);\n\n\n $xmlRootNode = (new AuditFile())->createRootElement();\n $sourceDocNode = $xmlRootNode->addChild(SourceDocuments::N_SOURCEDOCUMENTS);\n $paymentsNode = $sourceDocNode->addChild(Payments::N_PAYMENTS);\n $payNode = $paymentsNode->addChild(Payment::N_PAYMENT);\n\n $xml = $line->createXmlNode($payNode);\n\n try {\n $assertXml = $this->xmlIsEqual($lineXml, $xml);\n $this->assertTrue(\n $assertXml,\n \\sprintf(\n \"Fail on Payment '%s' Line '%s' with error '%s'\",\n $paymentXml->{Payment::N_PAYMENTREFNO},\n $lineXml->{Line::N_LINENUMBER}, $assertXml\n )\n );\n } catch (\\Exception | \\Error $e) {\n $this->fail(\n \\sprintf(\n \"Fail on Document '%s' Line '%s' with error '%s'\",\n $paymentXml->{Payment::N_PAYMENTREFNO},\n $lineXml->{Line::N_LINENUMBER}, $e->getMessage()\n )\n );\n }\n $this->assertEmpty($line->getErrorRegistor()->getOnCreateXmlNode());\n $this->assertEmpty($line->getErrorRegistor()->getOnSetValue());\n $this->assertEmpty($line->getErrorRegistor()->getLibXmlError());\n }\n }\n }", "public function validate() {\n /* Make sure we're dealing with a valid tag */\n $tagValue = $this->node->getValue();\n if ($this->tagInfo === false) {\n array_push($this->errors, \"Invalid Tag [$tagValue]. Suggestions: <br/> \" \n . $this->getMisspelledSuggestion($tagValue, $this->validTags));\n $this->node->addErrors($this->errors);\n return;\n }\n \n /* Check if tag is deprecated */\n if ($this->tagInfo->isTagDeprecated()) {\n /* Deprecated Tag: Add the warning and skip further validation */\n array_push($this->warnings, \"Deprecated Tag \\\"&lt$tagValue&gt\\\": \" . $this->tagInfo->getDescription());\n $this->node->addWarnings($this->warnings);\n return;\n }\n \n /* Check if this tag has required attributes */\n if (count($this->tagInfo->getRequiredAttributes() > 0)) {\n $this->validateRequiredAttributes();\n }\n \n /* Check if the tag has attributes set, if so, validate them */\n foreach ($this->node->getAttr() as $att => $val) {\n if (!$this->validateAttributeValue($att,$val)) {\n array_push($this->errors, \"The '$att' attribute has an invalid value. The allowed values are: <br />\" \n . implode(\"<br />\", $this->attributeList->getAttributeInfo($att)->getValues()). \"<br />\");\n }\n }\n \n \n $this->node->addErrors($this->errors);\n $this->node->addWarnings($this->warnings);\n \n }", "public function __construct(LibXMLError $error, $xml = '') {\n\t\t $return = $xml[$error->line - 1] . \"\\n\" . str_repeat('-', $error->column) . \"^\\n\";\n\t\t\n\t\t // get the error prefix based on severity\n\t\t switch ($error->level) {\n\t\t case LIBXML_ERR_WARNING:\n\t\t $return .= \"Warning $error->code: \";\n\t\t break;\n\t\t case LIBXML_ERR_ERROR:\n\t\t $return .= \"Error $error->code: \";\n\t\t break;\n\t\t case LIBXML_ERR_FATAL:\n\t\t $return .= \"Fatal Error $error->code: \";\n\t\t break;\n\t\t }\n\t\t\n\t\t // append the error message itself\n\t\t $return .= trim($error->message) . \" on line $error->line, column $error->column\\n\";\n\t\t \n\t\t // set up the Exception properties\n\t\t\tparent::__construct($return, $error->code);\n\t\t}", "protected function resetXMLInternalErrorsSettingAndThrowIfXMLErrorOccured()\n {\n if ($this->hasXMLErrorOccured()) {\n $this->resetXMLInternalErrorsSetting();\n throw new XMLProcessingException($this->getLastXMLErrorMessage());\n }\n\n $this->resetXMLInternalErrorsSetting();\n }", "protected function parseErrors($xtpl) {\n\t\t$msg = $this->oPage->getMsgError();\n\t\t\n\t\tif( !empty($msg) ){\n\t\t\t\n\t\t\t$xtpl->assign(\"msg\", $msg);\n\t\t\t//$xtpl->assign(\"msg\", );\n\t\t\t$xtpl->parse(\"main.msg_error\" );\n\t\t}\t\t\t\n\t\t\n\n }", "protected function parseXmlFile() {}", "public function testValidateDocumentXmlXxeThreatValidation()\n {\n }", "private function crowd_xml_logerror($rc, $msg_prefix = \"error in xml response\") {\n\t\t// got back a valid XML response (hopefully)\n\t\t$xmlResponse = new SimpleXMLElement($rc['response']);\n\t\tif($xmlResponse[0]->getName() == \"error\") {\n\t\t\t$reason = (string)$xmlResponse->{reason};\n\t\t\t$message = (string)$xmlResponse->{message};\n\t\t\terror_log(\"${msg_prefix}: ${reason} - ${message}\");\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $xmlResponse;\n\t}", "private function validateResult() {\n if (count($this->leafs) > 0) {\n $missingBrace = '}';\n if ($this->context['type'] == 'list') {\n $missingBrace = ']';\n }\n else if ($this->bTypeString) {\n $missingBrace = \"'''\";\n }\n $this->error(\"Reached end of file with unclosed `$missingBrace`\");\n }\n\n if (!count($this->leaf)) {\n $this->error(\"Unable to parse JCON text\");\n }\n }", "private function parseError()\n {\n return $this->error(null, -32700, 'Parse error');\n }", "protected function formatResultErrors()\n\t{\n\t\t$errors = array();\n\t\tif (!empty($this->errorsFatal))\n\t\t\t$errors['FATAL'] = $this->errorsFatal;\n\t\tif (!empty($this->errorsNonFatal))\n\t\t\t$errors['NONFATAL'] = $this->errorsNonFatal;\n\n\t\tif (!empty($errors))\n\t\t\t$this->arResult['ERRORS'] = $errors;\n\n\t\t// backward compatiblity\n\t\t$error = each($this->errorsFatal);\n\t\tif (!empty($error['value']))\n\t\t\t$this->arResult['ERROR_MESSAGE'] = $error['value'];\n\t}", "public function validate($xml)\n {\n if (!ini_get('allow_url_fopen')) {\n throw new EngineBlock_Exception(\n 'Failed validating XML, url_fopen is not allowed'\n );\n }\n\n // Load schema\n $schemaXml = @file_get_contents($this->_schemaLocation);\n if ($schemaXml === false) {\n throw new EngineBlock_Exception(\n sprintf('Failed validating XML, schema url could not be opened: \"%s\"', $this->_schemaLocation)\n );\n }\n\n $schemaXml = $this->_absolutizeSchemaLocations($schemaXml, $this->_schemaLocation);\n\n $dom = DOMDocumentFactory::fromString($xml);\n if (!@$dom->schemaValidateSource($schemaXml)) {\n $errorInfo = error_get_last();\n $errorMessage = $errorInfo['message'];\n // @todo improve parsing message by creating custom exceptions for which know that structure of messages\n $parsedErrorMessage = preg_replace('/\\{[^}]*\\}/', '', $errorMessage);\n echo '<pre>' . htmlentities(EngineBlock_Corto_XmlToArray::formatXml($xml)) . '</pre>';\n throw new EngineBlock_Exception(\n sprintf(\n 'Metadata XML doesn\\'t validate against schema at \"%s\", gives error: \"%s\"',\n $schemaXml,\n $parsedErrorMessage\n )\n );\n }\n }", "public function formatErrors()\n {\n $result = '';\n foreach($this->getErrors() as $attribute => $errors) {\n $result .= implode(\" \", $errors).\" \";\n }\n return $result;\n }", "public function convertOldErrors($messages,$errno,$errMessage){\n\t\t$oldMessages = explode(\"<br />\",$messages);\n\t\tforeach ($oldMessages as $message) {\n\t\t\tif($message!=\"\") $this->addMessage($message);\n\t\t}\n\t\t//parse the $errMessage against <br />s\n\t\t$oldErrors = explode(\"<br />\",$errMessage);\n\t\tforeach ($oldErrors as $error) {\n\t\t\tif($error!=\"\") $this->addError($error);\n\t\t}\n\t}", "function throwXmlError($message){\r\n\tXmlFlow::__print_xml_header();\r\n\techo XmlFlow::xml_encode(array('status' => XmlFlow::$STATUS_NOK, 'response' => \"\", 'msg' => $message));\r\n\texit;\r\n }", "private function _print_xml()\n\t{\n\t\n\t}", "private function bodyToErrors()\n {\n $this->readErrors();\n\n }", "public static function tryMitigateParseFailures(string $content): string\n {\n // Split the content in to individual lines\n $lines = \\explode(\\PHP_EOL, \\trim($content));\n\n // Iterate through each line from the content string\n foreach ($lines as &$line) {\n // Find any matching node element name and content in the line\n $result = \\preg_match_all('/<([A-Za-z0-9-_]+)?(?:[^\\>]+)?>(.*)<\\/\\1>/', $line, $matches, \\PREG_SET_ORDER);\n if ($result === false || $result === 0) {\n continue;\n }\n\n // Begin to iterate through each node key and value\n // We assume here that there *could* be more than one XML element in a given line\n foreach ($matches as $match) {\n // If the match does not contain three elements, skip\n if (\\count($match) !== 3) {\n // @codeCoverageIgnoreStart\n // Sanity check only and unable to be tested\n throw new ImpossibleException(\\sprintf(\n 'Regular expression match result should have 3 children, %d found.',\n \\count($match)\n ));\n // @codeCoverageIgnoreEnd\n }\n\n $matched = $match[0];\n $value = $match[2];\n\n // Check if the value contains any HTML characters which would cause XML parsing issues\n if (\\preg_match('//', $value) > 0) {\n $value = \\htmlentities($value);\n }\n\n // If the value has not been modified, continue\n if ($value === $match[2]) {\n continue;\n }\n\n // Update the line with the new value\n $replacement = \\str_replace($match[2], $value, $matched);\n $line = \\str_replace($matched, $replacement, $line);\n }\n }\n\n return \\implode(\\PHP_EOL, $lines);\n }", "private function hasXMLErrorOccured()\n {\n return (\\libxml_get_last_error() !== false);\n }", "public function testGetErrorsByFile()\n { \n $this->_mockXMLHandler\n ->expects($this->once())\n ->method('loadXML')\n ->with($this->equalTo(self::$_cbXMLFile))\n ->will($this->returnValue(simplexml_load_file(self::$_cbXMLFile)));\n \n $list = $this->_cbErrorHandler->getErrorsByFile(self::$_cbXMLFile, $this->_fileName);\n \n $this->assertType('SimpleXMLElement', $list);\n \n $count = 0;\n foreach ($list as $item) foreach($item->attributes() as $key => $value) {\n if (10 < $count) {\n break 2;\n }\n $this->assertTrue(in_array($key, $this->_neededKeys));\n $this->assertNotNull($value);\n $count++;\n }\n }", "public function parseErrors(Response $response);", "public function errors()\n {\n $_output = '';\n foreach ($this->errors as $error)\n {\n $errorLang = $this->lang->line($error) ? $this->lang->line($error) : '##' . $error . '##';\n $_output .= $this->error_start_delimiter . $errorLang . $this->error_end_delimiter;\n }\n\n return $_output;\n }", "public function validateSchema() : void {\n libxml_clear_errors();\n libxml_use_internal_errors(true);\n $oldEntityLoader = libxml_disable_entity_loader(false);\n $result = $this->schemaValidate($this->xsd);\n libxml_disable_entity_loader($oldEntityLoader);\n if(!$result) {\n $errors = [];\n foreach(libxml_get_errors() as $error) {\n $errors[] = \"[Line {$error->line}, Column {$error->column}] $error->message\";\n }\n throw new SamlDocumentSchemaValidationException($errors);\n }\n }", "function report(array $errors, $format = 'text')\n{\n switch ($format) {\n case 'text':\n $glueFileErrors = function ($fileErrors) {\n $strings = array_map(function ($item) {\n $fixable = $item['fixable'] ? '[x]' : '[ ]';\n $format = \"%' 4d\\t%' 9s\\t%s\\t%s\\t%s\";\n return sprintf($format, $item['line'], $item['type'], $fixable, $item['where'], $item['reason']);\n }, $fileErrors);\n\n return implode(\"\\n\", $strings);\n };\n\n $report = array_map(function ($file, $errors) use ($glueFileErrors) {\n return implode(\"\\n\", [$file, $glueFileErrors($errors)]);\n }, array_keys($errors), $errors);\n\n $footer = \"PSR-LINTER CAN FIX MARKED SNIFF VIOLATIONS AUTOMATICALLY\\n\";\n $report[] = $footer;\n\n return implode(\"\\n\\n\", $report);\n\n case 'json':\n return json_encode($errors);\n\n case 'yaml':\n return Yaml::dump($errors);\n }\n}", "public function parseErrorMessage($error_xml) {\n\t\t$error_message = (string) $error_xml->title . ' (' . (string) $error_xml->status . '): ' . (string) $error_xml->message;\n\t\treturn $error_message;\n\t}", "public function getErrorsAsString()\n {\n if (!$this->hasErrors()) {\n return '';\n }\n $errors[] = \"There are errors in the file. Please correct inconsistencies in line/s and re-upload the file to display the products.\";\n foreach ($this->getErrors() as $key => $error) {\n $lineNumber = (is_numeric($key) ? '#' . $key . ': ' : '');\n $errors[] = $lineNumber . implode(' ', $error);\n }\n return implode('<br>', $errors);\n }", "public function errors();", "public function errors();", "function parseFlintXml($checkedFile) {\n if ($checkedFile['result'] == \"failed\") {\n $outString = \"<li class='failed'>CheckResult: *\" . $checkedFile['result'] . \"*\";\n } else {\n $outString = \"<li>CheckResult: *\" . $checkedFile['result'] . \"*\";\n }\n\n $outString .= \"<ul class='check-result'>\";\n foreach($checkedFile->checkCategory as $cat) {\n if ($cat['result'] != \"failed\") {\n $outString .= \"<li class='happy'>\" . $cat['name'] . \": *\" . $cat['result'] . \"*</li>\";\n } else {\n $outString .= \"<li>\" . $cat['name'] . \": *\" . $cat['result'] . \"*</li>\";\n }\n }\n $outString .= \"</ul>\";\n $outString .= \"</li>\";\n\n return $outString;\n }", "public function testThrowsExceptionOnInvalidAddXmlContent()\n {\n $parser = new Parser($this->createTwig());\n $parser->addXmlContent(\"Invalid XML\");\n }", "protected function structureValidationErrorMessages($validation_result)\n {\n\n }", "private function parseResponseXML($response_xml=\"\")\n\t\t{\n\t\t\t$this->error_no = 0;\n\t\t\t$this->error_text = '';\n\t\t\t$x = simplexml_load_string($response_xml);\n\t\t\t//rateshop\n\t\t\tif($this->action_code==\"RateShop\"){\n\n\t\t\t\tif (isset($x->OTA_VehAvailRateRS->Errors))\n\t\t\t\t{\n\t\t\t\t\t$this->error=true;\n\t\t\t\t\t$this->error_no = (int) $x->OTA_VehAvailRateRS->Errors->Error[\"Code\"];\n\t\t\t\t\t$this->error_text .= (string) $x->OTA_VehAvailRateRS->Errors->Error[\"ShortText\"];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//BOOKING\n\t\t\tif($this->action_code==\"Booking\"){\n\t\t\t\tif (isset($x->OTA_VehResRS->Errors))\n\t\t\t\t{\n\t\t\t\t\t$this->error=true;\n\t\t\t\t\t$this->error_no = (int) $x->OTA_VehResRS->Errors->Error[\"Code\"];\n\t\t\t\t\t$this->error_text .= (string) $x->OTA_VehResRS->Errors->Error[\"ShortText\"];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Modify\n\t\t\tif($this->action_code==\"ModifyReservation\"){\n\t\t\t\tif (isset($x->OTA_VehModifyRS->Errors))\n\t\t\t\t{\n\t\t\t\t\t$this->error=true;\n\t\t\t\t\t$this->error_no = (int) $x->OTA_VehModifyRS->Errors->Error[\"Code\"];\n\t\t\t\t\t$this->error_text .= (string) $x->OTA_VehModifyRS->Errors->Error[\"ShortText\"];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//CANCEL\n\t\t\tif($this->action_code==\"CANCEL\"){\n\t\t\t\tif (isset($x->OTA_VehCancelRS->Errors))\n\t\t\t\t{\n\t\t\t\t\t$this->error=true;\n\t\t\t\t\t$this->error_no = (int) $x->OTA_VehCancelRS->Errors->Error[\"Code\"];\n\t\t\t\t\t$this->error_text .= (string) $x->OTA_VehCancelRS->Errors->Error[\"ShortText\"];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $response_xml;\n\t\t}", "public function writeErrorsIntoTheDom(): self\n {\n foreach ($this->errors as $field => $errors) {\n $inputTag = $this->formDocument->findOneOrFalse('[name=\\'' . $field . '\\']');\n if ($inputTag) {\n $errorMsgTemplateSelector = $inputTag->getAttribute('data-error-template-selector');\n if ($errorMsgTemplateSelector) {\n $errorMsgTemplate = $this->formDocument->findOneOrFalse($errorMsgTemplateSelector);\n if ($errorMsgTemplate) {\n foreach ($errors as $error) {\n $errorMsgTemplate->innertext .= ' ' . $error;\n }\n }\n }\n }\n }\n\n return $this;\n }", "private function is_valid_xml($xml) {\n\n libxml_use_internal_errors(true);\n $doc = new DOMDocument('1.0', 'utf-8');\n $doc->loadXML($xml);\n\n $errors = libxml_get_errors();\n \n return empty($errors);\n }", "function splitFaultstring($xml_array, $width = '') {\n\tif (!empty($xml_array)) {\n\t\tforeach ($xml_array as $key => $val) {\n\t\t\tif (is_numeric(strpos($val, 'faultstring>')) || is_numeric(strpos($val, 'message>'))) {\n\t\t\t\t$length = 20;\n\t\t\t\tif (!empty($width)) {\n\t\t\t\t\t$length = $width/7;\n\t\t\t\t}\n\t\t\t\t$val = wordwrap($val, $length, \"\\n\");\n\t\t\t\t$xml_array[$key] = $val;\n\t\t\t}\n\t\t}\n\t\treturn $xml_array;\n\t}\n\t\n\treturn FALSE;\n}", "private function getLastXMLErrorMessage()\n {\n $errorMessage = null;\n $error = \\libxml_get_last_error();\n\n if ($error !== false) {\n $errorMessage = \\trim($error->message);\n }\n\n return $errorMessage;\n }", "function getErrors();", "public function testGetXmlRootTagWithNotValidXML()\n {\n $this->expectException(InvalidXMLFormat::class);\n\n $this->mockTrait->getXmlRootTag('not xml');\n }", "private function convert_html_error ($level, $message, &$file, $line, $column) {\n\t\t$message = trim($message, \" \");\n\t\t\n\t\t// Resolve the file path\n\t\tif ($file) {\n\t\t\t/*\n\t\t\t\tWARNING: we need to cache the resolved files some where on disk otherwise this takes forever!\n\t\t\t\tif we put them in the build directory then users can clean the target to remove bad paths\n\t\t\t\tor we could resolve upon clicking via javascript?\n\t\t\t*/\n\t\t\tif (!array_key_exists($file, $this->source_paths)) {\n\t\t\t\t$path = $this->target_loader->resolve_path($file);\n\t\t\t\t$this->source_paths[$file] = $path;\n\t\t\t} else {\n\t\t\t\t$path = $this->source_paths[$file];\n\t\t\t}\n\t\t\t\n\t\t\t// Return the resolved path\n\t\t\t$file = $path;\n\t\t\t\n\t\t\tif (file_exists($path)) {\n\t\t\t\t$error = \"<a href=\\\"txmt://open/?url=file://$path&line=$line&column=$column\\\">$message</a><br>\";\n\t\t\t} else {\n\t\t\t\t$error = \"<span class=\\\"error-no-source\\\">$message</a><br>\";\n\t\t\t}\n\t\t} else {\n\t\t\t$error = \"<span class=\\\"error-no-source\\\">$message</a><br>\";\n\t\t}\n\t\t\n\t\treturn $error;\n\t}", "public function HTMLizeErrlog(){\n\t\t\treturn str_replace(\"\\n\", \"<br />\", $this->errlog);\n\t\t}", "public function HTMLizeErrlog(){\n\t\t\treturn str_replace(\"\\n\", \"<br />\", $this->errlog);\n\t\t}", "protected function renderXmlNotFoundOutput()\n {\n return '<root><message>Not found</message></root>';\n }", "function get_errors()\n {\n }", "public function get_errors() {\n\n\t\t$output = '';\n\t\t\n\t\t$errors = $this->errors;\n\t\t\n\t\tif ($errors) {\n\t\t\t$items = '';\n\t\t\tforeach ($errors as $e) {\n\t\t\t\t$items .= '<li>'.$e.'</li>' .\"\\n\";\n\t\t\t}\n\t\t\t$output = '<ul>'.\"\\n\".$items.'</ul>'.\"\\n\";\n\t\t}\n\t\telse {\n\t\t\t$output = __('There were no errors.', CCTM_TXTDOMAIN);\n\t\t}\n\t\treturn sprintf('<h2>%s</h2><div class=\"summarize-posts-errors\">%s</div>'\n\t\t\t, __('Errors', CCTM_TXTDOMAIN)\n\t\t\t, $output);\n\t}", "public function testValidateDocumentXmlValidation()\n {\n }", "public function testInvalidXml() {\r\n\t\t$xml=\"non xml string\";\r\n\t\t$actual = Response::xml($xml);\r\n\t\t\r\n\t\t$this->assertEquals($actual->success, 'false');\r\n\t}", "function render() {\n foreach ($this->request['invalid_elements'] as $element) {\n foreach ($element->errors as $error) {\n drupal_set_message($error, 'error');\n }\n }\n\n return parent::render();\n }", "private function setError() {\n\t\t$this->is_valid = false;\n\n\t\t// Remove the last invalid interval.\n\t\tarray_pop($this->intervals);\n\n\t\tif (!isset($this->source[$this->pos])) {\n\t\t\t$this->error = _('unexpected end of interval');\n\n\t\t\treturn;\n\t\t}\n\n\t\tfor ($i = $this->pos, $chunk = '', $maxChunkSize = 50; isset($this->source[$i]); $i++) {\n\t\t\tif (0x80 != (0xc0 & ord($this->source[$i])) && $maxChunkSize-- == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$chunk .= $this->source[$i];\n\t\t}\n\n\t\tif (isset($this->source[$i])) {\n\t\t\t$chunk .= ' ...';\n\t\t}\n\n\t\t$this->error = _s('incorrect syntax near \"%1$s\"', $chunk);\n\t}", "private function _getFlattenedErrors($errors)\n\t{\n\t\t$return = '';\n\n\t\tforeach ($errors as $attribute => $attributeErrors)\n\t\t{\n\t\t\t$return .= \"\\n - \".implode(\"\\n - \", $attributeErrors);\n\t\t}\n\n\t\treturn $return;\n\t}", "private function _getFlattenedErrors($errors)\n\t{\n\t\t$return = '';\n\n\t\tforeach ($errors as $attribute => $attributeErrors)\n\t\t{\n\t\t\t$return .= \"\\n - \".implode(\"\\n - \", $attributeErrors);\n\t\t}\n\n\t\treturn $return;\n\t}", "public function get_errors() { return $this->errortext; }", "function get_errors(){\r\n\t\t$errors = array();\r\n\r\n\t\tforeach($this->feeds as $feed){\r\n\t\t\tif($feed->error()) $errors[] = $feed->get_feed_id();\r\n\t\t}\r\n\r\n\t\treturn $errors;\r\n\t}", "public function testBuildInvalidDataSimpleXml() {\n\t\t$input = '<derp';\n\t\t$xml = Xml::build($input, array('return' => 'simplexml'));\n\t}", "function ae_fnerror_log( $ae_lvmessage ) {\n\terror_log( 'ae_tlch_xmlreq.php: ' . $ae_lvmessage );\n}", "function invalid(){\r\techo \"<node>\";\r\t\techo \"<count>invalid</count>\";\r\techo \"</node>\";\r\tdie(0);\r}", "protected function getFlattenedValidationErrorMessage() {}", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrors();", "function CustomError($errno, $errmsg, $filename, $linenum, $vars){\n\t$dt = date(\"Y-m-d H:i:s (T)\");\n\n\t// define an assoc array of error string\n\t// in reality the only entries we should\n\t// consider are E_WARNING, E_NOTICE, E_USER_ERROR,\n\t// E_USER_WARNING and E_USER_NOTICE\n\t$errortype = array (\n\t\tE_ERROR => 'Error',\n\t\tE_WARNING => 'Warning',\n\t\tE_PARSE => 'Parsing Error',\n\t\tE_NOTICE => 'Notice',\n\t\tE_CORE_ERROR => 'Core Error',\n\t\tE_CORE_WARNING => 'Core Warning',\n\t\tE_COMPILE_ERROR => 'Compile Error',\n\t\tE_COMPILE_WARNING => 'Compile Warning',\n\t\tE_USER_ERROR => 'User Error',\n\t\tE_USER_WARNING => 'User Warning',\n\t\tE_USER_NOTICE => 'User Notice',\n\t\tE_STRICT => 'Runtime Notice',\n\t\tE_RECOVERABLE_ERROR => 'Catchable Fatal Error'\n\t);\n\t// set of errors for which a var trace will be saved\n\t$user_errors = array(E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE);\n \n\t$err = \"<errorentry>\\n\";\n\t$err .= \"\\t<datetime>\" . $dt . \"</datetime>\\n\";\n\t$err .= \"\\t<errornum>\" . $errno . \"</errornum>\\n\";\n\t$err .= \"\\t<errortype>\" . $errortype[$errno] . \"</errortype>\\n\";\n\t$err .= \"\\t<errormsg>\" . $errmsg . \"</errormsg>\\n\";\n\t$err .= \"\\t<scriptname>\" . $filename . \"</scriptname>\\n\";\n\t$err .= \"\\t<scriptlinenum>\" . $linenum . \"</scriptlinenum>\\n\";\n\n\tif(in_array($errno, $user_errors)){\n\t\t$err .= \"\\t<vartrace>\" . wddx_serialize_value($vars, \"Variables\") . \"</vartrace>\\n\";\n\t}\n\t$err .= \"</errorentry>\\n\\n\";\n \n\t// for testing\n\t// echo $err;\n\n\t// save to the error log, and e-mail me if there is a critical user error\n\terror_log($err, 3, \"error.log\");\n\tif($errno == E_USER_ERROR){\n\t\techo \"<pre>Critical User Error $err>/pre>\\n\";\n\t\tdie();\n\t}\n}", "private function displayErrors () {\n echo '<pre>';\n\n foreach ($this->error as $single_error) {\n print_r($single_error);\n }\n\n echo '</pre>';\n }", "public static function displayErrors(){\n $ec = new EmailLabsConfig();\n if( $ec->getMode() == true && !empty( self::$errors ) ){\n $message = '';\n foreach( self::$errors as $item )\n $message .= '['.$item['lvl'].']['.$item['date'].']'.$item['msg'].\"\\n\";\n die( $message );\n }\n }", "protected function get_errors_description() {\n $errors = array();\n if ($this->options->is_check_errors == true) {\n\n $i = 0;\n $rules_names = $this->get_error_hints_names();\n\n foreach($rules_names as $rule_name) {\n $rule = new $rule_name($this->get_dst_root());\n $rhr = $rule->check_hint();\n\n if (count($rhr->problem_ids) > 0) {\n $errors[$i] = array();\n\n $errors[$i][\"problem\"] = $rhr->problem;\n $errors[$i][\"solve\"] = $rhr->solve;\n $errors[$i][\"problem_ids\"] = $rhr->problem_ids;\n $errors[$i][\"problem_type\"] = $rhr->problem_type;\n $errors[$i][\"problem_indfirst\"] = $rhr->problem_indfirst;\n $errors[$i][\"problem_indlast\"] = $rhr->problem_indlast;\n\n ++$i;\n }\n }\n }\n return $errors;\n }", "function error_reporting() {\n\t\t$r='';\n\t\tif (mb_strlen(self::$error)>0) {\n\t\t\t$r.=self::$error;\n\t\t}\n\t\tif (count(self::$error_arr)>0) {\n\t\t\t$r.='<h2>Произошли следующие ошибки:</h2>'.\"\\n\".'<ul>';\n\t\t\tforeach(self::$error_arr as $key=>$value) {\n\t\t\t\t$r.='<li>'.$value.'</li>';\n\t\t\t}\n\t\t\t$r.='</ul>';\n\t\t}\n\t\treturn $r;\n\t}", "function getErrors()\n {\n $errMsg = '';\n foreach ($this->errors as $error) {\n $errMsg .= $error;\n $errMsg .= '<br/>';\n }\n return $errMsg;\n }", "public function getErrors() {\n\n if (!$this->errors || count($this->errors === 0)) {\n return '';\n }\n $html = '';\n $pattern = '<li>%s</li>';\n $html .= '<ul>';\n\n foreach ($this->errors as $error) {\n $html .= sprintf($pattern, $error);\n }\n $html .= '</ul>';\n return sprintf($this->getWrapperPattern(self::ERRORS), $html);\n }", "protected function setSystemErrors(){\r\n // errors\r\n if($this->error->isErrors()){\r\n $errors = $this->error->getError();\r\n array_walk($errors, function(&$value){$value = array('text' => $value, 'class' => 'danger');});\r\n $this->parser->sys_errors = $errors;\r\n $this->parser->is_sys_errors = true;\r\n }else{\r\n $this->parser->is_sys_errors = false;\r\n }\r\n\r\n // messages\r\n if($this->error->isMessages()){\r\n $errors = $this->error->getError(true);\r\n array_walk($errors, function(&$value){$value = array('text' => $value, 'class' => 'success');});\r\n $this->parser->sys_messages = $errors;\r\n $this->parser->is_sys_messages = true;\r\n }else{\r\n $this->parser->is_sys_messages = false;\r\n }\r\n\r\n $this->error->clearError(true);\r\n }", "public function renderErrors();", "function formatXml($xml) {\n\t$format_xml = array();\n\tfor ($i = 0; $i < strlen($xml); $i++) {\n\t\t$start_pos = stripos($xml, '<');\n\t\t$stop_pos = stripos($xml, '>');\n\t\t/* get the tag of an element - it is between a '<' and a '>' character */\n\t\t$tag = substr($xml, $start_pos+1, $stop_pos-$start_pos-1);\n\t\t/* remaining string from xml, after eliminating the found tag */\n\t\t$xml = substr($xml, $stop_pos+1);\n\n\t\t/* search for ending tag in remaining $xml */\n\t\t$end_tag = strstr($xml, '/' . $tag);\n\t\t/* if end tag found */\n\t\tif (strlen($end_tag) > 0) {\n\t\t\t\n\t\t\t$end_tag_pos = strlen($xml) - strlen($end_tag);\n\t\t\tif ((stripos($xml, '<')+1) == $end_tag_pos) {\n\t\t\t\t/* get the value from the tag */\n\t\t\t\t$value = substr($xml, 0, $end_tag_pos);\n\t\t\t\t$tag_name = $tag;\n\t\t\t\t$tag = $tag_name . '>' .$value. '/' .$tag_name;\n\t\t\t\t/* tag is now similar to 'tag>value</tag'.\n\t\t\t\t * remaining xml is stored in $xml variable */\n\t\t\t\t$xml = substr($end_tag, strlen($tag_name)+2);\n\t\t\t}\n\t\t}\n\t\t$format_xml[] = $tag;\n\t}\n\t$tags_no = count($format_xml);\n\tif ($tags_no > 0) {\n\t\t/* add missing '<' and '>' characters. */\n\t\t$format_xml[0] = '<'.$format_xml[0];\n\t\t$format_xml[$tags_no-1] = $format_xml[$tags_no-1].'>';\n\t}\n\tif (!empty($format_xml[1])) {\n\t\t$envelope = explode(' ', $format_xml[1]);\n\t\t/* put new lines between tags */\n\t\tfor ($i = 1; $i < count($envelope)-1; $i++) {\n\t\t\t$envelope[$i] = $envelope[$i].\"\\n\";\n\t\t}\n\t\t$format_xml[1] = implode(' ', $envelope);\n\t\t/* return the formated xml */\n\t\treturn $format_xml;\n\t} else {\n\t\treturn FALSE;\n\t}\n}", "public function __construct() {\n // Laravel. This line explicitly disables those errors for this single conversion process.\n libxml_use_internal_errors(true);\n }", "public function getMessages() {\n return libxml_get_last_error();\n }", "public function stringifyAttributeErrors()\n {\n $o = array('fixed' => array(), 'lang' => array());\n $lang = Language::getTitle($this->language_id, false);\n $fixedAttr = $this->fixedAttributes();\n foreach($this->getErrors() as $attr => $errors)\n {\n $isFixed = in_array($attr, $fixedAttr);\n\n $label = $this->getAttributeLabel($attr);\n if(count($errors) > 1)\n $tmp = '<ul><li>'.implode('</li><li>', $errors).'</li></ul>';\n else\n $tmp = is_array($errors) ? $errors[0] : $errors;\n\n if($isFixed)\n $o['fixed'][$label] = $tmp;\n else\n $o['lang'][$lang][$label] = $tmp;\n }\n\n return $o;\n }", "private static function _checkXmlParser()\n {\n if (!function_exists('simplexml_load_string') || !class_exists('SimpleXMLElement')) {\n throw new AllopassApiMissingXMLFeatureException();\n }\n }", "private static function _checkXmlParser()\n {\n if (!function_exists('simplexml_load_string') || !class_exists('SimpleXMLElement')) {\n throw new AllopassApiMissingXMLFeatureException();\n }\n }", "public function validator($data) {\n $data = trim ( $data );\n \n if (strlen ( $data ) === 0) {\n $err = new LibXMLError ();\n $err->level = 3;\n $err->code = 4;\n $err->column = 1;\n $err->message = 'Start tag expected, \\'<\\' not found';\n $err->file = '';\n $err->line = 1;\n $error [] = $err;\n } else {\n libxml_use_internal_errors ( true );\n $doc = new DOMDocument ( '1.0', 'utf-8' );\n $doc->loadXML ( $data );\n $error = libxml_get_errors ();\n }\n return isset ( $error ) && count ( $error ) > 0 ? $error : $data;\n }", "public function getErrorLines()\n {\n return array('Something went wrong... ಠ_ಠ');\n }" ]
[ "0.702662", "0.6902437", "0.6713872", "0.6713872", "0.6486765", "0.63808376", "0.61858463", "0.6029961", "0.58217764", "0.56908494", "0.56432015", "0.5569628", "0.55458885", "0.5536127", "0.5533259", "0.5527144", "0.5525503", "0.5487141", "0.54767513", "0.5466897", "0.5458011", "0.54334766", "0.541702", "0.5403103", "0.5372802", "0.5357284", "0.5334972", "0.5334877", "0.53274876", "0.5320505", "0.53071564", "0.52685565", "0.5262607", "0.5253887", "0.5210493", "0.5199599", "0.5184054", "0.5181675", "0.51639926", "0.51628584", "0.515971", "0.515347", "0.5149793", "0.51360834", "0.5110423", "0.5107924", "0.5105785", "0.5105428", "0.5076734", "0.5055551", "0.5055551", "0.50435007", "0.5036306", "0.50347257", "0.5029751", "0.5028539", "0.5020764", "0.5012262", "0.50043285", "0.50015956", "0.49912265", "0.49847898", "0.49738628", "0.49738628", "0.496268", "0.49621612", "0.49508065", "0.49478605", "0.4946822", "0.49412262", "0.4927933", "0.49266544", "0.49266544", "0.4924278", "0.49205178", "0.4896871", "0.48945507", "0.48886657", "0.4888405", "0.48853388", "0.48853388", "0.48853388", "0.48853388", "0.48773405", "0.48761594", "0.48646978", "0.4862973", "0.48544678", "0.48471683", "0.48448983", "0.4843692", "0.48257172", "0.481753", "0.48154283", "0.4811492", "0.48113397", "0.4810934", "0.4810934", "0.48069775", "0.4803476" ]
0.6400994
5
Display a listing of the resource.
public function __construct() { $this->middleware('can:admin.usuarios.index')->only('index'); $this->middleware('can:admin.usuarios.edit')->only('edit'); $this->middleware('can:admin.usuarios.create')->only('create'); $this->middleware('can:admin.usuarios.destroy')->only('destroy'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // $roles= Role::all(); return view('dash.usuarios.createUsuarios',compact('roles')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $validated = $request->validate([ 'name' => 'required', 'email'=>'required', 'password'=>'required', ]); $usuario= User::create([ 'name' => $request['name'], 'email'=>$request['email'], 'password'=>bcrypt($request['password']),] ); $usuario->roles()->sync($request->roles); return redirect()->route('admin.usuarios.index')->with('info','El usuario se agrego correctamente'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(User $usuario) { // $roles= Role::all(); return view('dash.usuarios.editUsuarios',compact('usuario','roles')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, User $usuario) { $usuario->roles()->sync($request->roles); return redirect()->route('admin.usuarios.edit',$usuario)->with('info','Se asigno un rol correctamente'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(User $usuario) { $usuario->delete(); return redirect()->route('admin.usuarios.index')->with('info','El usuario se elimino correctamente'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
update deadline jika hari ini sudah melebihi deadline
public function index() { DB::statement("UPDATE m_kpix SET kpix_deadline = NULL WHERE kpix_deadline < DATE_FORMAT(CURRENT_DATE(), '%Y-%m-%d')"); return view('master/datakpi/index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _updateDeadline()\n {\n global $zdb;\n\n try {\n $due_date = self::getDueDate($this->_member);\n\n if ( $due_date != '' ) {\n $date_fin_update = $due_date;\n } else {\n $date_fin_update = new Expression('NULL');\n }\n\n $update = $zdb->update(Adherent::TABLE);\n $update->set(\n array('date_echeance' => $date_fin_update)\n )->where(\n Adherent::PK . '=' . $this->_member\n );\n $zdb->execute($update);\n return true;\n } catch (\\Exception $e) {\n Analog::log(\n 'An error occured updating member ' . $this->_member .\n '\\'s deadline |' .\n $e->getMessage(),\n Analog::ERROR\n );\n return false;\n }\n }", "public function setDeadline($deadline) {\n\t\t// make sure the value is null OR if not null validate date and time passed in, must create date time ok and still match the same string passed (e.g. prevent 31/02/2018)\n\t\tif(($deadline !== null) && date_format(date_create_from_format('d/m/Y H:i', $deadline), 'd/m/Y H:i') != $deadline) {\n throw new TaskException(\"Task deadline date time error\");\n }\n\n $this->_deadline = $deadline;\n\t}", "public function setDeadline($fv_deadline)\n {\n \tif(!empty($fv_deadline))\n \t{\n \t\t// if(!Utils::validarFecha($fv_deadline,'d-m-Y'))\n \t\t// {\n \t\t// \t$this->fv_error_message = $this->fv_error_message . '<br>- Fecha Limite'.$fv_deadline.ERROR_DATO_FECHA;\n \t\t// \treturn $this->fv_deadline = null;\n \t\t// }\n\n \t\treturn $this->fv_deadline =date(\"Y-m-d\", strtotime($fv_deadline)) ;\t\n \t}\n\n $this->fv_error_message = $this->fv_error_message .'<br> - Fecha Limite '.ERROR_NULL;\n return $this->fv_deadline = null;\n\n }", "public function setDeadline($var)\n {\n GPBUtil::checkInt64($var);\n $this->deadline = $var;\n\n return $this;\n }", "public function executeChangeDeadline(sfWebRequest $request)\n {\n try {\n // PHP Erro handling is really, really horrible\n $deadline = DateTime::createFromFormat('Y-m-d', $request->getPostParameter('deadline'));\n if ($deadline == false)\n throw new Exception();\n } catch (Exception $e) {\n $this->getUser()->setFlash('error', 'Invalid date. Please use YYYY-MM-DD.');\n $this->redirect('project/tool');\n }\n\n $conn = Doctrine_Manager::getInstance();\n $round = Doctrine_Core::getTable('NominationRound')->findAll();\n try {\n $round->delete();\n } catch (Exception $e) {\n $this->getUser()->setFlash('error', 'Unexpected Error. Message: '.$e->getMessage());\n $this->redirect('project/tool'); \n }\n \n $round = new NominationRound();\n $round->setDeadline($deadline->format('Y-m-d'));\n $round->save();\n\n $this->getUser()->setFlash('notice', 'New date applied.');\n $this->redirect('project/tool');\n }", "function deadline_passed($time = -1) { // -1 is placeholder for now\n\t\t$deadline = $this->attribute(\"deadline\");\n\t\tif($deadline == NULL) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tif($time == -1) {\n\t\t\t\treturn parse_date($this->attribute(\"deadline\")) < now();\n\t\t\t} else {\n\t\t\t\treturn parse_date($this->attribute(\"deadline\")) < $time;\n\t\t\t}\n\t\t}\n\t}", "public function getDeadline()\r\n {\r\n return $this->deadline;\r\n }", "public function getDeadline()\n {\n return $this->deadline;\n }", "public function getDeadline()\n {\n return $this->deadline;\n }", "public function getDeadline()\n {\n\n return $this->fv_deadline;\n }", "public function setVoidDeadline($value)\n {\n $this->_fields['VoidDeadline']['FieldValue'] = $value;\n return $this;\n }", "public function setDeadline($deadline)\r\n {\r\n $this->deadline = new DateTime($deadline);\r\n\r\n return $this;\r\n }", "public function getDeadline() {\n\t\treturn $this->_deadline;\n\t}", "public function variationDeadlineJob(){\n\t\tglobal $wpdb;\n\t\t$variations = $wpdb->get_results(\"SELECT * FROM $wpdb->postmeta WHERE meta_key = '_variation_deadline' AND NOT meta_value = '' \");\n\n\t\tforeach ( $variations as $variation ){\n\t\t\t/* if deadline is exceeded and variation is not disabled */\n\t\t\tif ( $variation->meta_value <= date('Y-m-d') AND get_post_status( $variation->meta_id ) != 'private' ){\n\t\t\t\t/* disable variation */\n\t\t\t\twp_update_post(array(\n\t\t\t\t\t'ID' => $variation->post_id,\n\t\t\t\t\t'post_status' => 'private'\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t}", "public function updateDeadline(int $idApproval, int $deadline): bool\n {\n try {\n $stmt = $this->db->prepare(\"UPDATE `Approval` SET `approvalDeadline` = :deadline WHERE `Approval`.`idApproval` = :idApproval; COMMIT;\");\n\n $stmt->bindParam(\":idApproval\", $idApproval, PDO::PARAM_INT);\n $stmt->bindParam(\":deadline\", $deadline, PDO::PARAM_STR);\n\n\n //Execute query, and set return-status + any potential error-message\n if ($stmt->execute()) {\n return true;\n } else {\n $this->errorMsgs = $stmt->errorInfo();\n return false;\n }\n\n } catch (InvalidArgumentException $e) {\n //TODO: Move to error.twig or return it in getLastError?\n print $e->getMessage() . PHP_EOL;\n }\n\n return false;\n }", "function check_deadline($function_v_project_id, $version, $mode){\n\t\t$check_deadline = mysql_query(\"SELECT upload_time FROM video_under_project WHERE video_project_id = \".$function_v_project_id.\" AND version LIKE '\".$version.\"' AND enabling = 1 ORDER BY id LIMIT 0, 1\");\n\t\t$check_deadline_row = mysql_fetch_array($check_deadline);\n\t\t $now = time(); // or your date as well\n\t\t $data_format = substr($check_deadline_row['upload_time'], 0, 10);\n\t\t $upload_date = strtotime($data_format);\n\t\t $datediff = $now - $upload_date;\n\t\t if($mode == \"deadline\"){\n\t\t \treturn 21 - floor($datediff/(60*60*24));\n\t\t }else{\n\t\t \treturn date('d-F-Y', strtotime($check_deadline_row['upload_time']));\n\t\t }\n\t\t //return $data_format ;\n\t}", "public function setConfirmDeadline($value)\n {\n $this->_fields['ConfirmDeadline']['FieldValue'] = $value;\n return $this;\n }", "public function update(Request $request) {\n $ticket = Ticket::findOrFail($request->t_id);\n\n $field = $request->field;\n $value = $request->value;\n if(!is_null($ticket[$field]) && $ticket[$field] == $value) //Khong cap nhat neu van la gia tri cu\n return $this->getErrors('Chưa thực hiện thay đổi nào.');\n\n //if change its team, change assignee to the new team's leader\n if($field == 'team_id') {\n $ticket->assignee()->associate(Team::find($value)->leader()->id);\n }\n //column is status\n else if($field == 'status') {\n if($value == Constant::STATUS_RESOLVED) {\n $ticket->resolved_at = now();\n } else if($value == Constant::STATUS_CLOSED || $value == Constant::STATUS_CANCELLED) {\n return $this->getErrors('Không thể thay đổi trạng thái của yêu cầu');\n }\n }\n //update thread (comments) if field is priority or deadline\n else if($field == 'priority' || $field == 'deadline') {\n if($field == 'deadline') {\n if(is_null($value)) //truong deadline trong\n return $this->getErrors('Vui lòng nhập deadline.');\n if(Carbon::parse($value) < now()) //deadline < gio hien tai\n return $this->getErrors('Deadline phải là một ngày sau ' . now() . '.');\n }\n if(is_null($request->reason)) {\n return $this->getErrors('Chưa điền lý do thay đổi.');\n }\n $thread = new Thread;\n\n $thread->content = $request->reason;\n if($field == 'priority') {\n $thread->type = Constant::COMMENT_PRIORITY;\n $field_name = \"mức độ ưu tiên\";\n $oldValue = TicketParser::getPriority($ticket[$field], false);\n $newValue = TicketParser::getPriority($value, false);\n } else { //deadline\n $thread->type = Constant::COMMENT_DEADLINE;\n $field_name = $field;\n $oldValue = $ticket[$field]->format(Constant::DATETIME_FORMAT);\n $newValue = Carbon::parse($value)->format(Constant::DATETIME_FORMAT);\n }\n $thread->ticket_id = $ticket->id;\n $thread->employee_id = $request->c_id;\n\n $thread->note = \"Thay đổi $field_name: $oldValue => $newValue<br/>Lý do: $request->reason\";\n\n $thread->save();\n }\n\n //update ticket info\n //change related employees\n //update unread for all users in each ticket\n switch ($field) {\n case 'relaters[]':\n //Remove all relation of old relaters to update again\n $ticket->relaters()->detach();\n //Remove all read of the ticket\n TicketRead::where('ticket_id', $ticket->id)->delete();\n\n $ticket->unreaders()->attach([\n $ticket->creator->id => ['status' => 1],\n $ticket->assignee->id => ['status' => 0]\n ]);\n $relaters = $value;\n if(is_null($relaters)) { //remove all relaters\n break;\n }\n foreach ($relaters as $relater) {\n $employee = Employee::findOrFail($relater);\n\n $ticket->relaters()->attach($employee->id);\n\n //prevent duplicate in ticket_read table\n if($employee->id != $ticket->creator->id && $employee->id != $ticket->assignee->id)\n $ticket->unreaders()->attach($employee->id);\n }\n break;\n case 'assignee':\n if(is_null($value))\n return $this->getErrors('Chưa chọn nhân viên');\n\n //Remove unread of old assignee\n TicketRead::where('ticket_id', $ticket->id)->where('employee_id', $ticket->assignee->id)->delete();\n\n $employee = Employee::findOrFail($value);\n $ticket->assignee()->associate($employee->id);\n\n if($ticket->unreaders->contains('id', $employee->id)) {\n $ticket->unreaders()->updateExistingPivot($employee->id, ['status' => 0]);\n } else {\n $ticket->unreaders()->attach($employee->id); //update new unread ticket\n }\n break;\n default:\n $ticket[$field] = $value; //Set all field to new value\n break;\n }\n $ticket->save();\n\n //Send email to notify update for the assignee of the ticket\n $ticket = Ticket::findOrFail($request->t_id);\n SendEmail::sendMailsForTicket(Constant::MAIL_UPDATED_TICKET, $ticket, $request->c_id);\n\n return response()->json([\n 'success' => true,\n 'detail' => 'Thay đổi thành công'\n ]);\n }", "public function deadlineDuration(?string $value): self\n {\n $this->instance->setDeadlineDuration($value);\n return $this;\n }", "public function editassigntimeAction()\n {\n $prevurl = getenv(\"HTTP_REFERER\");\n $user_params=$this->_request->getParams();\n $ftvrequest_obj = new Ep_Ftv_FtvRequests();\n $ftvpausetime_obj = new Ep_Ftv_FtvPauseTime();\n $requestId = $user_params['requestId'];\n $requestsdetail = $ftvrequest_obj->getRequestsDetails($requestId);\n\n ($user_params['editftvspentdays'] == '') ? $days=0 : $days=$user_params['editftvspentdays'];\n ($user_params['editftvspenthours'] == '') ? $hours=0 : $hours=$user_params['editftvspenthours'];\n ($user_params['editftvspentminutes'] == '') ? $minutes=0 : $minutes=$user_params['editftvspentminutes'];\n ($user_params['editftvspentseconds'] == '') ? $seconds=0 : $seconds=$user_params['editftvspentseconds'];\n\n /*if($user_params['addasigntime'] == 'addasigntime') ///when time changes in mail content in publish ao popup//\n {\n /*$editdate = date('Y-m-d', strtotime($user_params['editftvassigndate']));\n $edittime = date('H:i:s', strtotime($user_params['editftvassigntime']));\n $editdatetime =$editdate.\" \".$edittime;\n $data = array(\"assigned_at\"=>$editdatetime);////////updating\n $query = \"identifier= '\".$user_params['requestId'].\"'\";\n $ftvrequest_obj->updateFtvRequests($data,$query);\n $parameters['ftvType'] = \"chaine\";\n // $newseconds = $this->allToSeconds($user_params['editftvspentdays'],$user_params['editftvspenthours'],$user_params['editftvspentminutes'],$user_params['editftvspentseconds']);\n echo \"<br>\".$format = \"P\".$days.\"DT\".$hours.\"H\".$minutes.\"M\".$seconds.\"S\";\n echo \"<br>\".$requestsdetail[0]['assigned_at'];\n $time=new DateTime($requestsdetail[0]['assigned_at']);\n $time->sub(new DateInterval($format));\n echo \"<br>\".$assigntime = $time->format('Y-m-d H:i:s');\n $data = array(\"assigned_at\"=>$assigntime);////////updating\n echo $query = \"identifier= '\".$requestId.\"'\";\n $ftvrequest_obj->updateFtvRequests($data,$query);\n $this->_redirect($prevurl);\n }\n elseif($user_params['subasigntime'] == 'subasigntime')\n {\n $format = \"P\".$days.\"DT\".$hours.\"H\".$minutes.\"M\".$seconds.\"S\";\n $time=new DateTime($requestsdetail[0]['assigned_at']);\n $time->add(new DateInterval($format));\n $assigntime = $time->format('Y-m-d H:i:s');\n $data = array(\"assigned_at\"=>$assigntime);////////updating\n $query = \"identifier= '\".$requestId.\"'\";\n $ftvrequest_obj->updateFtvRequests($data,$query);\n $this->_redirect($prevurl);\n }*/\n $inpause = $ftvpausetime_obj->inPause($requestId);\n $requestsdetail[0]['inpause'] = $inpause;\n $ptimes = $ftvpausetime_obj->getPauseDuration($requestId);\n $assigntime = $requestsdetail[0]['assigned_at'];\n //echo $requestId; echo $requestsdetail[0]['assigned_at'];\n\n if(($requestsdetail[0]['status'] == 'done' || $inpause == 'yes') && $requestsdetail[0]['assigned_at'] != null)\n {\n if($requestsdetail[0]['status'] == \"closed\")\n $time1 = ($requestsdetail[0]['cancelled_at']); /// created time\n elseif ($requestsdetail[0]['status'] == \"done\")\n $time1 = ($requestsdetail[0]['closed_at']); /// created time\n else{\n if($inpause == 'yes') {\n $time1 = ($requestsdetail[0]['pause_at']);\n }else {\n $time1 = (date('Y-m-d H:i:s'));///curent time\n }\n }\n $pausedrequests = $ftvpausetime_obj->pausedRequest($requestId);\n if($pausedrequests == 'yes')\n {\n $time2 = $this->subDiffFromDate($requestId, $requestsdetail[0]['assigned_at']);\n }else{\n $time2 = $requestsdetail[0]['assigned_at'];\n }\n $difference = $this->timeDifference($time1, $time2);\n\n }elseif($requestsdetail[0]['assigned_at'] != null){\n $time1 = (date('Y-m-d H:i:s'));///curent time\n\n $pausedrequests = $ftvpausetime_obj->pausedRequest($requestId);\n if($pausedrequests == 'yes')\n {\n $updatedassigntime = $this->subDiffFromDate($requestId, $requestsdetail[0]['assigned_at']);\n }else{\n $updatedassigntime = $requestsdetail[0]['assigned_at'];\n }\n $time2 = $updatedassigntime;\n $difference = $this->timeDifference($time1, $time2);\n }\n ////when user trying to edit the time spent///\n if($user_params['editftvassignsubmit'] == 'editftvassignsubmit') ///when button submitted in popup//\n {\n $newseconds = $this->allToSeconds($days,$hours,$minutes,$seconds);\n $previousseconds = $this->allToSeconds($difference['days'],$difference['hours'],$difference['minutes'],$difference['seconds']);\n if($newseconds > $previousseconds){\n $diffseconds = $newseconds-$previousseconds;\n $difftime = $this->secondsTodayshours($diffseconds);\n $format = \"P\".$difftime['days'].\"DT\".$difftime['hours'].\"H\".$difftime['minutes'].\"M\".$difftime['seconds'].\"S\";\n $requestsdetail[0]['assigned_at'];\n $time=new DateTime($requestsdetail[0]['assigned_at']);\n $time->sub(new DateInterval($format));\n $assigntime = $time->format('Y-m-d H:i:s');\n $data = array(\"assigned_at\"=>$assigntime);////////updating\n $query = \"identifier= '\".$requestId.\"'\";\n $ftvrequest_obj->updateFtvRequests($data,$query);\n $this->_redirect($prevurl);\n }elseif($newseconds < $previousseconds){\n $diffseconds = $previousseconds-$newseconds;\n $difftime = $this->secondsTodayshours($diffseconds);\n $format = \"P\".$difftime['days'].\"DT\".$difftime['hours'].\"H\".$difftime['minutes'].\"M\".$difftime['seconds'].\"S\";\n $time=new DateTime($requestsdetail[0]['assigned_at']);\n $time->add(new DateInterval($format));\n $assigntime = $time->format('Y-m-d H:i:s');\n $data = array(\"assigned_at\"=>$assigntime);////////updating\n $query = \"identifier= '\".$requestId.\"'\";\n $ftvrequest_obj->updateFtvRequests($data,$query);\n $this->_redirect($prevurl);\n }else\n $this->_redirect($prevurl);\n }\n /*$this->_view->reqasgndate = date(\"d-m-Y\", strtotime($reqdetails[0]['assigned_at']));\n $this->_view->reqasgntime = date(\"g:i A\", strtotime($reqdetails[0]['assigned_at']));*/\n $this->_view->days = $difference['days'];\n $this->_view->hours = $difference['hours'];\n $this->_view->minutes = $difference['minutes'];\n $this->_view->seconds = $difference['seconds'];\n $this->_view->requestId = $user_params['requestId'];\n $this->_view->requestobject = $requestsdetail[0]['request_object'];\n $this->_view->current_duration= $difference['days'].\"j \".$difference['hours'].\"h \".$difference['minutes'].\"m \".$difference['seconds'].\"s \";\n\n $this->_view->extendparttime = 'no';\n $this->_view->extendcrtparttime = 'no';\n $this->_view->editftvassigntime = 'yes';\n $this->_view->nores = 'true';\n $this->_view->render(\"ongoing_extendtime_writer_popup\");\n\n }", "function setCompleted() {\n global $connection, $user;\n\n $this->movePosition(1);\n\n $sql = 'update TR_BATCH set completed_date = now() where tr_batch_id = ?';\n if ($statement = $connection->prepare($sql)) {\n $statement->bind_param(\"i\", $this->batch_id);\n $statement->execute();\n } else {\n throw new Exception(\"Database connection failed\");\n }\n }", "public function update_progress_now($id_p){\n $this->db2->select('max(progress) as now_progress');\n $this->db2->from('progress_pekerjaan');\n $this->db2->where('pekerjaan',$id_p);\n $q = $this->db2->get()->row();\n $now = $q->now_progress;\n\n\n if ($now) {\n $now = $now;\n } else {\n $now = 9;\n }\n $this->db2->set('progress_now',$now);\n $this->db2->where('id', $id_p);\n $this->db2->update('pekerjaan');\n }", "private static function update($fname) {\n\t\t$task_info = json_decode(file_get_contents(__base_path.'_data/tasks/'.$fname.'.data'),true);\n\t\t//Calcola in che momento cadrà il prossimo task\n\t\t$cur = getdate();\n\t\t$old = $cur['seconds'];\n\t\t$cur['seconds'] = self::process_date($task_info['s'],$cur['seconds']+1,60);\n\t\tif ($cur['seconds']<$old)\n\t\t\t$cur['minutes']++;\n\t\t$old = $cur['minutes'];\n\t\t$cur['minutes'] = self::process_date($task_info['m'],$cur['minutes'],60);\n\t\tif ($cur['minutes']<$old)\n\t\t\t$cur['hours']++;\n\t\t$old = $cur['hours'];\n\t\t$cur['hours'] = self::process_date($task_info['h'],$cur['hours'],24);\n\t\tif ($cur['hours']<$old)\n\t\t\t$cur['mday']++;\n\t\t$old = $cur['mday'];\n\t\t$cur['mday'] = self::process_date($task_info['d'],$cur['mday'],30);\n\t\tif ($cur['mday']<$old)\n\t\t\t$cur['mon']++;\n\t\t$old = $cur['mon'];\n\t\t$cur['mon'] = self::process_date($task_info['M'],$cur['mon'],12);\n\t\tif ($cur['mon']<$old)\n\t\t\t$cur['year']++;\n\t\tself::$tasks[$fname]['time'] = mktime($cur['hours'],$cur['minutes'],$cur['seconds'],$cur['mon'],$cur['mday']);\n\t\tfile_put_contents(__base_path.'_data/tasks/'.$fname.'.last', json_encode(self::$tasks[$fname]));\n\t}", "public function update1(Request $request, $id)\n {\n $request->validate([\n 'time' => 'required'\n ]);\n\n $form_data = array(\n 'time' => $request->time\n );\n\n Pengaduan::whereId($id)->update($form_data);\n \\App\\Notifikasi::create([\n 'id' => mt_rand(100,999),\n 'pengaduan_id' => $id,\n 'deadline' => $request->time,\n ]);\n\n\n return redirect('tabelpengaduan1')->with('success', 'Data berhasil di ubah');\n }", "function updateFee()\n {\n global $db;\n $requete = $db->prepare('UPDATE fees SET date=? , nature=? , amount=? , site_id=? where idF = ?');\n $requete->execute(array(\n $this->date,\n $this->nature,\n $this->amount,\n $this->site_id,\n $this->idF\n ));\n }", "public function testUpdatePayslip()\n {\n }", "public function getVoidDeadline()\n {\n return $this->_fields['VoidDeadline']['FieldValue'];\n }", "public function changetimeframe() {\n $sessionstaff = $this->Session->read('staff');\n if ($_POST['tier_timeframe'] == '') {\n $_POST['tier_timeframe'] = 0;\n }\n $this->AccessStaff->query('update access_staffs set tier_timeframe=' . $_POST['tier_timeframe'] . ' where clinic_id=' . $sessionstaff['clinic_id']);\n $this->Session->write('staff.staffaccess.AccessStaff.tier_timeframe', $_POST['tier_timeframe']);\n echo 1;\n\n die;\n }", "public function setDeadline(\\DateTime $deadline)\n {\n $this->deadline = $deadline;\n\n return $this;\n }", "function update() {\n\t\t$sql = \"UPDATE cost_detail \n\t\t\t\tSET\tcd_start_time=?, cd_end_time=?, cd_hour=?, cd_minute=?, cd_cost=?, cd_update=?, cd_user_update=? \n\t\t\t\tWHERE cd_fr_id=?, cd_seq=?\";\t\n\t\t$this->ffm->query($sql, array($this->cd_start_time, $this->cd_end_time, $this->cd_hour, $this->cd_minute, $this->cd_cost, $this->cd_update, $this->cd_user_update, $this->cd_fr_id, $this->cd_seq));\t\n\t}", "function upatetimer($runningTestId = NULL , $remainingTime = NULL)\n\t\t{\n\t\t\t$updateArray = array(\n\t\t\t\t'ts_remaining_time' => $remainingTime\n\t\t\t);\n\t\t\t$this->db->where('ts_id' , $runningTestId);\n\t\t\t$this->db->update(TABLE_TEST_SUBMITTED , $updateArray);\n\t\t}", "public function getDeadlineDone()\n {\n return $this->deadlineDone;\n }", "public function updateTime( Inx_Api_Recipient_Attribute $attr, $sValue );", "public function getConfirmDeadline()\n {\n return $this->_fields['ConfirmDeadline']['FieldValue'];\n }", "function update_candidate_new($id){\n\t$eur_date_start = $_POST['date_start']; \n\t$eur_date_end = $_POST['date_end']; \n\n\t$eur_time_start = strtotime($eur_date_start);\n\t$eur_time_end = strtotime($eur_date_end);\n\n\t$date_start=date('Y-m-d',$eur_time_start);\n\t$date_end=date('Y-m-d',$eur_time_end);\n\n\t\n\t$data = array(\n 'id_personal' => $id,\n\t\t\t 'status' => $_POST['status'],\n\t\t\t 'date_start' => $date_start,\n\t\t\t 'date_end' => $date_end,\n\t\t\t 'salary' => $_POST['salary'],\n\t\t\t 'center_def' => $_POST['center_def'],\n\t\t\t 'type_contract' => $_POST['type_contract'],\n\t\t\t 'comment' => $_POST['comment'],\n\t\t\t 'status' => $_POST['status'],\n\t\t\t 'nome' => $_POST['nome'],\n\t\t\t 'cognome'=> $_POST['cognome']\n\n\t\t\n );\n\t$this->db->where('id', $id);\n\t$this->db->insert('job_contract', $data);\n}", "public function isDeadlinePastDue(): bool {\n return Carbon::parse($this->deadline)->lessThan(Carbon::today()->toDateString());\n }", "public function update(Request $request, $id)\n {\n\n\n $training = Training::findOrFail($id);\n\n if($request->trainer){\n $trainer_id = $request->trainer;\n }else{\n $trainer_id = $training->user_id;\n }\n\n\n $schedule = $request->get('schedule');\n $splitHours = explode(\"-\",$schedule);\n\n $start = new Carbon($splitHours[0]);\n $end = new Carbon($splitHours[1]);\n \n $trainings = Training::where('day' , $request->day)->where('id' , '!=' , $training->id)->get();\n\n $flag = true;\n\n foreach($trainings as $trainingAll){\n $arrayHours = $this->comprobationArray($trainingAll->start , $trainingAll->end);\n $flag = $this->coincideHours($arrayHours , $start , $end);\n if(!$flag){\n $notification = 'Imposible editar entreno, las horas coindicen con otro entreno. Por favor, escoja otro horario.';\n return redirect('/trainings/'.$training->id.'/edit')->with(compact('notification'));\n }\n }\n\n if($flag){\n $data = $request->only('day', 'capacity' , 'description') + [ 'user_id' => $trainer_id , 'start' => $splitHours[0] , 'end' => $splitHours[1] ];\n\n $training->fill($data);\n $training->save(); \n\n $notification = 'El entreno se ha actualizado correctamente.';\n return redirect('/trainings')->with(compact('notification'));\n } \n\n }", "function set_next_poll_date(&$user) {\n $seconds = tier_to_seconds($user->tier);\n $last = strtotime($user->last_poll_date);\n $next = $last + $seconds;\n $user->next_poll_date = date('Y-m-d H:i:s', $next);\n}", "function timeout() {\n $q = Doctrine_Query::create()\n ->update('Zim_Model_User u')\n ->set('u.timedout', '?', '1')\n ->where(\"u.updated_at <= ?\", date('Y-m-d H:i:s', time()- $this->getVar('timeout_period', 30)));\n $q->execute();\n return;\n }", "public function update($id)\n {\n //Mengambil session teknisi\n $id_user = $this->session->userdata('id_user');\n\n //Mengambil data progress dan deskripsi untuk update system tracking ticket\n $progress = $this->input->post('progress');\n $date = date(\"Y-m-d H:i:s\"); \n $sql = $this->db->query(\"SELECT deadline FROM ticket WHERE id_ticket='$id'\")->row(); \n\n //Konfigurasi Upload Gambar\n $config['upload_path'] = './teknisi/'; //Folder untuk menyimpan gambar\n $config['allowed_types'] = 'gif|jpg|jpeg|png|pdf'; //Tipe file yang diizinkan\n $config['max_size'] = '2048'; //Ukuran maksimum file gambar yang diizinkan\n $config['max_width'] = '0'; //Ukuran lebar maks. 0 menandakan ga ada batas\n $config['max_height'] = '0'; //Ukuran tinggi maks. 0 menandakan ga ada batas\n\n //Memanggil library upload pada codeigniter dan menyimpan konfirguasi\n $this->load->library('upload', $config);\n\n //Jika upload gambar tidak sesuai dengan konfigurasi di atas, maka upload gambar gagal, dan kembali ke halaman Create ticket\n if (!$this->upload->do_upload('fileupdate')){\n $this->session->set_flashdata('status', 'Something went wrong! Image file is more than 2MB or not supported format');\n redirect('List_ticket_tek/detail_update/'.$id);\n } else {\n //Bagian ini jika file gambar sesuai dengan konfirgurasi di atas\n //Menampung file gambar ke variable 'gambar'\n $gambar = $this->upload->data();\n //Kondisi jika progress yang sudah selesai, maka status ticket pada system tracking ticket menjadi ticket closed dengan keterangan progress ticketnya juga\n if($progress==100)\n {\n if (date(\"Y-m-d H:i:s\") > $sql->deadline) {\n //Melakukan update data ticket dengan mengubah status ticket menjadi 6, memasukkan tanggal proses selesai, dan memasukkan progress dari ticket, data ditampung ke dalam array '$data' yang nanti akan diupdate dengan query\n $data = array(\n 'status' => 7,\n 'last_update' => $date,\n 'tanggal_solved' => $date,\n 'progress' => $progress\n );\n\n //Melakukan insert data tracking ticket closed oleh teknisi, data tracking ke dalam array '$datatracking' yang nanti akan di-insert dengan query\n $datatracking = array(\n 'id_ticket' => $id,\n 'tanggal' => $date,\n 'status' => \"Ticket Closed. Progress: \" . $progress . \" %\",\n 'deskripsi' => ucfirst($this->input->post('desk')),\n 'id_user' => $id_user,\n 'filefoto' => $gambar['file_name']\n );\n } else {\n //Melakukan update data ticket dengan mengubah status ticket menjadi 6, memasukkan tanggal proses selesai, dan memasukkan progress dari ticket, data ditampung ke dalam array '$data' yang nanti akan diupdate dengan query\n $data = array(\n 'status' => 6,\n 'last_update' => $date,\n 'tanggal_solved' => $date,\n 'progress' => $progress\n );\n\n //Melakukan insert data tracking ticket closed oleh teknisi, data tracking ke dalam array '$datatracking' yang nanti akan di-insert dengan query\n $datatracking = array(\n 'id_ticket' => $id,\n 'tanggal' => $date,\n 'status' => \"Ticket Closed. Progress: \" . $progress . \" %\",\n 'deskripsi' => ucfirst($this->input->post('desk')),\n 'id_user' => $id_user,\n 'filefoto' => $gambar['file_name']\n );\n }\n } \n else \n {\n //Bagian ini jika kondisinya progress ticket belum selesai dikerjakan, maka data yang diupdate hanya status dan progress\n //Melakukan update data ticket dengan mengubah status ticket menjadi 4, dan memasukkan progress dari ticket, data ditampung ke dalam array '$data' yang nanti akan diupdate dengan query\n $data = array(\n 'status' => 4,\n 'last_update' => date(\"Y-m-d H:i:s\"),\n 'progress' => $progress\n );\n\n //Melakukan insert data tracking ticket progress oleh teknisi, data tracking ke dalam array '$datatracking' yang nanti akan di-insert dengan query\n $datatracking = array(\n 'id_ticket' => $id,\n 'tanggal' => date(\"Y-m-d H:i:s\"),\n 'status' => \"Progress: \" . $progress . \" %\",\n 'deskripsi' => ucfirst($this->input->post('desk')),\n 'id_user' => $id_user, \n 'filefoto' => $gambar['file_name']\n );\n }\n //Query untuk melakukan update data ticket sesuai dengan array '$data' ke tabel ticket\n $this->db->where('id_ticket', $id);\n $this->db->update('ticket', $data);\n\n //Query untuk melakukan insert data tracking ticket sesuai dengan array '$datatracking' ke tabel tracking\n $this->db->insert('tracking', $datatracking);\n }\n }", "public function withVoidDeadline($value)\n {\n $this->setVoidDeadline($value);\n return $this;\n }", "public function actionUpdateVacancyApplicantExpire() {\n $connection = Yii::app()->db;\n $sqlRaw = \"UPDATE h_vacancy_applicant SET status_id = 3 where status_id = 1 AND created_date < \" . strtotime(\"-30 day\");\n Yii::app()->db->createCommand($sqlRaw)->execute();\n }", "function validDeadlines($claimDeadline, $completeDeadline){\n if($this -> validateDate($claimDeadline) && $this -> validateDate($completeDeadline)){\n $currentTime = date('Y-m-d');\n if($this -> dateGreaterThan($claimDeadline, $currentTime)){\n if($this -> dateGreaterThan($completeDeadline, $claimDeadline)){\n return true;\n }\n }\n }\n echo \"deadlines not valid\";\n return false;\n }", "function getTimeString($a_deadline)\n {\n global $lng;\n\n if ($a_deadline - time() <= 0)\n {\n $time_str = $lng->txt(\"rep_robj_xeph_time_over_short\");\n }\n else\n {\n $time_str = ilObjEphorus::period2String(new ilDateTime($a_deadline, IL_CAL_UNIX));\n }\n\n return $time_str;\n }", "function updategoal()\n {\n $goalid = $this->value('id');\n $status = $this->value('status');\n $userdetails = $this->userInfo();\n\t\t\n\t\t\n\t\t\n\t\t$application_path = $this->config['application_path'];\n\t\t$telespine_id = $this->config['telespineid'];\n\t\t\n\t\t$business_url = $this->config['business_telespine']; \n\t\t$support_email = $this->config['email_telespine'];\n\t\t$images_url=$this->config['images_url'];\n\t\t$data['images_url'] = $images_url;\n\t\t$data['support_email'] = $support_email ;\n $data['loginurl']=$this->config['telespine_login'];\n\t\t$result = $this->execute_query(\"UPDATE patient_goal SET status = {$status},update_date=now() WHERE patient_goal_id = {$goalid}\");\n\t\t\n\t\t\n\t\tif($status==2){\n\t\t$templatePath = $application_path.\"mail_content/telespine/goal_completed.php\";\n\t\t$fullname = $userdetails['name_first'].' '.$userdetails['name_last'];\n\t\t$data['fullname'] = $fullname;\n\t\t$message = $this->build_template($templatePath,$data);\n\t\t$data['support_email'] = $support_email;\n\t\t\n\t\t$to = $fullname.'<'.$userdetails['username'].'>';\n\t\t$subject =\"Telespine Update - Good for You!\";\n\t\t// To send HTML mail, the Content-type header must be set\n\t\t$headers = 'MIME-Version: 1.0' . \"\\n\";\n\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\n\";\n\t\t$headers .= \"From: Telespine Support<\".$support_email.\">\" . \"\\n\";\n\t\t$returnpath = \"-f\".$support_email;\n\t\t@mail($to, $subject, $message, $headers, $returnpath); \n\t\t}\n\t\t\n\n echo $this->getCompletedGoals($userdetails['user_id']);\n }", "public function updateAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EmployeeBundle:Timerecord')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Timerecord entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n /*** get total woked hours in a day **/\n $totalHours = $entity->getWorkedHours();\n //$totalHours = (float) preg_replace('/^(\\d+):(\\d+).+/','\\1.\\2',$totalHours);\n $time = explode(':', $totalHours);\n $hours = (int)$time[0] . '.' . $time[1];\n\n /*** now we want to calculate and save overtime hours if any **/\n $regular_time = 8.00;\n $initial_ot = 1.00;\n $maybe_ot = $hours - $regular_time;\n \n if ($hours > $regular_time && $maybe_ot >= 1) {\n $overtime = $maybe_ot;\n } else {\n $overtime = 0;\n }\n\n $currentDate = new \\DateTime();\n if ($editForm->isValid()) {\n $user = $this->container->get('security.context')->getToken()->getUser();\n $currentUser = $user->getUsername();\n $entity->setUpdatedby($currentUser);\n $entity->setDateupdated($currentDate);\n $entity->setTotalhour($hours);\n $entity->setTimeout($currentDate);\n $entity->setOvertime($overtime);\n $em->flush();\n $this->addFlash('success', 'Go Home' . ' ' . $currentUser);\n\n return $this->redirect($this->generateUrl('timerecord', array('id' => $id)));\n } else {\n return $this->redirect($this->generateUrl('timerecord_edit', array('id' => $id)));\n }\n /* $this->addFlash('danger', $currentUser . ' , ' . 'Please check errors!');\n\n return $this->render('EmployeeBundle:Timerecord:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));*/\n }", "public function withConfirmDeadline($value)\n {\n $this->setConfirmDeadline($value);\n return $this;\n }", "static public function mdlActualizarTiempoProcesoAdquisicion($tabla){\r\n\r\n\t\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla set tiempoProceso = TIMEDIFF(fechaTermino,fechaRecepcion)\");\r\n\r\n\t\t\tif ($stmt -> execute()) {\r\n\r\n\t\t\t\treturn \"ok\";\r\n\r\n\t\t\t}else {\r\n\r\n\t\t\t\treturn \"error\";\r\n\r\n\t\t\t}\r\n\t\t\t$stmt -> close();\r\n\r\n\t\t\t$stmt = null;\r\n\r\n\r\n\t}", "public function update($id)\n\t{\n\t\t$fbf_time = FbfTime::find($id);\n\t\t$fbf_time->idtime = Input::get('idtime');\n$fbf_time->descricao = Input::get('descricao');\n$fbf_time->classificacao = Input::get('classificacao');\n$fbf_time->ativo = Input::get('ativo');\n\n\t\t$fbf_time->save();\n\n\t\t// redirect\n\t\tSession::flash('message', 'Registro atualizado com sucesso!');\n\t\treturn Redirect::to('fbf_time');\n\t}", "function updateHora($conexion,$ip,$fecha,$hora){\r\n $consu = \"update visitas set time ='$hora' where ip_cliente ='$ip' \r\n and fecha ='$fecha'\";\r\n insertUpdate($conexion,$consu);\r\n }", "public function update_active(){\n\t\t$sql = \"update set creado=NOW() where id=$this->id\";\n\t\t\n\t}", "public function setDeadlineDone($deadlineDone)\n {\n $this->deadlineDone = $deadlineDone;\n\n return $this;\n }", "public function user_cron_update(){\n $this->loadModel('Leave'); \n $userData = $this->User->userList(); \n foreach ($userData as $users) {\n $joiningDate = $users['User']['joining_date'];\n $user_id = $users['User']['id'];\n $user_leav_data = $this->Leave->userLeaveData($user_id);\n $today = date('Y-m-d');\n $date = $joiningDate;\n // End date\n $end_date = '2020-12-31';\n\n while (strtotime($date) <= strtotime($end_date)) {\n echo \"$date\\n\";\n $date = date (\"Y-m-d\", strtotime(\"+4 month\", strtotime($date)));\n if($date == $today){\n $userEl = $users['User']['el'];\n $data['el'] = $userEl + 4;\n $update = $this->User->updateUser($user_id, $data);\n }\n \n }\n $today_date = date('d');\n $today_mnth = date('m');\n if ($today_date == 31 && $today_mnth == 3) {\n $data['el'] = 0;\n $update = $this->User->updateUser($user_id, $data);\n }\n\n }\n }", "function update_anagrafica_contratti($idagente){\n\t$eur_date_start = $_POST['date_start']; \n\t$eur_date_end = $_POST['date_end']; \n\n\t$eur_time_start = strtotime($eur_date_start);\n\t$eur_time_end = strtotime($eur_date_end);\n\n\t$date_start=date('Y-m-d',$eur_time_start);\n\t$date_end=date('Y-m-d',$eur_time_end);\n\n\t\n\t$data = array(\n \n\t\t\t 'status' => $_POST['status'],\n\t\t\t 'date_start' => $date_start,\n\t\t\t 'date_end' => $date_end,\n\t\t\t 'salary' => $_POST['salary'],\n\t\t\t 'center_def' => $_POST['center_def'],\n\t\t\t 'type_contract' => $_POST['type_contract'],\n\n\n\t\t\n );\n\t$this->db->where('id', $idagente);\n\t$this->db->update('job_contacts_all', $data);\n}", "public function isAfterDeadline() {\n return $this->assignment->isAfterDeadline($this->solution->getCreatedAt());\n }", "public function updateSalary() \r\n\t{\r\n\t\t$query = \"UPDATE \" . $this->table . \" SET\r\n\t\t poslednja_plata = current_date(),\r\n\t\tsledeca_plata = current_date() + interval 30 day\r\n\t\t\tWHERE id_radnik = ?\";\r\n\r\n\t\t$stmt = $this->conn->prepare($query);\r\n\r\n\t\t$stmt->bindParam(1, $this->id_radnik);\r\n\r\n\t\t$stmt->execute();\r\n\t}", "function setLifeTime($time);", "public function AgendaUpdate(Request $request)\n {\n $id = $request->id;\n // Las sguientes variables se crearan para luego concatenarlas con el fin de darle el forato de un datetime(año,mes,dia) ya que\n // llegan con un difrente por el request\n $año =substr($request->FechaAgenda, -4);\n $dia =substr($request->FechaAgenda, 0, 2);\n $mes = substr(substr($request->FechaAgenda, 3, 3), 0, 2);\n $fecha = $año.'-'.$mes.'-'.$dia;\n $AgendaUpdate = Agenda::find($id);\n $AgendaUpdate->titulo = $request->EditTitulo;\n $AgendaUpdate->fecha_inicio = $fecha.' '.date('H:i:s', strtotime($request->HoraInicioAgenda));\n $AgendaUpdate->fecha_fin = $fecha.' '.date('H:i:s', strtotime($request->HoraFinAgenda));\n $AgendaUpdate->save();\n\n // return ( $fecha.\" \".date(\"H:i:s\",strtotime($request->HoraFinAgenda)));\n return redirect('/index2');\n }", "public function deadline($deadline = null) {\n return new TimeWindow([\"timeStamp\" => $deadline ?: $this->getAttribute(\"deadline\")]);\n }", "public function applicationDeadline($applicationDeadline)\n {\n return $this->setProperty('applicationDeadline', $applicationDeadline);\n }", "public function updateSeconds(Request $request){\n if(Auth::guard('api')->user()){\n $data=Credit::find($request->id);\n $data->credit=$data->credit+($request->country_cost/60);\n $data->balance=$data->balance-($request->country_cost/60);\n $data->update();\n if(isset($request->history_id)){\n $history=CallHistory::find($request->history_id);\n $history->call_ended_at=time();\n $history->update();}\n return response('updated');\n }else{\n return response('unauthorized');\n }\n }", "public function setLastStatusUpdate($value) {\n\t\t$value = date('d-M-Y', strtotime($value));\n\t\tself::$_lastStatusUpdate = $value;\n\t}", "public function alterarTime($conexao,$id_pessoa){\n $query = \"update empresa_startup set cargo_funcao = ?,nivel_hierarquico = ? where id_pessoa = ?;\";\n $stmt = $conexao->prepare($query);\n $stmt->execute([$this->getCargoFuncao(),$this->getNivelHieraquico(),$id_pessoa]);\n }", "function update_candidate($id){\n\t$eur_date_start = $_POST['date_start']; \n\t$eur_date_end = $_POST['date_end']; \n\n\t$eur_time_start = strtotime($eur_date_start);\n\t$eur_time_end = strtotime($eur_date_end);\n\n\t$date_start=date('Y-m-d',$eur_time_start);\n\t$date_end=date('Y-m-d',$eur_time_end);\n\n\t\n\t$data = array(\n 'id' => $id,\n\t\t\t 'status' => $_POST['status'],\n\t\t\t 'date_start' => $date_start,\n\t\t\t 'date_end' => $date_end,\n\t\t\t 'salary' => $_POST['salary'],\n\t\t\t 'center_def' => $_POST['center_def'],\n\t\t\t 'type_contract' => $_POST['type_contract'],\n\t\t\t 'comment' => $_POST['comment']\n\n\t\t\n );\n\t$this->db->where('id', $id);\n\t$this->db->update('job_contacts_all', $data);\n}", "function update_right_now_message()\n {\n }", "public function setExpired()\n {\n $this->attributes['status'] = 'expired';\n self::save();\n }", "public function setExpired()\n {\n $this->attributes['status'] = 'expired';\n self::save();\n }", "function do_cron()\n{\n\t/*\n\t\t1. check the deadlines of all active pleas\n\t\t\t- if the deadline is past, and status is still active, deactivate and process pledges\n\t\t\t- if the deadline is soon, send warning notification\n\t\t2. other jobs???\n\t*/\n\t$today = date('Y-m-d', time() - (24*60*60));\n\t$tomorrow = date('Y-m-d', time() + 24*60*60);\n\t$expired = Plea::with('pledges.author', 'author')->where('deadline', '>=', $tomorrow)->where('status', '<>', 'expired')->get();\n\t$expiring = Plea::with('pledges.author', 'author')->where('deadline', '=', $today)->where('status', '<>', 'expiring')->get();\n\t\n\t// process expired pleas\n \tforeach ($expired as $plea)\n\t{\n\t\t// label as expired\n\t\t$plea->expire();\n\t\t\t\t\n\t\t// notify all interested parties\n\t\tforeach ($plea->pledges as $pledge)\n\t\t{\n\t\t\t$notification = array(\n\t\t\t\t'object' => $pledge,\n\t\t\t\t'type' => 'pledge',\n\t\t\t\t'reason' => 'expired'\n\t\t\t);\n\t\t\t$pledge->author->notify($notification);\n\t\t}\n\t\t\n\t\t// notify the original author\n\t\t$notification = array(\n\t\t\t'object' => $plea,\n\t\t\t'type' => 'plea',\n\t\t\t'reason' => 'expired'\n\t\t);\n\t\t$plea->author->notify($notification);\t\t\n\t\t\n\t}\n\t\n\t// process expiring pleas\n \tforeach ($expiring as $plea)\n\t{\n\t\t// label as expiring\n\t\t$plea->expiring();\n\t\t\n\t\t// notify all interested parties\n\t\tforeach ($plea->pledges as $pledge)\n\t\t{\n\t\t\t$notification = array(\n\t\t\t\t'object' => $pledge,\n\t\t\t\t'type' => 'pledge',\n\t\t\t\t'reason' => 'expiring'\n\t\t\t);\n\t\t\t$pledge->author->notify($notification);\n\t\t}\n\t\t// notify the original author\n\t\t$notification = array(\n\t\t\t'object' => $plea,\n\t\t\t'type' => 'plea',\n\t\t\t'reason' => 'expiring'\n\t\t);\n\t\t$plea->author->notify($notification);\n\t}\n\treturn Response::json(TRUE);\n}", "function companydatesupdate(){\n $this->auth(SUPPORT_ADM_LEVEL);\n $contest_id = $this->input->post('contest_id');\n $start = $this->input->post('start');\n $stop = $this->input->post('stop');\n if($this->m_contest->updateContestDates($contest_id, $start, $stop)){\n if($this->m_contest_dates->updateContestDates($contest_id, $stop)){\n $this->companyadmin();\n }\n }else{\n //todo not able to update, show error on admin page\n echo 'error';\n }\n }", "function changeSchedule(Request $request){\n\n $id = Auth::user()->id;\n $from_time = $request->from_time;\n $to_time = $request->to_time;\n $today_date = date('Y-m-d');\n\n /*\n * update end time using to_time variable\n * according to logged id\n */\n\n CalendarAvailability::where('user_id',$id)\n ->update(['end_time'=>$to_time]);\n\n Session::flash('status','Successfully updated');\n\n return redirect()->back();\n }", "public function onPreUpdate()\n {\n $this->fechaUltimaModificacion = new \\DateTime(\"now\");\n }", "public function run()\n {\n $course = Course::find(1);\n $deadline = new Deadline;\n $deadline->course = $course->id;\n $deadline->name = \"Final Upload\";\n $deadline->filetypes = \"pdf, zip\";\n $date = new DateTime();\n $date->add(new DateInterval('P30D'));\n $deadline->date = $date;\n $deadline->save();\n $deadline = new Deadline;\n $deadline->course = $course->id;\n $deadline->name = \"Interim Report\";\n $deadline->filetypes = \"pdf, zip\";\n $date = new DateTime();\n $date->add(new DateInterval('P4D'));\n $deadline->date = $date;\n $deadline->save();\n\n }", "function unilabel_update_instance($unilabel) {\n global $DB;\n\n $unilabel->timemodified = time();\n $unilabel->id = $unilabel->instance;\n\n $completiontimeexpected = !empty($unilabel->completionexpected) ? $unilabel->completionexpected : null;\n \\core_completion\\api::update_completion_date_event($unilabel->coursemodule, 'unilabel', $unilabel->id, $completiontimeexpected);\n\n return $DB->update_record('unilabel', $unilabel);\n}", "protected function _update()\n\t{\n\t\t$this->date_modified = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->last_online = $this->date_modified;\n\t}", "public function set_last_billed_due_date( $value ) {\n\t\t$this->set_prop( 'last_billed_due_date', $value ) ;\n\t}", "function preUpdate(){\n $this->alteradoEm = new \\DateTime('now');\n $this->alteradoEm->setTimezone(new \\DateTimeZone('America/Sao_Paulo'));\n }", "function setDueDate( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->DueDate = $value;\n }", "protected function setUpdated(){\n if($this->_id > 0){\n $pfDB = DB\\Database::instance()->getDB('PF');\n\n $pfDB->exec(\n [\"UPDATE \" . $this->table . \" SET updated=NOW() WHERE id=:id\"],\n [\n [':id' => $this->_id]\n ]\n );\n }\n }", "public function updateLastUsed()\n {\n if (\n $this->last_used_at === null ||\n $this->last_used_at < (new \\DateTime())->sub(new \\DateInterval('P1D'))\n ) {\n $this->last_used_at = new \\DateTime();\n $this->save();\n }\n }", "public function update(Request $request, $id)\n {\n $workLog = WorkLog::find($id);\n \n $request->validate([\n //'entry_datetime'=>['required', new CheckDateRule($request->input('recruit_id'))],\n 'entry_datetime'=>'required',\n 'out_datetime'=>'required',\n ]);\n $entryAt = Carbon::parse($request->input('entry_datetime'))->setTimezone('Asia/Tokyo');\n $outAt = Carbon::parse($request->input('out_datetime'))->setTimezone('Asia/Tokyo');\n \n $workLog->entry_datetime = Carbon::parse($request->input('entry_datetime'));\n $workLog->out_datetime = Carbon::parse($request->input('out_datetime'));\n\n $recruit = Recruit::find($request->input('recruit_id'));\n $teji = $recruit->job->teji;\n $tejiTime = $this->convertTime($recruit->job->teji);\n $startTime = $recruit->job->start_time;\n $startNightTime = $recruit->job->night_start_time;\n $sDt = $entryAt->format('Y-m-d') . \" \" . $startTime;\n\n $actualStartAt = Carbon::createFromFormat('Y-m-d H:i:s', $sDt, 'Asia/Tokyo');\n $breakTime = 1; //An hour break time\n list($tejiHours, $tejiMinutes) = preg_split('/[ :]/', $tejiTime);\n \n //check if the punched time is after starting time \n if ($entryAt->gt($actualStartAt)) { \n echo 'late'; exit(); //TODO\n } else {\n $totalDiff = $actualStartAt->diff($outAt);\n $diffHours = $totalDiff->h - $breakTime;\n $diffMinutes = $totalDiff->i > 15 ? $totalDiff->i : 0;\n\n $basic_time = $diffHours;\n $ot_time = 0;\n\n $strTime = strtotime($diffHours . \":\" . $diffMinutes . \":00\");\n $strTeji = strtotime($tejiTime);\n //if there is overtime\n if($strTime > $strTeji) {\n $strDiffSeconds = abs($strTime - $strTeji);\n $ot_time = $strDiffSeconds/60/60;\n $basic_time = $teji;\n }\n $workLog->basic_time = $basic_time;\n $workLog->ot_time = $ot_time;\n\n /* $actualEndAt = $actualStartAt->addHours($tejiHours + $breakTime)->addMinutes($tejiMinutes); */\n }\n $workLog->save();\n return $this->sendResponse($workLog, 'Work log updated successfully.');\n }", "public function time_to($future,$options=array(),$bad_wrap=array('<span class=\"error\" style=\"display:inline\">Your item is ',' old!</span>')) {\n $defaults = array(\n 'year' => false,\n 'month' => false,\n 'week' => false,\n 'day' => false,\n 'hour' => false,\n 'min' => false,\n 'sec' => true,\n );\n $options = array_merge($defaults,$options);\n if(!isset($this->time_left)) $this->time_left = '';\n // Common time periods as an array of arrays\n if(!isset($this->periods)) {\n $this->periods = array(\n ($options['year'] ? array('year', $this->sec_in_yr) : false),\n ($options['month'] ? array('month', $this->sec_in_mo) : false),\n ($options['week'] ? array('week', $this->sec_in_wk) : false),\n ($options['day'] ? array('day', $this->sec_in_day): false),\n ($options['hour'] ? array('hour', $this->sec_in_hr) : false),\n ($options['min'] ? array('minute', $this->sec_in_min): false),\n ($options['sec'] ? array('second', 1): false),\n );\n }\n $today = strtotime(date('Y-m-d',time()) . '00:00:00');\n $since = $future - $today; // Find the difference of time between now and the future\n if($since < 0) return $bad_wrap[0] . $this->convert_to_easy_time($future,-1,'') . $bad_wrap[1];\n // Loop around the periods, starting with the biggest\n if(count($this->periods) > 0) {\n $chunk = array_shift($this->periods);\n if(empty($chunk))\n return $this->time_to($future,$options);\n list($period,$seconds) = $chunk;\n // Find the biggest whole period\n $count = floor($since / $seconds);\n if($count == 0) {\n return $this->time_to($future,$options);\n } else {\n $this->time_left .= ($count == 1 ? \"1 {$period}\" : \"{$count} {$period}s\") . ', ';\n return $this->time_to($future - ($count * $seconds),$options);\n }\n } else {\n $time_left = $this->time_left;\n unset($this->time_left);\n unset($this->periods);\n return rtrim($time_left,' ,');\n }\n }", "protected function updateTip($args) {\n\n if ($args['ent_booking_id'] == '' || $args['ent_tip'] == '' || $args['ent_date_time'] == '')\n return $this->_getStatusMessage(1, 1);\n\n $this->curr_date_time = urldecode($args['ent_date_time']);\n\n $returned = $this->_validate_token($args['ent_sess_token'], $args['ent_dev_id'], '2');\n\n if (is_array($returned))\n return $returned;\n\n $getDetailsQry = \"select amount,meter_fee,toll_fee,parking_fee,airport_fee,coupon_code,discount from appointment where appointment_id = '\" . $args['ent_booking_id'] . \"'\";\n\n $getDetailsRes = mysql_query($getDetailsQry, $this->db->conn);\n\n $apptData = mysql_fetch_assoc($getDetailsRes);\n\n $total = $apptData['airport_fee'] + $apptData['parking_fee'] + $apptData['toll_fee'] + $apptData['meter_fee'];\n\n $amount = $total - $apptData['discount'];\n\n $tip = $amount * ((float) $args['ent_tip'] / 100);\n\n $fare = $amount + $tip;\n// $checkingDate = explode('-', $args['ent_slots_for']);\n\n $getScheduleQry = \"update appointment set tip_amount = '\" . $tip . \"',tip_percent = '\" . $args['ent_tip'] . \"',amount = '\" . $fare . \"' where appointment_id = '\" . $args['ent_booking_id'] . \"' and slave_id = '\" . $this->User['entityId'] . \"'\";\n mysql_query($getScheduleQry, $this->db->conn); //$getScheduleRes = \n// if (mysql_affected_rows() >= 0)\n// $errMsgArr = $this->_getStatusMessage(102, 2);\n// else\n $errMsgArr = $this->_getStatusMessage(98, 2);\n return array('errNum' => $errMsgArr['errNum'], 'errFlag' => $errMsgArr['errFlag'], 'errMsg' => $errMsgArr['errMsg'], 'fare' => $total, 'tip' => $tip, 'amount' => $fare, 'discount' => $apptData['discount'], 'code' => $apptData['coupon_code']);\n }", "public function setBooTimeFinishAttribute($value)\n\t{\n\t\t$this->attributes['boo_time_finish'] = $value->timestamps;\n\t}", "public function update(Request $request, $id)\n {\n $this->validate($request, array(\n 'answer' => 'required|max:3000',\n ));\n\n $report = Report::find($id);\n $now_time = now();\n $finish_time = $report->created_at->addHours($report->task->time);\n $task = $report->task()->first();\n $slug = $task->slug;\n if ($finish_time->gt($now_time)){\n if($task->type == true){\n if($task->question == trim(strtolower($request->answer))){\n $report->task->success++;\n $report->user->balance += $report->task->salary;\n $report->user->pay()->attach($report->task_id);\n $available = $report->task->available;\n\n $limit = new Limit;\n $limit->task_id = $report->task->id;\n $limit->user_id = $report->user->id;\n $limit->finish_at = now()->addHours($report->task->period);\n $limit->save();\n\n if($available <= 0){\n $report->task->is_show = false;\n $notification = new Notification;\n $notification->user_id = $report->task->user_id;\n $notification->description = 'Закончились деньги на задании: <a href=\"/tasks/'.$report->task->slug.'\">Пополнить задание: «'.$report->task->name.'»</a> .';\n $notification->status = 'is-info';\n $notification->save();\n }\n\n $notification = new Notification;\n $notification->user_id = $report->user_id;\n $notification->description = 'Оплачено задание: <a href=\"/tasks/'.$report->task->slug.'\">«'.$report->task->name.'»</a> +'.$report->task->salary.' ₽.';\n $notification->status = 'is-success';\n $notification->save();\n #referral system\n $referral = Referral::where('referral_id',$report->user->id)->first();\n if (count($referral) > 0){\n $bonus = $report->task->salary / 100 * $referral->user->percent_referrals;\n $referral->profit += $bonus;\n $referral->user->balance += $bonus;\n $referral->save();\n $referral->user->save();\n }\n\n $report->task->save();\n $report->user->save();\n $report->delete();\n } else {\n $report->task->danger++;\n $report->task->available++;\n if($report->task->is_show == false && $report->task->available == 1)\n $report->task->is_show = true;\n $report->user->rejected()->attach($report->task_id);\n $report->user->save();\n $report->task->save();\n $report->delete();\n\n $notification = new Notification;\n $notification->user_id = $report->user_id;\n $notification->description = 'Отклонено задание: <a href=\"/tasks/'.$report->task->slug.'\">«'.$report->task->name.'»</a> :(';\n $notification->status = 'is-danger';\n $notification->save();\n }\n } elseif ($task->technology == true) {\n $limit = new Limit;\n $limit->task_id = $report->task->id;\n $limit->user_id = $report->user->id;\n $limit->finish_at = now()->addHours($report->task->period);\n $limit->save();\n\n if($report->task->available <= 0) {\n $report->task->is_show = false;\n }\n\n $report->finished = true;\n $report->answer = $request->answer;\n $report->task->save();\n $report->save();\n\n $notification = new Notification;\n $notification->user_id = $report->task->user_id;\n $notification->description = 'У Вас новый отчёт! Задание: <a href=\"/manage/tasks/\">'.$report->task->name.'</a> от : '.$report->user->name.' .';\n $notification->status = 'is-warning';\n $notification->save();\n\n return redirect()->back()->withToaststatus('success')->withToast('Отчёт отправлен!');\n\n } else {\n $report->finished = true;\n $report->answer = $request->answer;\n if($report->task->available <= 0) {\n $report->task->is_show = false;\n }\n $report->task->save();\n $report->save();\n\n\n\n $notification = new Notification;\n $notification->user_id = $report->task->user_id;\n $notification->description = 'У Вас новый отчёт! Задание: <a href=\"/manage/tasks/\">'.$report->task->name.'</a> от : '.$report->user->name.' .';\n $notification->status = 'is-warning';\n $notification->save();\n }\n\n }else{\n $report->delete();\n\n }\n\n return redirect()->to('/tasks/'.$slug);\n\n }", "public function updateStatusProposal()\n { \n $now = Mage::getSingleton('core/date')->gmtDate(\"Y-m-d\"); \n $collection = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $collection->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_PROPOSAL);\n $collection->getSelect()->where('expiry < \\''.$now.'\\' AND no_expiry = \\'0\\'');\n $collection->load(); \n\n foreach ($collection as $item) { \n $item->setStatus(Ophirah_Qquoteadv_Model_Status::STATUS_PROPOSAL_EXPIRED);\n $item->save(); \n }\n }", "public function beforeUpdate()\n {\n\t\t// Asignar fecha y hora de ultima actualizacion\n// $this->updatedon = time();\n }", "public function setToUpdate()\n\t{\n\t\t$this->todo = 2 ;\n\t}", "public function update(){\n $sql = \"update \".self::$tablename.\" set correlativo=\\\"$this->correlativo\\\",nombre_instalador=\\\"$this->nombre_instalador\\\",nombre_proyecto=\\\"$this->nombre_proyecto\\\",localizacion=\\\"$this->localizacion\\\",contrato_orden_trabajo=\\\"$this->contrato_orden_trabajo\\\",sector_trabajo=\\\"$this->sector_trabajo\\\",area_aceptada=\\\"$this->area_aceptada\\\",fecha_proyecto=\\\"$this->fecha_proyecto\\\" where id_usuario=$this->id_usuario\";\n Executor::doit($sql);\n }", "function staff_checklist_time_ago_and_due($seconds_ago,$recur_hours=NULL)\n{\n\tif (is_null($recur_hours))\n\t{\n\t\t$seconds_to_go=$seconds_ago; // Actually, if only one parameter given, meaning is different\n\t\t$seconds_ago=mixed();\n\t\tif (is_null($seconds_to_go))\n\t\t{\n\t\t\treturn array(do_lang_tempcode('DUE_NOT'),1000000);\n\t\t}\n\t} else\n\t{\n\t\tif (is_null($seconds_ago))\n\t\t{\n\t\t\treturn array(do_lang_tempcode('DUE_NOW'),0);\n\t\t} else\n\t\t{\n\t\t\t$seconds_to_go=$recur_hours*60*60-$seconds_ago;\n\t\t}\n\t}\n\n\tif ($seconds_to_go>0)\n\t{\n\t\treturn array(do_lang_tempcode('DUE_TIME',is_null($seconds_ago)?do_lang_tempcode('NA_EM'):make_string_tempcode(escape_html(display_time_period($seconds_ago))),make_string_tempcode(escape_html(display_time_period($seconds_to_go)))),$seconds_to_go);\n\t} else\n\t{\n\t\treturn array(do_lang_tempcode('DUE_TIME_AGO',is_null($seconds_ago)?do_lang_tempcode('NA_EM'):make_string_tempcode(escape_html(display_time_period($seconds_ago))),make_string_tempcode(escape_html(display_time_period(-$seconds_to_go)))),$seconds_to_go);\n\t}\n}", "public function endMaintenancePeriod() : void\n {\n $this->getHesAdminDb()->update('\n UPDATE maintenance_periods SET end_time = now() WHERE end_time IS NULL\n ');\n }", "public function changestatusAction()\n {\n $user_params=$this->_request->getParams();\n $automail=new Ep_Message_AutoEmails();\n $ftvrequest_obj = new Ep_Ftv_FtvRequests();\n $ftvcontacts_obj = new Ep_Ftv_FtvContacts();\n $ftvpausetime_obj = new Ep_Ftv_FtvPauseTime();\n\n if($user_params['status'] == 'closed')\n $data = array(\"status\"=>$user_params['status'], \"cancelled_at\"=>date('Y-m-d H:i:s'));////////updating\n elseif($user_params['status'] == 'done')\n $data = array(\"status\"=>$user_params['status'], \"closed_at\"=>date('Y-m-d H:i:s'));////////updating\n else\n $data = array(\"status\"=>$user_params['status'], \"closed_at\"=>NULL, \"cancelled_at\"=>NULL);////////updating\n $query = \"identifier= '\".$user_params['requestId'].\"'\";\n $requestdetails = $ftvrequest_obj->requestDetailsById($user_params['requestId']);\n $contactId = $requestdetails[0]['request_by'];\n $contactdetails = $ftvcontacts_obj->getFtvContactDetails($contactId);\n $contactName = $contactdetails[0]['first_name'].\" \".$contactdetails[0]['last_name'];\n $parameters['ftvobject'] = $requestdetails[0]['request_object'];\n $parameters['ftvcontactName'] = $contactName;\n $ftvrequest_obj->updateFtvRequests($data,$query);\n ////making the time resume if its in pause////\n $inpause = $ftvpausetime_obj->inPause($user_params['requestId']);\n if($inpause == 'yes')\n {\n $data = array(\"resume_at\"=>date('Y-m-d H:i:s'));////////updating\n $query = \"ftvrequest_id = '\".$user_params['requestId'].\"' AND resume_at IS NULL \";\n $ftvpausetime_obj->updateFtvPauseTime($data,$query);\n }\n if($user_params['status'] == 'done')\n {\n if($this->adminLogin->userId != '110823103540627' ) ///when not johny head of BO user for FTV changed\n {\n $parameters['ftvrequestlink'] = \"/ftvchaine/ftvch-requests?submenuId=ML11-SL6\";\n $parameters['ftvType'] = \"chaine\";\n $automail->messageToEPMail('110823103540627',114,$parameters);// to johny\n $parameters['ftvrequestlink'] = \"http://ep-test.edit-place.com/ftvchaine/index\";\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\n }\n else // in case jhony change the status\n {\n $parameters['ftvrequestlink'] = \"http://ep-test.edit-place.com/ftvchaine/index\";\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\n }\n }\n\n }", "public function pausetimeAction()\n {\n $user_params=$this->_request->getParams();\n $ftvrequest_obj = new Ep_Ftv_FtvRequests();\n $ftvcontacts_obj = new Ep_Ftv_FtvContacts();\n $ftvtime_obj = new Ep_Ftv_FtvPauseTime();\n if($user_params['type'] == 'pause')\n {\n ////for goroup Id in users table////\n $ftvtime_obj->ftvrequest_id=$user_params['requestId'];\n $ftvtime_obj->pause_at=date('Y-m-d H:i:s') ;\n $ftvtime_obj->resume_at=null;\n $ftvtime_obj->insert();\n }\n else\n {\n $data = array(\"resume_at\"=>date('Y-m-d H:i:s'));////////updating\n $query = \"ftvrequest_id= '\".$user_params['requestId'].\"' AND resume_at is null\";\n $ftvtime_obj->updateFtvPauseTime($data,$query);\n }\n }", "public function test20210802_000000()\n {\n // init\n $deadline = new NextMonthFirstBusinessDay(2021, 7, 20);\n\n // get deadline\n $date = $deadline();\n $this->assertEquals(2021, $date->year);\n $this->assertEquals(8, $date->month);\n $this->assertEquals(2, $date->day);\n $this->assertEquals(0, $date->hour);\n $this->assertEquals(0, $date->minute);\n $this->assertEquals(0, $date->second);\n }", "public function update(ReserSaveRequest $request, $id)\n {\n //return $request;\n /*$reserva = Reservation::find($id);\n $reserva->fill($request->all());\n $reserva->save();*/\n\n $a = strtotime($request['startdate']);\n $b = strtotime($request['enddate']);\n if($a > $b)\n {\n Alert::error('La fecha final no debe ser mayor a la inicial...!!!'); \n Toastr::error('No se creó la reserva de viaje correctamente...!!!', $title = null, $options = [\"positionClass\"=> \"toast-bottom-right\", \"progressBar\"=> true, \"timeOut\"=> \"9000\"]);\n return Redirect::to('/calendario/create'); \n }else{\n\n $fi = $request->get('enddate'); \n $fi = $fi.' 23:59:59';\n \n $reserva = Reservation::find($id);\n $reserva->entity = $request->get('entity');\n $reserva->objetive = $request->get('objetive');\n $reserva->passengers = $request->get('passengers');\n $reserva->startdate = $request->get('startdate');\n $reserva->enddate = $fi;\n $reserva->user_id = $request->get('user_id');\n $reserva->save();\n\n //Session::flash('message','La reserva fue CREADA correctamente...');\n Alert::success('La reserva de viaje fue ACTUALIZADA correctamente...!!!');\n\n Toastr::success('La reserva fue actualizada correctamente...!!!', $title = null, $options = [\"positionClass\"=> \"toast-bottom-right\", \"progressBar\"=> true, \"timeOut\"=> \"9000\"]);\n return redirect('reservas');\n\n }\n\n //Session::flash('message','La reserva fue EDITADA correctamente...');\n Alert::info('La reserva fue EDITADA correctamente...!!!');\n\n Toastr::success('La reserva fue EDITADA correctamente...!!!', $title = null, $options = [\"positionClass\"=> \"toast-bottom-right\", \"progressBar\"=> true, \"timeOut\"=> \"9000\"]);\n\n return redirect('reservas');\n }", "public function updateTill(Request $request) {\n try {\n $restaurant_token = getRestaurantToken();\n $tokenData = [\n 'restaurant_token'=>$restaurant_token,\n 'provider_token'=>Config::get('pos.provider_token'),\n ];\n\n $input=[\n 'dateStart'=>@$request->dateStart,\n 'dateEnd'=>@$request->dateEnd,\n 'cashFund'=>@$request->cashFund,\n 'transfers'=>@$request->transfers,\n 'lastUpdate'=>@$request->lastUpdate,\n 'updateByWaiter'=>@$request->updateByWaiter,\n ];\n\n $inputData = array_merge($tokenData,$input);\n $url = Config::get('pos.base_path').'tills/'.$request->tillId;\n $response = Curl::to($url)\n ->withData($inputData)\n ->asJson()\n ->patch();\n return customResponse(Config::get(\"http_status.OK\"), true, \"till updated sucessfully\",$response);\n } catch (\\Exception $e) {\n return customResponse(Config::get(\"http_status.ISE\"), false, \"ISE\", new stdClass());\n }\n }", "function SetAExpire($TL, $sToken, $uid){\n if((checkUsrPermissions($sToken) == \"ar\") | (checkUsrPermissions($sToken) == \"an\")){\n if(chkUsrExist((int)$uid)){\n $ex = GetExp($TL);\n if($ex == \"Err :: Select One Of This : [1h,12h,1d,1w,2w,1m,3m,1y,3y,5y,lifetime]\"){\n return \"Err :: Check TimeLimit\";\n }else{\n $_SESSION['db']->prepare(\"UPDATE users SET `expire-date`=:ex WHERE id=:id\")->execute(['id' => $uid,'ex' => $ex]);\n $_SESSION['db']->prepare(\"UPDATE users SET `Subscription-create-date`=:cd WHERE id=:id\")->execute(['id' => $uid,'cd' => gmdate('Y-m-d h:i:s')]);\n return \"done\"; \n }\n }else{\n return \"UserID Not Exist !!\";\n } \n }else{\n return \"Err :: May u are not admin !\";\n }\n}", "public function review_schedule($sch_id, $status, $comm){\r\n\t $dates = date('Y-m-d');\r\n\r\n$res = $this->db->query('UPDATE leave_schedule SET status='.$status.', sup_update_date=\"'.$dates.'\", super_comment=\"'.$comm.'\" WHERE sched_id='.$sch_id);\r\n\t return $res;\r\n\t }", "public function update(Request $request, ContainerTask $containerTask)\n {\n $rules = [\n 'user_id' => 'required',\n 'value' => 'required' //indica la fecha que debe realizarse la tarea\n ];\n\n $this->validate($request,$rules); \n User::where('id',$request->user_id)->firstOrFail();\n\n $containerTask->user_id = $request->user_id;\n if($request->value == \"true\"){\n $containerTask->date_done = date('Y-m-d');\n }else{\n $containerTask->date_done = null;\n }\n $containerTask->save();\n return $this->showOne($containerTask);\n }", "function actualizarFechaUltimaVisita($usuario){\n global $pdo;\n \n $consulta = $pdo->prepare(\"UPDATE web.db_usuarios \"\n . \"SET fecha_ultima_visita = now() \"\n . \"WHERE usuario = :usuario\");\n $consulta->bindParam(\":usuario\", $usuario);\n $consulta->execute();\n \n \n}", "public function testUpdateTask()\n {\n }", "public function update(Request $request){\n $servicios =$request['servicios'];\n $vehiculo = Vehiculo::where('matricula',$request['matricula'])->first();\n $mantenimiento = mantenimientos::where('idmantenimiento',$request['idmantenimiento'])->first();\n $taller=Detalletallerservicios::where('mantenimiento',$mantenimiento['idmantenimiento'])->get();\n $carbon = new \\Carbon\\Carbon();\n $date = $carbon->now();\n $hoy =$date->format('Y-m-d');\n if($request['fecha_salida']<$hoy ||$request['fecha_salida']<$request['fecha_ingresa'])\n return back()->with('mensaje','INTRODUZCA LA FECHA DE INGRESO CORRECTAMENTE :)')->withInput();\n if($request['fecha_ingresa']==null)\n return back()->with('mensaje','LAS FECHAS SON INCORRECTAS :)')->withInput();\n if($request['fecha_salida']!=$hoy)\n return back()->with('mensaje','INTRODUZCA LA FECHA DE REGRESO CORRECTAMENTE :)')->withInput();\n if(!(is_array($servicios)) && (!empty($taller))){\n return back()->with('mensaje','SELECCIONA UNO O MÁS SERVICIOS REALIZADOS EN LA SECCION AGREGAR DESCRIPCIÓN:)')->withInput();\n }\n if(($request->validate([\n 'tipo' => 'required',\n 'fecha_ingresa' => 'required',\n 'kilometraje' => 'required',\n 'costo' =>'required',\n ]))){\n $vehiculosucursal = vehiculosucursales::where('vehiculo',$vehiculo['idvehiculo'])->first();\n $vehiculo->update(\n [\n 'estatus'=> 'ACTIVO',\n 'updated_at'=>$date\n ]\n );\n\n $mantenimiento = mantenimientos::where('idmantenimiento',$request['idmantenimiento'])\n ->where('fecha_ingresa',$request['fecha_ingresa'])->first(); \n\n $mantenimiento ->update([\n 'fecha_ingresa' => $request['fecha_ingresa'],\n 'fecha_salida' => $request['fecha_salida'],\n 'costo_total' => $request['costo'],\n 'tipo' => $request['tipo'],\n 'status' => 'TERMINADO',\n 'updated_at'=>$date\n\n ]); \n \n $mantenimiento = mantenimientos::where('idmantenimiento',$request['idmantenimiento'])\n ->where('fecha_ingresa',$request['fecha_ingresa'])->first(); \n \n if(is_array($servicios)){\n if(count($servicios)>0){\n foreach($servicios as $serv){\n $taller=Tallerservicios::where('nombreservicio',$serv)->first();\n Detalletallerservicios::insert([\n 'mantenimiento' => $mantenimiento['idmantenimiento'],\n 'tallerservicio'=> $taller['idserviciotaller'],\n 'created_at'=>$date,\n 'updated_at'=>$date\n ]);\n }\n }\n }\n return back()->with('msj','DATOS GUARDADOS EXITOSAMENTE :)');\n }\n return $servicios;\n //\n }" ]
[ "0.75438094", "0.6839023", "0.65811425", "0.6499962", "0.64726937", "0.6326507", "0.6272524", "0.6130955", "0.6130955", "0.6119048", "0.6082056", "0.6061628", "0.60455734", "0.59000087", "0.5878815", "0.58178854", "0.5796808", "0.5690283", "0.56462574", "0.56130266", "0.5598991", "0.5576913", "0.55768424", "0.55539834", "0.5518615", "0.5493659", "0.54894143", "0.5460675", "0.5417277", "0.54115605", "0.53782797", "0.53736126", "0.53577846", "0.53490263", "0.53400093", "0.5337852", "0.5315635", "0.52832174", "0.5267135", "0.5266186", "0.52661175", "0.5249564", "0.52400726", "0.52372855", "0.5234576", "0.52261645", "0.5224095", "0.5211236", "0.5199875", "0.5197509", "0.5184307", "0.5182214", "0.5181126", "0.5180791", "0.5180252", "0.5167935", "0.51520205", "0.5144622", "0.5135513", "0.5114601", "0.51047987", "0.5096828", "0.5078437", "0.50757366", "0.5072202", "0.50601435", "0.50601435", "0.50587964", "0.50465816", "0.50412196", "0.50385684", "0.50341505", "0.5031132", "0.5030558", "0.5030049", "0.5029053", "0.5022222", "0.5015939", "0.5010527", "0.5002703", "0.5000817", "0.4998722", "0.4995257", "0.49910384", "0.4971565", "0.497101", "0.49688473", "0.49666974", "0.4965736", "0.49643767", "0.49599385", "0.49536282", "0.49536097", "0.49515152", "0.49509335", "0.4941107", "0.4940997", "0.4915285", "0.49134752", "0.4911074", "0.4909341" ]
0.0
-1
Instantiates a new artifact and sets the default values.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct() {\n\t\t$this->overrideDefaults( $this->loadDefaults() );\n\t}", "public function __construct( $oDiagram, $aDefaultValues ) {\n\t\tparent::__construct( $oDiagram, $aDefaultValues );\n\n\t\t$this->sLabel = wfMessage( 'bs-ns' )->text();\n\t\t$this->aAvailableValues = $this->loadAvailableValues();\n\t\t$this->aDefaultValues = array( 0 );\n\t}", "public function testValidationDefaultNoAnyFields()\r\n {\r\n $data = $this->getCorrectData();\r\n unset($data['name']);\r\n unset($data['locked']);\r\n unset($data['ref_artifact_id']);\r\n unset($data['status']);\r\n $artifact = $this->Artifacts->newEntity($data);\r\n $this->assertEmpty($artifact->errors());\r\n }", "public function __construct()\n {\n $defaultAttributeSetId = \\Mage::getSingleton('eav/config')\n ->getEntityType(\\Mage_Catalog_Model_Product::ENTITY)\n ->getDefaultAttributeSetId();\n $set = \\Mage::getModel('eav/entity_attribute_set')->load(4);\n $gid = $set->getDefaultGroupId();\n\n $that = $this;\n $this->setDefaultParameters(array(\n 'type'=> 'text',\n 'input'=> 'text',\n 'label'=> 'Test Attribute',\n 'global'=> \\Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,\n 'is_required'=> '0',\n 'is_comparable'=> '0',\n 'is_searchable'=> '0',\n 'is_unique'=> '1',\n 'is_configurable'=> '1',\n 'user_defined'=> '1',\n 'attribute_code' => function() use($that) { return $that->nextValue('attribute_code', function($i){return 'attribute_fixture_code_' . $i; }); },\n 'frontend_label' => function() use($that) { return $that->nextValue('frontend_label', function($i){return 'Attribute Fixture ' . $i; }); },\n 'attribute_set_id' => $defaultAttributeSetId,\n 'attribute_group_id' => $gid\n ));\n }", "function __construct($defaultProperties = array ())\r\n {\r\n $this->defaultProperties = $defaultProperties;\r\n }", "public function __construct(array $def = null) {\n if (is_null($def)) return;\n $this->init($def);\n }", "public function __construct () {\r\n\t\t$this->region_default_args['properties'][] = array(\r\n\t\t\t'name' => 'version',\r\n\t\t\t'value' => Upfront_Layout::$version\r\n\t\t);\r\n\t}", "public abstract function __construct($variable = NULL);", "protected function __construct()\n {\n [$arrStyleArchives, $arrStyleGroups] = static::loadBundleConfiguration();\n\n self::$arrArchive = $arrStyleArchives;\n self::$arrGroups = $arrStyleGroups;\n }", "function __construct()\n {\n $this\n ->setOpacity(1.0)\n ->setUpdatedAt(new \\DateTime('now'))\n ->setActive(false)\n ;\n }", "public function __construct()\n {\n $this->defaultStyle = \"rotatingPlane\";\n $this->defaultColor = \"black\";\n $this->container = null;\n }", "public function testValidationDefaultNoAnyFields()\r\n {\r\n $data = $this->getCorrectData();\r\n unset($data['locked']);\r\n unset($data['ref_artifact_id']);\r\n unset($data['deliverable_id']);\r\n unset($data['content']);\r\n unset($data['stamp']);\r\n $artifact = $this->Solids->newEntity($data);\r\n $this->assertEmpty($artifact->errors());\r\n }", "public function __construct() {\n $this->addVar([\n 'base_url' => 'http://example.com',\n 'base_dir' => '/',\n 'theme_dir' => 'themes',\n 'plugins_dir' => 'plugins'\n ], false, true);\n }", "public function __construct() {\n XRef::setConfigFileName(\"default\");\n XRef::setConfigValue(\"xref.data-dir\", \"tmp\");\n $this->xref = new XRef();\n }", "public function init() {\n\t\t// use this method to initialize default values.\n\t}", "public function __construct()\n {\n if (3 == func_num_args()) {\n $this->command = func_get_arg(0);\n $this->environment = func_get_arg(1);\n $this->image = func_get_arg(2);\n }\n }", "public function __construct(){\n $arModuleVersion = [];\n include(__DIR__ . \"/version.php\");\n\n $this->MODULE_ID = 'almaybee.addstorestoorderproducts';\n $this->MODULE_VERSION = $arModuleVersion[\"VERSION\"];\n $this->MODULE_VERSION_DATE = $arModuleVersion[\"VERSION_DATE\"];\n $this->MODULE_NAME = Loc::getMessage(\"AL_MAYBEE_STORES_MODULE_NAME\");\n $this->MODULE_DESCRIPTION = Loc::getMessage(\"AL_MAYBEE_STORES_MODULE_DESCRIPTION\");\n $this->PARTNER_NAME = Loc::getMessage(\"AL_MAYBEE_STORES_MODULE_PARTNER_NAME\");\n// $this->PARTNER_URI = Loc::getMessage(\"CRM_GENESIS_SLOTS_PARTNER_URI\");\n }", "function _create_resource()\n{\n $classname = sfConfig::get('app_sfPropelVersionableBehaviorPlugin_test_class', 'Article');\n \n if (!class_exists($classname))\n {\n throw new Exception(sprintf('Unknown class \"%s\"', $classname));\n }\n \n $node = new $classname();\n\n return new $node;\n}", "public function __construct( $properties = array() ) {\n\n\t\tparent::__construct( bbp_parse_args( $properties, array(\n\t\t\t'id' => 'IOA',\n\t\t\t'name' => __( 'BBPress IOA', 'bbpress' ),\n\t\t\t'version' => bbp_get_version(),\n\t\t\t'dir' => trailingslashit( get_template_directory() . '/external/bbpress' ),\n\t\t\t'url' => trailingslashit( get_template_directory_uri() . '/external/bbpress' ),\n\t\t), 'default_theme' ) );\n\n\t\t$this->setup_actions();\n\t}", "public function produceArtifact($artifactName);", "public function __construct() {\r\n\r\n // set default values for properties\r\n $this->chmod_value = 0755;\r\n\r\n $this->error = 0;\r\n\r\n $this->jpeg_quality = 85;\r\n\r\n $this->png_compression = 9;\r\n\r\n $this->webp_quality = 80;\r\n\r\n $this->preserve_aspect_ratio = $this->preserve_time = $this->enlarge_smaller_images = $this->bmp_compressed = true;\r\n\r\n $this->sharpen_images = $this->auto_handle_exif_orientation = $this->jpeg_interlace = false;\r\n\r\n $this->source_path = $this->target_path = '';\r\n\r\n }", "public function testValidationDefaultCorrect()\r\n {\r\n $data = $this->getCorrectData();\r\n $artifact = $this->Artifacts->newEntity($data);\r\n $this->assertEmpty($artifact->errors());\r\n }", "public function __construct()\r\n {\r\n $this->file_type=self::IMAGE_TYPE_JPG;\r\n $this->manipulation_action=self::IMAGE_ACTION_FILL;\r\n $this->result=false;\r\n $this->whitepaper_color=[255,255,255];\r\n $this->transparency_color=[0,0,0,127];\r\n $this->msg=\"Please select image file path/URL!\";\r\n }", "public function testReflectionInjectsDefaultValue()\n {\n $c = new Container;\n\n $this->assertSame('Phil Bennett', $c->get('League\\Container\\Test\\Asset\\FooWithDefaultArg')->name);\n }", "public final function make(): void\n {\n if (!$this->config) {\n parent::__construct([\n 'description' => $this->description ?: $this->description(),\n 'values' => $this->values ?: $this->values()\n ]);\n $this->setInstance($this);\n }\n }", "public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }", "public function __construct()\n {\n parent::__construct();\n $this->pipeline = getAssetPipeline();\n }", "public function __construct($filePath, $new = false, $archiveImplementation = null)\n {\n }", "public static function createDefault()\n {\n return self::create(null);\n }", "public function Initialize()\n\t\t{\n\t\t\t$this->intIdOrganization = Organization::IdOrganizationDefault;\n\t\t\t$this->strName = Organization::NameDefault;\n\t\t\t$this->strPhone = Organization::PhoneDefault;\n\t\t\t$this->strQrCode = Organization::QrCodeDefault;\n\t\t\t$this->strOrganizationImage = Organization::OrganizationImageDefault;\n\t\t\t$this->strLatitude = Organization::LatitudeDefault;\n\t\t\t$this->strLongitude = Organization::LongitudeDefault;\n\t\t\t$this->strCountry = Organization::CountryDefault;\n\t\t\t$this->strCity = Organization::CityDefault;\n\t\t\t$this->strAddress = Organization::AddressDefault;\n\t\t\t$this->intIdOrganizationType = Organization::IdOrganizationTypeDefault;\n\t\t\t$this->intIdOwner = Organization::IdOwnerDefault;\n\t\t}", "public function __construct() {\r\n\t\t$this->_val = new \\tinyPHP\\Classes\\Core\\Val();\r\n\t}", "public function __construct(array $args = [])\n {\n if (empty($args['environment'])) {\n $args['environment'] = 'staging';\n }\n $this->checkCredentials($args);\n $this->args = $args;\n $this->urlRegistry = new UrlRegistry($args['environment']);\n $this->httpClient = http_client();\n $this->manifest = new Manifest();\n $this->token = data_get($args, 'credentials.token', null);\n }", "public function __construct()\n {\n parent::__construct();\n $this->bucket = config('flysystem.connections.awss3.bucket');\n\n $this->request = new Client([\n 'base_uri' => 'https://tvmwznbdlk.execute-api.us-west-2.amazonaws.com/prod/'\n ]);\n }", "abstract public function __construct($value);", "public function __construct()\n {\n $this->setActive( TRUE );\n $this->setAllowGif( FALSE );\n $this->setAllowPng( FALSE );\n $this->setApplyWatermark( TRUE );\n $this->setCreatedAt( new \\DateTime() );\n $this->setFilename( NULL );\n $this->setGif( FALSE );\n $this->setPng( FALSE );\n $this->setPosition( 0 );\n $this->setRating( 3 );\n $this->setRatingsCount( 1 );\n $this->setTitle( NULL );\n $this->setType( 'pin' );\n $this->setViews( 0 );\n }", "public function __construct(\n ProductRepository $productRepository,\n CategoryRepository $categoryRepository, \n AttributeRepository $attributeRepository,\n AttributeValueRepository $attributeValueRepository,\n ProductAttributeRepository $productAttributeRepository,\n TagRefRepository $tagRefRepository,\n MetadataRepository $metadataRepository, \n FileRepository $fileRepository,\n WarehouseRepository $warehouseRepository,\n ProductUrlRepository $productUrlRepository\n )\n {\n $this->repository = $productRepository;\n $this->categoryRepository = $categoryRepository;\n $this->attributeRepository = $attributeRepository;\n $this->attributeValueRepository = $attributeValueRepository;\n $this->productAttributeRepository = $productAttributeRepository;\n $this->tagRefRepository = $tagRefRepository;\n $this->metadataRepository = $metadataRepository;\n $this->fileRepository = $fileRepository;\n $this->warehouseRepository = $warehouseRepository;\n $this->productUrlRepository = $productUrlRepository;\n $this->init();\n \n }", "public function __construct( $default_class = self::BASE ) {\n\n\t\t$this->factory = Factory::with_default_class( self::BASE, (string) $default_class );\n\t}", "public function __construct()\n {\n if (5 == func_num_args()) {\n $this->sku = func_get_arg(0);\n $this->quantity = func_get_arg(1);\n $this->dimensions = func_get_arg(2);\n $this->weight = func_get_arg(3);\n $this->declaredValue = func_get_arg(4);\n }\n }", "public function initializeCreateAction() {\n\t\t$this->setTypeConverterConfigurationForImageUpload('newExample');\n\t}", "public function __construct(array $creationOptions);", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "public function __construct()\n {\n # no args = no further setup\n if (func_num_args() == 0) return;\n\n # use this to work out whether an arg refers to an Orm name\n $name_specified = 0;\n\n if (is_array($input = func_get_arg(0))) { # array = new object with initial values\n if (func_num_args() == 2)\n $name_specified = 1;\n\n foreach($input as $key => $val)\n $this->$key = $val;\n\n }\n\n if ($name_specified > 0) {\n $this->setup_name = func_get_arg($name_specified);\n }\n }", "function CreateDefaultResourceEntity()\n {\n\t\t$result = $this->sendRequest(\"CreateDefaultResourceEntity\", array());\n\t\treturn $this->getResultFromResponse($result);\n }", "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->assetId = func_get_arg(0);\n $this->accounts = func_get_arg(1);\n }\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->demandSourceTransparency = false;\n $this->enableViewTagcadeReport = false;\n }", "public abstract function initialise();", "public function __construct()\n {\n parent::__construct();\n $this->package_m = new Package;\n $this->package_repository = new Repository(new Package, resolve(\\Gdevilbat\\SpardaCMS\\Modules\\Role\\Repositories\\Contract\\AuthenticationRepository::class));\n $this->package_repository->setModule('epaper');\n }", "public function __construct(PackageCreator $creator)\n {\n parent::__construct();\n\n $this->creator = $creator;\n }", "protected abstract function __construct();", "function create( $summary, $details, $assigned_to=100, $priority=3, $extra_fields=array(), $importData = array()) {\n\t\t//\n\t\t//\tmake sure this person has permission to add artifacts\n\t\t//\n\n\t\t//\n\t\t//\tget the user_id\n\t\t//\n\t\tif(array_key_exists('user', $importData)){\n\t\t\t\t$user = $importData['user'];\n\t\t} else {\n\t\t\tif (!forge_check_perm ('tracker',$this->ArtifactType->getID(),'submit')) {\n\t\t\t\t\t$this->setError(_('You are not currently allowed to submit items to this tracker.'));\n\t\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (session_loggedin()) {\n\t\t\t\t$user=user_getid();\n\t\t\t} else {\n\t\t\t\t$user=100;\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\t//\tdata validation\n\t\t//\n\t\tif (!$summary) {\n\t\t\t$this->setError(_('Message Summary Is Required'));\n\t\t\treturn false;\n\t\t}\n\t\tif (!$details) {\n\t\t\t$this->setError(_('Message Body Is Required'));\n\t\t\treturn false;\n\t\t}\n\t\tif (!$assigned_to) {\n\t\t\t$assigned_to=100;\n\t\t}\n\t\tif (!$priority) {\n\t\t\t$priority=3;\n\t\t}\n\t\t$status_id=1;\t\t// on creation, status is set to \"open\"\n\n\t\t//\n\t\t//\tThey may be using an extra field \"status\" box so we have to remap\n\t\t//\tthe status_id based on the extra field - this keeps the counters\n\t\t//\taccurate\n\t\t//\n\t\t$status_id = $this->ArtifactType->remapStatus($status_id,$extra_fields);\n\t\tif (!$status_id) {\n\t\t\t$this->setError($this->ArtifactType->getErrorMessage());\n\t\t\treturn false;\n\t\t}\n\n\t\tdb_begin();\n\t\tif (array_key_exists('time',$importData)){\n\t\t\t$time = $importData['time'];\n\t\t} else {\n\t\t\t$time = time();\n\t\t}\n\t\t$res = db_query_params ('INSERT INTO artifact\n\t\t\t(group_artifact_id,status_id,priority,\n\t\t\tsubmitted_by,assigned_to,open_date,summary,details)\n\t\t\tVALUES ($1,$2,$3,$4,$5,$6,$7,$8)',\n\t\t\t\t\tarray ($this->ArtifactType->getID(),\n\t\t\t\t\t $status_id,\n\t\t\t\t\t $priority,\n\t\t\t\t\t $user,\n\t\t\t\t\t $assigned_to,\n\t\t\t\t\t $time,\n\t\t\t\t\t htmlspecialchars($summary),\n\t\t\t\t\t htmlspecialchars($details))) ;\n\t\tif (!$res) {\n\t\t\t$this->setError(db_error());\n\t\t\tdb_rollback();\n\t\t\treturn false;\n\t\t}\n\n\t\t$artifact_id=db_insertid($res,'artifact','artifact_id');\n\n\t\tif (!$res || !$artifact_id) {\n\t\t\t$this->setError(db_error());\n\t\t\tdb_rollback();\n\t\t\treturn false;\n\t\t} else {\n\t\t\t//\n\t\t\t//\tNow set up our internal data structures\n\t\t\t//\n\t\t\tif (!$this->fetchData($artifact_id)) {\n\t\t\t\tdb_rollback();\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\t// the changes to the extra fields will be logged in this array.\n\t\t\t\t// (we won't use it however)\n\t\t\t\t$extra_field_changes = array();\n\t\t\t\tif (!$this->updateExtraFields($extra_fields,$extra_field_changes)) {\n\t\t\t\t\tdb_rollback();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//\n\t\t\t//\tnow send an email if appropriate\n\t\t\t//\n\t\t\t$this->mailFollowupEx(0, 1);\n\t\t\tdb_commit();\n\n\t\t\treturn $artifact_id;\n\t\t}\n\t}", "public function __construct($defaults='')\n {\n //If left empty set defaults options\n if (empty($defaults)) {\n $this->setOptions($this->defaults);\n } else {\n throw new RuntimeException(\"Cannot initialise - Please use setOptions()\");\n }\n $this->cacheDir = $this->cacheDir;\n }", "public function __construct(DefaultService $repository) {\n $this->repository = $repository;\n }", "public function __construct(Factory $asset)\n {\n $this->asset = $asset;\n }", "public function __construct()\n {\n $creator = app('diagro.creator');\n $composer = app('composer');\n\n parent::__construct($creator, $composer);\n }", "public function __construct($parameters) {\n $this->parameters = $parameters;\n if (isset($parameters['screenshot_dir'])) {\n $this->screenshot_dir = $parameters['screenshot_dir'];\n }\n }", "final private function __construct() {}", "final private function __construct() {}", "public function __construct(ProductionSheet $productionSheet)\n {\n // $this->productionSheet = $registry->get('new');\n $this->productionSheet = $productionSheet;\n }", "function __construct()\n\t{\n\t\t$this->jar = new \\GuzzleHttp\\Cookie\\CookieJar(); // Uncomment if cookies need to be set\n\t}", "function __construct()\n {\n $this->setNumber(42);\n $this->setStatus(0);\n }", "function __construct() {\n $args = array(\n 'slug' => 'projects',\n 'name' => 'Projects',\n );\n parent::init( $args );\n }", "public function setDefaultValues() {\n $this->effective_date = \"1970-1-1\";\n $this->end_date = \"9999-12-31\";\n $this->pu_percentage = 100;\n }", "protected function _construct()\n\t{\n\t\t$this->_init('aurednik/cms_home_entity_attribute');\n\t}", "public function __construct($params)\n {\n $this->product_id = $params[\"product_id\"];\n $this->color = $params[\"color\"];\n $this->user_id = isset($params[\"user_id\"]) ? $params[\"user_id\"] : 6;\n }", "public function __construct( $params = false, $prod = false ) {\n\t\tparent::__construct( $params, $prod );\n\t}", "public function __construct()\n {\n if (5 == func_num_args()) {\n $this->serviceName = func_get_arg(0);\n $this->template = func_get_arg(1);\n $this->replicas = func_get_arg(2);\n $this->selector = func_get_arg(3);\n $this->volumeClaimTemplates = func_get_arg(4);\n }\n }", "protected final function __construct() {}", "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->apiVersion = func_get_arg(0);\n $this->kind = func_get_arg(1);\n }\n }", "final private function __construct()\n {\n }", "final private function __construct()\n {\n }", "public function __construct() {\n parent::__construct();\n $this->template_factory = new Flexi_TemplateFactory($this->getPluginPath() . '/templates');\n $this->assets = $this->getPluginURL() . '/assets/';\n }", "public function makeDefault() {\n $this->update([\n 'color' => null,\n 'size' => null\n ]);\n }", "public function __construct()\n {\n $this->hosts = [];\n $this->directInjectors = [];\n $this->defaultItems = [];\n }", "public function __construct($resource) {\n\t\tif(!isset($resource)) {\n\t\t\tthrow new Exception(\"Invalid AddonObject construction\");\n\t\t}\n\n\t\t$this->id = intval($resource->id);\n\t\t$this->board = intval($resource->board);\n\t\t$this->blid = intval($resource->blid);\n\t\t$this->name = $resource->name;\n\t\t$this->description = $resource->description;\n\t\t$this->approved = intval($resource->approved);\n\t\t$this->version = $resource->version;\n\n\t\t$this->filename = $resource->filename;\n\t\t$this->deleted = intval($resource->deleted);\n\n\t\t$this->betaVersion = $resource->betaVersion;\n\n\t\t$this->uploadDate = $resource->uploadDate;\n\t\t$this->url = \"https://s3.amazonaws.com/\" . urlencode(AWSFileManager::getBucket()) . \"/addons/\" . $this->id;\n\n\t\t$this->summary = $resource->summary;\n\t}", "public function __construct($alert)\n {\n $this->alert = $alert->getId();\n $this->product = $alert->getProduct();\n $this->notifications = $alert->getNotifications();\n $this->added = $alert->getAdded();\n $this->processed = $alert->getProcessed();\n\n $this->archived = new \\DateTime;\n }" ]
[ "0.5547299", "0.5547299", "0.5547299", "0.5547299", "0.5547299", "0.5337604", "0.5337604", "0.5337604", "0.5337604", "0.5337604", "0.5337604", "0.5337604", "0.5337604", "0.5337604", "0.5337604", "0.5319317", "0.5319317", "0.5319317", "0.5319317", "0.5319317", "0.5319317", "0.5319317", "0.5319317", "0.5319317", "0.51901823", "0.5131435", "0.51207286", "0.5111745", "0.50572073", "0.5041743", "0.5025903", "0.5012561", "0.500116", "0.4989502", "0.49561313", "0.49422336", "0.49313232", "0.49020216", "0.48954105", "0.4881058", "0.48663324", "0.4861963", "0.4855292", "0.4827326", "0.4820218", "0.47947598", "0.47918794", "0.47819138", "0.4772424", "0.476856", "0.47668147", "0.47665867", "0.47312087", "0.47284785", "0.4711397", "0.47069204", "0.47053128", "0.47014278", "0.47013432", "0.46978942", "0.46977893", "0.4697068", "0.46899998", "0.46885842", "0.46819907", "0.46819907", "0.46819907", "0.46713307", "0.46709168", "0.46708485", "0.46683702", "0.46679613", "0.46622095", "0.4661464", "0.46477494", "0.46471143", "0.46444926", "0.4642801", "0.4642361", "0.46392855", "0.46347424", "0.463077", "0.463077", "0.4623491", "0.4620744", "0.461948", "0.46145964", "0.46094137", "0.46079332", "0.46066606", "0.46065018", "0.46007502", "0.4599942", "0.4598574", "0.45979586", "0.45979586", "0.4593894", "0.45920056", "0.45919386", "0.45863637", "0.45858714" ]
0.0
-1
Creates a new instance of the appropriate class based on discriminator value
public static function createFromDiscriminatorValue(ParseNode $parseNode): Artifact { $mappingValueNode = $parseNode->getChildNode("@odata.type"); if ($mappingValueNode !== null) { $mappingValue = $mappingValueNode->getStringValue(); switch ($mappingValue) { case '#microsoft.graph.security.host': return new Host(); case '#microsoft.graph.security.hostComponent': return new HostComponent(); case '#microsoft.graph.security.hostCookie': return new HostCookie(); case '#microsoft.graph.security.hostname': return new Hostname(); case '#microsoft.graph.security.hostSslCertificate': return new HostSslCertificate(); case '#microsoft.graph.security.hostTracker': return new HostTracker(); case '#microsoft.graph.security.ipAddress': return new IpAddress(); case '#microsoft.graph.security.passiveDnsRecord': return new PassiveDnsRecord(); case '#microsoft.graph.security.sslCertificate': return new SslCertificate(); case '#microsoft.graph.security.unclassifiedArtifact': return new UnclassifiedArtifact(); } } return new Artifact(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function createFromDiscriminatorValue(ParseNode $parseNode): DeviceManagementConfigurationSettingInstance {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.deviceManagementConfigurationChoiceSettingCollectionInstance': return new DeviceManagementConfigurationChoiceSettingCollectionInstance();\n case '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance': return new DeviceManagementConfigurationChoiceSettingInstance();\n case '#microsoft.graph.deviceManagementConfigurationGroupSettingCollectionInstance': return new DeviceManagementConfigurationGroupSettingCollectionInstance();\n case '#microsoft.graph.deviceManagementConfigurationGroupSettingInstance': return new DeviceManagementConfigurationGroupSettingInstance();\n case '#microsoft.graph.deviceManagementConfigurationSettingGroupCollectionInstance': return new DeviceManagementConfigurationSettingGroupCollectionInstance();\n case '#microsoft.graph.deviceManagementConfigurationSettingGroupInstance': return new DeviceManagementConfigurationSettingGroupInstance();\n case '#microsoft.graph.deviceManagementConfigurationSimpleSettingCollectionInstance': return new DeviceManagementConfigurationSimpleSettingCollectionInstance();\n case '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance': return new DeviceManagementConfigurationSimpleSettingInstance();\n }\n }\n return new DeviceManagementConfigurationSettingInstance();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ThreatSubmission {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.security.emailContentThreatSubmission': return new EmailContentThreatSubmission();\n case '#microsoft.graph.security.emailThreatSubmission': return new EmailThreatSubmission();\n case '#microsoft.graph.security.emailUrlThreatSubmission': return new EmailUrlThreatSubmission();\n case '#microsoft.graph.security.fileContentThreatSubmission': return new FileContentThreatSubmission();\n case '#microsoft.graph.security.fileThreatSubmission': return new FileThreatSubmission();\n case '#microsoft.graph.security.fileUrlThreatSubmission': return new FileUrlThreatSubmission();\n case '#microsoft.graph.security.urlThreatSubmission': return new UrlThreatSubmission();\n }\n }\n return new ThreatSubmission();\n }", "public function setDiscriminator($discriminator)\n {\n $this->discriminator = $discriminator;\n return $this;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): BusinessScenario {\n return new BusinessScenario();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ExactMatchJobBase {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.exactMatchLookupJob': return new ExactMatchLookupJob();\n case '#microsoft.graph.exactMatchSession': return new ExactMatchSession();\n case '#microsoft.graph.exactMatchSessionBase': return new ExactMatchSessionBase();\n }\n }\n return new ExactMatchJobBase();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): AndroidWorkProfileCertificateProfileBase {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.androidWorkProfilePkcsCertificateProfile': return new AndroidWorkProfilePkcsCertificateProfile();\n case '#microsoft.graph.androidWorkProfileScepCertificateProfile': return new AndroidWorkProfileScepCertificateProfile();\n }\n }\n return new AndroidWorkProfileCertificateProfileBase();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): AuthenticationMethodTarget {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.microsoftAuthenticatorAuthenticationMethodTarget': return new MicrosoftAuthenticatorAuthenticationMethodTarget();\n case '#microsoft.graph.smsAuthenticationMethodTarget': return new SmsAuthenticationMethodTarget();\n case '#microsoft.graph.voiceAuthenticationMethodTarget': return new VoiceAuthenticationMethodTarget();\n }\n }\n return new AuthenticationMethodTarget();\n }", "public function create(string $class);", "public static function createFromDiscriminatorValue(ParseNode $parseNode): DelegatedPermissionClassification {\n return new DelegatedPermissionClassification();\n }", "public static final function of($class) {\n return self::typeOf($class)->newInstance();\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ObjectMapping {\n return new ObjectMapping();\n }", "function get_new($class, $params=NULL)\r\n\t{\r\n\t\t$obj = $this->singularize(ucwords($class));\r\n\t\treturn new $obj($params);\r\n\t}", "public static function createFromDiscriminatorValue(ParseNode $parseNode): StsPolicy {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.activityBasedTimeoutPolicy': return new ActivityBasedTimeoutPolicy();\n case '#microsoft.graph.claimsMappingPolicy': return new ClaimsMappingPolicy();\n case '#microsoft.graph.homeRealmDiscoveryPolicy': return new HomeRealmDiscoveryPolicy();\n case '#microsoft.graph.tokenIssuancePolicy': return new TokenIssuancePolicy();\n case '#microsoft.graph.tokenLifetimePolicy': return new TokenLifetimePolicy();\n }\n }\n return new StsPolicy();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): PayloadByFilter {\n return new PayloadByFilter();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): CloudPcGalleryImage {\n return new CloudPcGalleryImage();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): CommsOperation {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.addLargeGalleryViewOperation': return new AddLargeGalleryViewOperation();\n case '#microsoft.graph.cancelMediaProcessingOperation': return new CancelMediaProcessingOperation();\n case '#microsoft.graph.inviteParticipantsOperation': return new InviteParticipantsOperation();\n case '#microsoft.graph.muteParticipantOperation': return new MuteParticipantOperation();\n case '#microsoft.graph.muteParticipantsOperation': return new MuteParticipantsOperation();\n case '#microsoft.graph.playPromptOperation': return new PlayPromptOperation();\n case '#microsoft.graph.recordOperation': return new RecordOperation();\n case '#microsoft.graph.startHoldMusicOperation': return new StartHoldMusicOperation();\n case '#microsoft.graph.stopHoldMusicOperation': return new StopHoldMusicOperation();\n case '#microsoft.graph.subscribeToToneOperation': return new SubscribeToToneOperation();\n case '#microsoft.graph.unmuteParticipantOperation': return new UnmuteParticipantOperation();\n case '#microsoft.graph.updateRecordingStatusOperation': return new UpdateRecordingStatusOperation();\n }\n }\n return new CommsOperation();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): GroupPolicyUploadedPresentation {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.groupPolicyPresentationCheckBox': return new GroupPolicyPresentationCheckBox();\n case '#microsoft.graph.groupPolicyPresentationComboBox': return new GroupPolicyPresentationComboBox();\n case '#microsoft.graph.groupPolicyPresentationDecimalTextBox': return new GroupPolicyPresentationDecimalTextBox();\n case '#microsoft.graph.groupPolicyPresentationDropdownList': return new GroupPolicyPresentationDropdownList();\n case '#microsoft.graph.groupPolicyPresentationListBox': return new GroupPolicyPresentationListBox();\n case '#microsoft.graph.groupPolicyPresentationLongDecimalTextBox': return new GroupPolicyPresentationLongDecimalTextBox();\n case '#microsoft.graph.groupPolicyPresentationMultiTextBox': return new GroupPolicyPresentationMultiTextBox();\n case '#microsoft.graph.groupPolicyPresentationText': return new GroupPolicyPresentationText();\n case '#microsoft.graph.groupPolicyPresentationTextBox': return new GroupPolicyPresentationTextBox();\n }\n }\n return new GroupPolicyUploadedPresentation();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): Teamwork {\n return new Teamwork();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): Photo {\n return new Photo();\n }", "function _new($classe)\n{\n return new $classe($bdd, $ObjetBDDParam);\n}", "public function getDiscriminator()\n {\n return $this->discriminator;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): DeviceManagementConfigurationCategory {\n return new DeviceManagementConfigurationCategory();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): PrivilegedAccessScheduleInstance {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance': return new PrivilegedAccessGroupAssignmentScheduleInstance();\n case '#microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance': return new PrivilegedAccessGroupEligibilityScheduleInstance();\n }\n }\n return new PrivilegedAccessScheduleInstance();\n }", "public function setDiscriminatorValue($discriminatorValue)\n {\n $this->discriminatorValue = $discriminatorValue;\n return $this;\n }", "public function make($type);", "public static function create($type = NULL) {\n if ($type) {\n $cname = \"BMAttack\" . ucfirst(strtolower($type));\n if (class_exists($cname)) {\n return $cname::create();\n } else {\n return NULL;\n }\n }\n\n $class = get_called_class();\n return new $class;\n }", "public function func($choice) \n {\n if($choice == \"bs\")\n {\n return (new blood_sugar);\n }\n \n elseif ($choice == \"bp\")\n {\n return (new blood_pressure);\n }\n \n elseif ($choice == \"wt\")\n {\n return (new weight);\n }\n }", "protected function instantiate()\n\t{\n\t\t$class = get_class($this);\n\t\t$model = new $class(null);\n\t\treturn $model;\n\t}", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ProcessEvidence {\n return new ProcessEvidence();\n }", "public static function factory()\n {\n $class = get_called_class();\n $object = new $class();\n foreach (static::getDefaults() as $field => $value) {\n $object->{$field} = $value;\n }\n return $object;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): IosVpnConfiguration {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.iosikEv2VpnConfiguration': return new IosikEv2VpnConfiguration();\n }\n }\n return new IosVpnConfiguration();\n }", "public static function factory($flags = null, $class_name = null) {}", "public static function factory($flags = null, $class_name = null) {}", "public static function get_new($type) {\n // Get type name\n if (!$type) {\n $type = 'general';\n }\n if (!preg_match('~^[a-z][a-z0-9_]*$~', $type)) {\n throw new coding_exception(\"Invalid forum type name: $type\");\n }\n $classname = 'forumngtype_' . $type;\n\n // Require library\n global $CFG;\n require_once(dirname(__FILE__) . \"/$type/$classname.php\");\n\n // Create and return type object\n return new $classname;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): UserExperienceAnalyticsDeviceStartupProcessPerformance {\n return new UserExperienceAnalyticsDeviceStartupProcessPerformance();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): DeviceHealthScript {\n return new DeviceHealthScript();\n }", "public static function create($config) {\n if(isset($config['type']) && class_exists($config['type'])) {\n $item = new $config['type'];\n $item->config = $config;\n return $item;\n }\n return null;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): AccessPackageQuestion {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.accessPackageMultipleChoiceQuestion': return new AccessPackageMultipleChoiceQuestion();\n case '#microsoft.graph.accessPackageTextInputQuestion': return new AccessPackageTextInputQuestion();\n }\n }\n return new AccessPackageQuestion();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ZebraFotaDeployment {\n return new ZebraFotaDeployment();\n }", "function new_instance($class)\n {\n }", "public function getTargetType($type) {\n $retObj = array();\n switch ($type) {\n case 'Brand':\n $retObj[] = new ProductBrand($this->targetData);\n $retObj[] = new ProductBrand();\n \n return $retObj;\n break;\n case 'Condition':\n $retObj[] = new ProductCanonicalCondition($this->targetData);\n $retObj[] = new ProductCanonicalCondition();\n \n return $retObj;\n break;\n case 'Category':\n $retObj[] = new ProductBiddingCategory('BIDDING_CATEGORY_L1', $this->targetData);\n $retObj[] = new ProductBiddingCategory('BIDDING_CATEGORY_L1');\n \n return $retObj;\n break;\n case 'Channel':\n $retObj[] = new ProductChannel($this->targetData);\n $retObj[] = new ProductChannel();\n \n return $retObj;\n break;\n case 'Item ID':\n $retObj[] = new ProductOfferId($this->targetData);\n $retObj[] = new ProductOfferId();\n \n return $retObj;\n break;\n case 'Product type':\n $retObj[] = new ProductType('PRODUCT_TYPE_L1', $this->targetData);\n $retObj[] = new ProductType('PRODUCT_TYPE_L1');\n \n return $retObj;\n break;\n case 'Channel exclusivity':\n $retObj[] = new ProductChannelExclusivity($this->targetData);\n $retObj[] = new ProductChannelExclusivity();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_0':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_1':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_2':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_3':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_4':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n \n default:\n break;\n }\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): EducationOneRosterApiDataProvider {\n return new EducationOneRosterApiDataProvider();\n }", "static private function createInstance($className, ECash_Config $baseConfig = null)\r\n\t{\r\n\t\t//if (is_null($className))\r\n\t\t//{\r\n\t\t//\tthrow new Exception(\"NULL configuration class name passed\");\r\n\t\t//}\r\n\r\n\t\tif (!class_exists($className))\r\n\t\t{\r\n\t\t\tthrow new Exception(\"$className class does not exist\");\r\n\t\t}\r\n\r\n\t\t$classRefl = new ReflectionClass($className);\r\n\t\tif (!$classRefl->isSubclassOf(__CLASS__))\r\n\t\t{\r\n\t\t\tthrow new Exception(\"$className is not a child of \". __CLASS__);\r\n\t\t}\r\n\r\n\t\treturn new $className($baseConfig);\r\n\t}", "public static function createFromDiscriminatorValue(ParseNode $parseNode): MacOSCustomConfiguration {\n return new MacOSCustomConfiguration();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ItemPhone {\n return new ItemPhone();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ManagedMobileApp {\n return new ManagedMobileApp();\n }", "static function make($type)\n {\n $scraper = null;\n\n switch ($type) {\n case 'ElAderezo':\n $scraper = new ScraperElAderezo;\n break; \n case 'GastronomiaYCia':\n $scraper = new ScraperGastronomiaYCia;\n break;\n case 'UtensiliosDeCocina':\n $scraper = new ScraperUtensiliosDeCocina;\n break;\n } \n return $scraper;\n }", "protected static function newFactory()\n {\n return TypeFactory::new();\n }", "public function create(){\r\n\treturn new $this->class();\r\n }", "public static function factory($type)\n {\n if (include_once 'Drivers/' . $type . '.php') {\n $classname = 'Driver_' . $type;\n return new $classname;\n } else {\n throw new Exception('Driver not found');\n }\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): Filter {\n return new Filter();\n }", "public static function createModel($type)\n {\n $className = 'app'.d_S.'models'.d_S.ucfirst($type).\"Model\";\n if($className!=NULL)\n {\n return new $className($type);\n }\n else\n {\n echo \"$className Not Found!\";\n }\n }", "public function getDiscriminatorValue()\n {\n return $this->discriminatorValue;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): Win32LobAppFileSystemDetection {\n return new Win32LobAppFileSystemDetection();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): IosWebContentFilterSpecificWebsitesAccess {\n return new IosWebContentFilterSpecificWebsitesAccess();\n }", "public function createInstance($identifier)\r\n \t{\r\n \t\t$className = $this->getClassMapper($identifier);\r\n\r\n \t\t$params = array_slice(func_get_args(), 1);\r\n\r\n \t\t// We must use reflection in PHP < 5.6 See http://stackoverflow.com/questions/8734522/dynamically-call-class-with-variable-number-of-parameters-in-the-constructor\r\n \t\t$reflection = new \\ReflectionClass($className);\r\n\r\n return $reflection->newInstanceArgs($params);\r\n \t}", "public static function createFromDiscriminatorValue(ParseNode $parseNode): GroupPolicyDefinitionFile {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.groupPolicyUploadedDefinitionFile': return new GroupPolicyUploadedDefinitionFile();\n }\n }\n return new GroupPolicyDefinitionFile();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): IpSecurityProfile {\n return new IpSecurityProfile();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): FileClassificationRequest {\n return new FileClassificationRequest();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): Win32LobAppPowerShellScriptRule {\n return new Win32LobAppPowerShellScriptRule();\n }", "public function find(string $class): Instantiator;", "public static function createFromDiscriminatorValue(ParseNode $parseNode): AggregatedInboundStatistics {\n return new AggregatedInboundStatistics();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): UnifiedRoleManagementPolicy {\n return new UnifiedRoleManagementPolicy();\n }", "public function createClass()\n {\n return $this->addExcludesNameEntry($this->classes);\n }", "public static function create($kingdom, $species) {\n switch ($kingdom) {\n case 'Animal':\n $organism = new Animal($species);\n break;\n case 'Plant':\n $organism = new Plant($species);\n default:\n // Probably throw an error here.\n }\n return $organism;\n }", "public function getDiscriminator(): string\n {\n return $this->discriminator;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): MeetingParticipantInfo {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.virtualEventPresenterInfo': return new VirtualEventPresenterInfo();\n }\n }\n return new MeetingParticipantInfo();\n }", "public static function instantiate($row)\n {\n switch ($row['type']){\n case Page::TYPE:\n return new Page();\n case Slide::TYPE:\n return new Slide();\n case TopMenu::TYPE:\n return new TopMenu();\n case News::TYPE:\n return new News();\n default:\n return new self;\n }\n }", "public function getNew()\n {\n $class = get_class($this);\n\n return new $class;\n }", "public function create()\n {\n return new $this->class;\n }", "public static function build($type) {\n $product = $type;\n if (class_exists($product)) {\n return new $product();\n }\n else {\n throw new Exception(\"Invalid product type given.\");\n }\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): AccessReviewDecision {\n return new AccessReviewDecision();\n }", "protected static function GetClassForType($sType)\n {\n $oInstance = null;\n $sClassName = null;\n\n // old format (Class, Subtype, Type) lookup\n if (strstr($sType, ',')) {\n $aParts = explode(',', $sType);\n if (3 == count($aParts)) {\n $sClassName = trim($aParts[0]);\n }\n } else {\n $sClassName = $sType;\n }\n\n if (is_null($sClassName)) {\n trigger_error('ERROR: sType has invalid format (must be of the form CLASSNAME,SUBTYPE,TYPE)', E_USER_ERROR);\n } else {\n $oInstance = new $sClassName();\n }\n\n return $oInstance;\n }", "public static function factory($className = __CLASS__)\n {\n return parent::factory($className);\n }", "public function factoryMethod(): Product\n {\n return new ConcreteProduct1;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ManagedDeviceMobileAppConfigurationState {\n return new ManagedDeviceMobileAppConfigurationState();\n }", "public function instantiate($className);", "public static function createFromDiscriminatorValue(ParseNode $parseNode): TrainingReminderNotification {\n return new TrainingReminderNotification();\n }", "private function defaultCast(string $type, $value)\n {\n return class_exists($type) ? new $type($value) : $value;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): MacOSDmgApp {\n return new MacOSDmgApp();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): Qna {\n return new Qna();\n }", "public function getMorphClass();", "public function getMorphClass();", "public function getMorphClass();", "private static function getRaceInstance(string $race): Race\n {\n switch ($race) {\n case \"0\":\n case \"Elf\":\n return new Elf();\n case \"1\":\n case \"Human\":\n return new Human();\n case \"2\":\n case \"Dwarf\":\n return new Dwarf();\n default:\n echo \"invalid race\";\n die;\n }\n }", "static function newobj($type /* ... */){\n if(is_null($type)) return;\n\n $ar = func_get_args();\n $type = array_shift($ar); // remove type/object\n \n try{\n // get the asked class\n if(is_string($type)) $cls = defnz(self::$decode_table,$type,'opc_item_' . $type);\n else if (is_object($type)) $cls = get_class($type);\n else throw new Exception('invalid type: ' . strval($type));\n \n // check this class 8exists, implements opi_item\n if(!class_exists($cls)) \n\tthrow new Exception('unknown class: ' . $cls);\n else if(!in_array('opi_item',class_implements($cls)))\n\tthrow new Exception('not able to handle: ' . $cls);\n \n } catch (Exception $ex) {\n trigger_error('error creating a opc_item: ' . $ex->getMessage(),E_USER_WARNING);\n return NULL;\n }\n \n // crate and call init with the other arguments\n $res = new $cls();\n call_user_func_array(array(&$res,'init'),$ar);\n return $res;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): DirectorySetting {\n return new DirectorySetting();\n }", "public function createInstance($processor);", "public static function factory()\r\n {\r\n return parent::factory(__CLASS__);\r\n }", "public function newInstance();", "public function newInstance();", "public static function createFromDiscriminatorValue(ParseNode $parseNode): OnPremisesPublishingSingleSignOn {\n return new OnPremisesPublishingSingleSignOn();\n }", "public static abstract function createInstance();", "function case_default()\n{\n return new CaseDefault();\n}", "function createInstance(ClassDefinition $classDefinition);", "public function getNewEntityClass()\n {\n return new $this->entityClassName();\n }", "public static function factory($className)\n {\n return new $className;\n }", "public function create() {\n\t\t$implementationClassName = 'Imagine\\\\' . $this->settings['driver'] . '\\Imagine';\n\t\treturn new $implementationClassName();\n\t}", "public function createType()\n {\n $o = new TypeSelector();\n $this->appendSelector($o);\n\n return $o;\n }" ]
[ "0.5663202", "0.56524795", "0.55938476", "0.5582519", "0.5502307", "0.54198116", "0.5367442", "0.5345139", "0.5340543", "0.5317889", "0.53125316", "0.5274097", "0.52523774", "0.52451587", "0.5238258", "0.5223514", "0.52152604", "0.5212037", "0.51939124", "0.5174952", "0.515281", "0.5145421", "0.51320994", "0.5126641", "0.51244414", "0.51131696", "0.51095724", "0.5106034", "0.5076475", "0.50683355", "0.5059517", "0.5054157", "0.5041357", "0.5041357", "0.5029067", "0.49990818", "0.49943754", "0.4992221", "0.49901217", "0.497755", "0.49764502", "0.49659026", "0.49652568", "0.49549586", "0.49476686", "0.49223715", "0.4917166", "0.48937762", "0.48900846", "0.4877465", "0.4874357", "0.48657772", "0.48465893", "0.48452786", "0.4841382", "0.48322994", "0.48264185", "0.48192546", "0.48134297", "0.48112124", "0.48106822", "0.48010898", "0.47939616", "0.47873792", "0.4781471", "0.47799864", "0.47753745", "0.4774995", "0.4766917", "0.47521192", "0.47505757", "0.47382355", "0.4737392", "0.47304296", "0.4729597", "0.4712104", "0.4709488", "0.47094297", "0.4701303", "0.46802947", "0.46749547", "0.4673087", "0.46685794", "0.46685794", "0.46685794", "0.4666915", "0.4664548", "0.466203", "0.4656222", "0.46535435", "0.4652453", "0.4652453", "0.4650804", "0.4648183", "0.4646791", "0.46157163", "0.46077174", "0.46037248", "0.4602221", "0.46016708" ]
0.55732256
4
The deserialization information for the current model
public function getFieldDeserializers(): array { $o = $this; return array_merge(parent::getFieldDeserializers(), [ ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOriginalModelInfo()\n {\n return $this->original_model_info;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'detectionStatus' => fn(ParseNode $n) => $o->setDetectionStatus($n->getEnumValue(DetectionStatus::class)),\n 'imageFile' => fn(ParseNode $n) => $o->setImageFile($n->getObjectValue([FileDetails::class, 'createFromDiscriminatorValue'])),\n 'mdeDeviceId' => fn(ParseNode $n) => $o->setMdeDeviceId($n->getStringValue()),\n 'parentProcessCreationDateTime' => fn(ParseNode $n) => $o->setParentProcessCreationDateTime($n->getDateTimeValue()),\n 'parentProcessId' => fn(ParseNode $n) => $o->setParentProcessId($n->getIntegerValue()),\n 'parentProcessImageFile' => fn(ParseNode $n) => $o->setParentProcessImageFile($n->getObjectValue([FileDetails::class, 'createFromDiscriminatorValue'])),\n 'processCommandLine' => fn(ParseNode $n) => $o->setProcessCommandLine($n->getStringValue()),\n 'processCreationDateTime' => fn(ParseNode $n) => $o->setProcessCreationDateTime($n->getDateTimeValue()),\n 'processId' => fn(ParseNode $n) => $o->setProcessId($n->getIntegerValue()),\n 'userAccount' => fn(ParseNode $n) => $o->setUserAccount($n->getObjectValue([UserAccount::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function getSerializableData()\n {\n return [\n 'id' => $this->getId(),\n 'name' => $this->getName(),\n 'description' => $this->getDescription(),\n 'profile' => $this->getProfile(),\n 'salt' => $this->getSalt(),\n 'type' => $this->getType(),\n 'value' => $this->getValue(),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'cameraMake' => fn(ParseNode $n) => $o->setCameraMake($n->getStringValue()),\n 'cameraModel' => fn(ParseNode $n) => $o->setCameraModel($n->getStringValue()),\n 'exposureDenominator' => fn(ParseNode $n) => $o->setExposureDenominator($n->getFloatValue()),\n 'exposureNumerator' => fn(ParseNode $n) => $o->setExposureNumerator($n->getFloatValue()),\n 'fNumber' => fn(ParseNode $n) => $o->setFNumber($n->getFloatValue()),\n 'focalLength' => fn(ParseNode $n) => $o->setFocalLength($n->getFloatValue()),\n 'iso' => fn(ParseNode $n) => $o->setIso($n->getIntegerValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'orientation' => fn(ParseNode $n) => $o->setOrientation($n->getIntegerValue()),\n 'takenDateTime' => fn(ParseNode $n) => $o->setTakenDateTime($n->getDateTimeValue()),\n ];\n }", "public function getReflectionData()\n {\n return $this->_reflectionData;\n }", "public function deserialize($data)\n {\n }", "public function getSerializer();", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'mobileAppIdentifier' => fn(ParseNode $n) => $o->setMobileAppIdentifier($n->getObjectValue([MobileAppIdentifier::class, 'createFromDiscriminatorValue'])),\n 'version' => fn(ParseNode $n) => $o->setVersion($n->getStringValue()),\n ]);\n }", "public function serializer() {\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"FileId\",$param) and $param[\"FileId\"] !== null) {\n $this->FileId = $param[\"FileId\"];\n }\n\n if (array_key_exists(\"SubAppId\",$param) and $param[\"SubAppId\"] !== null) {\n $this->SubAppId = $param[\"SubAppId\"];\n }\n\n if (array_key_exists(\"StartTimeOffset\",$param) and $param[\"StartTimeOffset\"] !== null) {\n $this->StartTimeOffset = $param[\"StartTimeOffset\"];\n }\n\n if (array_key_exists(\"EndTimeOffset\",$param) and $param[\"EndTimeOffset\"] !== null) {\n $this->EndTimeOffset = $param[\"EndTimeOffset\"];\n }\n\n if (array_key_exists(\"RepairInfo\",$param) and $param[\"RepairInfo\"] !== null) {\n $this->RepairInfo = new RepairInfo();\n $this->RepairInfo->deserialize($param[\"RepairInfo\"]);\n }\n\n if (array_key_exists(\"VideoFrameInterpolationInfo\",$param) and $param[\"VideoFrameInterpolationInfo\"] !== null) {\n $this->VideoFrameInterpolationInfo = new VideoFrameInterpolationInfo();\n $this->VideoFrameInterpolationInfo->deserialize($param[\"VideoFrameInterpolationInfo\"]);\n }\n\n if (array_key_exists(\"SuperResolutionInfo\",$param) and $param[\"SuperResolutionInfo\"] !== null) {\n $this->SuperResolutionInfo = new SuperResolutionInfo();\n $this->SuperResolutionInfo->deserialize($param[\"SuperResolutionInfo\"]);\n }\n\n if (array_key_exists(\"HDRInfo\",$param) and $param[\"HDRInfo\"] !== null) {\n $this->HDRInfo = new HDRInfo();\n $this->HDRInfo->deserialize($param[\"HDRInfo\"]);\n }\n\n if (array_key_exists(\"VideoDenoiseInfo\",$param) and $param[\"VideoDenoiseInfo\"] !== null) {\n $this->VideoDenoiseInfo = new VideoDenoiseInfo();\n $this->VideoDenoiseInfo->deserialize($param[\"VideoDenoiseInfo\"]);\n }\n\n if (array_key_exists(\"AudioDenoiseInfo\",$param) and $param[\"AudioDenoiseInfo\"] !== null) {\n $this->AudioDenoiseInfo = new AudioDenoiseInfo();\n $this->AudioDenoiseInfo->deserialize($param[\"AudioDenoiseInfo\"]);\n }\n\n if (array_key_exists(\"ColorInfo\",$param) and $param[\"ColorInfo\"] !== null) {\n $this->ColorInfo = new ColorEnhanceInfo();\n $this->ColorInfo->deserialize($param[\"ColorInfo\"]);\n }\n\n if (array_key_exists(\"SharpInfo\",$param) and $param[\"SharpInfo\"] !== null) {\n $this->SharpInfo = new SharpEnhanceInfo();\n $this->SharpInfo->deserialize($param[\"SharpInfo\"]);\n }\n\n if (array_key_exists(\"FaceInfo\",$param) and $param[\"FaceInfo\"] !== null) {\n $this->FaceInfo = new FaceEnhanceInfo();\n $this->FaceInfo->deserialize($param[\"FaceInfo\"]);\n }\n\n if (array_key_exists(\"LowLightInfo\",$param) and $param[\"LowLightInfo\"] !== null) {\n $this->LowLightInfo = new LowLightEnhanceInfo();\n $this->LowLightInfo->deserialize($param[\"LowLightInfo\"]);\n }\n\n if (array_key_exists(\"ScratchRepairInfo\",$param) and $param[\"ScratchRepairInfo\"] !== null) {\n $this->ScratchRepairInfo = new ScratchRepairInfo();\n $this->ScratchRepairInfo->deserialize($param[\"ScratchRepairInfo\"]);\n }\n\n if (array_key_exists(\"ArtifactRepairInfo\",$param) and $param[\"ArtifactRepairInfo\"] !== null) {\n $this->ArtifactRepairInfo = new ArtifactRepairInfo();\n $this->ArtifactRepairInfo->deserialize($param[\"ArtifactRepairInfo\"]);\n }\n\n if (array_key_exists(\"TargetInfo\",$param) and $param[\"TargetInfo\"] !== null) {\n $this->TargetInfo = new RebuildMediaTargetInfo();\n $this->TargetInfo->deserialize($param[\"TargetInfo\"]);\n }\n\n if (array_key_exists(\"SessionId\",$param) and $param[\"SessionId\"] !== null) {\n $this->SessionId = $param[\"SessionId\"];\n }\n\n if (array_key_exists(\"SessionContext\",$param) and $param[\"SessionContext\"] !== null) {\n $this->SessionContext = $param[\"SessionContext\"];\n }\n\n if (array_key_exists(\"TasksPriority\",$param) and $param[\"TasksPriority\"] !== null) {\n $this->TasksPriority = $param[\"TasksPriority\"];\n }\n\n if (array_key_exists(\"ExtInfo\",$param) and $param[\"ExtInfo\"] !== null) {\n $this->ExtInfo = $param[\"ExtInfo\"];\n }\n }", "public function toObject(){\r\n return json_decode($this->toJson());\r\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'app' => fn(ParseNode $n) => $o->setApp($n->getObjectValue([MobileApp::class, 'createFromDiscriminatorValue'])),\n 'deviceId' => fn(ParseNode $n) => $o->setDeviceId($n->getStringValue()),\n 'deviceName' => fn(ParseNode $n) => $o->setDeviceName($n->getStringValue()),\n 'displayVersion' => fn(ParseNode $n) => $o->setDisplayVersion($n->getStringValue()),\n 'errorCode' => fn(ParseNode $n) => $o->setErrorCode($n->getIntegerValue()),\n 'installState' => fn(ParseNode $n) => $o->setInstallState($n->getEnumValue(ResultantAppState::class)),\n 'installStateDetail' => fn(ParseNode $n) => $o->setInstallStateDetail($n->getEnumValue(ResultantAppStateDetail::class)),\n 'lastSyncDateTime' => fn(ParseNode $n) => $o->setLastSyncDateTime($n->getDateTimeValue()),\n 'mobileAppInstallStatusValue' => fn(ParseNode $n) => $o->setMobileAppInstallStatusValue($n->getEnumValue(ResultantAppState::class)),\n 'osDescription' => fn(ParseNode $n) => $o->setOsDescription($n->getStringValue()),\n 'osVersion' => fn(ParseNode $n) => $o->setOsVersion($n->getStringValue()),\n 'userName' => fn(ParseNode $n) => $o->setUserName($n->getStringValue()),\n 'userPrincipalName' => fn(ParseNode $n) => $o->setUserPrincipalName($n->getStringValue()),\n ]);\n }", "public function onDeserialization($sender) \r\n {\r\n // TODO: Implement onDeserialization() method.\r\n }", "protected function get_decoded_data() {\n return json_decode($this->get_data());\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'classification' => fn(ParseNode $n) => $o->setClassification($n->getEnumValue(WindowsQualityUpdateClassification::class)),\n 'isExpeditable' => fn(ParseNode $n) => $o->setIsExpeditable($n->getBooleanValue()),\n 'kbArticleId' => fn(ParseNode $n) => $o->setKbArticleId($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'bold' => fn(ParseNode $n) => $o->setBold($n->getBooleanValue()),\n 'color' => fn(ParseNode $n) => $o->setColor($n->getStringValue()),\n 'italic' => fn(ParseNode $n) => $o->setItalic($n->getBooleanValue()),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n 'size' => fn(ParseNode $n) => $o->setSize($n->getFloatValue()),\n 'underline' => fn(ParseNode $n) => $o->setUnderline($n->getStringValue()),\n ]);\n }", "public function getInfo()\n {\n return self::jsonDecode($this->fields['info']->getValue());\n }", "public function getModelsMetaData() {}", "public function jsonSerialize()\n {\n return $this->externalFields;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'currentLabel' => fn(ParseNode $n) => $o->setCurrentLabel($n->getObjectValue([CurrentLabel::class, 'createFromDiscriminatorValue'])),\n 'discoveredSensitiveTypes' => fn(ParseNode $n) => $o->setDiscoveredSensitiveTypes($n->getCollectionOfObjectValues([DiscoveredSensitiveType::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'clientContext' => fn(ParseNode $n) => $o->setClientContext($n->getStringValue()),\n 'resultInfo' => fn(ParseNode $n) => $o->setResultInfo($n->getObjectValue([ResultInfo::class, 'createFromDiscriminatorValue'])),\n 'status' => fn(ParseNode $n) => $o->setStatus($n->getEnumValue(OperationStatus::class)),\n ]);\n }", "function jsonSerialize()\n\t{\n\t\treturn [\n\t\t\t'id' => $this->getId(),\n\t\t\t'metadata' => $this->getMetadata()\n\t\t];\n\t}", "public function deserialize($data);", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'ignoreVersionDetection' => fn(ParseNode $n) => $o->setIgnoreVersionDetection($n->getBooleanValue()),\n 'includedApps' => fn(ParseNode $n) => $o->setIncludedApps($n->getCollectionOfObjectValues([MacOSIncludedApp::class, 'createFromDiscriminatorValue'])),\n 'minimumSupportedOperatingSystem' => fn(ParseNode $n) => $o->setMinimumSupportedOperatingSystem($n->getObjectValue([MacOSMinimumOperatingSystem::class, 'createFromDiscriminatorValue'])),\n 'primaryBundleId' => fn(ParseNode $n) => $o->setPrimaryBundleId($n->getStringValue()),\n 'primaryBundleVersion' => fn(ParseNode $n) => $o->setPrimaryBundleVersion($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'applicationId' => fn(ParseNode $n) => $o->setApplicationId($n->getStringValue()),\n 'description' => fn(ParseNode $n) => $o->setDescription($n->getStringValue()),\n 'discoverable' => fn(ParseNode $n) => $o->setDiscoverable($n->getBooleanValue()),\n 'default' => fn(ParseNode $n) => $o->setEscapedDefault($n->getBooleanValue()),\n 'factoryTag' => fn(ParseNode $n) => $o->setFactoryTag($n->getStringValue()),\n 'metadata' => fn(ParseNode $n) => $o->setMetadata($n->getCollectionOfObjectValues([SynchronizationMetadataEntry::class, 'createFromDiscriminatorValue'])),\n 'schema' => fn(ParseNode $n) => $o->setSchema($n->getObjectValue([SynchronizationSchema::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'check32BitOn64System' => fn(ParseNode $n) => $o->setCheck32BitOn64System($n->getBooleanValue()),\n 'detectionType' => fn(ParseNode $n) => $o->setDetectionType($n->getEnumValue(Win32LobAppFileSystemDetectionType::class)),\n 'detectionValue' => fn(ParseNode $n) => $o->setDetectionValue($n->getStringValue()),\n 'fileOrFolderName' => fn(ParseNode $n) => $o->setFileOrFolderName($n->getStringValue()),\n 'operator' => fn(ParseNode $n) => $o->setOperator($n->getEnumValue(Win32LobAppDetectionOperator::class)),\n 'path' => fn(ParseNode $n) => $o->setPath($n->getStringValue()),\n ]);\n }", "public function modelData()\n {\n return [\n 'title' => $this->title,\n 'description' => $this->description,\n 'image' => $this->image->store('images', 'public'),\n 'featured_image' => $this->featured_image->store('images', 'public'),\n ];\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'attributeMappings' => fn(ParseNode $n) => $o->setAttributeMappings($n->getCollectionOfObjectValues([AttributeMapping::class, 'createFromDiscriminatorValue'])),\n 'enabled' => fn(ParseNode $n) => $o->setEnabled($n->getBooleanValue()),\n 'flowTypes' => fn(ParseNode $n) => $o->setFlowTypes($n->getEnumValue(ObjectFlowTypes::class)),\n 'metadata' => fn(ParseNode $n) => $o->setMetadata($n->getCollectionOfObjectValues([ObjectMappingMetadataEntry::class, 'createFromDiscriminatorValue'])),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'scope' => fn(ParseNode $n) => $o->setScope($n->getObjectValue([Filter::class, 'createFromDiscriminatorValue'])),\n 'sourceObjectName' => fn(ParseNode $n) => $o->setSourceObjectName($n->getStringValue()),\n 'targetObjectName' => fn(ParseNode $n) => $o->setTargetObjectName($n->getStringValue()),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'assignmentState' => fn(ParseNode $n) => $o->setAssignmentState($n->getStringValue()),\n 'duration' => fn(ParseNode $n) => $o->setDuration($n->getStringValue()),\n 'reason' => fn(ParseNode $n) => $o->setReason($n->getStringValue()),\n 'requestedDateTime' => fn(ParseNode $n) => $o->setRequestedDateTime($n->getDateTimeValue()),\n 'roleId' => fn(ParseNode $n) => $o->setRoleId($n->getStringValue()),\n 'roleInfo' => fn(ParseNode $n) => $o->setRoleInfo($n->getObjectValue([PrivilegedRole::class, 'createFromDiscriminatorValue'])),\n 'schedule' => fn(ParseNode $n) => $o->setSchedule($n->getObjectValue([GovernanceSchedule::class, 'createFromDiscriminatorValue'])),\n 'status' => fn(ParseNode $n) => $o->setStatus($n->getStringValue()),\n 'ticketNumber' => fn(ParseNode $n) => $o->setTicketNumber($n->getStringValue()),\n 'ticketSystem' => fn(ParseNode $n) => $o->setTicketSystem($n->getStringValue()),\n 'type' => fn(ParseNode $n) => $o->setType($n->getStringValue()),\n 'userId' => fn(ParseNode $n) => $o->setUserId($n->getStringValue()),\n ]);\n }", "public function getPreSerializerData()\n {\n $data = array(\n 'orderID' => $this->getOrderID(),\n 'paymentMethod' => $this->getPaymentMethod(),\n );\n\n if (!empty($this->paymentInstrumentID)) {\n $data['paymentInstrumentID'] = $this->getPaymentInstrumentID();\n }\n\n if (!empty($this->amount)) {\n $data['amount'] = $this->getAmount();\n }\n\n if (!empty($this->additionalInformation)) {\n $data['additionalInformation'] = $this->getAdditionalInformation();\n }\n\n if (!empty($this->cvv)) {\n $data['cvv'] = $this->getCcv();\n }\n\n return $data;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'deviceCount' => fn(ParseNode $n) => $o->setDeviceCount($n->getIntegerValue()),\n 'medianImpactInMs' => fn(ParseNode $n) => $o->setMedianImpactInMs($n->getIntegerValue()),\n 'processName' => fn(ParseNode $n) => $o->setProcessName($n->getStringValue()),\n 'productName' => fn(ParseNode $n) => $o->setProductName($n->getStringValue()),\n 'publisher' => fn(ParseNode $n) => $o->setPublisher($n->getStringValue()),\n 'totalImpactInMs' => fn(ParseNode $n) => $o->setTotalImpactInMs($n->getIntegerValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'attributeDestination' => fn(ParseNode $n) => $o->setAttributeDestination($n->getObjectValue([AccessPackageResourceAttributeDestination::class, 'createFromDiscriminatorValue'])),\n 'attributeName' => fn(ParseNode $n) => $o->setAttributeName($n->getStringValue()),\n 'attributeSource' => fn(ParseNode $n) => $o->setAttributeSource($n->getObjectValue([AccessPackageResourceAttributeSource::class, 'createFromDiscriminatorValue'])),\n 'id' => fn(ParseNode $n) => $o->setId($n->getStringValue()),\n 'isEditable' => fn(ParseNode $n) => $o->setIsEditable($n->getBooleanValue()),\n 'isPersistedOnAssignmentRemoval' => fn(ParseNode $n) => $o->setIsPersistedOnAssignmentRemoval($n->getBooleanValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'additionalInformation' => fn(ParseNode $n) => $o->setAdditionalInformation($n->getStringValue()),\n 'creationDateTime' => fn(ParseNode $n) => $o->setCreationDateTime($n->getDateTimeValue()),\n 'expirationDateTime' => fn(ParseNode $n) => $o->setExpirationDateTime($n->getDateTimeValue()),\n 'referenceKey' => fn(ParseNode $n) => $o->setReferenceKey($n->getStringValue()),\n 'referenceSystem' => fn(ParseNode $n) => $o->setReferenceSystem($n->getStringValue()),\n 'requestorId' => fn(ParseNode $n) => $o->setRequestorId($n->getStringValue()),\n 'requestorName' => fn(ParseNode $n) => $o->setRequestorName($n->getStringValue()),\n 'requestType' => fn(ParseNode $n) => $o->setRequestType($n->getStringValue()),\n 'roleId' => fn(ParseNode $n) => $o->setRoleId($n->getStringValue()),\n 'roleName' => fn(ParseNode $n) => $o->setRoleName($n->getStringValue()),\n 'tenantId' => fn(ParseNode $n) => $o->setTenantId($n->getStringValue()),\n 'userId' => fn(ParseNode $n) => $o->setUserId($n->getStringValue()),\n 'userMail' => fn(ParseNode $n) => $o->setUserMail($n->getStringValue()),\n 'userName' => fn(ParseNode $n) => $o->setUserName($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'clickAction' => fn(ParseNode $n) => $o->setClickAction($n->getStringValue()),\n 'clickDateTime' => fn(ParseNode $n) => $o->setClickDateTime($n->getDateTimeValue()),\n 'id' => fn(ParseNode $n) => $o->setId($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'sourceId' => fn(ParseNode $n) => $o->setSourceId($n->getStringValue()),\n 'uriDomain' => fn(ParseNode $n) => $o->setUriDomain($n->getStringValue()),\n 'verdict' => fn(ParseNode $n) => $o->setVerdict($n->getStringValue()),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'classification' => fn(ParseNode $n) => $o->setClassification($n->getEnumValue(PermissionClassificationType::class)),\n 'permissionId' => fn(ParseNode $n) => $o->setPermissionId($n->getStringValue()),\n 'permissionName' => fn(ParseNode $n) => $o->setPermissionName($n->getStringValue()),\n ]);\n }", "public function toArray()\n {\n return $this->info;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'activeDevices' => fn(ParseNode $n) => $o->setActiveDevices($n->getIntegerValue()),\n 'batteryCapacityFair' => fn(ParseNode $n) => $o->setBatteryCapacityFair($n->getIntegerValue()),\n 'batteryCapacityGood' => fn(ParseNode $n) => $o->setBatteryCapacityGood($n->getIntegerValue()),\n 'batteryCapacityPoor' => fn(ParseNode $n) => $o->setBatteryCapacityPoor($n->getIntegerValue()),\n 'lastRefreshedDateTime' => fn(ParseNode $n) => $o->setLastRefreshedDateTime($n->getDateTimeValue()),\n ]);\n }", "public function deserialize ($data, $metaModel) {\n\t\t$result = array();\n\t\t\t$this->systemLogger->log(\"Data: \" . print_r($data, TRUE), LOG_INFO); // TODO remove\n\n\t\tif (array_key_exists('id', $data)) {\n\t\t\t$result['__identity'] = $data['id'];\n\t\t}\n\t\t\n\t\t// Add properties\n\t\tforeach ((array) $metaModel->getProperties() as $property) {\n\t\t\t$propertyPayloadName = $this->getPayloadName($property->getName());\n\n\t\t\tif (array_key_exists($propertyPayloadName, $data)) {\n\t\t\t\t$convertTo = $property->getConverter()->getTo();\n\t\t\t\t$result[$property->getName()] = $convertTo($data[$propertyPayloadName]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Add associations\n\t\tforeach ((array) $metaModel->getAssociations() as $association) {\n\t\t\t$associationPayloadName = $this->getPayloadName($association->getEmberName(), $association->getEmberType());\n\t\t\t$this->systemLogger->log(\"Association: \" . $association->getEmberName() . \"; PayloadName: \" . $associationPayloadName . \"; Type: \" . $association->getEmberType(), LOG_INFO);\n\t\t\t$this->systemLogger->log(\"Payload name: \" . $associationPayloadName, LOG_INFO); // TODO remove\n\t\t\t\n\t\t\tif(isset($data[$associationPayloadName]) && $data[$associationPayloadName] !== NULL) {\n\t\t\t\t$result[$association->getFlowName()] = $data[$associationPayloadName];\n\t\t\t}\n\t\t}\n\n\t\t// TODO remove Logging\n\t\tob_start();\n\t\tvar_dump($result);\n\t\t$x = ob_get_clean();\n\t\t$this->systemLogger->log(\"Result: \" .$x, LOG_INFO);\n\n\t\t\n\t\treturn $result;\n\t}", "public static function getSerializer();", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'platformType' => fn(ParseNode $n) => $o->setPlatformType($n->getEnumValue(PolicyPlatformType::class)),\n 'settingCount' => fn(ParseNode $n) => $o->setSettingCount($n->getIntegerValue()),\n 'settingStates' => fn(ParseNode $n) => $o->setSettingStates($n->getCollectionOfObjectValues([ManagedDeviceMobileAppConfigurationSettingState::class, 'createFromDiscriminatorValue'])),\n 'state' => fn(ParseNode $n) => $o->setState($n->getEnumValue(ComplianceStatus::class)),\n 'userId' => fn(ParseNode $n) => $o->setUserId($n->getStringValue()),\n 'userPrincipalName' => fn(ParseNode $n) => $o->setUserPrincipalName($n->getStringValue()),\n 'version' => fn(ParseNode $n) => $o->setVersion($n->getIntegerValue()),\n ]);\n }", "protected final function parse_model_request() {\n\t \n\t /* get the model from the request */\n\t $modeldata = (is_array($this->request['model'])) ? $this->request['model'] : array();\n\t /*\n\t *\tlooks something like this now:\n\t\t *\t$modeldata = array(\n\t\t * \t'title'\t\t\t\t=> 'my title',\n\t\t * \t'content'\t\t\t=> 'some content',\n\t\t * 'any backbone key'\t=> 'any backbone value'\n\t\t * );\n\t\t */\n\t \t \n\t \t/* the formatting of the parsed output */\n \t$parsed = array();\n \t\n \t/* get all data packages, also the core packages and parse them */\n\t \t$data_packages = array_merge($this->core_data_packages, $this->properties->custom_data_packages ); \n\t \tforeach ($data_packages as $data_package) {\n\t\t \t$parsed[$data_package] = array();\n\t \t} \t\n \t/*\n\t *\tlooks something like this now:\n\t\t *\t$parsed = array(\n\t\t * \t'post'\t\t\t\t\t\t\t=> array(),\n\t\t * \t'postmeta'\t\t\t\t\t\t=> array(),\n\t\t * \t'comment'\t\t\t\t\t\t=> array(),\n\t\t *\t\t'any registered data package' \t=> array()\n\t\t * );\n\t\t */\n \n \t/* get default values if some are set in the extended handler class */\n \t$parsed = $this->filter_pre_parse_model_request($parsed, $this->request_method);\n \t\n \t/* start parsing */\n\t\tforeach ($modeldata as $id_backbone => $value) {\n\t\t\t\n\t\t\t/* check if the data package field is registered */\n\t\t\t/* only data_package_fields registered in backbone pass this gate */\n\t\t\tif ( ! array_key_exists($id_backbone, $this->properties->data_package_fields) )\n\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t// shorthand for data package fields\n\t\t\t$field = $this->properties->data_package_fields[$id_backbone]; // any backbone key\n\t\t\t$data_package = $field['data_package']; // the name of the package, e.g. 'post' or 'author'\n\t\t\t$wp_id = $field['id']; // the wp key name, e.g. post_title, post_parent\t\t\n\n\t\t\t/* some preprocessing */\n\t\t\tif( isset($field['options']) ) {\n\t\t\t\n\t\t\t\t/* this field is read only, so throw it away, we ignore this value */\n\t\t\t\tif( array_key_exists('readonly', $field['options']) && $field['options']['readonly'] )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t/* validate the data */\n\t\t\t\tif( array_key_exists('validate', $field['options']) ) { \t\t\t\t\t\n\t\t\t\t\t$validate_callback = $field['options']['validate'];\n\t\t\t\t\t\n\t\t\t\t\t/* execute the validation callback e.g. esc_attr(), esc_url(), .. */\n\t\t\t\t\tif(function_exists($validate_callback))\n\t\t\t\t\t\t$value = call_user_func ($validate_callback, $value);\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/* sort all data in a nice way */\n\t\t\t$parsed[$data_package][$wp_id] = $value;\n\t\t\t/*\n\t\t *\tlooks something like this now:\n\t\t\t *\t$parsed = array(\n\t\t\t * \t'post'\t\t=> array( 'post_title' \t=> 'my title',\n\t\t\t * \t\t\t\t\t\t\t 'post_content'=> 'my content',\n\t\t\t *\t\t\t\t\t\t\t 'any wp key'\t=> 'value from backbone'\n\t\t\t *\t\t\t\t\t\t\t),\n\t\t\t * \t'postmeta'\t=> array(...),\n\t\t\t * \t'comment'\t=> array(...)\n\t\t\t * );\n\t\t\t */\n\t\t\t\n\t\t}\t\t\t\t\t\n\t\t\n\t\t/* override some key, values with filter in the child class */\n \t$parsed = $this->filter_post_parse_model_request($parsed, $this->request_method);\n \t\n \t/* there might be an error \t */\n \tif( ! $parsed ) {\n\t \t$this->set_error( 500, 'request could nt be parsed' );\n\t \t$parsed = array();\n \t}\n \t\n \t// successfully set our data\n \t$this->parsed_model_request = $parsed;\t \t\t\n\t}", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function jsonSerialize() {\n return get_object_vars($this);\n }", "public function jsonSerialize() {\n return get_object_vars($this);\n }", "public function jsonSerialize()\r\n {\r\n return get_object_vars($this);\r\n }", "function jsonSerialize()\n {\n return (object) get_object_vars($this);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'email' => fn(ParseNode $n) => $o->setEmail($n->getStringValue()),\n 'identity' => fn(ParseNode $n) => $o->setIdentity($n->getObjectValue([CommunicationsUserIdentity::class, 'createFromDiscriminatorValue'])),\n 'presenterDetails' => fn(ParseNode $n) => $o->setPresenterDetails($n->getObjectValue([VirtualEventPresenterDetails::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "function jsonSerialize()\n {\n return get_object_vars($this);\n }", "function jsonSerialize()\n {\n return get_object_vars($this);\n }", "function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function jsonSerialize()\n {\n return (object) get_object_vars($this);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'id' => fn(ParseNode $n) => $o->setId($n->getStringValue()),\n 'isAnswerEditable' => fn(ParseNode $n) => $o->setIsAnswerEditable($n->getBooleanValue()),\n 'isRequired' => fn(ParseNode $n) => $o->setIsRequired($n->getBooleanValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'sequence' => fn(ParseNode $n) => $o->setSequence($n->getIntegerValue()),\n 'text' => fn(ParseNode $n) => $o->setText($n->getObjectValue([AccessPackageLocalizedContent::class, 'createFromDiscriminatorValue'])),\n ];\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function serialize () {\n return (object) array(\n 'id' => $this->getId(),\n 'data' => (object) $this->getData(),\n 'definitionId' => $this->getDefinitionId(),\n 'createdAt' => $this->getCreatedAt()\n );\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function getInfo() \n {\n return $this->requestInfo;\n }", "public function getInfo()\r\n {\r\n return $this->info;\r\n }", "public function getInfo ()\n {\n return $this->info;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'allowPrinting' => fn(ParseNode $n) => $o->setAllowPrinting($n->getBooleanValue()),\n 'allowScreenCapture' => fn(ParseNode $n) => $o->setAllowScreenCapture($n->getBooleanValue()),\n 'allowTextSuggestion' => fn(ParseNode $n) => $o->setAllowTextSuggestion($n->getBooleanValue()),\n 'assessmentAppUserModelId' => fn(ParseNode $n) => $o->setAssessmentAppUserModelId($n->getStringValue()),\n 'configurationAccount' => fn(ParseNode $n) => $o->setConfigurationAccount($n->getStringValue()),\n 'configurationAccountType' => fn(ParseNode $n) => $o->setConfigurationAccountType($n->getEnumValue(SecureAssessmentAccountType::class)),\n 'launchUri' => fn(ParseNode $n) => $o->setLaunchUri($n->getStringValue()),\n 'localGuestAccountName' => fn(ParseNode $n) => $o->setLocalGuestAccountName($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'number' => fn(ParseNode $n) => $o->setNumber($n->getStringValue()),\n 'type' => fn(ParseNode $n) => $o->setType($n->getEnumValue(PhoneType::class)),\n ]);\n }", "public function readObject();", "public function getInfo()\n\t{\n\t\treturn $this->resource->get($this->name)->getContent();\n\t}", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'description' => fn(ParseNode $n) => $o->setDescription($n->getStringValue()),\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'members' => fn(ParseNode $n) => $o->setMembers($n->getCollectionOfObjectValues([Identity::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'appRoleId' => fn(ParseNode $n) => $o->setAppRoleId($n->getStringValue()),\n 'creationTimestamp' => fn(ParseNode $n) => $o->setCreationTimestamp($n->getDateTimeValue()),\n 'principalDisplayName' => fn(ParseNode $n) => $o->setPrincipalDisplayName($n->getStringValue()),\n 'principalId' => fn(ParseNode $n) => $o->setPrincipalId($n->getStringValue()),\n 'principalType' => fn(ParseNode $n) => $o->setPrincipalType($n->getStringValue()),\n 'resourceDisplayName' => fn(ParseNode $n) => $o->setResourceDisplayName($n->getStringValue()),\n 'resourceId' => fn(ParseNode $n) => $o->setResourceId($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'completionDateTime' => fn(ParseNode $n) => $o->setCompletionDateTime($n->getDateTimeValue()),\n 'creationDateTime' => fn(ParseNode $n) => $o->setCreationDateTime($n->getDateTimeValue()),\n 'error' => fn(ParseNode $n) => $o->setError($n->getObjectValue([ClassificationError::class, 'createFromDiscriminatorValue'])),\n 'lastUpdatedDateTime' => fn(ParseNode $n) => $o->setLastUpdatedDateTime($n->getDateTimeValue()),\n 'startDateTime' => fn(ParseNode $n) => $o->setStartDateTime($n->getDateTimeValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'content' => fn(ParseNode $n) => $o->setContent($n->getBinaryContent()),\n 'dateTime' => fn(ParseNode $n) => $o->setDateTime($n->getDateTimeValue()),\n 'extension' => fn(ParseNode $n) => $o->setExtension($n->getStringValue()),\n 'extractedTextContent' => fn(ParseNode $n) => $o->setExtractedTextContent($n->getBinaryContent()),\n 'mediaType' => fn(ParseNode $n) => $o->setMediaType($n->getStringValue()),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n 'otherProperties' => fn(ParseNode $n) => $o->setOtherProperties($n->getObjectValue([StringValueDictionary::class, 'createFromDiscriminatorValue'])),\n 'processingStatus' => fn(ParseNode $n) => $o->setProcessingStatus($n->getEnumValue(FileProcessingStatus::class)),\n 'senderOrAuthors' => function (ParseNode $n) {\n $val = $n->getCollectionOfPrimitiveValues();\n if (is_array($val)) {\n TypeUtils::validateCollectionValues($val, 'string');\n }\n /** @var array<string>|null $val */\n $this->setSenderOrAuthors($val);\n },\n 'size' => fn(ParseNode $n) => $o->setSize($n->getIntegerValue()),\n 'sourceType' => fn(ParseNode $n) => $o->setSourceType($n->getEnumValue(SourceType::class)),\n 'subjectTitle' => fn(ParseNode $n) => $o->setSubjectTitle($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'deviceRestartBehavior' => fn(ParseNode $n) => $o->setDeviceRestartBehavior($n->getEnumValue(Win32LobAppRestartBehavior::class)),\n 'maxRunTimeInMinutes' => fn(ParseNode $n) => $o->setMaxRunTimeInMinutes($n->getIntegerValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'runAsAccount' => fn(ParseNode $n) => $o->setRunAsAccount($n->getEnumValue(RunAsAccountType::class)),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'identity' => fn(ParseNode $n) => $o->setIdentity($n->getObjectValue([IdentitySet::class, 'createFromDiscriminatorValue'])),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'role' => fn(ParseNode $n) => $o->setRole($n->getEnumValue(OnlineMeetingRole::class)),\n 'upn' => fn(ParseNode $n) => $o->setUpn($n->getStringValue()),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'appDisplayName' => fn(ParseNode $n) => $o->setAppDisplayName($n->getStringValue()),\n 'dataType' => fn(ParseNode $n) => $o->setDataType($n->getStringValue()),\n 'isMultiValued' => fn(ParseNode $n) => $o->setIsMultiValued($n->getBooleanValue()),\n 'isSyncedFromOnPremises' => fn(ParseNode $n) => $o->setIsSyncedFromOnPremises($n->getBooleanValue()),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n 'targetObjects' => function (ParseNode $n) {\n $val = $n->getCollectionOfPrimitiveValues();\n if (is_array($val)) {\n TypeUtils::validateCollectionValues($val, 'string');\n }\n /** @var array<string>|null $val */\n $this->setTargetObjects($val);\n },\n ]);\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Format\",$param) and $param[\"Format\"] !== null) {\n $this->Format = $param[\"Format\"];\n }\n\n if (array_key_exists(\"Csv\",$param) and $param[\"Csv\"] !== null) {\n $this->Csv = new CsvInfo();\n $this->Csv->deserialize($param[\"Csv\"]);\n }\n\n if (array_key_exists(\"Json\",$param) and $param[\"Json\"] !== null) {\n $this->Json = new JsonInfo();\n $this->Json->deserialize($param[\"Json\"]);\n }\n\n if (array_key_exists(\"Parquet\",$param) and $param[\"Parquet\"] !== null) {\n $this->Parquet = new ParquetInfo();\n $this->Parquet->deserialize($param[\"Parquet\"]);\n }\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'distributeForStudentWork' => fn(ParseNode $n) => $o->setDistributeForStudentWork($n->getBooleanValue()),\n 'resource' => fn(ParseNode $n) => $o->setResource($n->getObjectValue([EducationResource::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'accessRecommendation' => fn(ParseNode $n) => $o->setAccessRecommendation($n->getStringValue()),\n 'accessReviewId' => fn(ParseNode $n) => $o->setAccessReviewId($n->getStringValue()),\n 'appliedBy' => fn(ParseNode $n) => $o->setAppliedBy($n->getObjectValue([UserIdentity::class, 'createFromDiscriminatorValue'])),\n 'appliedDateTime' => fn(ParseNode $n) => $o->setAppliedDateTime($n->getDateTimeValue()),\n 'applyResult' => fn(ParseNode $n) => $o->setApplyResult($n->getStringValue()),\n 'justification' => fn(ParseNode $n) => $o->setJustification($n->getStringValue()),\n 'reviewedBy' => fn(ParseNode $n) => $o->setReviewedBy($n->getObjectValue([UserIdentity::class, 'createFromDiscriminatorValue'])),\n 'reviewedDateTime' => fn(ParseNode $n) => $o->setReviewedDateTime($n->getDateTimeValue()),\n 'reviewResult' => fn(ParseNode $n) => $o->setReviewResult($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'calculateDiscountOnCreditMemos' => fn(ParseNode $n) => $o->setCalculateDiscountOnCreditMemos($n->getBooleanValue()),\n 'code' => fn(ParseNode $n) => $o->setCode($n->getStringValue()),\n 'discountDateCalculation' => fn(ParseNode $n) => $o->setDiscountDateCalculation($n->getStringValue()),\n 'discountPercent' => fn(ParseNode $n) => $o->setDiscountPercent($n->getStringValue()),\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'dueDateCalculation' => fn(ParseNode $n) => $o->setDueDateCalculation($n->getStringValue()),\n 'id' => fn(ParseNode $n) => $o->setId($n->getStringValue()),\n 'lastModifiedDateTime' => fn(ParseNode $n) => $o->setLastModifiedDateTime($n->getDateTimeValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n ];\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"BizType\",$param) and $param[\"BizType\"] !== null) {\n $this->BizType = $param[\"BizType\"];\n }\n\n if (array_key_exists(\"EvilFlag\",$param) and $param[\"EvilFlag\"] !== null) {\n $this->EvilFlag = $param[\"EvilFlag\"];\n }\n\n if (array_key_exists(\"Label\",$param) and $param[\"Label\"] !== null) {\n $this->Label = $param[\"Label\"];\n }\n\n if (array_key_exists(\"Suggestion\",$param) and $param[\"Suggestion\"] !== null) {\n $this->Suggestion = $param[\"Suggestion\"];\n }\n\n if (array_key_exists(\"Keywords\",$param) and $param[\"Keywords\"] !== null) {\n $this->Keywords = $param[\"Keywords\"];\n }\n\n if (array_key_exists(\"Score\",$param) and $param[\"Score\"] !== null) {\n $this->Score = $param[\"Score\"];\n }\n\n if (array_key_exists(\"DetailResults\",$param) and $param[\"DetailResults\"] !== null) {\n $this->DetailResults = [];\n foreach ($param[\"DetailResults\"] as $key => $value){\n $obj = new DetailResults();\n $obj->deserialize($value);\n array_push($this->DetailResults, $obj);\n }\n }\n\n if (array_key_exists(\"RiskDetails\",$param) and $param[\"RiskDetails\"] !== null) {\n $this->RiskDetails = [];\n foreach ($param[\"RiskDetails\"] as $key => $value){\n $obj = new RiskDetails();\n $obj->deserialize($value);\n array_push($this->RiskDetails, $obj);\n }\n }\n\n if (array_key_exists(\"Extra\",$param) and $param[\"Extra\"] !== null) {\n $this->Extra = $param[\"Extra\"];\n }\n\n if (array_key_exists(\"RequestId\",$param) and $param[\"RequestId\"] !== null) {\n $this->RequestId = $param[\"RequestId\"];\n }\n }", "protected function getObjectData() {\n return $this->data;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'filter' => fn(ParseNode $n) => $o->setFilter($n->getObjectValue([WorkbookFilter::class, 'createFromDiscriminatorValue'])),\n 'index' => fn(ParseNode $n) => $o->setIndex($n->getIntegerValue()),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n 'values' => fn(ParseNode $n) => $o->setValues($n->getObjectValue([Json::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'addedDateTime' => fn(ParseNode $n) => $o->setAddedDateTime($n->getDateTimeValue()),\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'verifiedPublisherId' => fn(ParseNode $n) => $o->setVerifiedPublisherId($n->getStringValue()),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'deletedChats' => fn(ParseNode $n) => $o->setDeletedChats($n->getCollectionOfObjectValues([DeletedChat::class, 'createFromDiscriminatorValue'])),\n 'deletedTeams' => fn(ParseNode $n) => $o->setDeletedTeams($n->getCollectionOfObjectValues([DeletedTeam::class, 'createFromDiscriminatorValue'])),\n 'devices' => fn(ParseNode $n) => $o->setDevices($n->getCollectionOfObjectValues([TeamworkDevice::class, 'createFromDiscriminatorValue'])),\n 'teamsAppSettings' => fn(ParseNode $n) => $o->setTeamsAppSettings($n->getObjectValue([TeamsAppSettings::class, 'createFromDiscriminatorValue'])),\n 'teamTemplates' => fn(ParseNode $n) => $o->setTeamTemplates($n->getCollectionOfObjectValues([TeamTemplate::class, 'createFromDiscriminatorValue'])),\n 'workforceIntegrations' => fn(ParseNode $n) => $o->setWorkforceIntegrations($n->getCollectionOfObjectValues([WorkforceIntegration::class, 'createFromDiscriminatorValue'])),\n ]);\n }" ]
[ "0.6067922", "0.5759543", "0.5708227", "0.5663973", "0.5626403", "0.5607489", "0.5597127", "0.5582992", "0.55805206", "0.55749476", "0.55737877", "0.5545505", "0.5529162", "0.5523548", "0.5518858", "0.55104053", "0.5507383", "0.5482898", "0.54758966", "0.5475867", "0.54485196", "0.54406196", "0.5435983", "0.5423808", "0.54216844", "0.54160607", "0.5414494", "0.5397282", "0.5390837", "0.53901935", "0.5381852", "0.53797996", "0.53693736", "0.53686494", "0.5364876", "0.5350122", "0.5345665", "0.53442115", "0.5327602", "0.53254575", "0.5323211", "0.5316442", "0.53109545", "0.53109545", "0.53109545", "0.53109545", "0.53109545", "0.53109545", "0.53109545", "0.53086495", "0.53086495", "0.53083086", "0.53058827", "0.5300915", "0.52969193", "0.52969193", "0.52969193", "0.52966297", "0.52966297", "0.5295935", "0.5295935", "0.5295935", "0.5295935", "0.5295935", "0.5295935", "0.5294224", "0.52935994", "0.5291741", "0.5291741", "0.5291741", "0.5291741", "0.5291741", "0.5291741", "0.52906066", "0.52883685", "0.52883685", "0.52876395", "0.5280892", "0.5280467", "0.5278872", "0.52716607", "0.52693534", "0.52653086", "0.52623343", "0.5258704", "0.525561", "0.52554286", "0.52469206", "0.52458364", "0.52451915", "0.5242895", "0.5242707", "0.5237819", "0.52339834", "0.52234733", "0.52230334", "0.52096957", "0.5204796", "0.5202764" ]
0.57719976
1
Serializes information the current object
public function serialize(SerializationWriter $writer): void { parent::serialize($writer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function SerializeObject () {\n return serialize ($this);\n }", "public function serialize()\n {\n // TODO: Implement serialize() method.\n }", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "public function serializar() {\n\t return json_encode(get_object_vars($this), JSON_FORCE_OBJECT);\n\t\t}", "public function serializar() {\n\t return json_encode(get_object_vars($this), JSON_FORCE_OBJECT);\n\t\t}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function toString() : void\n {\n $out = serialize($this);\n \n }", "public function __toString()\n\t{\n\t\treturn $this->serialize();\n\t}", "public function serialize()\n {\n }", "public function serialize()\n {\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Service\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Service\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\ChrisHemmings\\Electio\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\ChrisHemmings\\Electio\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString() {\n\t\tif (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n\t\t\treturn json_encode(\\Wallee\\Sdk\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n\t\t}\n\n\t\treturn json_encode(\\Wallee\\Sdk\\ObjectSerializer::sanitizeForSerialization($this));\n\t}", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Sales\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Sales\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function serialize()\n {\n return serialize(array(\n \"id\"=>$this->getId()\n ));\n }", "public function serialize();", "public function serialize();", "public function serialize();", "public function serialize() {\r\n return json_encode($this);\r\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Autodesk\\Forge\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Autodesk\\Forge\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Marketing\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Marketing\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function serialize()\n {\n return json_encode($this);\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Ory\\Hydra\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Ory\\Hydra\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n // return json_encode(\n // ObjectSerializer::sanitizeForSerialization($this),\n // JSON_PRETTY_PRINT\n // );\n //}\n\n return json_encode(ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\Infoplus\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\Infoplus\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "public abstract function serialize();", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Yext\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Yext\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n\t{\n\t\treturn $this->dump();\n\t}", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\BumbalClient\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\BumbalClient\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function serialize() {\n\t\t$aInformation = array();\n\t\tforeach (self::$s_aInfoKeys as $sKey) {\n\t\t\t$aInformation[$sKey] = $this[$sKey];\n\t\t}\n\n\t\treturn serialize($aInformation);\n\t}", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Abulia\\TflUnified\\Swagger\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Abulia\\TflUnified\\Swagger\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }" ]
[ "0.7756909", "0.7567479", "0.7460804", "0.7460804", "0.7460804", "0.74483377", "0.74483377", "0.7395633", "0.7395633", "0.7395633", "0.7395633", "0.7395633", "0.7395633", "0.739549", "0.739549", "0.7389668", "0.73007923", "0.7277297", "0.7277297", "0.7209685", "0.719259", "0.719259", "0.7190416", "0.7180332", "0.7174614", "0.71350366", "0.712846", "0.712846", "0.7124929", "0.7123445", "0.7123445", "0.7123445", "0.71196645", "0.71107656", "0.71104735", "0.71052724", "0.71001405", "0.71001405", "0.70990664", "0.70878917", "0.7085295", "0.7080219", "0.7076329", "0.7074027", "0.7074027", "0.70713055", "0.7069906", "0.7063665", "0.7063665", "0.7063383", "0.70598245", "0.7055724", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823" ]
0.0
-1
Return the default value of the given value.
function value($value) { return $value instanceof Closure ? $value() : $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultValue() {}", "public function getDefaultValue() {}", "public function getDefaultValue()\n {\n\treturn $this->default;\n }", "public function getDefaultValue()\n {\n return $this->default_value;\n }", "public function getDefaultValue() \n\t\t{\n\t\t\treturn $this->defaultValue;\n\t\t}", "public function getDefaultValue()\n {\n return $this->defaultValue;\n }", "public function getDefaultValue()\n {\n return $this->defaultValue;\n }", "function get_value_or_default($value,$default='')\n{\n\treturn (!empty($value)) ? $default : $value;\n}", "public function getDefaultValue();", "public function getDefaultValue();", "public function getDefaultValue(): mixed;", "public function getDefaultValue() {\n return $this->_default_value;\n }", "public function getDefaultValue()\n {\n return $this->_defaultValue;\n }", "public function getDefaultValue()\n {\n return $this->DefaultValue;\n }", "public function getDefaultValue() {\n\t\treturn isset($this->default) ? $this->default : null;\n\t}", "function getDefault()\n {\n return $this->_defValue;\n }", "function getDefaultValue() {\n return $this->getProperty('default_value');\n }", "protected function getDefaultValue( $value )\n\t{\n\t\tif ( $value instanceof Expression )\n\t\t{\n\t\t\treturn $value;\n\t\t}\n\n\t\tif ( is_bool( $value ) )\n\t\t{\n\t\t\treturn \"'\" . (int) $value . \"'\";\n\t\t}\n\n\t\treturn \"'\" . strval( $value ) . \"'\";\n\t}", "public function getDefaultValue()\n {\n return $this->domain->getDefaultValue();\n }", "public function getDefaultValue()\n {\n // if we do not have a default value, we rely on\n // the underlying datatype to have one\n if ($this->defaultValue === null)\n return $this->oType->getDefaultValue();\n\n return $this->defaultValue;\n }", "public function getDefaultValue()\n {\n if ($this->default instanceof Expression) {\n return $this->default;\n }\n\n return $this->buildDefaultValue();\n }", "function default_value(&$var, $def = null) {\n return isset($var)?$var:$def;\n}", "public function getValidDefaultValue(): mixed;", "function wpv_default($value, $default) {\n\tif (empty($value))\n\t\treturn $default;\n\treturn $value;\n}", "public static function get_value($value, $default_val = '')\n\t{\n\t\treturn Check::isStringEmptyOrNull($value) ? $default_val : $value;\n\t}", "public function getDefaultValue()\n\t{\n\t\tswitch ($this->type) {\n\t\t\tcase self::TYPE_TEXT:\n\t\t\tcase self::TYPE_TEXTAREA:\n\t\t\tcase self::TYPE_PASSWORD:\n\t\t\t\treturn $this->default_value;\n\t\t\t\tbreak;\n\n\t\t\tcase self::TYPE_DATE:\n\t\t\t\treturn date(kyConfig::get()->getDateFormat(), $this->default_value);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t\t\tbreak;\n\t\t}\n\t}", "protected function getDefaultValue()\n {\n return new Value( array() );\n }", "public function getDefaultValue(): string|int|float|bool|array|null\n {\n $defaultValueNode = $this->node->props[$this->positionInNode]->default;\n\n if ($defaultValueNode === null) {\n return null;\n }\n\n if ($this->compiledDefaultValue === null) {\n $this->compiledDefaultValue = (new CompileNodeToValue())->__invoke(\n $defaultValueNode,\n new CompilerContext(\n $this->reflector,\n $this,\n ),\n );\n }\n\n return $this->compiledDefaultValue->value;\n }", "function getDefaultValue() \n {\n return $this->getValueByFieldName( 'statevar_default' );\n }", "public function getDefault()\n\t\t{\n\t\t\treturn $this->default;\n\t\t}", "public function getDefault()\n {\n return $this->get($this->default);\n }", "public function getDefault($var);", "public static function getDefault()\n {\n return self::$default;\n }", "public static function getDefault()\r\n {\r\n return self::get('default');\r\n }", "public function defaultValue($value = null)\n\t{\n\t\treturn $this->getSet(\"defaultValue\", $value);\n\t}", "public function getDefault()\n {\n return $this->default;\n }", "public function getDefaultVal(): string\n {\n return $this->defaultText;\n }", "public function get_default(){\n\t\treturn $this->default;\n\t}", "public function getDefault()\n {\n return $this->getOption('default');\n }", "public function getDefaultValue() {\n\t\treturn $this->data[$this->defaultLanguagePageID];\n\t}", "function progress_default_value(&$var, $def = null) {\n return isset($var)?$var:$def;\n}", "public function defaultValue()\n {\n // TODO: More cases required.\n if ($this->isClass()) {\n return null;\n } else {\n switch ($this->name) {\n case 'int': return 0;\n case 'string': return '';\n default: throw new \\Exception('No default value available');\n }\n }\n }", "function usp_ews_default_value(&$var, $def = null) {\n return isset($var)?$var:$def;\n}", "static function df(&$value, $default = \"\", $allowZero = false)\n {\n if ($allowZero)\n return !isset($value) ? $default : $value;\n\n return empty($value) ? $default : $value;\n }", "function getDefault() {\n return $this->records[2];\n }", "function coalescenull($value, $default1) {\n if (is_null($value)) {\n return $default1;\n } else {\n return $value;\n }\n }", "public static function defaultify($value)\n {\n if (is_array($value)) {\n foreach ($value as &$v) {\n $v === '' and $v = static::literal('DEFAULT');\n }\n\n return $value;\n }\n return $value === '' ? static::literal('DEFAULT') : $value;\n }", "protected function getDefault($type) {\r\n $default = $this->defaults[$type];\r\n if (empty($default))\r\n return 0;\r\n else\r\n return $default;\r\n }", "public function getOrDefault($key, $defaultValue);", "public function getDefaultValueString()\n {\n $defaultValue = $this->getDefaultValue();\n if ($defaultValue !== null) {\n if ($this->isNumericType()) {\n $dflt = (float) $defaultValue->getValue();\n } elseif ($this->isTextType() || $this->getDefaultValue()->isExpression()) {\n $dflt = \"'\" . str_replace(\"'\", \"\\'\", $defaultValue->getValue()) . \"'\";\n } elseif ($this->getType() == PropelTypes::BOOLEAN) {\n $dflt = $this->booleanValue($defaultValue->getValue()) ? 'true' : 'false';\n } else {\n $dflt = \"'\" . $defaultValue->getValue() . \"'\";\n }\n } else {\n $dflt = \"null\";\n }\n\n return $dflt;\n }", "public function getDefault();", "public function getDefault()\n {\n if($this->default === null) {\n return $this->first();\n }\n return $this->default;\n }", "public function getValueOrDefault($key) {\n return $this->values->get($key) !== NULL\n ? $this->values->get($key)\n : $this->values->get('Default'.$key);\n }", "public function getDefaultProductOptionValue(): ?ProductOptionValue\n {\n $criteria = Criteria::create();\n $criteria->where(Criteria::expr()->eq('default_value', true))\n ->setMaxResults(1);\n\n $values = $this->product_option_values->matching($criteria);\n\n if ($value = $values->first()) {\n return $value;\n }\n\n return null;\n }", "protected static function getDefault($value)\n\t{\n\t\tif (is_array($value)) {\n\t\t\t$value = isset($value[0]) ? $value[0] : '';\n\t\t\treturn \"array(\" . $value . \")\";\n\t\t}\n\t\tif (is_bool($value)) {\n\t\t\treturn ($value) ? \"true\" : \"false\";\n\t\t}\n\t\tif (is_null($value)) {\n\t\t\treturn \"null\";\n\t\t}\n\t\treturn '\"' . $value . '\"';\n\t}", "function getDefaultValue($fieldname){\n\t\t$field =& $this->getField($fieldname);\n\t\t$tablename = $this->getTableName($fieldname);\n\t\tif ( !isset($tablename) ) return null;\n\t\t$table =& $this->getTableOrView($tablename);\n\t\t$delegate =& $table->getDelegate();\n\t\tif ( isset($delegate) and method_exists($delegate, $fieldname.'__default') ){\n\t\t\treturn call_user_func(array(&$delegate, $fieldname.'__default'));\n\t\t} else if ( $field['Default'] ){\n\t\t\treturn $field['Default'];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public function getDefault(): string\n {\n return $this->default;\n }", "public function getDefault(): string\n {\n return $this->default;\n }", "public function getDefaultValue() {\n return new qti_variable($this->cardinality, $this->type, array('value' => $this->defaultValue));\n }", "public function getDefaultElementValue($element_id) {\n $type = $this->entity->type;\n $value = variable_get(\"cdb_{$type}_{$element_id}_default_value\", '');\n return $value;\n }", "public function getDefaultValue(): AbstractValue\n {\n return new ScalarValue();\n }", "public function val($key, $default = null) {\n return $this->field[$key] ?? $default;\n }", "public function getDefaultValueInfo()\n {\n return $this->default;\n }", "protected function _getValue($name, $default) {}", "#[\\ReturnTypeWillChange]\n public function getDefaultValue()\n {\n return $this->getDeclaringClass()->getDefaultProperties()[$this->name];\n }", "protected function getDefaultValueFromConfiguration($value) {\n // was briefly poisoned with \"array()\" values as defaults.\n\n try {\n $value = phutil_string_cast($value);\n } catch (Exception $ex) {\n $value = '';\n } catch (Throwable $ex) {\n $value = '';\n }\n\n return $value;\n }", "public function getDefaultIdValue(): RawValue\n {\n return new RawValue('default');\n }", "public function getValue(string $field, mixed $default = null): mixed;", "function cspm_get_field_default($option_id, $default_value = ''){\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * We'll check if the default settings can be found in the array containing the \"(shared) plugin settings\".\r\n\t\t\t * If found, we'll use it. If not found, we'll use the one in [@default_value] instead. */\r\n\t\t\t \r\n\t\t\t$default = $this->cspm_setting_exists($option_id, $this->plugin_settings, $default_value);\r\n\t\t\t\r\n\t\t\treturn $default;\r\n\t\t\t\r\n\t\t}", "public function defaultValue($key)\n {\n\n if (! isset(static::$cols[$key])) {\n Error::report('asked for wrong default value data: '.$key.' in '.get_class($this));\n\n return null;\n }\n\n return static::$cols[$key][self::COL_DEFAULT];\n\n }", "public function getDefault()\n {\n return $this->config['config']['default'] ?? null;\n }", "public function getDefault(): ?string;", "public function getPhpDefaultValue()\n {\n return $this->domain->getPhpDefaultValue();\n }", "function getValue( $val, $default ) {\n\n $result = trim( $val );\n\n if ( is_bool( $val ) ) {\n\n if ( !isset( $val ) ) {\n\n $result = $default;\n\n } else {\n\n $result = $val;\n\n }\n\n } else {\n\n if ( strlen( $result ) <= 0 ) {\n\n $result = $default;\n\n }\n\n }\n\n return $result;\n\n }", "function getValue($key, $default = null)\r\n {\r\n return $this->coalesce($this->container[$key], $default);\r\n }", "private function getDefaultAttributeValue(array $field_value) {\n return empty($field_value[0]['value']) ? '' : $field_value[0]['value'];\n }", "public function getDefault($name) {\n\t\tif (isset ( $this->_defaults [$name] )) {\n\t\t\treturn $this->_defaults [$name];\n\t\t}\n\t}", "function define_default($param, $value) {\n\t\t//\n\t}", "public function get(string $key, $default = null)\n {\n\t\treturn array_key_exists($key, $this->values) ? $this->values[$key] : $default;\n\t}", "function value($value,$key=0,$default=false) {\n if((is_string($key) OR is_int($key)) AND is_array($value)) {\n if(array_key_exists($key,$value)) {\n return $value[$key];\n }\n }\n return $default;\n}", "public function getDefaultSetting()\n {\n return $this->getPlatform()->getColumnDefaultValueDDL($this);\n }", "public function __get( $name )\n {\n if ( $name === 'default' )\n {\n return $this->defaultValue;\n }\n }", "public function get($key, $default = null)\n {\n if(isset($this->values[$key])) {\n return $this->values[$key];\n }\n return $default;\n }", "function stripDefaultValue($value, $options)\n\t{\n\t\tif($value == $options['default'])\n\t\t{\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn $value;\n\t\t}\n\t}", "public function getValueByName(string $name, $default = null);", "function get_defaultsetting() {\n return $this->defaultsetting;\n }", "public function _default_option() \n\t{\n\t\t$default_value = $this->EE->TMPL->fetch_param('default_value', '');\n\t\t$default = $this->EE->TMPL->fetch_param('default');\n\t\t$return = '';\n\t\tif($default) {\n\t\t\t$return .= '<option value=\"'.$default_value.'\">'.$default.'</option>';\n\t\t}\n\t\treturn $return;\n\t}", "public function getValue($name, $default= NULL) {\n return isset($this->values[$name]) ? $this->values[$name] : $default;\n }", "public function default($value)\n {\n $this->default = $value;\n\n return $this;\n }", "function getDefaultValue($data = array())\r\n\t{\r\n\t\tif (!isset($this->_default)) {\r\n\t\t\t$w = new FabrikWorker();\r\n\t\t\t$params = $this->getParams();\r\n\t\t\t$link = $params->get('link_default_url');\r\n\t\t\t// $$$ hugh - no idea what this was here for, but it was causing some BIZARRE bugs!\r\n\t\t\t//$formdata = $this->getForm()->getData();\r\n\t\t\t// $$$ rob only parse for place holder if we can use the element\r\n\t\t\t// otherwise for encrypted values store raw, and they are parsed when the\r\n\t\t\t// form in processsed in form::addEncrytedVarsToArray();\r\n\t\t\tif ($this->canUse()) {\r\n\t\t\t\t$link = $w->parseMessageForPlaceHolder($link, $data);\r\n\t\t\t}\r\n\t\t\t$element = $this->getElement();\r\n\t\t\t$default = $w->parseMessageForPlaceHolder($element->default, $data);\r\n\t\t\tif ($element->eval == \"1\") {\r\n\t\t\t\t$default = @eval(stripslashes($default));\r\n\t\t\t}\r\n\t\t\t$this->_default = array('label'=>$default, 'link'=>$link);\r\n\t\t}\r\n\t\treturn $this->_default;\r\n\t}", "public function getValue($key, $default = NULL) {\n\t\tif(array_key_exists($key, $this->config)) {\n\t\t\treturn $this->config[$key];\n\t\t}\n\n\t\treturn $default;\n\t}", "function setDefaultValue( $value = 'now' )\r\n\t{\r\n\t\t$this->defaultValue = date($this->dateFormat, strtotime($value));\r\n\t}", "public static function compileDefault($value) {\n\t\tif (is_null($value)) {\n\t\t\treturn 'NULL';\n\t\t}\n\n\t\tif (is_bool($value)) {\n\t\t\treturn $value ? 'TRUE' : 'FALSE';\n\t\t}\n\n\t\tif (is_numeric($value)) {\n\t\t\treturn \"'{$value}'\";\n\t\t}\n\n\t\tif (is_string($value)) {\n\t\t\tif ($value === 'CURRENT_TIMESTAMP') {\n\t\t\t\treturn $value;\n\t\t\t}\n\n\t\t\t$value = str_replace(chr(39), chr(92) . chr(39), $value);\n\t\t\treturn \"'{$value}'\";\n\t\t}\n\n\t\treturn false;\n\t}", "public function get($key, $default = null) {\n return array_key_exists($key, $this->values) ? $this->values[$key] : $default;\n }", "public function get($key, $default_val = null)\r\n {\r\n if (isset($this->attributes[$key])) {\r\n return $this->attributes[$key];\r\n }\r\n\r\n return $default_val;\r\n }", "function getifSet(&$value, $default = null)\n{\n //if it is set return the value, or else, return the default value\n return isset($value) ? $value : $default;\n}", "public function setDefaultValue($value);", "function defval (&$val,$default_val) {\r\n\t\tif (!isset($val) || ''==$val) {\r\n\t\t\t$val=$default_val;\r\n\t\t} elseif ('NULL' == $val) {\r\n\t\t\t$val='';\r\n\t\t}\r\n\r\n\t\tif (ereg(\"^%([^\\[]+)\\[(.+)\\]%$\",$val,$regs) ) {\r\n\t\t\t$val=$this->{$regs[1]}[$regs[2]];\r\n\t\t}\r\n\t}", "public function value(/*$default = \\Unicity\\Core\\Data\\Undefined::instance(), $eval = 'ifUndefined'*/) {\n\t\t\t$argc = func_num_args();\n\t\t\tif ($argc > 0) {\n\t\t\t\t$args = func_get_args();\n\t\t\t\t$default = $args[0];\n\t\t\t\t$function = ($argc > 1) ? $args[1] : 'ifUndefined';\n\t\t\t\treturn call_user_func_array(array('\\\\Unicity\\\\MappingService\\\\Data\\\\ToolKit', $function), array($this->value, $default));\n\t\t\t}\n\t\t\treturn $this->value;\n\t\t}", "public static function getDefaultValueForParameter($param){\n // todo: change this dummy\n return \"\";\n }", "public function get($key, $default = null)\n\t{\n\t\tif ($option = self::where('key', $key)->first()) {\n\t\t\treturn $option->value;\n\t\t}\n\n\t\treturn $default;\n\t}" ]
[ "0.80408", "0.804026", "0.80091625", "0.79798394", "0.79289234", "0.79138875", "0.79138875", "0.7909732", "0.7881974", "0.7881974", "0.7848414", "0.7823993", "0.7820418", "0.776555", "0.7728266", "0.77212256", "0.76933616", "0.76096064", "0.7536002", "0.7527292", "0.7493406", "0.7394341", "0.73691434", "0.7352595", "0.73386425", "0.73294705", "0.73069143", "0.7304374", "0.72980267", "0.7246979", "0.7229179", "0.7227183", "0.71855575", "0.7176163", "0.7158797", "0.71457857", "0.7092169", "0.7076704", "0.70414114", "0.7040764", "0.69781834", "0.6955337", "0.6930746", "0.6853878", "0.6831984", "0.68215656", "0.6800309", "0.67959416", "0.67823493", "0.6727691", "0.66930944", "0.6653536", "0.6651284", "0.6644315", "0.6628104", "0.6604772", "0.659129", "0.659129", "0.6570671", "0.6552371", "0.6527106", "0.6481162", "0.6459637", "0.6445424", "0.6440293", "0.64300513", "0.632802", "0.6321456", "0.63204", "0.6257767", "0.62400955", "0.6235327", "0.62276167", "0.62118596", "0.619702", "0.6180819", "0.6177651", "0.61688465", "0.61643726", "0.6133012", "0.61319077", "0.6128002", "0.61204076", "0.6118292", "0.61029506", "0.6101342", "0.609929", "0.6086652", "0.6084264", "0.6078283", "0.60622895", "0.6057202", "0.6055966", "0.6047095", "0.604615", "0.6044607", "0.60429865", "0.6039362", "0.60338193", "0.6028787", "0.60164815" ]
0.0
-1
Escape HTML entities in a string.
function e($value) { if ($value instanceof Htmlable) { return $value->toHtml(); } return htmlentities($value, ENT_QUOTES, 'UTF-8', false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function escape($html) { return htmlspecialchars($html, ENT_QUOTES | ENT_SUBSTITUTE, \"UTF-8\"); }", "public static function html_escape(string $str, string $encoding = 'UTF-8'): string\n {\n return self::htmlspecialchars(\n $str,\n \\ENT_QUOTES | \\ENT_SUBSTITUTE,\n $encoding\n );\n }", "function esc($str) {\n return htmlEnt($str);\n}", "public function escape ($str) {\r\n\t\treturn htmlentities($str, ENT_QUOTES, 'utf-8');\r\n\t}", "public static function encodeHtml($string)\n\t{\n\t\treturn htmlspecialchars($string, ENT_QUOTES, static::$defaultCharset);\n\t}", "public static function escape($str, $htmlSpecialChars = false)\n {\n if ($htmlSpecialChars) {\n $str = htmlspecialchars($str);\n }\n\n return addslashes($str);\n }", "function escape($string) {\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "function escape($string){\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "function escape($string) {\n\n return htmlentities($string, ENT_QUOTES, 'ISO-8859-15');\n}", "function escape($html) {\n return htmlspecialchars($html, ENT_QUOTES | ENT_SUBSTITUTE, \"UTF-8\");\n}", "public function escape( $str ) {\n\t\treturn htmlentities( $str, ENT_QUOTES );\n\t}", "function escape($string) {\r\n\treturn htmlentities($string, ENT_QUOTES, 'UTF-8');\r\n}", "public function escape($string)\n {\n return htmlentities($string,ENT_QUOTES,'UTF-8');\n }", "public function escape($string)\n {\n return htmlentities($string, ENT_QUOTES, 'UTF-8', false);\n }", "public function escape($string);", "public function escape($string);", "public static function escape(string $string): string\n {\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n }", "function _xmlEntities($string) {\n return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');\n }", "public function escape($string)\n {\n return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');\n }", "public abstract function escape($string);", "public static function escape($string)\n {\n $replace = [\n \"/\\n/s\" => '\\n',\n \"/,/s\" => '\\,',\n \"/;/s\" => '\\;',\n ];\n\n return htmlspecialchars(preg_replace(array_keys($replace), $replace, $string));\n }", "public function escapeString($string);", "public static function html($string) {\n return htmlspecialchars($string, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');\n }", "public function encodeHTML($str)\n {\n return htmlentities($str, ENT_QUOTES, 'UTF-8');\n }", "public static function escape(string $string): string\n {\n return htmlspecialchars($string, ENT_COMPAT | ENT_SUBSTITUTE, 'utf-8', false);\n }", "public function escape($string)\n {\n // escape all HTML special characters\n $string = htmlspecialchars($string);\n\n // make an exception for embedded <xref> tags.\n $string = preg_replace(\n '/&lt;xref linkend=&quot;(.+?)&quot;\\/&gt;/',\n \"<xref linkend=\\\"$1\\\"/>\",\n $string\n );\n\n // make an exception for embedded <varname>/<emphasis> tags.\n $string = preg_replace(\n '/&lt;(\\/)?(varname|emphasis)&gt;/',\n \"<$1$2>\",\n $string\n );\n\n return $string;\n }", "protected function escape($str): string {\n return htmlspecialchars($str, ENT_HTML5, 'UTF-8');\n }", "function _htmlentities($str) \n {\n $transtab=get_html_translation_table (HTML_ENTITIES,ENT_QUOTES);\n $transtab[chr(38)] = '&';\n return preg_replace(\"/&(?![A-Za-z]{0,4}\\w{2,3};|#[0-9]{2,5};)/\",\"&amp;\" , strtr($str, $transtab));\n }", "abstract public function escapeString($string);", "public function escapeHtml($html) {\n\t\t//[roman] da es die schöne double_encode Sache bei htmlentities erst ab der PHP 5.2.3 gibt hier ein fieser Mist...\n\t\tif (version_compare(PHP_VERSION, '5.2.3', '>=')) {\n\t\t\t$html= htmlentities($html, ENT_QUOTES, 'UTF-8', FALSE);\n\t\t} else {\n\t\t\t$html= html_entity_decode($html, ENT_QUOTES, 'UTF-8');\n\t\t\t$html= htmlentities($html, ENT_QUOTES, 'UTF-8');\n\t\t}\n\t\treturn $html;\n\t}", "abstract public function escape_string( $str );", "protected abstract function escape($string);", "public static function escape($str, $flags = ENT_QUOTES)\r\n {\r\n return htmlentities($str, $flags, 'UTF-8');\r\n }", "function escape($str) {\n return htmlspecialchars($str, ENT_QUOTES);\n}", "protected function escape($string)\n\t{\n\t\treturn htmlentities( trim((string)$string), ENT_QUOTES, 'UTF-8' );\n\t}", "function convertHtmlEntities($str)\n{\n return htmlentities($str, ENT_QUOTES, \"UTF-8\");\n}", "function s2_htmlencode($str)\n{\n return htmlspecialchars($str, ENT_QUOTES, 'UTF-8');\n}", "public function escapeString($stringToEscape);", "function makeTagEntities($str, $useNamedEntities = 1) {\n // Note that we should use &apos; for the single quote, but IE doesn't like it\n $arrReplace = $useNamedEntities ? array('&#39;','&quot;','&lt;','&gt;') : array('&#39;','&#34;','&#60;','&#62;');\n return str_replace(array(\"'\",'\"','<','>'), $arrReplace, $str);\n }", "function makeTagEntities($str, $useNamedEntities = 1) {\n // Note that we should use &apos; for the single quote, but IE doesn't like it\n $arrReplace = $useNamedEntities ? array('&#39;','&quot;','&lt;','&gt;') : array('&#39;','&#34;','&#60;','&#62;');\n return str_replace(array(\"'\",'\"','<','>'), $arrReplace, $str);\n }", "public function escape($text);", "public static function esc($str){\n\t\t\n\t\tif(ini_get('magic_quotes_gpc'))\n\t\t\t$str = stripslashes($str);\n\t\t\n\t\treturn mysql_real_escape_string(strip_tags($str));\n\t}", "public function escape(string $str): string;", "public static function entities_replace(string $html): string {\n\t\t$html = strtr($html, ['&ldquo;' => '\"', '&rdquo;' => '\"', '&lsquo;' => '\\'', '&rsquo;' => '\\'', ]);\n\t\treturn html_entity_decode($html);\n\t}", "public static function hescape($string)\r\n {\r\n return htmlspecialchars(self::utf8Sanitize($string), ENT_QUOTES, 'UTF-8');\r\n }", "function xmlentities ( $string ) { \n\treturn str_replace ( array ('&', '<', '>', '\"'), array ('&amp;', '&lt;', '&gt;', '&#34;' ), $string ); \n}", "public static function htmlSpecialChars($string, $flags = ENT_COMPAT, $encoding = null)\n\t{\n\t\tif (empty($encoding))\n\t\t{\n\t\t\t$encoding = Main\\Localization\\Translation::getCurrentEncoding();\n\t\t}\n\t\treturn \\htmlspecialchars($string, $flags, $encoding, true);\n\t}", "private function dohtmlentities($string) {\r\n\r\n return htmlentities($string, ENT_QUOTES, \"UTF-8\");\r\n\r\n }", "function escape_html($string) {\n $text = htmlspecialchars($string);\n // $text = strip_tags($string);\n\n return $text;\n}", "protected static function xmlentities($string) {\n return str_replace ( array ( '&', '\"', \"'\", '<', '>', '`' ), array ( '&amp;' , '&quot;', '&apos;' , '&lt;' , '&gt;', '&apos;' ), $string );\n }", "public function escapeString($str) {\n\t\treturn $str;\n\t}", "public static function escapeForHtml($value)\n {\n return htmlspecialchars(\n $value,\n static::htmlEscapeFlags(),\n self::CHARSET,\n true\n );\n }", "public static function specialchars($str, $double_encode = true) {\n\t\t// Force the string to be a string\n\t\t$str = (string) $str;\n\n\t\t// Do encode existing HTML entities (default)\n\t\tif ($double_encode === true) {\n\t\t\t$str = htmlspecialchars($str, ENT_QUOTES, 'UTF-8');\n\t\t} else {\n\t\t\t// Do not encode existing HTML entities\n\t\t\t// From PHP 5.2.3 this functionality is built-in, otherwise use a regex\n\t\t\tif (version_compare(PHP_VERSION, '5.2.3', '>=')) {\n\t\t\t\t$str = htmlspecialchars($str, ENT_QUOTES, 'UTF-8', false);\n\t\t\t} else {\n\t\t\t\t$str = preg_replace('/&(?!(?:#\\d++|[a-z]++);)/ui', '&amp;', $str);\n\t\t\t\t$str = str_replace(array('<', '>', '\\'', '\"'), array('&lt;', '&gt;', '&#39;', '&quot;'), $str);\n\t\t\t}\n\t\t}\n\n\t\treturn $str;\n\t}", "static public function esc($txt) {\n return htmlspecialchars($txt);\n }", "public function escapeForHtml() {\n $rawString = htmlspecialchars($this->rawString, ENT_QUOTES, $this->charset);\n\n return new static($rawString, $this->charset);\n }", "public function escape($text, $flags = ENT_COMPAT, $charset = null, $doubleEncode = true);", "function ailyak_facebook_group_feed_html_escape(&$text) {\n $text = htmlspecialchars($text);\n}", "function html_escape($var, bool $double_encode = true)\n {\n if ($double_encode === false) {\n throw new NotSupportedException(\n '$double_encode = false is not supported.'\n );\n }\n\n return esc($var, 'html');\n }", "public static function specialchars($str, $double_encode = TRUE)\n\t{\n\t\t// Do encode existing HTML entities (default)\n\t\tif ($double_encode == TRUE)\n\t\t{\n\t\t\t$str = htmlspecialchars($str, ENT_QUOTES, 'UTF-8');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Do not encode existing HTML entities\n\t\t\t// From PHP 5.2.3 this functionality is built-in, otherwise use a regex\n\t\t\tif (version_compare(PHP_VERSION, '5.2.3', '>='))\n\t\t\t{\n\t\t\t\t$str = htmlspecialchars($str, ENT_QUOTES, 'UTF-8', FALSE);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$str = preg_replace('/&(?!(?:#\\d+|[a-z]+);)/i', '&amp;', $str);\n\t\t\t\t$str = str_replace(array('<', '>', '\\'', '\"'), array('&lt;', '&gt;', '&#39;', '&quot;'), $str);\n\t\t\t}\n\t\t}\n\n\t\treturn $str;\n\t}", "public function escape($string)\n {\n return $string;\n }", "function xmlentities($string)\n{\n return str_replace ( array ( '&', '\"', \"'\", '<', '>' ), array ( '&amp;' , '&quot;', '&apos;' , '&lt;' , '&gt;' ), $string );\n}", "function escape_string($string)\n{\n\tglobal $connection;\n\t$string=htmlentities($string);\n\treturn $string;\n}", "function encode($string){\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "public function e(string $string): string\n {\n return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');\n }", "static public function encode($html) {\r\n\t\t\treturn htmlspecialchars($html);\r\n\t\t}", "public function htmlentities($string)\n\t{\n\t\treturn htmlentities($string, ENT_QUOTES, 'UTF-8');\n\t}", "function atk_htmlentities($string, $quote_style=ENT_COMPAT, $charset=null)\n{\n\treturn atkString::htmlentities($string, $quote_style, $charset);\n}", "function html_escape($v) {\n\treturn escape($v, TRUE);\n}", "public abstract function escapeString($value);", "public function escape( &$string ) {\n\t\t$string = $this->real_escape_string( $string );\n\t}", "abstract public function escapeString($value);", "static function specialCharsToHTML( $str )\n {\n $search = array(\n 'á', 'é', 'í', 'ó', 'ú',\n 'Á', 'É', 'Í', 'Ó', 'Ú',\n 'ñ', 'Ñ', '¿', '¡'\n );\n $replace = array(\n '&aacute;', '&eacute;', '&iacute;', '&oacute;', '&uacute;',\n '&Aacute;', '&Eacute;', '&Iacute;', '&Oacute;', '&Uacute;',\n '&ntilde;', '&Ntilde;', '&iquest;', '&iexcl;'\n );\n\n $str = str_replace($search, $replace, $str);\n return $str;\n }", "public function renderEscaped(): string\n {\n $this->escapeHtml(true);\n\n return $this->render();\n }", "function html_escape($value)\n{\n return apply_filters('html_escape', $value);\n}", "public function escapeText($str) {\n $str = preg_replace('/([,\\'\";\\\\\\\\])/', \"\\\\\\\\$1\", $str);\n return preg_replace('/\\n/', '\\\\\\\\n', $str);\n }", "public function encode($text) {\n\t\treturn htmlspecialchars($text, ENT_QUOTES, 'UTF-8');\n\t}", "function encode_special_characters(string $html, bool $double_encoding = true, ?string $encoding = null): string\n{\n $encoding = Internal\\internal_encoding($encoding);\n\n return htmlspecialchars($html, ENT_QUOTES | ENT_HTML5 | ENT_SUBSTITUTE, $encoding, $double_encoding);\n}", "function safehtml($in) {\n return htmlentities($in,ENT_COMPAT,'UTF-8');\n}", "function escape($_str) {\n\t\treturn str_replace('\"', '&quot;', $_str);\n\t}", "function encode($str) {\n\t\treturn str_replace(array('&', '<', '>'), array('&amp;', '&lt;', '&gt;'), $str);\n\t}", "function makeAmpersandEntities($str, $useNamedEntities = 1) {\n return preg_replace(\"/&(?![A-Za-z]{0,4}\\w{2,3};|#[0-9]{2,5};)/m\", $useNamedEntities ? \"&amp;\" : \"&#38;\", $str);\n }", "function makeAmpersandEntities($str, $useNamedEntities = 1) {\n return preg_replace(\"/&(?![A-Za-z]{0,4}\\w{2,3};|#[0-9]{2,5};)/m\", $useNamedEntities ? \"&amp;\" : \"&#38;\", $str);\n }", "function encode_html($str)\r\n\t{\r\n\t\t$_POST[$this->_current_field] = htmlspecialchars($str, ENT_COMPAT, \"UTF-8\");\r\n\t}", "public function escape( $string = '' ) {\n\t\t// Unfold content lines per RFC 5545\n\t\t$string = str_replace( \"\\n\\t\", '', $string );\n\t\t$string = str_replace( \"\\n \", '', $string );\n\n\t\t$allowed_html = array(\n\t\t\t'a' => array(\n\t\t\t\t'href' => array(),\n\t\t\t\t'title' => array()\n\t\t\t)\n\t\t);\n\n\t\t$allowed_tags = '';\n\t\tforeach ( array_keys( $allowed_html ) as $tag ) {\n\t\t\t$allowed_tags .= \"<{$tag}>\";\n\t\t}\n\n\t\t// Running strip_tags() first with allowed tags to get rid of remaining gallery markup, etc\n\t\t// because wp_kses() would only htmlentity'fy that. Then still running wp_kses(), for extra\n\t\t// safety and good measure.\n\t\treturn wp_kses( strip_tags( $string, $allowed_tags ), $allowed_html );\n\t}", "public static function escape($s) {}", "function esc($value)\n{\n return htmlentities($value);\n}", "function string_html_entities( $p_string ) {\r\n\treturn htmlentities( $p_string, ENT_COMPAT, config_get('charset') );\r\n}", "public function escape(?string $string, int $flags = \\ENT_QUOTES): string\n {\n return htmlspecialchars((string) $string, $flags, BaseApp::CHARSET);\n }", "function html($text)\n{\n\treturn htmlspecialchars($text, ENT_QUOTES, 'UTF-8');\n}", "function encode(string $html, bool $double_encoding = true, ?string $encoding = null): string\n{\n $encoding = Internal\\internal_encoding($encoding);\n\n return htmlentities($html, ENT_QUOTES, $encoding, $double_encoding);\n}", "function entities($data, $strategy = 'html', $encoding = null)\n {\n return foil('escaper')->escape($data, $strategy, $encoding);\n }", "public function escape($stringValue);", "function _twig_escape_html_attr_callback($matches)\n{\n /*\n * While HTML supports far more named entities, the lowest common denominator\n * has become HTML5's XML Serialisation which is restricted to the those named\n * entities that XML supports. Using HTML entities would result in this error:\n * XML Parsing Error: undefined entity\n */\n static $entityMap = array(\n 34 => 'quot', /* quotation mark */\n 38 => 'amp', /* ampersand */\n 60 => 'lt', /* less-than sign */\n 62 => 'gt', /* greater-than sign */\n );\n $chr = $matches[0];\n $ord = ord($chr);\n /**\n * The following replaces characters undefined in HTML with the\n * hex entity for the Unicode replacement character.\n */\n if (($ord <= 0x1f && $chr != \"\\t\" && $chr != \"\\n\" && $chr != \"\\r\") || ($ord >= 0x7f && $ord <= 0x9f)) {\n return '&#xFFFD;';\n }\n /**\n * Check if the current character to escape has a name entity we should\n * replace it with while grabbing the hex value of the character.\n */\n if (strlen($chr) == 1) {\n $hex = strtoupper(substr('00'.bin2hex($chr), -2));\n } else {\n $chr = twig_convert_encoding($chr, 'UTF-16BE', 'UTF-8');\n $hex = strtoupper(substr('0000'.bin2hex($chr), -4));\n }\n $int = hexdec($hex);\n if (array_key_exists($int, $entityMap)) {\n return sprintf('&%s;', $entityMap[$int]);\n }\n /**\n * Per OWASP recommendations, we'll use hex entities for any other\n * characters where a named entity does not exist.\n */\n return sprintf('&#x%s;', $hex);\n}", "public static function escape($str)\n {\n return str_replace(\n [\"\\\\\", \"\\x00\", \"\\n\", \"\\r\", \"'\", '\"', \"\\x1a\"],\n [\"\\\\\\\\\",\"\\\\0\",\"\\\\n\", \"\\\\r\", \"\\'\", '\\\"', \"\\\\Z\"],\n $str\n );\n }", "abstract protected function _escape($s);", "function entify($string) { \n /* used by /samuel/cv/, should leave tags as is and only convert chars */\n # echo \"<!-- $string -->\\n\";\n $from = array('/&/',\n '/å/', '/ä/', '/ö/',\n '/Å/', '/Ä/', '/Ö/',\n );\n $to = array('&amp;',\n '&aring;', '&auml;', '&ouml;',\n '&Aring;', '&Auml;', '&Ouml',\n );\n # echo \"<!-- $string -->\\n\";\n return preg_replace($from, $to, $string);\n }", "function e(string $s): string\n{\n return htmlspecialchars($s, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');\n}", "function escape($value) {\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);\n}", "function e($string){\n\n return htmlentities($string,'UTF-8', ENT_QUOTES,false);\n\n\n\n\n\n}", "public function testEscapesHtml()\n {\n $this->assertEquals(\n '&lt;script&gt;Hello&lt;/script&gt;',\n $this->outputHelper->escape('<script>Hello</script>')\n );\n }", "protected function escapeString(string $value): string\n {\n return htmlentities(\n str_replace(\"\\n\", \"\\\\n\", $value),\n ENT_COMPAT,\n 'utf-8'\n );\n }" ]
[ "0.7398256", "0.73252624", "0.7279042", "0.71967745", "0.7172629", "0.7108799", "0.7092033", "0.7061027", "0.7047301", "0.7039438", "0.70331246", "0.7000682", "0.6996479", "0.6989928", "0.69414914", "0.69414914", "0.6927437", "0.6924094", "0.6896654", "0.68397653", "0.6826673", "0.6817453", "0.6795748", "0.67924064", "0.6719237", "0.6690589", "0.6687083", "0.667483", "0.66587096", "0.66514504", "0.6648043", "0.6644388", "0.6630735", "0.66242963", "0.6605839", "0.66028184", "0.6602205", "0.65898365", "0.6588696", "0.6588696", "0.65689063", "0.6549199", "0.654211", "0.6539941", "0.6493421", "0.64756364", "0.64735067", "0.6458576", "0.6453926", "0.64428496", "0.6442821", "0.6439965", "0.64349294", "0.6428208", "0.64132", "0.64044625", "0.639491", "0.6390349", "0.6375557", "0.6365126", "0.63626486", "0.6349569", "0.63377815", "0.63110816", "0.63087326", "0.6294901", "0.6294589", "0.62776566", "0.62726563", "0.6269556", "0.6265172", "0.62644225", "0.6258484", "0.62535405", "0.62402886", "0.62394655", "0.6209139", "0.62026304", "0.61974794", "0.6195688", "0.61944574", "0.61944574", "0.6179954", "0.6167229", "0.616462", "0.6163874", "0.61581486", "0.6158093", "0.615658", "0.61490804", "0.6147221", "0.61459607", "0.61454374", "0.6130616", "0.61270237", "0.6111572", "0.6109801", "0.61077094", "0.6080415", "0.6071598", "0.6062657" ]
0.0
-1
get a first value in an array
function first($target) { // target must be an array if (!is_array($target)) { $target = (array)$target; } // target is required to have a value. if (count($target)) { return array_values($target)[0]; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function first($array) {\n\t\treturn $array[0];\n\t}", "public static function firstValue($array){\n\t\tforeach($array as $elt) return $elt;\n\t\treturn false;\n\t}", "function _first($ar){\n\treturn array_shift(array_values($ar));\t\n}", "function array_first($array)\n {\n return arr::first($array);\n }", "public static function first($array) {\n if (count($array) == 0) {\n return null;\n }\n $keys = array_keys($array);\n return $array[$keys[0]];\n }", "public function first()\n {\n $copy = $this->array;\n return reset($copy);\n }", "function array_first($array)\n{\n if( is_array($array) )\n {\n $keys = array_keys($array);\n if( isset($keys[0]) )\n return $array[$keys[0]];\n }\n return null;\n}", "protected function get_first_array_item( $val ) {\n\t\tif ( $val && is_array( $val ) ) {\n\t\t\treturn $val[0];\n\t\t}\n\t\treturn $val;\n\t}", "function first_value_from_array(array $array, mixed $default = null): mixed\n {\n return \\Midnite81\\Core\\Functions\\first_value_from_array($array);\n }", "public function first(): mixed\n {\n return array_first($this->data);\n }", "function first()\n\t{\n\t\treturn array_values($this->_data)[0];\n\t}", "public function first() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_shift( $result );\n\t}", "function first(array $array): mixed\n{\n return $array ? reset($array) : null; // No falses.\n}", "public function first() {\n if (sizeof($this) < 1) return null;\n $keys = array_keys($this);\n return $this[$keys[0]];\n }", "function first_index_arr($arr)\n {\n foreach ($arr as $k => $v) return $k;\n }", "private function oneFromArray($array, $key = 0) {\n if (ISSET($array[$key]))\n {\n return $array[$key];\n }\n }", "function array_first($array, $callback, $default = null)\n {\n return Arr::first($array, $callback, $default);\n }", "function array_first($array, $callback, $default = null)\n\t{\n\t\tforeach ($array as $key => $value)\n\t\t{\n\t\t\tif (call_user_func($callback, $key, $value)) return $value;\n\t\t}\n\n\t\treturn value($default);\n\t}", "public function first(){\n return (!empty($this->_result)) ? $this->_result[0] : [];\n }", "function tf_array_first_set()\r\n {\r\n $key_list = func_get_args();\r\n $array = array_shift($key_list);\r\n $default = array_pop($key_list);\r\n \r\n foreach ($key_list as $key)\r\n if (isset($array[$key]))\r\n return $array[$key];\r\n\r\n return $default;\r\n }", "public static function first(array $array)\n {\n return !empty($array) ? reset($array) : null;\n }", "function first ()\n {\n return $this->A ? $this->A[0] : null;\n }", "function getFirstElement($array){\n\n /*\n * convert object to array first\n */\n\n if(is_object($array)){\n $array = (array) $array;\n }\n\n\n /*\n * check if this array is\n * php array\n */\n\n if(is_array($array)){\n return getElement($array);\n }\n\n /*\n * if json array\n * check if json is valid\n * and decode the array\n */\n\n $array = jsonDecode($array);\n\n /*\n * return with the first element\n */\n\n return getElement($array);\n\n}", "function array_first($array, callable $callback = null, $default = null)\n {\n return Arr::first($array, $callback, $default);\n }", "function getFirst() ;", "function getArrayFirstIndex($arr) {\n\tforeach ($arr as $key => $value)\n\treturn $key;\n}", "public function first() {\n\t\tif ($this->isNotEmpty()) {\n\t\t\tforeach ($this->_value as $value) {\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "static function head(array $array) {\n return reset($array);\n }", "public static function first( $array, $getKey = FALSE )\n\t{\n\t\tif ( $getKey ) {\n\t\t\t$array = array_keys( $array );\n\t\t}\n\t\treturn is_array( $array ) ? reset( $array ) : NULL;\n\t}", "public function array_first( $array, $get_key = false ) {\n\t\tif ( is_array( $array ) && ! empty( $array ) ) {\n\t\t\t$keys = array_keys( $array );\n\n\t\t\t// Get array key\n\t\t\tif ( $get_key ) {\n\t\t\t\treturn $keys[0];\n\t\t\t}\n\n\t\t\t// Get array value\n\t\t\treturn $array[ $keys[0] ];\n\t\t}\n\n\t\treturn null;\n\t}", "public function first()\n {\n return $this->values()->shift();\n }", "public function first()\n {\n return $this->getData(0);\n }", "function first_value(): mixed\n {\n $args = func_get_args();\n\n return \\Midnite81\\Core\\Functions\\first_value(...$args);\n }", "public function first() {\n return $this->nth( 0 );\n }", "public function getFirst();", "public function first(): mixed;", "public function first(): mixed;", "public function first()\n {\n return \\count($this->data) > 0 ? $this->data[0] : null;\n }", "public function getFirst()\n {\n $this->update();\n if (isset($this->data[0])) {\n return $this->updateValueIfNeeded($this->data, 0);\n }\n return null;\n }", "public static function first($array)\n {\n $newArr = array_slice($array, 0, 1);\n\n return !empty($newArr[0]) ? $newArr[0] : false;\n }", "public function first() { \t\n \ttry{\n if (!is_array($this->Items)) return $this->Items ; \t\t\n if (!count($this->Items)) return null; \t\n \treset($this->Items); \t\t\n return $this->Items[key($this->Items)]; \n }catch(Exception $e){\n throw $e;\n } \t\n }", "public function first() {\n\t\treturn $this->valueForKey($this->firstKey());\n\t}", "function popfirst($arr)\n {\n if(!is_array($arr) || count($arr) ==0)\n {\n return null;\n }\n else\n {\n foreach($arr as $key=>$val)\n {\n //immediately return the key\n return $key;\n }\n }\n\n return null;\n }", "public static function findFirstOrDefault($array, $default = null)\n\t{\n\t\tif (!is_array($array) || 0 == sizeof($array)) {\n\t\t\treturn $default;\n\t\t}\n\n\t\treturn array_shift($array);\n\t}", "public function First()\n {\n return $this->Results()[0];\n }", "public function first()\n {\n return Arr::first($this->items);\n }", "public function testFirst()\r\n {\r\n self::assertEquals(1, Arr::first([1, 2, 3]));\r\n self::assertEquals('a', Arr::first(['a', 'b', 'c']));\r\n self::assertNotEquals('b', Arr::first(['a', 'b', 'c']));\r\n\r\n self::assertEquals(2, Arr::first([1, 2, 3], function ($value) {\r\n return $value === 2;\r\n }));\r\n self::assertEquals(null, Arr::first([1, 2, 3], function ($value) {\r\n return $value === 20;\r\n }));\r\n\r\n self::assertInternalType('int', Arr::first([1, 2, 3]));\r\n self::assertInternalType('string', Arr::first(['a', 'b', 'c']));\r\n }", "public static function arrayKeyFirst($array) {\n\t\tforeach ($array as $key => $unused) {\n\t\t\treturn $key;\n\t\t}\n\t\treturn NULL;\n\t}", "static function first(array $array, callable $callback, $default = null) {\n foreach ($array as $key => $value) {\n if ($callback($key, $value)) {\n return $value;\n }\n }\n\n return $default;\n }", "public static function first();", "public function getFirst() {}", "public static function first($array, $callback = NULL, $default = NULL)\n {\n \n if (is_null($callback)) {\n \n if (empty($array)) {\n return $default;\n }\n \n foreach ($array as $entry) {\n return $entry;\n }\n \n }\n \n foreach ($array as $key => $value) {\n if (call_user_func($callback, $value, $key)) {\n return $value;\n }\n }\n \n \n return $default;\n }", "public function head($array)\n {\n return reset($array);\n }", "public static function getFirstElementPointer(array &$arr)\n {\n $result = null;\n if (is_array($arr) && sizeof($arr)) {\n reset($arr);\n $result = &$arr[key($arr)];\n }\n\n return $result;\n }", "public function first(): mixed\n {\n return Iterators::first($this->iterator);\n }", "protected function first()\n {\n foreach ($this->sortable as $key => $value) {\n if (is_numeric($key)) {\n return $value;\n }\n\n return $key;\n }\n\n return null;\n }", "public function first(){\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function first()\n {\n return current($this->_data);\n }", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first() {\n\n\t\treturn $this->search[0];\n\n\t}", "public function first() {\n\t\treturn $this->items[0];\n\t}", "function getElement($array , $index = 0){\n\n if($index != 0){\n return isset($array[$index]) ? $array[$index] : '';\n }\n\n $array = array_values($array);\n\n return array_shift($array);\n}", "public function getFirstItem();", "public function first()\n {\n if($this->length()>0)\n {\n return $this->getAt(0);\n }\n throw new \\OutOfBoundsException();\n }", "function first()\n{\n\t$this->rewind();\n\treturn $this->current();\n}", "public function array_first($array, callable $callback = null, $default = null)\n {\n return Arr::first($array, $callback, $default);\n }", "public function first()\n {\n try {\n return Optional::ofNullable($this->get(0));\n } catch (OutOfBoundsException $e) {\n return Optional::absent();\n }\n }", "protected function realiseFirstElement(): ?string\n {\n $safeKey = null;\n\n if (count($this->array) == 0) {\n if ($this->lazyTail->valid()) {\n $safeKey = $this->realiseCurrentPair();\n } else {\n $this->clearIndexIfAllKeysValid();\n }\n } elseif ($this->lazyTail->valid()) {\n $safeKey = array_keys($this->array)[0];\n }\n\n return $safeKey;\n }", "public function getFirst()\n\t{\t\treturn $this->first;\n\t}", "public function firstKey(): int|string|null\n {\n return array_key_first($this->data);\n }", "public function firstItem();", "public function first()\n {\n $this->rewind();\n return $this->current();\n }", "public function firstKey() {\n\t\t$keys = $this->keys();\n\t\treturn array_shift($keys);\n\t}", "public function getFirstItem()\n {\n if ($this->valid() === false) {\n return null;\n }\n return $this->rewind()->current();\n }", "public function getFirst ()\n {\n return end ( $this->_list ) ;\n }", "public function getFirst()\n\t{\n\t\treturn $this->first;\n\t}", "public function getFirst()\n {\n return 1;\n }", "public static function first($array, callable $callback, $default = null)\n {\n foreach ($array as $key => $value)\n {\n if (call_user_func($callback, $key, $value)) return $value;\n }\n\n return $default;\n }", "public function first(){\n\n //using the above (results) method here\n return $this->results()[0]; //depends on the version of your PHP server\n //return $this->results[0];\n }", "public function first()\r\n\t{\r\n\t\treturn reset($this->_items);\r\n\t}", "public function first()\n {\n return (count($this->list) > 0 ?\n $this->list[0] : null\n );\n }", "public function getFirstItem() {}", "public function getFirst()\n {\n return $this->first;\n }", "public function getFirst()\n {\n return $this->first;\n }", "public function getFirstItem() {}", "public function first()\n {\n return $this->results()[0];\n }", "public function firstValue()\n\t{\n\t\treturn $this->first()->value;\n\t}", "public function first()\n {\n return reset($this->_elements);\n }", "public function first()\n {\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function first()\n {\n foreach ($this->items as $currentItem) {\n return $currentItem;\n }\n }", "public function getFirst()\n {\n if (is_array($this->rows)) {\n $rows = &$this->rows;\n } else {\n $query = clone $this->query;\n $query->setLimit(1);\n $rows = $query->getResult();\n }\n\n return (isset($rows[0])) ? $rows[0] : null;\n }", "public function findFirst() {\r\n\t\t$aux = $this->fetchAllPg(1);\r\n\t\tif($aux == null)\r\n\t\t\treturn null;\r\n\t\treturn $aux[0];\r\n\t}", "public function first() {\n if (count($this->items) > 0) {\n return $this->items[0];\n }\n else\n return null;\n }" ]
[ "0.81598693", "0.8003739", "0.7990094", "0.7891045", "0.7811379", "0.77909565", "0.77603984", "0.7744126", "0.77000874", "0.7563306", "0.7431629", "0.74117345", "0.73975104", "0.7320833", "0.73013973", "0.7205051", "0.71997315", "0.7186234", "0.7171078", "0.7142157", "0.7131107", "0.712532", "0.7089253", "0.70187193", "0.69854265", "0.6970351", "0.69665504", "0.6928528", "0.6899931", "0.6881066", "0.6846967", "0.68340874", "0.6833195", "0.68118966", "0.6759219", "0.67321384", "0.67321384", "0.6717273", "0.66972613", "0.668376", "0.6676857", "0.66756034", "0.6666023", "0.6631718", "0.6620055", "0.6612939", "0.6612851", "0.66022587", "0.65976787", "0.65930843", "0.6588675", "0.6580262", "0.65781444", "0.6574689", "0.65716416", "0.65692794", "0.65559024", "0.6550311", "0.65401125", "0.65401125", "0.65401125", "0.65401125", "0.65401125", "0.65401125", "0.65401125", "0.65401125", "0.6528752", "0.6515771", "0.6514354", "0.6503536", "0.6491493", "0.6478077", "0.6478035", "0.6432462", "0.64250416", "0.6423947", "0.64206886", "0.6412641", "0.64024305", "0.6400969", "0.6395932", "0.63665926", "0.63648456", "0.6355466", "0.6346232", "0.63446647", "0.63407785", "0.63370335", "0.63334006", "0.6333004", "0.6333004", "0.63329065", "0.63259566", "0.6324508", "0.63206065", "0.6316318", "0.6315646", "0.62885636", "0.62866116", "0.62778914" ]
0.7061974
23
create and return a new view object
function view($file = '', $parameters = [], $mergeParameters = []) { return $file !== '' ? View::make($file, $parameters, $mergeParameters) : app('view'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createView();", "public function makeNew()\n\t{\n\t\treturn new static($this->view);\n\t}", "function view($name_view){\n return new View($name_view);\n}", "public function createView(){\n\t\t$vue = new View(\"Create\");\n\t\t$vue->generer();\n\t}", "public function create(): View\n {\n //\n }", "public function create()\n {\n return view($this->_config['view']);\n }", "function __construct()\r\n {\r\n $this->view = new View();\r\n }", "Public Static Function Instance($template = null){\r\n return new View($template);\r\n }", "function __construct()\n {\n $this->view = new View(); \n }", "function __construct()\n {\n $this->view = new View();\n }", "public function create()\n {\n return view($this->view());\n }", "function __construct(){\n $this->view=new View(); \n }", "protected function createView()\n {\n return new IndexView();\n }", "private function _View() {\n\t \n // $this->_View;\n\t\t\t//$View = ClassRegistry::getObject('');\n\t\treturn $this->_View;\n\t}", "protected function _view()\r\n\t\t{\r\n\t\t\t((!is_object($this->_view)) ? $this->_view = init_class(VIEW_NAME) : '');\r\n\t\t}", "public function create()\n {\n return view(parent::commonData($this->view_path.'.create'));\n }", "protected function getNewViewInstance() {\n return $this->objectManager->get('TYPO3\\\\CMS\\\\Fluid\\\\View\\\\StandaloneView');\n }", "public function __construct()\n {\n $this->view = new View($this);\n }", "static public function Make($path, $data=[]) {\n\t\treturn new View($path, $data);\n\t}", "public function getView()\n {\n if (!$this->view) {\n $viewClass = $this->viewClass;\n $this->view = new $viewClass();\n\n $this->initializeViewAdditions();\n }\n\n return $this->view;\n }", "public function __construct($view = null) {}", "public function create()\r\n {\r\n return view($this->edit_view);\r\n }", "public function getView() {}", "public function getView() {}", "public function makeView() {\n\t\treturn \n\t\t\t$this->getView()\n\t\t\t\t->with('option', $this);\n\t}", "function getView($view, $params = array()) {\n $view = \"app\\\\views\\\\\" . $view . \"View\";\n return new $view($params);\n }", "public function __construct(){\n //l'intensification de la classe view\n $this->view=new View();\n }", "public function create()\n {\n //return view()\n }", "function view($name, $place) {\n return new Project\\View($name, $place);\n}", "public function create()\n\t{\n\t\t//\n\t\treturn View::make('mockups.pelanggan');\n\t}", "private function _makeView($controller_name)\n\t{\n\t\t$view = $controller_name . 'View';\n\n\t\treturn new $view();\n\t}", "public function create()\n\t{\n\t\t//\n\t\treturn \\View::make('new');\n\t}", "abstract protected function getView();", "public static function make($view, $data = array())\n {\n return new static($view, $data);\n }", "function __construct() {\n// \t\t$this -> view = new View();\n \t}", "public function create()\n {\n $obj = new Obj();\n $this->authorize('create', $obj);\n\n return view('appl.'.$this->app.'.'.$this->module.'.createedit')\n ->with('stub','Create')\n ->with('obj',$obj)\n ->with('editor',true)\n ->with('datetimepicker',true)\n ->with('app',$this);\n }", "public function create()\n {\n //on that view we manipulate a token\n return view(\"trello.token\");\n }", "public function getView();", "function create () {\n\tinclude 'request-create-view.php';\n}", "public function getView()\n {\n }", "public function create()\n {\n $this->view_data['language'] = Language::translatable()->get(); \n return view($this->base_view_path.'add', $this->view_data);\n }", "protected function _initView()\n\t{\n\t\t$view = new App_View();\n\t\t$view->doctype('XHTML1_STRICT');\n\n\t\t$view->addHelperPath(APPLICATION_PATH . '/views/helpers');\n\t\t$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');\n\t\t$viewRenderer->setView($view);\n\n\t\t\n\t\treturn $view;\n\t}", "public function getView(){ }", "protected function createView() {\n return parent::createView()\n ->with('singleResultView', 'partials.test-result-single-textarea');\n }", "public function getView()\n\t{\n\t\tif(NULL === $this->_view) {\n\t\t\t$this->_view = agoractu_view::getInstance();\n\t\t}\n\t\treturn $this->_view;\n\t}", "public static function create(string $viewName, Request $request = null)\n {\n $view = new View();\n\n $view->setRequest($request);\n\n $view->setPath($view->getViewPath() . str_replace('.', DIRECTORY_SEPARATOR, $viewName));\n\n return $view;\n }", "public function create() \n {\n return view(\"$this->view.create\");\n }", "protected function makeViews()\n {\n new MakeView($this, $this->files);\n }", "public function make($view, $data = array());", "public function create()\n {\n return view($this->controller.'.create', $this->viewData);\n }", "public function createView($viewName, $definition, $schemaName){ }", "public function create()\n\t{\n\t\treturn View::make($this->createView, array(\n\t\t\t'model' => $this->decorator->getModel(),\n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'fields' => FieldMapper::getFields($this->decorator->getFields()),\n\t\t\t'method' => 'POST',\n\t\t\t'action' => get_class($this) . '@store',\n\t\t\t'listingAction' => get_class($this) . '@index'\n\t\t));\n\t}", "private function _setView()\n\t{\n\t\tif (preg_match('/^[a-z0-9_-]+$/', $this->_requestVars[1])) {\n\t\t\t$this->_view = $this->_requestVars[1];\n } else {\n \t$this->_view = $this->_requestVars[1] = self::DEFAULT_VIEW;\n }\n\n return $this;\n\t}", "public function testNewViewInstance()\n {\n $this->assertInstanceOf(CalculatorView::class, new CalculatorView(new CalculatorModel(), new JsonTemplate()));\n }", "protected function createView() {\n return Utils::view('partials/test-result')\n ->with(\"results\", $this->getResults())\n ->with(\"message\", $this->message);\n }", "protected function createView() {\n return Utils::view('partials/test-result')\n ->with(\"results\", $this->getResults())\n ->with(\"message\", $this->message);\n }", "public function create()\n {\n\t return view('crear-ug0299');\n }", "protected function createView()\n {\n LayoutModule::setLayoutClassName( PortalLayout::class );\n return new PortalView();\n }", "protected function resolveView() {\n\t\t$view = new $this->defaultViewObjectName();\n\t\t$view->setTemplatePathAndFilename('resource://TYPO3.TYPO3/Private/Templates/Error/Index.html');\n\t\t$view->setControllerContext($this->controllerContext);\n\t\treturn $view;\n\t}", "public function __construct()\n {\n $this->view = new Views('about');\n }", "public static function view($template = null) {\n\t\tinclude_once 'core/base_view.php';\n\n\t\t// Return a new view object\n\t\treturn new Base_View($template);\n\t}", "protected function _initView()\r\n {\r\n $view = new Zend_View();\r\n $view->doctype('XHTML1_STRICT');\r\n\r\n // Add it to the ViewRenderer\r\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');\r\n $viewRenderer->setView($view);\r\n\r\n $front = Zend_Controller_Front::getInstance();\r\n $router = $front->getRouter();\r\n $router->addRoute('products', new Zend_Controller_Router_Route('products/:slug', array('controller' => 'products', 'action' => 'details')));\r\n $router->addRoute('page', new Zend_Controller_Router_Route('page/:slug', array('controller' => 'page', 'action' => 'open')));\r\n\r\n return $view;\r\n }", "public function create() {\n return view($this->viewfolder . '.create', ['j' => $this->j]);\n }", "public function create()\n\t{\n return View::make('home');\n\t}", "public function create()\n {\n $routePrefix = $this->routePrefix;\n\n /* Parameters passed to view:\n $routePrefix as string\n */\n return view($this->viewPrefix.'.create', compact('routePrefix'));\n }", "public function view(): mixed;", "public function getViewFactory()\n {\n return $this->view;\n }", "function _custom_teasers_views_build_view($teaser_view = array()) {\n $teaser_view += custom_teasers_views_default_data();\n \n // Now we'll set up the basic starting structure.\n $view = new view;\n $view->name = $teaser_view['module'] .'_'. $teaser_view['name'];\n $view->description = \"Generated automatically by the {$teaser_view['module']} module.\";\n $view->base_table = 'node';\n $view->is_cacheable = FALSE;\n $view->api_version = 2;\n $view->disabled = FALSE;\n\n // Bootstrap the default display for the view. Here's where the action happens.\n $handler = $view->new_display('default', 'Defaults', 'default');\n\n _custom_teasers_views_add_fields($handler, $teaser_view);\n _custom_teasers_views_add_sort($handler, $teaser_view);\n _custom_teasers_views_add_filter($handler, $teaser_view);\n\n _custom_teasers_views_add_extras($view, $teaser_view);\n\n drupal_alter('teaser_view', $view, $teaser_view);\n\n // We will NOT save the view. Instead we're going to return it so others can\n // expose it as a default, save it to the DB, or whatever they'd like to do.\n return $view;\n}", "public function create()\n {\n $view = new View('verein_create');\n $view->title = 'Verein erfassen';\n $view->heading = 'Verein erfassen';\n $view->display();\n }", "public function __construct( View $view ) {\n\t\t$this->view = $view;\n\t}", "protected function initializeStandaloneViewInstance() {}", "protected function setView()\n {\n $view = 'Src\\Modules\\\\' . $this->module_name . '\\Views\\\\' . $this->class . 'View';\n $this->view = new $view;\n \n $this->view->setData( $this->model->getData() );\n \n $this->view->run();\n }", "public function create()\n {\n $this->authorize('superadmin-only');\n\n return parent::view(null, $this->repository->makeModel());\n }", "public function addView()\n {\n $nbViews = $this->getData('nb_views') + 1;\n $this->save(array(\n 'nb_views' => $nbViews,\n ));\n\n return $this;\n }", "protected function getView()\n {\n if( $this->view == null ) {\n $this->view = clone $this->getServiceLocator()->get('View');\n $this->view->setResponse(new Response());\n }\n return $this->view;\n }", "public static function view($view, array $data = array())\n {\n $view = View::make($view, $data);\n\n return new static($view);\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function create()\n\t{\n\t\treturn View::make(''.$this->common_name.'.create')->with('common_name',$this->common_name);\n\t}", "public function __construct()\r\n {\r\n $this->view = new stdClass;\r\n $this->view->placeHolder = $this->placeHolder;\r\n $this->view->settingOptionName = $this->settingOptionName;\r\n }", "protected function buildView()\n {\n $view = new FusionView();\n\n $httpRequest = Request::createFromEnvironment();\n $request = $httpRequest->createActionRequest();\n\n $uriBuilder = new UriBuilder();\n $uriBuilder->setRequest($request);\n\n $this->controllerContext = new ControllerContext(\n $request,\n new Response(),\n new Arguments([]),\n $uriBuilder\n );\n\n $view->setControllerContext($this->controllerContext);\n $view->disableFallbackView();\n $view->setPackageKey('Flowpack.Listable');\n $view->setFusionPathPattern(__DIR__ . '/Fixtures/');\n\n return $view;\n }", "public function createView($viewEngineDef = null, ?Closure $engineCallback = null, bool $withShareExtensions = true): ViewInterface;", "public function __construct($view = null) {\n \t parent::__construct();\n $this->view = $view;\n }", "public function create()\n {\n return view($this->veiw_base . '.create');\n }", "public function createView($file = null)\n {\n $view = new View($this->getTemplatePath() . '/app/views/');\n if ($file) {\n $view->setFile($file);\n }\n return $view;\n }", "public function create()\n {\n // Open the editor with an empty canvas\n return View::make('canvas.editor');\n }", "public function getView()\n {\n $view = App::$locator->view;\n if ($this->layout) {\n $view->setLayout($this->layout);\n }\n \n return $view;\n }", "public function create()\n {\n return view('izgled');\n }", "public function create(): object\n {\n if (!Bouncer::can('create', $this->model)) {\n abort(403);\n }\n $form = $this->form($this->form, [\n 'method' => 'POST',\n 'route' => [$this->routeWithModulePrefix . '.' . 'store']\n ]);\n\n $item = new $this->model;\n return $this->view($this->baseView . '.create', ['form' => $form, 'item' => $item]);\n }", "public static function make($view, $data = array(), $path = \\VIEW_PATH)\n\t{\n\t\treturn new static($view, $data, $path);\n\t}", "public function create(View $view)\n {\n if( Request::is('admin/user/*'))\n $runner = DB::table('tbl_registration')->where('RegistrationId', Request::route('id'))->first();\n else if ( Request::is('admin/employee/*') || Request::is('admin/owner/*'))\n $runner = DB::table('tbl_registration')->join('tbl_companies', 'tbl_companies.CompanyId', '=', 'tbl_registration.CompanyId')->where('RegistrationId', Request::route('id'))->first();\n else if( Request::is('admin/account')) {\n $runner = new \\stdClass;\n $runner->admin_id = Session::get('user_data')->admin_id;\n $runner->RegistrationName = Session::get('user_data')->admin_name;\n $runner->RegistrationEmail = Session::get('user_data')->admin_email;\n }\n $view->with('user_info', $runner);\n }", "public function view($view)\n {\n $this->view = $view;\n\n return $this;\n }", "public function viewCreate(){\n\n\t\t// Set logged in user to a variable.\n\n\t\t$authUser = Auth::user();\n\n\t\t// Return view with variables.\n\n\t\treturn view('tags.viewCreate')\n\t\t\t->with('authUser', $authUser);\n\n\t}", "public function create()\n {\n\n $title = 'Tạo mới đơn hàng!';\n\n return view($this->viewPath . __FUNCTION__, compact('title'));\n }", "protected function getView(){\n if(!$this->_view){\n $this->_view=new JView();\n }\n return $this->_view;\n }", "protected function view()\n {\n if (! $this->view) {\n $this->view = Mockery::mock(Factory::class);\n }\n\n return $this->view;\n }", "public function create()\n {\n return $this->response->view($this->getViewName('create'));\n }", "public function initializeView() {}", "public function initializeView() {}", "public function createView(FormView $parent = null);", "static function create_debug_view() {\n\t\tif(Director::is_cli() || Director::is_ajax()) return new CliDebugView();\n\t\telse return new DebugView();\n\t}", "public function classView()\n\t{\n\t\treturn new ClassView(10);\n\t}" ]
[ "0.8312718", "0.78242815", "0.7594237", "0.7483111", "0.7407571", "0.73987806", "0.7166859", "0.7142819", "0.71399647", "0.7131695", "0.70666873", "0.6991523", "0.69908655", "0.695502", "0.6945335", "0.69352496", "0.69260645", "0.687377", "0.6855885", "0.68550223", "0.67924553", "0.67792517", "0.67747444", "0.67747444", "0.67649764", "0.6741666", "0.67407626", "0.6714943", "0.6707911", "0.6649541", "0.66094035", "0.6603182", "0.6579568", "0.65735805", "0.6570631", "0.656641", "0.6550556", "0.65143466", "0.65121365", "0.6507956", "0.64930856", "0.6492499", "0.6484599", "0.6484098", "0.64626193", "0.6462284", "0.6443536", "0.64351934", "0.643419", "0.6429892", "0.64266086", "0.64233404", "0.6411862", "0.641012", "0.64077747", "0.64077747", "0.6398193", "0.63923717", "0.6385004", "0.63549894", "0.63405526", "0.6333376", "0.63332516", "0.63260305", "0.6322415", "0.63201547", "0.6315021", "0.62956893", "0.62933797", "0.62909627", "0.6288231", "0.6285425", "0.62736684", "0.62734944", "0.62679195", "0.6262769", "0.62529355", "0.6251759", "0.6249565", "0.62483245", "0.62351054", "0.6232332", "0.6226469", "0.62169874", "0.62164986", "0.6212562", "0.6211205", "0.62044644", "0.62042403", "0.61998296", "0.6196113", "0.6194444", "0.6185682", "0.6182674", "0.61730856", "0.6172273", "0.6167209", "0.6167209", "0.61621666", "0.6159436", "0.61548036" ]
0.0
-1
add a parameter to view bag
function assign($name = '', $value = '') { return View::with($name, $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setParamToView($key, $value);", "public function setParamToView($key, $value){\n\t\tView::setViewParam($key, $value);\n\t}", "function addExtraParameter($name) {\n\t\t$this->addParameter($name, Request::getParameter($name));\n\t}", "function addParameter($name, $value) {\n\t\t$this->link->addParameter($name, $value);\n\t}", "public function addToContext( string $key, $value, string $behavior ): View;", "public function addParam($name,$value)\n\t\t{\n\t\t\t$this->param[$name] = $value;\n\t\t}", "public function addParam($key, $value)\n {\n $this->_params[$key] = $value;\n }", "public function add($request_param, $name) \n {\n $this->filters[$request_param] = $name;\n }", "function onView($param)\n {\n // get the parameter and shows the message\n $key=$param['key'];\n \n new TMessage('info', \"Militar : $key\");\n }", "function addParam($name, $value) {\n if (!isset($this->params[$name])) {\n $this->setParam($name, $value);\n }\n else {\n $oldParam = $this->getParam($name);\n if (!is_array($oldParam)) {\n $oldParam = array($oldParam);\n }\n array_push($oldParam, $value);\n $this->setParam($name, $oldParam);\n }\n }", "protected function _injectTplVariable()\r\n {\r\n $oConfig = oxRegistry::getConfig();\r\n $sTplVariableName = $oConfig->getConfigParam('sTplVariable');\r\n if ($sTplVariableName) {\r\n $oConfig->getActiveView()->addTplParam($sTplVariableName, $this->getToxid());\r\n }\r\n }", "public function addVariable($tv);", "public function addParameter(string $name, $value): self;", "public function AddParam(Param $param){\r\n\t\t$this->params[] = $param;\r\n\t}", "public function addTplParam($sPara, $sValue)\n {\n $this->_aViewData[$sPara] = $sValue;\n }", "public function addAction() {\n \t$dataType = $this->getInput('dataType');\n \tif (!in_array($dataType,$this->DATATYPE)) {\n \t exit(\"参数错误\");\n \t}\n \t$this->assign('dataType', $dataType);\n $this->assign('dataTypes', $this->DATATYPE);\n }", "public function add ($elType, $param = NULL, $place = 'head');", "public function thisIsAnExample() {\n\t\t$this->model->getRequest()->params['pow'] = 'hello from IndexListener';\n\t}", "public static function parameter(string $key, $value): void\n {\n if (!static::hasNewRelic()) {\n return;\n }\n\n if (!is_scalar($value)) {\n $value = json_encode($value);\n }\n\n newrelic_add_custom_parameter($key, $value);\n }", "public function addServiceExtensionParameter($keyword, $value = null)\n\t{\n\t\t$this->_extparams[$keyword] = $value;\n\t}", "function addPrivateParam($name, $value) {\n\t\t$this->privateParams[$name] = $value;\n\t}", "function setParameter($key, $value) {\n $this->parameters[$key] = $value;\n }", "public function AddParameter($value)\n {\n throw new \\ErrorException('Parameters not suppered for groups. It is only for single directives.');\n }", "public function addAction() {\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "public function addBaggageItem($key, $value)\n {\n $this->context = $this->context->withBaggageItem($key, $value);\n }", "public function addVariable($name, $value);", "function add($request){\r\n return $this->view();\r\n }", "function add_template_param( &$attr_custom, $params, $node ){\n global $FUNCS, $CTX;\n\n $attr = $FUNCS->get_named_vars(\n array(\n 'routable'=>'0',\n ),\n $params\n );\n extract( $attr );\n\n $attr['routable'] = ( $routable==1 ) ? 1 : 0;\n\n // merge with existing custom params\n $attr_custom = array_merge( $attr_custom, $attr );\n\n // if template is routable, prepare ground for cms:route tags that may be present\n if( $routable ){\n $routes = array();\n $CTX->set_object( '_tpl_routes', $routes, 'global' );\n }\n\n }", "public function add_ip_binding($param){\n $input = array(\n 'command' => '/ip/hotspot/ip-binding/add'\n );\n $out = array_merge($input, $param);\n return $this->query($out);\n }", "public function addParam ($key, $value) {\n\t\t$this->params->setParam($key, $value);\n\t\treturn $this;\n\t}", "public function add($param)\n {\n $sentence = new SentenceUtil();\n $sentence->addCommand('/ip/hotspot/add');\n foreach ($param as $name => $value) {\n $sentence->setAttribute($name, $value);\n }\n $this->talker->send($sentence);\n\n return 'Sucsess';\n }", "public function add() {\n parent::add();\n \n if(!$this->request->is('restful')) {\n $this->set('title_for_layout', _txt('op.add-a', array($this->viewVars['vv_authenticator']['Authenticator']['description'])));\n }\n }", "protected function add_parameter($name, $details)\n\t{\n\t\t$this->P->add_parameter($name, $details);\n\t}", "function setParam($name, $value) {\n $this->params[$name] = $value;\n }", "public function addAction()\n {\n $this->templatelang->load($this->_controller.'.'.$this->_action);\n\n // Rendering view page\n $this->_view();\n }", "public function addToBodyParams(string $k,$v){\n\t\treturn $this->getBodyParams()->$k = $v;\t\t\n\t}", "public function setParam($key, $value);", "function AddArgument($key, $value)\r\n\t{\r\n\t\t$this->Argument[$key]=$value;\r\n\t}", "function addView ($view_key, &$view) {\n\t\t$this->_views[$view_key] =& $view;\n\t}", "public function addAction() {\n $configid = $this->getInput('id');\n $customAnimationEffect = Common::getConfig('deliveryConfig','customAnimationEffect');\n if($configid){\n \t$configInfo = Advertiser_Service_AdAppkeyConfigModel::getConfig($configid);\n \t$this->assign('config', $configInfo);\n }\n \t$this->assign('customAnimationEffect', $customAnimationEffect);\n }", "public function putParam($key, $value)\n {\n $this->params[$key] = $value;\n }", "public function add()\n {\n //renderView('add');\n }", "public function addAction() {\n\t\t$this->_forward('edit', null, null, array('id' => 0, 'model' => $this->_getParam('model')));\n\t}", "public function addUrlParameter($key, $value)\n {\n $this->urlParameters[$key] = $value;\n }", "public function addMoreInfo($param, $value)\n {\n $this->params[$param] = $value;\n\n return $this;\n }", "public function with(Template\\Parameter $parameter)\n {\n $this->parameters[$parameter->getKey()] = $parameter;\n }", "public function addParam($name, $value){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}", "function setParam($var, $val) {\n\t\t\t$this->obj[$var] = $val;\n\t\t}", "function set_parameter($name, $value)\r\n {\r\n //dump(get_class($this) . ' | ' . $name);\r\n $this->parameters[$name] = $value;\r\n }", "public function addRouteParameter($name, ProviderInterface $routeParameter)\n {\n $this->routeParameters[$name] = $routeParameter;\n }", "public function addParam($param, $value){\n\t\t\tif(is_string($param)){\n\t\t\t\t$this->parameters[$param] = $value;\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "public function store( RequestInterface $request, $view );", "public function __set($var, $val) {\n\t\t$this->view_variables[$var] = $val;\n\t}", "function add_param($link, $param_name, $value) {\n\t$newlink = \"\";\n\t//verifica se ja existe ?\n\tif(stripos($link,\"?\")) {\n\t\t$newlink = $link.\"&\".$param_name.\"=\".$value;\n\t} else {\n\t\t$newlink = $link.\"?\".$param_name.\"=\".$value;\n\t}\n\treturn $newlink;\n}", "public function add()\n\t{\n\t\tPhpfox::getComponent('language.admincp.phrase.add', array('sReturnUrl' => $this->get('return'), 'sVar' => $this->get('phrase'), 'bNoJsValidation' => true), 'controller');\n\t}", "public function addBodyParameter($key, $value)\n {\n $this->bodyParams[$key] = $value;\n }", "public function xadd() {\n\t\t$args = $this->getAllArguments ();\n\t\tif ($args ['view'] == 'forms') {\n\t\t\t$this->_redirect ( '_newForm' );\n\t\t} elseif ($args ['view'] == 'fields') {\n\t\t\t$this->_redirect ( '_newField' );\n\t\t} elseif ($args ['view'] == 'actions') {\n\t\t\t$this->_redirect ( '_newAction' );\n\t\t} else {\n\t\t\tparent::xadd ();\n\t\t}\n\t}", "public function addAction() {\n $this->assign('ad_ptypes', $this->ad_ptypes);\n }", "public function addParam (string $key, $value)\n {\n if (!$this->paramExists($key))\n $this->params[$key] = $value;\n\n $this->save();\n\n return $this;\n }", "public function action($parameter);", "function addParam($par)\n\t{\n\t\tif(is_object($par) && is_a($par, 'jmap_xmlrpcval'))\n\t\t{\n\t\t\t$this->params[]=$par;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function addAction()\n {\n return $this->render('OCPlatformBundle:Default:index.html.twig', ['value' => 0]);\n }", "public function addQuerystringParameter($key, $value)\n {\n $this->querystringParams[$key] = $value;\n }", "protected function inject_custom_parameters()\n\t{\n\t\tforeach ($this->custom_parameters as $key => $value)\n\t\t{\n\t\t\t$this->container->setParameter($key, $value);\n\t\t}\n\t}", "public function addParam($param, $raw = true)\n {\n if ($param instanceof PMA_Message) {\n $this->_params[] = $param;\n } elseif ($raw) {\n $this->_params[] = htmlspecialchars($param);\n } else {\n $this->_params[] = PMA_Message::notice($param);\n }\n }", "public function get_add()\n { \n // Render the page\n View::make($this->bundle . '::product.add')->render();\n }", "public function __set($var, $value) { $this->{$this->_parameterMap[$var]} = $value; }", "public function __set($var, $value) { $this->{$this->_parameterMap[$var]} = $value; }", "public function addViewState( $key, $value = null )\n {\n $this->page->$key = $value;\n $this->viewState[ $key ] = null;\n $this->viewState[ $key ] =& $this->page->$key;\n }", "public function addTransactionParam($name, $value)\n {\n newrelic_add_custom_parameter($name, $value);\n }", "abstract protected function setParameter($key, $value);", "public function setParam($key, $value)\r\n {\r\n $this->_frontController->setParam($key, $value);\r\n }", "public function setParam($name, $value){\n\t\t$this->params[(string)$name] = $value;\n\t}", "function cggm_set_var($params, &$smarty)\n{\n $map = '';\n $mod = cms_utils::get_module('CGGoogleMaps');\n if( isset($params['map']) ) {\n $map = $params['map'];\n unset($params['map']);\n }\n else {\n $map = $mod->GetPreference('default_map',0);\n }\n\n foreach( $params as $key => $value ) {\n $mod->add_attr($map,$key,$value);\n }\n}", "function set($name, $value){\n if($this->_HTML AND $this->_HTML_load_view) $this->_template->set($name, $value);\n elseif($this->_JSON){\n if($name == null){\n array_push($this->_JSON_contents, $value);\n }else{\n $this->_JSON_contents[$name] = $value;\n }\n }\n }", "public function addAction() {\r\n \t$this->checkRight();\r\n \t$gid = $this->getInput('gid');\r\n \t$title = \"添加收货人地址\";\r\n \t$this->assign('title', $title);\r\n \t$this->assign('gid', $gid);\r\n }", "public function setParameter($param, $value)\n {\n $this->params[$param] = $value;\n }", "public abstract function setParameter($parameter);", "public function getParamsToView();", "public function param($id, $value)\n\t{\n\t\t$this->params[$id] = $value;\n\t}", "public function set_param($key, $value)\n {\n }", "public function add($name, $value = null)\n {\n $noName = false;\n if (null === $name) {\n $name = Parameter::guessParameterNameByValue($value);\n $noName = true;\n }\n\n if (isset($this->parameters[strtoupper($name)])) {\n $this->parameters[strtoupper($name)]->addValue($value);\n } else {\n $param = new Parameter($this->root, $name, $value);\n $param->noName = $noName;\n $this->parameters[$param->name] = $param;\n }\n }", "public function set($key,$value=null){\n if(is_array($key)){\n $this->vars += $key;\n }else{\n $this->vars[$key]=$value;\n }\n }", "public function setParam($key, $val) {\n $this->params[$key] = $val;\n }", "public function setParam($name, $value);", "protected function addFormObjectToViewHelperVariableContainer() {}", "public function getViewParams($params = []);", "public function addAction() {\n\t\tlist(, $groups) = Resource_Service_Pgroup::getAllPgroup();\n\t\t$this->assign('groups', $groups);\n\t\t$this->assign('ntype', $this->ntype);\n\t\t$this->assign('btype', $this->btype);\n\t}", "function storeParameters()\n {\n }", "public function addParameter(string $parameterName, $parameterValue): void\n {\n $this->parameters[$parameterName] = $parameterValue;\n }", "public function panierAdd() : void\n {\n if(!$this->userSession->isAuthenticatedUser()){\n redirect(\"index.php?action=user&action2=loginForm\");\n }\n \n $this->panierModel->addPanier((int) $_GET['id']);\n require_once 'www/templates/panier/PanierView.phtml';\n }", "private function regParam($param) {\n array_unshift($this->getRegistredParams(), $param); //reg param\n \n //exclude param from array if in it\n $req_array = $this->getRequiredParams();\n\n if (in_array(strtolower($param), $req_array))\n {\n $srchd_key = array_search(strtolower($param), $req_array);\n unset($this->requiredParams[$srchd_key]);\n }\n }", "public function add_argument ($key, $value)\n {\n $this->_args [$key] = $value;\n }", "public function AddVar($key, $var)\n {\n $this->aTemplateData[$key] = $var;\n }", "public function add(){\n $outData['script']= CONTROLLER_NAME.\"/add\";\n $this->assign('output',$outData);\n $this->display();\n }", "public function setParam($param, $value);", "function param($name)\n{\n return Yii::app()->params[$name];\n}", "function set_get_parameter($param, $value) {\n\n $get_value = \\M\\Config::get('GET');\n $get_value[$param] = $value;\n\n \\M\\Config::set('GET', $get_value);\n}", "public function addParam($value, $type = null) {\n\t\tif (is_null($type)) {\n\t\t\t$type = $this->_typecast($value);\n\t\t}\n\t\tif (is_array($value)) {\n\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t$t = $this->_typecast($v);\n\t\t\t\t$value[$k] = array('value' => $v, 'type' => $t);\n\t\t\t}\n\t\t}\n\t\t$this->_data[] = array('type' => $type, 'value' => $value);\n\t}", "function build(&$view) {\n $view->build_info['drupalcons_request'] = $this->request;\n\n // Adding arguments to the request.\n if (isset($view->query->request_arguments)) {\n foreach ($view->query->request_arguments as $arg_key => $arg_value) {\n $view->build_info['drupalcons_request']->addArgument($arg_key, $arg_value);\n }\n }\n }", "public function setParameter($name, $value);" ]
[ "0.6673741", "0.6226563", "0.61348355", "0.6077619", "0.60666555", "0.602137", "0.6005444", "0.59983975", "0.594663", "0.58954656", "0.5856598", "0.5808698", "0.5673977", "0.5644863", "0.55754507", "0.55315346", "0.5496296", "0.5477798", "0.54398763", "0.5436183", "0.5412803", "0.54061604", "0.53866893", "0.53832525", "0.53799427", "0.5367593", "0.5356084", "0.53541535", "0.53537923", "0.5352413", "0.535016", "0.53187627", "0.5310604", "0.52877504", "0.527732", "0.527594", "0.52700084", "0.52552706", "0.524705", "0.5238772", "0.5238509", "0.5224135", "0.51990783", "0.51906455", "0.5188656", "0.5178878", "0.51659137", "0.5162582", "0.5160017", "0.5158927", "0.51537675", "0.5151483", "0.5149805", "0.5145468", "0.51145095", "0.511168", "0.5109457", "0.51059914", "0.5101158", "0.5099297", "0.5094122", "0.5085041", "0.50847566", "0.50797576", "0.5079716", "0.5078201", "0.5076546", "0.5076546", "0.5073501", "0.5071724", "0.5060419", "0.50583845", "0.5052515", "0.5044159", "0.50416106", "0.5039027", "0.5038643", "0.5036087", "0.5034267", "0.50296104", "0.50283533", "0.5025583", "0.5009163", "0.5008851", "0.5008622", "0.50080574", "0.50075763", "0.50069517", "0.4998569", "0.49973044", "0.49964055", "0.49936602", "0.49886248", "0.4987275", "0.49868107", "0.49783778", "0.49714312", "0.49713388", "0.49666023", "0.4966247", "0.49611208" ]
0.0
-1
work with config files
function config($name = '', $set = null) { if ('' === $name) { return App::make('config'); } return null === $set ? Config::get($name) : Config::set($name, $set); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function loadConfig();", "public abstract function loadConfig($fileName);", "function processConfiguration() ;", "function loadConfig(){\n $file = file_get_contents($this->config_dir, FILE_USE_INCLUDE_PATH);\n $urls = json_decode($file,TRUE);\n //not the best way but error handling\n if ($file == NULL || $urls == NUll ){\n print(\"Error reading the config file or it it is empty\");\n }\n else{\n $this->config_data = $urls;\n\n }\n }", "function parseConfig() {\n\n\t\t// Make sure our config file exists\n\t\tif(!file_exists(CONFIGPATH . $this->_options['configFile'])) {\n\t\t\tdie('Unable to find <b>'. CONFIGPATH . $this->_options['configFile'] .'</b> file, please check your application configuration');\n\t\t}\n\n\t\t// Switch the file extension\n\t\tswitch(PPI_Helper::getFileExtension($this->_options['configFile'])) {\n\t\t\tcase 'ini':\n\t\t\t\treturn new PPI_Config_Ini(parse_ini_file(CONFIGPATH . $this->_options['configFile'], true, INI_SCANNER_RAW), $this->_options['configBlock']);\n\n\t\t\tcase 'xml':\n\t\t\t\tdie('Trying to load a xml config file but no parser yet created.');\n\t\t\t\tbreak;\n\n\t\t\tcase 'php':\n\t\t\t\tdie('Trying to load a php config file but no parser yet created.');\n\t\t\t\tbreak;\n\n\t\t}\n\t}", "private function setUpConfig() {\n\n //Get the file where the configs are and process the arrays\n require($this->_data['pathtodata']);\n\n $this->_data = array_merge($this->_data,$acs_confdata);\n\n if (empty($this->_data['indexfile']))\n $this->_data['indexfile'] = 'index';\n\n if (empty($this->_data['common_extension']))\n $this->_data['common_extension'] = COMMON_EXTENSION;\n \n $this->setUriData($this->_data); \n \n //Create the cache file of the config\n if (isset($this->_data['cache_config']) && $this->_data['cache_config'])\n $this->saveConfig();\n else\n if (file_exists($this->_data['cache_config_file']))\n unlink($this->_data['cache_config_file']); \n }", "public function readConfig() {\n if ( file_exists( $this->path . '/config/config.php' ) ) {\n require_once $this->path . '/config/config.php';\n }\n }", "private function read_config() {\n\t\t$sections = parse_ini_file($this->config['conf'], true);\n\t\tforeach ($sections as $sectionk => $sectionv) {\n\t\t\tforeach ($sectionv as $key => $var)\n\t\t\t\t$this->config[$sectionk . '.' . $key] = $var;\n\t\t}\n\t}", "protected function setConfigurations()\n {\n if ($files = $this->getFiles('config'))\n {\n foreach ($files as $key => $filename)\n {\n $this->config->set(basename($filename, '.php'), require path('config').DIRECTORY_SEPARATOR.($filename));\n }\n }\n }", "private function loadConfig()\n {\n\n $this->config = include(__DIR__ . '/../../config/config.php');\n\n }", "public static function config();", "function config_load() {\n\t\t$config_camera = '/^\\s*([^:]+)\\s*:\\s*([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})\\s+(\\d+)\\s*x\\s*(\\d+)\\s*$/iu';\n\t\t$config_gate = '/^\\s*(.+)\\s*\\((\\d+)\\s*,\\s*(\\d+)\\)\\s*\\((\\d+),(\\d+)\\)\\s*$/u';\n\n\t\t$data = file(CONFIG_PATH);\n\t\tif ($data === NULL) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$config = array();\n\n\t\t$status = 0;\n\t\tfor ($n=0; $n<sizeof($data); $n++) {\n\t\t\t$str = $data[$n];\n\t\t\n\t\t\tif (preg_match($config_camera, $str, $matches)) {\n\t\t\t\t$name = trim($matches[1]);\n\t\t\t\t$hw_id = $matches[2].$matches[3].$matches[4].$matches[5].$matches[6].$matches[7];\n\t\t\t\t$width = $matches[8];\n\t\t\t\t$height= $matches[9];\n\n\t\t\t\t$gates = array();\n\t\t\t\tarray_push($config, \n\t\t\t\t\t\t array(\"hw\" => $hw_id, \n\t\t\t\t\t\t \"name\" => $name, \n\t\t\t\t\t\t\t\t \"gates\" => &$gates,\n\t\t\t\t\t\t\t\t \"width\" => $width,\n\t\t\t\t\t\t\t\t \"height\"=> $height));\n\t\t\t\t$status = 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($status == 1 && preg_match($config_gate, $str, $matches)) {\n\t\t\t\tarray_push($gates, array(\"name\"=>trim($matches[1]),\n\t\t\t\t\t\t\t\t\t\t \"x1\" =>$matches[2],\n\t\t\t\t\t\t\t\t\t\t \"y1\" =>$matches[3],\n\t\t\t\t\t\t\t\t\t\t \"x2\" =>$matches[4],\n\t\t\t\t\t\t\t\t\t\t \"y2\" =>$matches[5]));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\treturn $config;\n\t}", "private function LoadConfigFile(){\n $a = file_get_contents($this->RootDIR . 'config/main.json');\n $this->Config = json_decode($a, true);\n }", "function __loadConfig($plugin,$file) {\n // still support config values of v2.3 elements\n if (count(explode('.', $file)) > 0) {\n $file = str_replace('.', '_', $file);\n }\n \n // load config from app config folder\n if (Configure::load($file) === false) {\n // load config from plugin config folder\n if( $plugin ){\n\t if (Configure::load($plugin.'.'.$file) === false) {\n\t echo '<p>Error: The '.$file.'.php could not be found in your app/config or app/plugins/comment/config folder. Please create it from the default comment/config/default.php.</p>';\n\t }\n\t }else\n\t {\n\t if (Configure::load($file) === false) {\n\t echo '<p>Error: The '.$file.'.php could not be found in your app/config or app/plugins/comment/config folder. Please create it from the default comment/config/default.php.</p>';\n\t }\t \n\t }\n }\n }", "static function loadConfig() {\n\t\t$config = self::file($_SERVER[\"DOCUMENT_ROOT\"] . \"/../config.json\");\n\t\tif (!is_null($config))\n\t\t\tself::$config = json_decode($config);\n\t}", "private function loadConfig()\n {\n $files = scandir($this->configPath());\n $configs = [];\n\n foreach ($files as $file) {\n $filePath = $this->configPath() . DIRECTORY_SEPARATOR . $file;\n\n if (is_file($filePath)) {\n $config = [basename($file, '.php') => include $filePath];\n if (is_array($config)) {\n $configs = array_merge($configs, $config);\n }\n }\n }\n\n $this->config = $configs;\n }", "public function initConfig() {\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t\\app::$config = array_merge(\\app::$config, $config);\r\n }", "private static function getConfig() {\n\n\t\t$pathRoot = $_SERVER['DOCUMENT_ROOT'].substr($_SERVER['PHP_SELF'],0, strpos($_SERVER['PHP_SELF'],\"/\",1)).\"/config/\";\n\n\t\t$jsonConfig = file_get_contents($pathRoot.'config.json');\n\t\tself::$arrayConfig = json_decode($jsonConfig);\n\t}", "private function parseConfig(){\n\t\t\treturn parse_ini_file(BASE_PATH . 'config' . DIRECTORY_SEPARATOR . 'config.ini');\n\t\t}", "abstract protected function configs(): array;", "abstract protected function getConfig();", "private function setupPHPConfigFiles()\n {\n foreach( glob('app/etc/*.php') as $file )\n {\n $key = str_replace('.php', null, basename($file));\n $data = include $file;\n \n $this->config->add($key, $data);\n }\n }", "private function loadConfigFiles()\n { if (!$this->configFiles) {\n $this->configFiles[] = 'config.neon';\n }\n\n foreach ($this->configFiles as $file) {\n $this->configurator->addConfig($this->paths->getConfigDir().'/'.$file);\n }\n }", "abstract public function loadConfig(array $config);", "abstract protected function loadConfig(array $config);", "function config_parser($path)\n{\n $conffile = fopen($path, 'r');\n $config = fread($conffile, filesize($path));\n\n $parsed_config = array();\n $parsed_config['head'] = array();\n $parsed_config['body'] = \"\";\n\n// split into head and body sections\n $lines = explode(\"\\n\", $config);\n\n $head = $body = array();\n $mode = 0;\n\n foreach($lines as $line)\n {\n if(preg_match(\"/--body--/i\", $line) and $mode == 0)\n $mode = 1;\n else {\n if($mode == 0) array_push($head, $line);\n else array_push($body, $line);\n }\n }\n\n// Parse key-value pares\n foreach($head as $line)\n {\n $result = explode(':', $line);\n\n $key = array_shift($result);\n $value = \"\";\n\n $id = 0;\n foreach($result as $item) {\n if($id > 0) $value .= \":$item\";\n else $value .= trim($item);\n\n $id ++;\n }\n\n if($key != \"\") {\n $parsed_config['head'] = array_merge(\n $parsed_config['head'], array(strtolower($key) => $value));\n }\n }\n\n// Re join body\n $body_txt = \"\";\n\n foreach($body as $line)\n $body_txt .= \"$line\\n\";\n\n $parsed_config['body'] = trim($body_txt);\n\n return $parsed_config;\n}", "abstract protected function getConfigPath();", "static function set_config() {\n\t\tif ( file_exists( self::childpath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::childpath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'wpgrade-config' . EXT;\n\t\t}\n\t}", "public function getConfigFilePath();", "public function getConfigFile();", "protected static function loadSingleExtLocalconfFiles() {}", "abstract public function getConfig();", "private function runConfig()\n {\n $configs = [\n [\n 'name' => 'sub_title',\n 'alias_name' => 'SubTitle',\n 'value' => 'SubTitle',\n ],\n [\n 'name' => 'title',\n 'alias_name' => 'Title',\n 'value' => 'Title',\n ],\n ];\n\n foreach ($configs as $config) {\n factory(Config::class)->create($config);\n }\n }", "function load_configs($file, $is_global = true)\n{\n\n if (substr($file, -5) != '.json') {\n throw new Exception('Invalid config file found in configs folder.');\n }\n\n $fname = strtolower(substr(basename($file), 0, - (strlen('.json'))));\n\n $GLOBALS[\"__CONFIG__{$fname}__\"] = json_decode(file_get_contents($file), true);\n}", "private function readConfig(){\n\n\t\t$this->_ini_array = parse_ini_file(CONFIG.'system.ini');\n\n\t\t$this->_host =\t$this->_ini_array['db_host'];\n\t\t$this->_username = $this->_ini_array['db_username'];\n\t\t$this->_password = $this->_ini_array['db_password'];\n\t\t$this->_database = $this->_ini_array['db_database'];\n\t\n\t\t$this->_log_enabled=$this->_ini_array['log_enabled'];\n\t\t$this->_log_level=$this->_ini_array['log_level'];\n\t\t$this->_log_file_path=$this->_ini_array['log_path'];\n\t\n\n\t\t$this->_lang_default=$this->_ini_array['lang_default'];\n\n\t}", "public function readConfigFile(): void\n {\n $configPath = __DIR__ . '/../../.config';\n if (!file_exists($configPath)) {\n echo \"Could not find .config\\n\";\n die;\n }\n $lines = preg_split('/[\\r\\n]+/', file_get_contents($configPath));\n foreach ($lines as $line) {\n if (empty($line)) {\n continue;\n }\n if (substr($line, 0, 1) == '#') {\n continue;\n }\n $kv = preg_split(\"/=/\", $line);\n $key = $kv[0];\n $value = $kv[1];\n $this->data[$key] = $value;\n }\n }", "abstract protected function defineConfiguration();", "public function processConfiguration() {}", "function load_config() {\n\t\t$conf_file = @file_get_contents( LDAP_LOGIN_PATH.'data.dat' );\n\t\tif ($conf_file!==false)\n\t\t{\n\t\t\t$this->config = unserialize($conf_file);\n\t\t}\n\t}", "public function config_path();", "public static function loadConfig($configFile) {\n\t}", "public function testConfigFromSingleFile()\n {\n $cfg = new Configuration();\n $cfg->setBaseDirectories($this->dirs);\n $config = $cfg->load(\"view\");\n\n $this->assertInternalType(\"array\", $config);\n $this->assertArrayHasKey(\"file\", $config);\n $this->assertArrayHasKey(\"config\", $config);\n $this->assertArrayNotHasKey(\"items\", $config);\n $this->assertContains(\"a view\", $config[\"config\"]);\n }", "public function loadConfig($data);", "private function loadConfig() {\n $config = array();\n\n $this->config = $config;\n if (file_exists(__DIR__ . '/../config.php')) {\n require_once(__DIR__. '/../config.php');\n $this->config = array_merge($this->config, $config);\n //TODO check for required config entries\n } else {\n //TODO handle this nicer\n $this->fatalErr('NO_CFG', 'Unable to load config file');\n }\n\n if (array_key_exists('THEME', $this->config)) {\n $this->pageLoader->setTheme($this->config['THEME']);\n }\n }", "function getConfiguration() ;", "function load_config($path) {\n \n // Check path\n if(file_exists($path) == false) {\n throw new Exception(\"Unable to load configuration -- file not found: $path\");\n }\n \n // Check file\n if(is_file($path) == false) {\n throw new Exception(\"Unable to load configuration -- not a file: $path\");\n }\n \n // Check permissions\n if(is_readable($path) == false) {\n throw new Exception(\"Unable to load configuration -- access denied: $path\");\n }\n \n // Check size \n if(filesize($path) == 0) {\n throw new Exception(\"Unable to load configuration -- file is empty: $path\");\n }\n \n // Load parser\n require_once(YAML_PARSER);\n \n // Load config\n $config = Spyc::YAMLLoad($path);\n \n // Check result - if empty, throw an exception\n if(sizeof($config) == 0) {\n throw new Exception(\"Unable to load configuration -- parse error: $path\");\n }\n \n // General application options\n if(isset($config['info']['name'])) { $this->set_name($config['info']['name']); }\n if(isset($config['info']['admin email'])) { $this->set_admin_email($config['info']['admin email']); }\n if(isset($config['info']['admin name'])) { $this->set_admin_name($config['info']['admin name']); }\n if(isset($config['info']['base url'])) { $this->set_base_url($config['info']['base url']); }\n if(isset($config['info']['base directory'])) { $this->set_base_dir($config['info']['base directory']); }\n \n // Database\n if(isset($config['database']['name'])) { \n \n // Initialize db object\n $this->db = new StanfordDatabase();\n \n // Credentials\n if(isset($config['database']['name'])) { $this->db->set_database($config['database']['name']); }\n if(isset($config['database']['username'])) { $this->db->set_username($config['database']['username']); }\n if(isset($config['database']['password'])) { $this->db->set_password($config['database']['password']); }\n \n // Encryption\n if(isset($config['database']['use encryption'])) { $this->db->use_encryption($config['database']['use encryption']); }\n else { $this->db->use_encryption(false); }\n\n }\n \n // Use mysql sessions set to true\n if(isset($config['database']['use mysql sessions']) && $config['database']['use mysql sessions'] == true ) {\n \n // Check DB\n if($this->db instanceof StanfordDatabase) {\n \n // Enable MySQL sessions\n $this->db->setup_mysql_sessions();\n \n }\n else {\n \n // DB not configured\n throw new Exception(\"Cannot enable MySQL-based sessions -- database credentials not provided\"); \n \n }\n }\n \n // Logging\n if(isset($config['settings']['logging mode'])) {\n $this->util->set_error_reporting($config['settings']['logging mode']);\n }\n \n // Undo magic quotes\n if(isset($config['settings']['undo magic quotes']) && $config['settings']['undo magic quotes'] == true) {\n $this->util->undo_magic_quotes();\n }\n }", "public function setupConfig()\n {\n registry::getInstance()->set('config', $this->parseConfig());\n }", "protected function loadConfigsForRegister(): void\n {\n $shipConfigs = $this->getConfigsFromShip();\n $containersConfigs = $this->getConfigsFromContainers();\n\n $configs = array_merge($shipConfigs, $containersConfigs);\n\n foreach ($configs as $file){\n $filename = pathinfo($file, PATHINFO_FILENAME);\n $this->mergeConfigFrom($file, $filename);\n }\n }", "protected function loadConfig() {\n $json = new JSON();\n $viewConfig = $json->readFile(__SITE_PATH . \"\\\\config\\\\view.json\");\n $this->meta_info = $viewConfig['meta'];\n $this->js_files = $viewConfig['javascript'];\n $this->css_files = $viewConfig['css'];\n }", "function read_config($file = false)\n{\n global $config, $databases;\n $ret = false;\n if (!$file) {\n $file = $config['config_file'];\n }\n // protect from including external files\n $search = array(':', 'http', 'ftp', ' ');\n $replace = array('', '', '', '');\n $file = str_replace($search, $replace, $file);\n\n if (is_readable($config['paths']['config'] . $file . '.php')) {\n // to prevent modern server from caching the new configuration we need to evaluate it this way\n clearstatcache();\n $f = implode('', file($config['paths']['config'] . $file . '.php'));\n $f = str_replace('<?php', '', $f);\n $f = str_replace('?>', '', $f);\n eval($f);\n $config['config_file'] = $file;\n $_SESSION['config_file'] = $config['config_file'];\n $ret = true;\n }\n\n return $ret;\n}", "function __construct() {\n if (!file_exists($this->configuration_file_path)) {\n \n die(\"FATAL: Missing \" . $this->configuration_file_path . `pwd` );\n \n }\n \n $raw_contents = file_get_contents($this->configuration_file_path);\n\n\n //parse json object\n try {\n\n $this->Config = json_decode( $raw_contents );\n\n } catch (Exception $e) {\n\n die(\"FATAL: Bad configuration file? \");\n\n }\n \n\n }", "function conf($path){\n\t$path=trim($path,'.');\n\tif(strlen($path)==0){\n\t\tthrow new exception(\"Illage config para\");\n\t}\n\tstatic $allconfig=array();\n\t$arrpath=explode('.',$path);\n\t//get config file name($cfn)\n\t$cfn=array_shift($arrpath);\n\n\tif(!array_key_exists($cfn,$allconfig)){\n\t\t//it seems that this config file has not been loaded\n\t\t$conffilepath='application/config/'.$cfn.'.php';\n\t\tif(is_readable($conffilepath)){\n\t\t\t//get include file\n\t\t\t$allconfig[$cfn]=include $conffilepath;\n\t\t\t$arrret=$allconfig[$cfn];\n\t\t}\n\t\telse{\n\t\t\tthrow new exception('config file include error');\n\t\t}\n\t}\n\telse{\n\t\t//it looks that this config file has been loaded already\n\t\t$arrret=$allconfig[$cfn];\n\t}\n\t//step into to get config array\n\tforeach($arrpath as $k => $v)\n\t{\n\t\tif(array_key_exists($v,$arrret)){\n\t\t\t$arrret=$arrret[$v];\n\t\t}\n\t\telse{\n\t\t\tthrow new exception('key '.$v.' doesnot exist ');\n\t\t}\n\t}\n\n\treturn $arrret;\n\n}", "private function loadHookConfig() {\r\n if (!is_readable(self::CONFIG_FILE)) {\r\n throw new \\Slackbot\\Exception\\ConfigException('Missing config file ' . self::CONFIG_FILE);\r\n }\r\n \r\n $config = parse_ini_file(self::CONFIG_FILE, true);\r\n\t\tforeach ($config as $sectionName => $settings) {\r\n\t\t\tif (isset($settings['token'])) {\r\n\t\t\t\tforeach ($this->hooks as $hookName => $hook) {\r\n\t\t\t\t\tif ($hookName === $sectionName) {\r\n\t\t\t\t\t\t$hook->addTokens((array)$settings['token']);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function defineConfig()\n {\n // Get config paths\n $configs = $this->config->getDirectly(__DIR__ . '/../Config/path.php')['default_config'] ?? [];\n\n // Add all of them to config collector if $configs is an array\n if (is_array($configs)) {\n foreach ($configs as $alias => $path) {\n $this->config->set($alias, $path);\n }\n }\n }", "private static function getConfig(){\n return parse_ini_file(__DIR__ . \"/../config/config.ini\");\n }", "private static function getConfig(){\n return parse_ini_file(__DIR__ . \"/../config/config.ini\");\n }", "private static function loadAppConfig() {\n\t\t\t$appConfJson = file_get_contents(JIAOYU_PROJECT_HOME.\"/app/conf/config.json\");\n\t\t\ttry {\n\t\t\t\t$appConf = JsonUtils::decode($appConfJson);\n\t\t\t} catch (JsonException $e) {\n\t\t\t\tthrow new ConfigurationException(\"Error initializing app config: \".$e->getMessage());\n\t\t\t}\n\n\t\t\t// OK - now we can load up the config array from the file\n\t\t\tforeach ($appConf as $configKey => $configValue) {\n\t\t\t\tself::$config[$configKey] = $configValue;\n\t\t\t}\n\t\t}", "private function load_config() {\n $this->config = new Config();\n }", "private function _config()\n\t{\n\t\t// Get the base path for the smarty base directory\n\t\t$basePath\t= $this->getBasePath();\n\t\t$configFile\t= $this->getConfigFile();\n\t\t\n\t\tif (null === $basePath){\n\t\t\tthrow new Exception('No view base path specified');\n\t\t}\n\t\t\n\t\tif (null === $configFile){\n\t\t\tthrow new Exception('No config file specified');\n\t\t}\n\t\t\n\t\t// Generate the path to the view xml config file\n\t\tif ( file_exists(Package::buildPath( $basePath , $configFile)) ) {\n\t\t\t$viewBuildFile = Package::buildPath( $basePath , $configFile);\n\t\t} else {\n\t\t\tthrow new Exception(\"Unable to find config file: \" . $configFile);\n\t\t}\n\t\t \n\t\t// Load the config file\n\t\tif (! $viewXml = Zend_Registry::get('site_config_cache')->load('view_config') ) {\n\t\t\ttry {\n\t\t\t\t$xmlSection = (defined('BUILD_ENVIRONMENT')) ? BUILD_ENVIRONMENT : strtolower($_SERVER['SERVER_NAME']);\n\t\t\t\t$viewXml = new Zend_Config_Xml($viewBuildFile, $xmlSection);\n\t\t\t\tZend_Registry::get('site_config_cache')->save($viewXml, 'view_config');\n\t\t\t} catch (Zend_Exception $e) {\n\t\t\t\tthrow new Exception( 'There was a problem caching the config file: ' . $e->getMessage() );\n\t\t\t}\n\t\t}\n\t\tunset($viewBuildFile, $xmlSection);\n\t\t\n\t\t\n\t\t// Alias' replacements\n\t\t$replacements = array(\n ':baseDir' => $basePath\n ); \n\t\t\n $params = str_replace(array_keys($replacements), array_values($replacements), $viewXml->smarty->params->toArray());\n\n\t\t// Set the base smarty parameters\n\t\t$this->setParams($params);\n\t\t\n\t\t// Register plugins\n\t\t/*\n\t\tif (isset($viewXml->smarty->plugins)){\n\t\t\t$plugins\t= $viewXml->smarty->plugins->toArray();\n\t\t\t\n\t\t\t// Loop each plugin entry\n\t\t\tforeach($plugins as $key => $plugin)\n\t\t\t{\n\t\t\t\t// Check if a plugin type has been specified\n\t\t\t\tif (isset($plugin['type'])){\n\t\t\t\t\tswitch($plugin['type'])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'resource':\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t$methodArgs\t= array(\n\t\t\t\t\t\t\t\t\t$key . '_get_source',\n\t\t\t\t\t\t\t\t\t$key . '_get_timestamp',\n\t\t\t\t\t\t\t\t\t$key . '_get_secure',\n\t\t\t\t\t\t\t\t\t$key . '_get_trusted'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$methodArgs\t= (is_array($plugin['parameters'])) ? $plugin['parameters'] : array();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//$methodName\t= 'register_' . $plugin['type'];\n\t\t\t\t\t//$this->_setSmartyMethod($methodName, array($key, $methodArgs));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t*/\n\t\t\n\t}", "public function testConfigurationFromFile()\n {\n $path = __DIR__ . '/files/file1.config.php';\n\n $configuration = Factory::fromFile($path);\n\n $this->assertInstanceOf(Configuration::class, $configuration);\n $this->assertEquals(include $path, $configuration->getInternalContainer());\n }", "public static function read_config()\n\t{\n\t\t$config = realpath(dirname(__FILE__) . '/../../config_local.php');\n\t\t$hosted_config = Utils::get_hosted_path() . '/config_local.php';\n\n\t\tif (is_readable($config)) \n\t\t{\n\t\t\trequire($config);\n\t\t\t$is_hosted = FALSE;\n\t\t\t\n\t\t// maybe we are hosted\n\t\t} elseif (file_exists($hosted_config) )\n\t\t{\n\t\t\trequire($hosted_config);\n\t\t\trequire_once(Utils::get_hosted_path() . '/htdocs/system/system.php');\n\t\t\t$is_hosted = TRUE;\n\n\t\t// lets try the normal config location\n\t\t} elseif (is_readable('config.php')) \n\t\t{\n\t\t\trequire('config.php');\n\t\t\t$is_hosted = FALSE;\n\n\t\t// redirect\n\t\t} else \n\t\t{\n\t\t\theader('Location: install/index.php');\n\t\t\t$is_hosted = FALSE;\n\t\t}\n\n\t\tdefine('IS_HOSTED', $is_hosted);\n\t}", "abstract protected function configure();", "abstract protected function configure();", "public function testConfigFromFileAndDirectory()\n {\n $cfg = new Configuration();\n $cfg->setBaseDirectories($this->dirs);\n $config = $cfg->load(\"route\");\n\n $this->assertInternalType(\"array\", $config);\n $this->assertArrayHasKey(\"file\", $config);\n $this->assertArrayHasKey(\"config\", $config);\n $this->assertContains(\"a route\", $config[\"config\"]);\n $this->assertArrayHasKey(\"items\", $config);\n $this->assertContains(\"a 404 route\", $config[\"items\"][0][\"config\"]);\n $this->assertContains(\"an internal route\", $config[\"items\"][1][\"config\"]);\n }", "function __construct()\r\n\t{\r\n\t\trequire './configs/configs.php';\r\n\t}", "public static function config($_file) {\n\t\t// Generate hash code for config file\n\t\t$_hash='php.'.self::hashCode($_file);\n\t\t$_cached=Cache::cached($_hash);\n\t\tif ($_cached && filemtime($_file)<$_cached['time'])\n\t\t\t// Retrieve from cache\n\t\t\t$_save=gzinflate(Cache::fetch($_hash));\n\t\telse {\n\t\t\tif (!file_exists($_file)) {\n\t\t\t\t// .ini file not found\n\t\t\t\tself::$global['CONTEXT']=$_file;\n\t\t\t\ttrigger_error(self::TEXT_Config);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Map sections to framework methods\n\t\t\t$_map=array('global'=>'set','routes'=>'route','maps'=>'map');\n\t\t\t// Read the .ini file\n\t\t\tpreg_match_all(\n\t\t\t\t'/\\s*(?:\\[(.+?)\\]|(?:;.+?)*|(?:([^=]+)=(.+?)))(?:\\v|$)/s',\n\t\t\t\t\tfile_get_contents($_file),$_matches,PREG_SET_ORDER\n\t\t\t);\n\t\t\t$_cfg=array();\n\t\t\t$_ptr=&$_cfg;\n\t\t\tforeach ($_matches as $_match) {\n\t\t\t\tif ($_match[1]) {\n\t\t\t\t\t// Section header\n\t\t\t\t\tif (!isset($_map[$_match[1]])) {\n\t\t\t\t\t\t// Unknown section\n\t\t\t\t\t\tself::$global['CONTEXT']=$_section;\n\t\t\t\t\t\ttrigger_error(self::TEXT_Section);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$_ptr=&$_cfg[$_match[1]];\n\t\t\t\t}\n\t\t\t\telseif ($_match[2]) {\n\t\t\t\t\t$_csv=array_map(\n\t\t\t\t\t\tfunction($_val) {\n\t\t\t\t\t\t\t// Typecast if necessary\n\t\t\t\t\t\t\treturn is_numeric($_val) ||\n\t\t\t\t\t\t\t\tpreg_match('/^(TRUE|FALSE)\\b/i',$_val)?\n\t\t\t\t\t\t\t\t\teval('return '.$_val.';'):$_val;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tstr_getcsv($_match[3])\n\t\t\t\t\t);\n\t\t\t\t\t// Convert comma-separated values to array\n\t\t\t\t\t$_match[3]=count($_csv)>1?$_csv:$_csv[0];\n\t\t\t\t\tif (preg_match('/(.+?)\\[(.*?)\\]/',$_match[2],$_sub)) {\n\t\t\t\t\t\tif ($_sub[2])\n\t\t\t\t\t\t\t// Associative array\n\t\t\t\t\t\t\t$_ptr[$_sub[1]][$_sub[2]]=$_match[3];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t// Numeric-indexed array\n\t\t\t\t\t\t\t$_ptr[$_sub[1]][]=$_match[3];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t// Key-value pair\n\t\t\t\t\t\t$_ptr[$_match[2]]=$_match[3];\n\t\t\t\t}\n\t\t\t}\n\t\t\tob_start();\n\t\t\tforeach ($_cfg as $_section=>$_pair) {\n\t\t\t\t$_func=$_map[$_section];\n\t\t\t\tforeach ($_pair as $_key=>$_val)\n\t\t\t\t\t// Generate PHP snippet\n\t\t\t\t\techo 'F3::'.$_func.'('.\n\t\t\t\t\t\tvar_export($_key,TRUE).','.\n\t\t\t\t\t\t($_func=='set' || !is_array($_val)?\n\t\t\t\t\t\t\tvar_export($_val,TRUE):self::listArgs($_val)).\n\t\t\t\t\t');'.\"\\n\";\n\t\t\t}\n\t\t\t$_save=ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\t// Compress and save to cache\n\t\t\tCache::store($_hash,gzdeflate($_save));\n\t\t}\n\t\t// Execute cached PHP code\n\t\teval($_save);\n\t\tif (self::$global['ERROR'])\n\t\t\t// Remove from cache\n\t\t\tCache::remove($_hash);\n\t}", "protected function load_config() {\n $this->config = Kohana::$config->load('imagecache');\n $this->config_patterns = Kohana::$config->load('imagecache_patterns');\n }", "abstract public function configure();", "public function createConfig()\n\t{\n\t}", "private function __construct() {\r\n\t\t$conf = array();\r\n\t\t\r\n\t\t// Cerchiamo di capire se siamo in ambiente windows-based \"\\\" oppure linux-based \"/\"\r\n\t\t$win_dir_root = substr(dirname(__FILE__),0,strrpos(dirname(__FILE__),\"\\\\\"));\r\n\t\t$lin_dir_root = substr(dirname(__FILE__),0,strrpos(dirname(__FILE__),\"/\"));\r\n\t\t\r\n\t\t// di default ipotizziamo di essere in ambiente linux...\r\n\t\t$dir_root = $lin_dir_root;\r\n\t\t$slash = '/';\r\n\t\t\r\n\t\tif (is_dir($win_dir_root))\r\n\t\t{\r\n\t\t // siamo in ambiente windows\r\n\t\t $dir_root = $win_dir_root;\r\n\t\t $slash = '\\\\';\r\n\t\t}\r\n\r\n\t\t$file = __ROOT_PATH .$slash.'config'.$slash.'config.php';\r\n\t\t\r\n\t\techo $file .'<br/>';\r\n\r\n\t\tif (!file_exists($file)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\trequire ($file);\r\n\r\n\t\t// check format\r\n\t\tif (!isset($conf) OR !is_array($conf)) {\r\n\t\t\t$conf = array();\r\n\t\t}\r\n\r\n\t\techo '$config[dbuser] = ' .$config['dbuser']. '<br/>';\r\n\t\t$this -> user = $config['dbuser'];\r\n\t\t$this -> pass = $config['dbpass'];\r\n\t\t$this -> base = $config['dbname'];\r\n\t\t$this -> host = $config['dbhost'];\r\n\t\t$this -> errors = $config['dberrors'];\r\n\t\t$this -> logger = $config['enable_log'];\r\n\r\n\t\tif ($this -> pdo) {\r\n\t\t\t$this -> connectPdo();\r\n\t\t} else {\r\n\t\t\t$this -> connectMysql();\r\n\t\t}\r\n\t}", "protected function registerConfigurations()\n {\n try {\n\n $auth = file_get_contents(config_path('auth.php'));\n\n $data_map = $this->parseName();\n\n /********** Guards **********/\n\n $guards = file_get_contents($this->stub_path . '/config/guards.stub');\n\n // compile stub...\n $guards = strtr($guards, $data_map);\n\n $guards_bait = \"'guards' => [\";\n\n $auth = str_replace($guards_bait, $guards_bait . $guards, $auth);\n\n /********** Providers **********/\n\n $providers = file_get_contents($this->stub_path . '/config/providers.stub');\n\n // compile stub...\n $providers = strtr($providers, $data_map);\n\n $providers_bait = \"'providers' => [\";\n\n $auth = str_replace($providers_bait, $providers_bait . $providers, $auth);\n\n /********** Passwords **********/\n\n $passwords = file_get_contents($this->stub_path . '/config/passwords.stub');\n\n // compile stub...\n $passwords = strtr($passwords, $data_map);\n\n $passwords_bait = \"'passwords' => [\";\n\n $auth = str_replace($passwords_bait, $passwords_bait . $passwords, $auth);\n\n // Overwrite config file\n file_put_contents(config_path('auth.php'), $auth);\n\n } catch (Exception $ex) {\n throw new \\RuntimeException($ex->getMessage());\n }\n }", "public function load_config() {\n if (!isset($this->config)) {\n $name = $this->get_name();\n $this->config = get_config(\"local_$name\");\n }\n }", "public function config()\n {\n }", "private function configuration() {\n\n $f = \"includes/expr.ini\";\n\n return parse_ini_file($f);\n\n }", "public function execute($configFiles)\r\n {\r\n $this->initialize();\r\n\r\n // parse the yaml\r\n $config = $this->parseYamls($configFiles);\r\n\r\n // init our data array\r\n $data = array();\r\n\r\n // get all php.ini configuration\r\n $configs = ini_get_all();\r\n\r\n // set some php.ini keys\r\n if (isset($config['set']))\r\n {\r\n foreach ($config['set'] as $key => $value)\r\n {\r\n $key = strtolower($key);\r\n\r\n // key exists?\r\n if (!array_key_exists($key, $configs))\r\n {\r\n $error = sprintf('Configuration file \"%s\" specifies key \"%s\" which is not a php.ini directive', $configFiles[0], $key);\r\n throw new sfParseException($error);\r\n }\r\n\r\n // key is overridable?\r\n if ($configs[$key]['access'] != 7)\r\n {\r\n $error = sprintf('Configuration file \"%s\" specifies key \"%s\" which cannot be overrided', $configFiles[0], $key);\r\n throw new sfParseException($error);\r\n }\r\n\r\n // escape value\r\n $value = str_replace(\"'\", \"\\\\'\", $value);\r\n\r\n $data[] = sprintf(\"ini_set('%s', '%s');\", $key, $value);\r\n }\r\n }\r\n\r\n // check some php.ini settings\r\n if (isset($config['check']))\r\n {\r\n foreach ($config['check'] as $key => $value)\r\n {\r\n $key = strtolower($key);\r\n\r\n // key exists?\r\n if (!array_key_exists($key, $configs))\r\n {\r\n $error = sprintf('Configuration file \"%s\" specifies key \"%s\" which is not a php.ini directive [err0002]', $configFiles[0], $key);\r\n throw new sfParseException($error);\r\n }\r\n\r\n if (ini_get($key) != $value)\r\n {\r\n $error = sprintf('Configuration file \"%s\" specifies that php.ini \"%s\" key must be set to \"%s\". The current value is \"%s\" (%s). [err0001]', $configFiles[0], $key, var_export($value, true), var_export(ini_get($key), true), $this->get_ini_path());\r\n throw new sfInitializationException($error);\r\n }\r\n }\r\n }\r\n\r\n // warn about some php.ini settings\r\n if (isset($config['warn']))\r\n {\r\n foreach ($config['warn'] as $key => $value)\r\n {\r\n $key = strtolower($key);\r\n\r\n // key exists?\r\n if (!array_key_exists($key, $configs))\r\n {\r\n $error = sprintf('Configuration file \"%s\" specifies key \"%s\" which is not a php.ini directive [err0002]', $configFiles[0], $key);\r\n throw new sfParseException($error);\r\n }\r\n\r\n $warning = sprintf('{sfPhpConfigHandler} php.ini \"%s\" key is better set to \"%s\" (current value is \"%s\" - %s)', $key, var_export($value, true), var_export(ini_get($key), true), $this->get_ini_path());\r\n $data[] = sprintf(\"if (ini_get('%s') != %s)\\n{\\n sfLogger::getInstance()->warning('%s');\\n}\\n\", $key, var_export($value, true), str_replace(\"'\", \"\\\\'\", $warning));\r\n }\r\n }\r\n\r\n // check for some extensions\r\n if (isset($config['extensions']))\r\n {\r\n foreach ($config['extensions'] as $extension_name)\r\n {\r\n if (!extension_loaded($extension_name))\r\n {\r\n $error = sprintf('Configuration file \"%s\" specifies that the PHP extension \"%s\" should be loaded. (%s)', $configFiles[0], $extension_name, $this->get_ini_path());\r\n throw new sfInitializationException($error);\r\n }\r\n }\r\n }\r\n\r\n // compile data\r\n $retval = sprintf(\"<?php\\n\".\r\n \"// auto-generated by sfPhpConfigHandler\\n\".\r\n \"// date: %s\\n%s\\n\", date('Y/m/d H:i:s'), implode(\"\\n\", $data));\r\n\r\n return $retval;\r\n }", "public function localConfig();", "protected function getConfiguration() {}", "function load_config() {\n $config_file = \"scripts/i-erp.conf\";\n $comment = \"#\";\n // open the config file\n $fp = fopen($config_file, \"r\");\n if (!$fp) {\n echo(\"Failed to open file\");\n return 0;\n }\n // loop through the file lines and pull out variables\n while (!feof($fp)) {\n $line = trim(fgets($fp));\n if ($line && $line[0] != $comment) {\n $pieces = explode(\"=\", $line);\n $option = trim($pieces[0]);\n $value = trim($pieces[1]);\n $config_values[$option] = $value;\n }\n }\n fclose($fp);\n $_SESSION['install_lib'] = $config_values['install_lib'];\n $_SESSION['server'] = $config_values['server'];\n $_SESSION['timeout'] = $config_values['timeout'];\n $_SESSION['appname'] = $config_values['appname'];\n $_SESSION['h_logo'] = $config_values['h_logo'];\n $_SESSION['si_logo'] = $config_values['si_logo'];\n $_SESSION['copyr'] = $config_values['copyr'];\n return 1;\n}", "abstract protected function loadConfiguration($name);", "private static function readConfig()\n {\n $handler = self::getHandler();\n if (null == $handler->arrConfigGlobal && null == $handler->arrConfigLocal && null == $handler->arrConfigSecure) {\n include dirname(__FILE__) . '/../../config/default.php';\n\n $handler->arrConfigLocal = $APPCONFIG;\n\n $db = Base_Database::getConnection();\n try {\n // This is just for things like API keys, password salts etc.\n // If we have, at a later point, a function to export the database\n // en masse, then we can encrypt all the output from the secureconfig\n // table. It shouldn't overide the global or local config settings\n $sql = \"SELECT * FROM secureconfig\";\n $query = $db->prepare($sql);\n $query->execute();\n $handler->arrConfigSecure = $query->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_GROUP);\n\n // This is just the regular global configuration settings.\n $sql = \"SELECT * FROM config\";\n $query = $db->prepare($sql);\n $query->execute();\n $handler->arrConfigGlobal = $query->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_GROUP);\n foreach ($handler->arrConfigGlobal as $key => $value) {\n $handler->arrConfig[$key] = array('isLocal' => false, 'isOverriden' => false, 'value' => $value[0]);\n }\n \n // This is the configuration settings local to this individual machine.\n foreach ($handler->arrConfigLocal as $key => $value) {\n if (isset($handler->arrConfig[$key])) {\n $handler->arrConfig[$key] = array('isLocal' => true, 'isOverriden' => true, 'value' => $value);\n } else {\n $handler->arrConfig[$key] = array('isLocal' => true, 'isOverriden' => false, 'value' => $value);\n }\n }\n } catch(Exception $e) {\n error_log($e);\n die();\n }\n }\n }", "protected function initConfig()\n {\n $this->di->setShared('config', function () {\n $path = BASE_DIR . 'app/config/';\n\n if (!is_readable($path . 'config.php')) {\n throw new RuntimeException(\n 'Unable to read config from ' . $path . 'config.php'\n );\n }\n\n $config = include $path . 'config.php';\n\n if (is_array($config)) {\n $config = new Config($config);\n }\n\n if (!$config instanceof Config) {\n $type = gettype($config);\n if ($type == 'boolean') {\n $type .= ($type ? ' (true)' : ' (false)');\n } elseif (is_object($type)) {\n $type = get_class($type);\n }\n\n throw new RuntimeException(\n sprintf(\n 'Unable to read config file. Config must be either an array or Phalcon\\Config instance. Got %s',\n $type\n )\n );\n }\n\n if (is_readable($path . APPLICATION_ENV . '.php')) {\n $override = include_once $path . APPLICATION_ENV . '.php';\n\n if (is_array($override)) {\n $override = new Config($override);\n }\n\n if ($override instanceof Config) {\n $config->merge($override);\n }\n }\n\n return $config;\n });\n }", "private function mergeConfig() {\n\t\t$this->mergeConfigFrom(\n\t\t\t__DIR__ . '/../config/config.php', 'sl-upload'\n\t\t);\n\t}", "public function load()\n\t{\n\t\tif (file_exists(self::$configPath))\n\t\t{\n\t\t\t$this->config = json_decode(file_get_contents(self::$configPath), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->config = array();\n\t\t}\n\t}", "private function load()\n {\n if (!file_exists($this->file)) {\n throw new Exception('config file not found');\n }\n // read contents of wordpress config\n // we can not require the configuration because it requires a shit load of other files\n $this->config = file_get_contents($this->file);\n }", "public function configs() {\n\n\t\t// Recommend plugins\n\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/tgm-plugin-activation-config.php' );\n\n\t\t// Post Series\n\t\tif ( get_theme_mod( 'post_series_enable', true ) ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'post-series/post-series-config.php' );\n\t\t}\n\n\t\t// Portfolio config\n\t\tif ( WPEX_PORTFOLIO_IS_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'portfolio/portfolio-config.php' );\n\t\t}\n\n\t\t// Staff config\n\t\tif ( WPEX_STAFF_IS_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'staff/staff-config.php' );\n\t\t}\n\n\t\t// Testimonials config\n\t\tif ( WPEX_TESTIMONIALS_IS_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'testimonials/testimonials-config.php' );\n\t\t}\n\n\t\t// WooCommerce config\n\t\tif ( WPEX_WOOCOMMERCE_ACTIVE ) {\n\n\t\t\t// WooCommerce core tweaks\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'woocommerce/woocommerce-config.php' );\n\n\t\t}\n\n\t\t// Visual composer config\n\t\tif ( WPEX_VC_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'visual-composer/visual-composer-config.php' );\n\t\t}\n\n\t\t// Tribe events config\n\t\tif ( WPEX_TRIBE_EVENTS_CALENDAR_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/tribe-events-config.php' );\n\t\t}\n\n\t\t// Revolution slider config\n\t\tif ( WPEX_REV_SLIDER_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/revslider-config.php' );\n\t\t}\n\n\t\t// WPML Config\n\t\tif ( WPEX_WPML_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/wpml-config.php' );\n\t\t}\n\n\t\t// Polylang Config\n\t\tif ( class_exists( 'Polylang' ) ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/polylang-config.php' );\n\t\t}\n\n\t}", "protected function _findConfigs()\n {\n foreach (new DirectoryIterator($this->_configPath) as $fileInfo) {\n if ($fileInfo->isDot()) {\n continue;\n }\n if ($fileInfo->isDir()) {\n continue;\n }\n if ($fileInfo->getExtension() !== 'xml') {\n continue;\n }\n\n $name = str_replace('.' . $fileInfo->getExtension(), '', $fileInfo->getFilename());\n $this->_configFiles[$name] = [\n 'name' => $name,\n 'basename' => $fileInfo->getBasename(),\n 'pathname' => $fileInfo->getPathname(),\n ];\n }\n }", "private function loadConfig()\n {\n $this->category->config = [];\n $this->loadMeta('admins', 'array');\n $this->loadMeta('members', 'array');\n $this->loadMeta('template');\n $this->loadMeta('category', 'array');\n //$this->loadMetaCategory();\n $this->loadInitScript();\n }", "private function initialiseConfig()\n {\n $this->mergeConfigFrom(__DIR__ . '/..' . Settings::LARAVEL_REAL_CONFIG, Settings::LARAVEL_CONFIG_NAME);\n }", "public function load($files)\n\t{\n\t\t// multiple files\n\t\tif (strpos($files, ',')) {\n\t\t\t$filesList = explode(',', $files);\n\t\t}\n\t\telse { // single file\n\t\t\t$filesList[] = $files;\n\t\t}\n\n\t\tforeach($filesList as $file) {\n\t\t\t$file = trim($file);\n\n\t\t\t// default to BP./app/config/ dir\n\t\t\tif (substr($file, 0, 1 ) != \"/\") {\n\t\t\t\t$file = BP.'/app/config/'.$file;\n\t\t\t}\n\n\t\t\t// convert file into array\n\t\t\tif (file_exists($file)) {\n\t\t\t\t$config = parse_ini_file($file, true);\n\n\t\t\t\t// if it has sections, remove the config_title array that gets created\n\t\t\t\t// $configTitle = $config['config_title'];\n\t\t\t\t// unset($config['config_title']);\n\t\t\t\t// add the array using the config title as a key to the items array\n\n\t\t\t\tif (!is_array($config)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// has section headings\n\t\t\t\tif (is_array($config[key($config) ])) {\n\t\t\t\t\tforeach($config as $section => $values) {\n\t\t\t\t\t\t$this->container['config']->{$section} = (object)$values;\n\t\t\t\t\t}\n\t\t\t\t} else { // does not have sections\n\t\t\t\t\tforeach($config as $key => $value) {\n\t\t\t\t\t\t$this->container['config']->{$key} = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function LoadConfiguration()\r\n\t{\r\n\t\t$cinfFilePath = Site::GetConfigFilePath ();\r\n\t\t$config = simplexml_load_file ( $cinfFilePath );\r\n\t\t\r\n\t\t// load languages\r\n\t\tif (isset ( $config->languages ))\r\n\t\t{\r\n\t\t\t$langs = ( array ) $config->languages;\r\n\t\t\t$langsA = $langs ['language'];\r\n\t\t\t\r\n\t\t\tif (! is_array ( $langsA ))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t$linkID = ( string ) $langsA->linkID;\r\n\t\t\t\t$linkName = ( string ) $langsA->linkName;\r\n\t\t\t\t$this->m_languages [$linkID] = $linkName;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tforeach ( $langsA as $lang )\r\n\t\t\t\t{\r\n\t\t\t\t\t$linkID = ( string ) $lang->linkID;\r\n\t\t\t\t\t$linkName = ( string ) $lang->linkName;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->m_languages [$linkID] = $linkName;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$langKes = array_keys ( $this->m_languages );\r\n\t\t\t$this->m_languageDefault = $langKes [0];\r\n\t\t}\r\n\t\t\r\n\t\t// load templates\r\n\t\tif (isset ( $config->templates ))\r\n\t\t{\r\n\t\t\t$templates = ( array ) $config->templates;\r\n\t\t\t$langsA = $templates ['template'];\r\n\t\t\t\r\n\t\t\tif (! is_array ( $langsA ))\r\n\t\t\t{\r\n\t\t\t\t$this->m_templates = null;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->m_templates = array ();\r\n\t\t\t\t\r\n\t\t\t\tforeach ( $langsA as $lang )\r\n\t\t\t\t{\r\n\t\t\t\t\t$fileName = ( string ) $lang;\r\n\t\t\t\t\tarray_push ( $this->m_templates, $fileName );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// load siteURL\r\n\t\tif (isset ( $config->url ))\r\n\t\t{\r\n\t\t\t$this->m_URL = ( string ) $config->url;\r\n\t\t\t$this->m_URL = trim ( $this->m_URL );\r\n\t\t}\r\n\t\t\r\n\t\t// load siteURL\r\n\t\tif (isset ( $config->maxImageWidth ))\r\n\t\t{\r\n\t\t\t$this->m_maxImageWidth = ( int ) $config->maxImageWidth;\r\n\t\t}\r\n\t\t\r\n\t\t// secuirity-file root\r\n\t\tif (isset ( $config->securFolder ))\r\n\t\t{\r\n\t\t\t$this->m_sfRoot = ( string ) $config->securFolder;\r\n\t\t\t$this->m_sfRoot = trim ( $this->m_sfRoot );\r\n\t\t}\r\n\t\t\r\n\t\t// boxes\r\n\t\tif (isset ( $config->boxes ))\r\n\t\t{\r\n\t\t\t$boxes = ( array ) $config->boxes;\r\n\t\t\t$boxes = $boxes ['box'];\r\n\t\t\tif (! is_array ( $boxes ))\r\n\t\t\t{\r\n\t\t\t\t$this->m_boxes = array ($boxes );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->m_boxes = $boxes;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// product image root\r\n\t\tif (isset ( $config->productImageRoot ))\r\n\t\t{\r\n\t\t\t$str = ( string ) $config->productImageRoot;\r\n\t\t\t$this->m_prodImagRoot = trim ( $str );\r\n\t\t}\r\n\t\t\r\n\t\t// product image root\r\n\t\tif (isset ( $config->galleryRoot ))\r\n\t\t{\r\n\t\t\t$str = ( string ) $config->galleryRoot;\r\n\t\t\t$this->m_galleryImageRoot = trim ( $str );\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "protected function _setConfig()\n {\n if ($this->_system) {\n $config = $this->_system . DIRECTORY_SEPARATOR . 'config.php';\n } else {\n $config = false;\n }\n\n // manually look for a --config argument that overrides the default\n $found = false;\n foreach ($this->_argv as $val) {\n if ($val == '--config') {\n // found the argument\n $found = true;\n // reset the default in preparation for the next argument\n $config = false;\n continue;\n }\n \n if ($found && substr($val, 0, 1) != '-') {\n $config = $val;\n break;\n }\n \n if (substr($val, 0, 9) == '--config=') {\n $found = true;\n $config = substr($val, 9);\n break;\n }\n }\n \n // if there was a --config but no param, that's a failure\n if ($found && ! $config) {\n echo \"Please specify a config file path after the --config option.\" . PHP_EOL;\n exit(1);\n }\n \n // was there a config file at all?\n if ($config) {\n $realpath = realpath($config);\n if ($realpath) {\n $this->_config = $realpath;\n $text = \"Using config file '$realpath'.\" . PHP_EOL;\n } else {\n echo \"Could not resolve real path to config file '$config'.\" . PHP_EOL;\n exit(1);\n }\n } else {\n $text = \"Not using a config file.\" . PHP_EOL;\n }\n \n if ($this->_verbose) {\n echo $text;\n }\n }", "private function init(){\r\n\t\t$this->readDescriptionConfig();\r\n\t\t$this->readKeywordsConfig();\r\n\t\t$this->readMetaConfig();\r\n\t\t$this->readLinksConfig();\r\n\t\t$this->readScriptsConfig();\r\n\t}", "private static function check_config ()\n\t{\n\t\t// load config file here\n\t\tif (count(self::$_config) == 0)\n\t\t{\n\t\t\tself::LoadConfigFile();\n\t\t}\n\t}", "function process_config($config) {\n\t\treturn true;\n\t}", "protected function _load_config()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $config_file = new Configuration_File(self::APP_CONFIG);\n $this->config = $config_file->load();\n } catch (File_Not_Found_Exception $e) {\n // Not fatal\n }\n\n $this->is_loaded = TRUE;\n }", "function ConfigFile() {\n $options = array(\n 'pipe' => NULL,\n 'config' => UNISH_SANDBOX,\n 'root' => $this->root,\n 'uri' => $this->env,\n );\n $this->drush('core-status', array('Drush configuration'), $options);\n $output = trim($this->getOutput());\n $loaded = explode(' ', $output);\n $this->assertSame(array_values($this->exists), $loaded);\n }", "function get_config($filename)\n{\n\t$config = parse_ini_file($filename);\n\n\tif ($config === FALSE) {\n\t\tthrow new Exception(\"could not read configuration from '{$filename}'\");\n\t}\n\n\tif (!isset($config['url'])) {\n\t\tthrow new Exception(\"url not found in '{$filename}'\");\n\t}\n\tif (!isset($config['username'])) {\n\t\tthrow new Exception(\"username not found in '{$filename}'\");\n\t}\n\tif (!isset($config['password'])) {\n\t\tthrow new Exception(\"password not found in '{$filename}'\");\n\t}\n\tif (!isset($config['source'])) {\n\t\tthrow new Exception(\"source project not found in '{$filename}'\");\n\t}\n\tif (!isset($config['destination'])) {\n\t\tthrow new Exception(\"destination project not found in '{$filename}'\");\n\t}\n\n\treturn $config;\n}", "protected function _getConfigFile()\n {\n $moduleName = get_class($this);\n $moduleName = strtolower(substr($moduleName, 0, strpos($moduleName, '_')));\n\n if(!in_array($moduleName,\n array_keys(Zend_Controller_Front::getInstance()->getControllerDirectory())))\n {\n $moduleName = \"\";\n }\n\n $loader = null;\n\n foreach(Zend_Loader_Autoloader::getInstance()->getAutoloaders() as $autoloader)\n {\n if(strtolower($autoloader->getNamespace()) == $moduleName)\n {\n $loader = $autoloader;\n break;\n }\n }\n\n $moduleName = get_class($this);\n $path = $loader->getResourceTypes();\n\n $path = $path['configs']['path'];\n if(substr($path, -1) != '/' && substr($path, -1) != '\\\\')\n {\n $path .= '/';\n }\n\n $pathPart = str_replace(\n \"_\", \"/\",\n substr(\n stristr($moduleName, $this->_namespaceMapper),\n (strlen($this->_namespaceMapper) + 1)\n )\n );\n\n $config = array();\n\n foreach(array('ini' => 'Ini', 'yml' => 'Yaml', 'xml' => 'Xml') as $configExt => $parserType)\n {\n if(file_exists($path . $pathPart . '.' . $configExt))\n {\n $parser = 'Zend_Config_' . $parserType;\n $parser = new $parser($path . $pathPart . '.' . $configExt);\n $config = $parser->toArray();\n }\n }\n return $config;\n }", "public function __construct()\n {\n if (is_file($config = root('config', 'config.php'))) {\n $this->item = (array) require($config);\n }\n if (is_file($config = _DIR_ . _DS_ . 'config.php')) {\n $this->set((array) require($config));\n }\n if(getenv('ENV')){\n if(is_file($config_env = root('config', getenv('ENV').'.php'))){\n $this->set((array) require($config_env));\n }\n }\n if (!$this->item) {\n throw new \\ErrorException('Unable load config');\n }\n }", "public function test_Config_gives_access_to_path(){\n\t\t$path = $this->path;\n\t\t$config = new Config($path);\n\t\t$this->assertSame($path, $config->path);\n\n\t\t// Based on loadFromFilePath\n\t\t$config = new Config();\n\t\t$config->loadFromFile($this->path);\n\t\t$this->assertSame($this->path, $config->path);\n\t}", "function Event_Config_Read()\n {\n if (empty($this->Event_Config))\n {\n $this->Event_Config=$this->ReadPHPArray($this->Event_Config_File());\n $groups=$this->Dir_Files($this->Event_Config_Path.\"/Config\",'\\.php$');\n $this->Event_Config_Group=$this->Event_Config[ \"Config_Group_Default\" ];\n \n }\n }" ]
[ "0.7683705", "0.752549", "0.7277249", "0.7263684", "0.72213644", "0.7190471", "0.7177392", "0.7115437", "0.7092817", "0.7064185", "0.6902569", "0.6893135", "0.6862062", "0.6839351", "0.6825777", "0.68184644", "0.68082887", "0.6784786", "0.677997", "0.67794913", "0.6756413", "0.6732041", "0.6713695", "0.6709783", "0.6709493", "0.66983986", "0.66859835", "0.6684727", "0.6682306", "0.6680658", "0.6668099", "0.665282", "0.6647259", "0.66456103", "0.6627432", "0.66124415", "0.66055584", "0.6599683", "0.6596743", "0.6574883", "0.65715307", "0.6562715", "0.65366626", "0.65274006", "0.6527019", "0.6524053", "0.65132374", "0.65054834", "0.64969283", "0.6495426", "0.6485684", "0.64820355", "0.64819574", "0.6454801", "0.6445986", "0.6445986", "0.6442489", "0.64384085", "0.64305276", "0.64175487", "0.6400241", "0.6390991", "0.6390991", "0.63881695", "0.63867426", "0.63847995", "0.63743424", "0.6363332", "0.63521516", "0.63483876", "0.63447326", "0.6343163", "0.63318676", "0.6331503", "0.63289624", "0.6323477", "0.6321704", "0.63194597", "0.6300449", "0.6292547", "0.6279358", "0.6278058", "0.6276806", "0.62749386", "0.62719667", "0.6268469", "0.62655663", "0.62547415", "0.6250089", "0.6216472", "0.6214387", "0.62103635", "0.6207683", "0.6205875", "0.6196091", "0.6195809", "0.6188848", "0.6184265", "0.618423", "0.6181407", "0.6178885" ]
0.0
-1
Works with route collector. this function add a new get route
function get($uri, $action) { return Route::get($uri, $action); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getRoute(){\n\t}", "public function testRouterAddByGet($method)\n {\n $router = new Router();\n\n $router->get(\"\", function () {\n return \"get\";\n });\n\n $router->always(function () {\n return \"not get\";\n });\n\n $res = $router->handle(\"\", $method);\n if ($method === \"GET\") {\n $this->assertEquals(\"get\", $res);\n }\n if ($method !== \"GET\") {\n $this->assertEquals(\"not get\", $res);\n }\n\n $routes = $router->getAll();\n $this->assertEquals(2, count($routes));\n }", "public function get_route()\n {\n }", "public function add( Route $route ): Collection;", "abstract public function getRoute();", "public function getRoute()\n {\n }", "function add_route($route, $function, $method='GET') {\n array_push($this->routers, Array(\n 'expression' => $route,\n 'function' => $function,\n 'method' => $method\n ));\n }", "public function testAddRouteShorthandMethodGet()\n {\n $this->collection->get('name', '/', 'action');\n\n $this->assertCount(1, $this->collection->all());\n\n $routes = $this->collection->all();\n\n $this->assertArrayHasKey('0', $routes);\n\n $this->assertContains('GET', $routes[0]->getMethods());\n }", "public function getRoute();", "public function addGetRoute($path, $callable, $name = null){\n return $this->add($path, $callable, $name, 'GET');\n }", "function add_listing_routes()\n {\n $this->add_route('GET', '/routes', function(){\n print \"<h1>Routes</h1>\";\n foreach($this->routes as $method => $routes) {\n print \"<h3>\".$method.\"</h3>\";\n print \"<ul>\";\n foreach ($routes as $route) {\n print \"<li>\".$route->path.\"</li>\";\n }\n print \"</ul>\";\n }\n });\n }", "public function getRoute(): Route;", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function addRoutes($routes);", "public static function route();", "public function get(...$args) {\n $this->registerRouteHandler('GET', ...$args);\n }", "public static function get($route, $function){\n Router::register_route($route, $function, 'GET');\n }", "public function getRoutes() {}", "public function getNodeRoute();", "abstract public function addRoute($url, $ctrl, $mth);", "function\taddRoute($routeData){\n\t\t//$this->routes[] = $route;\n\t\t$this->routes[] = $routeData;\n\t}", "public function get($uri, $function) {\n $newRoute = new Route($uri, array(\"GET\"), $function);\n\n $this->collection->addRoute($newRoute);\n }", "public function register_routes() {\n\n\t\t\\add_filter( 'do_parse_request', array( $this, 'handle_routing' ) );\n\n\t}", "private static function registerRoute($route){\r\n global $Routes;\r\n $Routes[] = BASEDIR.$route;\r\n }", "public function getRoute($name){ }", "private static function registerRoute($route) {\n global $Routes;\n $Routes[] = $route;\n }", "public function testRouterAddByAdd($method)\n {\n $router = new Router();\n\n $router->add(\"about\", function () {\n return \"about\";\n });\n\n $res = $router->handle(\"about\", $method);\n $this->assertEquals(\"about\", $res);\n\n $routes = $router->getAll();\n $this->assertEquals(1, count($routes));\n }", "protected function generateGetRouteMethod()\n {\n return <<<EOF\n public function getRoute(\\$route)\n {\n if (!isset(self::\\$declaredRoutes[\\$route])) {\n return null;\n }\n \\$info = self::\\$declaredRoutes[\\$route];\n return new Route(\n \\$info['route'],\n \\$info['options'],\n \\$info['parent'],\n \\$info['routeRequirements']\n );\n }\nEOF;\n }", "public function register_route() {\n register_rest_route( $this->namespace, $this->endpoint , array(\n 'methods' => 'POST',\n 'callback' => array($this, 'get_next_page'),\n 'args' => array(),\n ) );\n }", "public static function get($route, $options){\n self::register('GET', $route, $options);\n }", "function add_route($route, callable $closure)\n\n {\n// $route = self::APP_PREFIX.$route;\n// die($route);\n $this->routes[$route] = $closure;\n }", "public function getRoute()\n {\n $this->name = '';\n\n $matches = [];\n if (preg_match('/[a-f\\d]{24}/i', $this->request->getUri(), $matches)) {\n $this->id = reset($matches); # get first param in URI after /recipes/\n $this->request->setGetParam(\"id\", $this->id);\n }\n\n if ($this->request->getMethodType() == Request::METHOD_POST && strpos($this->request->getUri(),\n self::route_auth) !== false) {\n $this->name = 'auth';\n $this->isAuthNeeded = false;\n }\n\n //\tList\tGET\t/recipes\t✘\n if ($this->request->getMethodType() == Request::METHOD_GET\n && strpos($this->request->getUri(), self::route_list) !== false\n && !preg_match('/[a-f\\d]{24}/i', $this->request->getUri())\n ) {\n $this->name = 'listing';\n $this->isAuthNeeded = false;\n }\n\n // Create\tPOST\t/recipes\t✓\n if ($this->request->getMethodType() == Request::METHOD_POST\n && strpos($this->request->getUri(), self::route_create) !== false\n && (empty($this->request->getGetParam(\"id\")) || is_null($this->request->getGetParam(\"id\")))) {\n $this->isAuthNeeded = true;\n $this->name = 'create';\n }\n\n // Get\tGET\t/recipes/{id}\t✘\n if ($this->request->getMethodType() == Request::METHOD_GET\n && strpos($this->request->getUri(), self::route_list) !== false\n && preg_match('/[a-f\\d]{24}$/i', $this->request->getUri())) {\n $this->isAuthNeeded = false;\n $this->name = 'get';\n\n $matches = [];\n if (preg_match('/[a-f\\d]{24}$/i', $this->request->getUri(), $matches)) {\n $this->id = reset($matches); # get first param in URI after /recipes/\n $this->request->setGetParam(\"id\", $this->id);\n }\n }\n\n // Update\tPUT\t/recipes/{id}\t✓\n if ($this->request->getMethodType() == Request::METHOD_PUT\n && strpos($this->request->getUri(), self::route_list) !== false\n && preg_match('/[a-f\\d]{24}$/i', $this->request->getUri())) {\n $this->isAuthNeeded = true;\n $this->name = 'update';\n\n if ($this->request->getContentType() != 'application/x-www-form-urlencoded') {\n throw new Exception(\"Accept only application/x-www-form-urlencoded for PUT method\", 415);\n }\n\n $matches = [];\n if (preg_match('/[a-f\\d]{24}$/i', $this->request->getUri(), $matches)) {\n $this->id = reset($matches); # get first param in URI after /recipes/\n $this->request->setGetParam(\"id\", $this->id);\n }\n }\n\n // Update\tPATCH\t/recipes/{id}\t✓\n if ($this->request->getMethodType() == Request::METHOD_PATCH\n && strpos($this->request->getUri(), self::route_update) !== false\n && preg_match('/[a-f\\d]{24}$/i', $this->request->getUri(), $id)) {\n $this->isAuthNeeded = true;\n $this->name = 'patch';\n\n $matches = [];\n if (preg_match('/[a-f\\d]{24}$/i', $this->request->getUri(), $matches)) {\n $this->id = reset($matches); # get first param in URI after /recipes/\n $this->request->setGetParam(\"id\", $this->id);\n }\n }\n\n // Delete\tDELETE\t/recipes/{id}\t✓\n if ($this->request->getMethodType() == Request::METHOD_DELETE\n && strpos($this->request->getUri(), self::route_delete) !== false\n && preg_match('/[a-f\\d]{24}$/i', $this->request->getUri(), $id)) {\n $this->isAuthNeeded = true;\n $this->name = 'delete';\n\n }\n\n // Rate\tPOST\t/recipes/{id}/rating\t✘\n if ($this->request->getMethodType() == Request::METHOD_POST\n && strpos($this->request->getUri(), self::route_rate) !== false\n && preg_match('/[a-f\\d]{24}/i', $this->request->getUri())) {\n $this->isAuthNeeded = false;\n $this->name = 'rate';\n }\n\n // SEARCH\tPOST\t/recipes/search\t✘\n if ($this->request->getMethodType() == Request::METHOD_GET\n && strpos($this->request->getUri(), self::route_search) !== false) {\n $this->isAuthNeeded = false;\n $this->name = 'search';\n }\n\n return $this->name;\n }", "protected function loadRoute()\n {\n $this->post('/task', 'task.controller:saveAction');\n\n // Url for update task\n $this->put('/task/{id}', 'task.controller:updateAction');\n\n // Url for see one task\n $this->get('/task/{id}', 'task.controller:getAction');\n\n // Url for delete task\n $this->delete('/task/{id}', 'task.controller:deleteAction');\n\n // Url for list of tasks\n $this->get('/task', 'task.controller:listAction');\n\n //Get Tag list\n $this->get('/tags', 'tag.controller:listAction');\n\n //Add tag to task\n $this->post('/addTag', 'tag.controller:setTagAction');\n\n //Add tag to tag list\n $this->post('/tag', 'tag.controller:saveAction');\n\n //Search by tag\n $this->get('/search/tag', 'tag.controller:searchAction'); \n\n // Url for delete tag in tag list\n $this->delete('/tag', 'tag.controller:deleteAction');\n \n // Url for auth github\n $this->post('/github', 'github.controller:authAction'); \n }", "public function GetRouteGetRequestsOnly ();", "public function get($route, $action) {\r\n $this->router->addRoute('GET', $route, $action);\r\n return $this;\r\n }", "private function addRoute()\n {\n if (! $this->postType->rewrite) {\n return;\n }\n $postTypeSlug = $this->postType->rewrite['slug'];\n $this->cortexRoutes->addRoute(new QueryRoute(\n \"{$postTypeSlug}/{postName}/{singleChildName}\",\n function (array $matches) use ($postTypeSlug) {\n $queryPost = new QueryPost(\n $this->postType->name,\n $matches['postName']\n );\n if (! $queryPost->postExists()) {\n new TemplateRenderer('404');\n }\n $postSingle = $queryPost->getPost();\n new TemplateRenderer(\n $postTypeSlug,\n $matches['singleChildName'],\n $this->makeDataArray(\n $postSingle->ID,\n $matches['singleChildName']\n ),\n $this->templateRootDirectory\n );\n die();\n }\n ));\n }", "function register_routes(){\n \tregister_rest_route( parent::get_api_base(), $this->controller . 'get' , array(\n \t\t'methods' => WP_REST_Server::READABLE,\n \t\t'callback' => array($this,'run_cron'),\n\n \t\t//'permission_callback' => array( $this, 'get_item_permissions_check' ),\n \t));\n\t}", "public function addRoutes(): void\n {\n $router = $this->config['router'] ?? Router::class;\n $router::$DELIMITER = $this->delimiter;\n foreach (static::$routes as [$url, $func, $method]) {\n $router::add($url, [$this, $func], $method);\n }\n }", "public function route() {\n\n try {\n \n $obj = APIFactory::init($this->parsed_path[0]);\n echo $this->getAction($obj, $this->parsed_path);\n \n } catch(UndefinedActionException $e) { \n\n echo $e->getMessage();\n\n } catch(Exception $e) {\n\n echo $e->getMessage();\n\n }\n }", "public function route() {\n\t\t$route = $this->sets[':default']->route();\n\t\tif (!$route&&sizeof($this->route_extra)==0) return false;\n\t\tif (!$route) $route = new CMS_Navigation3_LinkSet();\n\t\t$n = $route->count();\n\t\tforeach($this->route_extra as $r) {\n\t\t\t$item = $r[1];\n\t\t\t$item['id'] = $n;\n\t\t\t$n++;\n\t\t\t$route->add($r[0],$item);\n\t\t}\t\n\t\treturn $route;\n\t}", "public function addRoutes()\n {\n //Get the routes template content\n $content = \\File::get($this->package_path('Templates/routes.php'));\n //Append to the routes.php file\n $this->addToFile('routes.php', 'routes', \"\\n\\n\" . $content);\n }", "public function addRoute (Cmf_Route $route) {\n $this->_routes[$route->getName()] = $route;\n }", "public function getRoutes();", "public function getRoutes();", "public function __construct()\n {\n $this->addAdditionalRoute('redeemByGet', 'redeem/{reward}/user/{user}', ['GET']);\n $this->addAdditionalRoute('redeemByPost', 'redeem/', ['POST']);\n }", "public function route()\n\t{\n\t\t/* [http|https]/[Ajax|]/[Get|Post|Delete|Put]/uri */\n\t\t$this->route = $this->route_raw = ($this->c->Request->is_https ? 'https' : 'http').'/'.($this->c->Request->is_ajax ? 'Ajax' : '').'/'.$this->c->Request->request.'/'.$this->c->Request->uri;\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->preRouter();\n\n\t\t/* rewrite dispatch route */\n\t\tforeach ($this->c->router['routes'] as $regexpath => $switchto) {\n\t\t\tif (preg_match($regexpath, $this->route)) {\n\t\t\t\t/* we got a match */\n\t\t\t\t$this->route = preg_replace($regexpath, $switchto, $this->route);\n\t\t\t\t$this->route_matched = $regexpath;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->postRouter();\n\n\t}", "private function loadRoute()\n\t{\n\t\t/*\n\t\t* Se o controller nao for passado por GET,\n\t\t* assume-se como padrão o controller 'IndexController';\n\t\t*/\n\t\t$this->st_controller = isset($_REQUEST['controle']) ? $_REQUEST['controle'] : 'index';\n\t\t\n\t\t/*\n\t\t* Se a action nao for passada por GET,\n\t\t* assume-se como padrão a action 'IndexAction';\n\t\t*/\n\t\t$this->st_action = isset($_REQUEST['acao']) ? $_REQUEST['acao'] : 'index';\n\t}", "function add_rewrite_endpoint($name, $places, $query_var = \\true)\n {\n }", "private static function registerRoute($route)\n {\n global $Routes;\n $Routes[] = \"/\".$route;\n }", "public function addRoute($route, RouteDocument $routeDocument);", "public static function getRoutes();", "public static function getRoutes();", "public static function routes(): void\n {\n //\n }", "function create_initial_rest_routes()\n {\n }", "function rest_get_route_for_post($post)\n {\n }", "static public function addRoutes(sfEvent $event)\n {\n $r = $event->getSubject();\n\n $r->prependRoute('dkp_manager_suggestRaidUsers', new sfRoute('/suggestRaidUsers', array(\n 'module' => 'dkp_manager',\n 'action' => 'suggestRaidUsers'\n )));\n\n }", "abstract protected function getListRoute() : string;", "protected function makeRoute()\n {\n new MakeRoute($this, $this->files);\n }", "private function add($path, $callable, $name, $method){\n $route = new Route($path, $callable);\n $this->routes[$method][] = $route;\n if(is_string($callable) && $name === null){\n $name = $callable;\n }\n if($name){\n $this->namedRoutes[$name] = $route;\n }\n return $route;\n }", "public function route(): RouteContract;", "private function __di_init_service_route () {\n $this->route = $this->constant(new GoDiService_Route_Property($this));\n }", "public static function add_route($method, $route, $function){\n\t\t\tself::$routes[$method][$route] = $function;\n\t\t}", "public function route() {\r\n register_rest_route( 'api/v1', '/web-data-endpoint', array(\r\n 'methods' => 'GET',\r\n 'callback' => array( $this, 'callback' )\r\n ) );\r\n }", "public function add($key, $route){\n $this->routes[$key] = $route;\n }", "public function register_routes() {\n\t\tparent::register_routes();\n\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base . '/totals',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_totals' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_totals_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "public function createRouteObject();", "public function populate_router() {\n if (Cache::has(APP_NAME.\"_Marmalade\\Router\\Routes\")) {\n $this->routes = Cache::get(APP_NAME.\"_Marmalade\\Router\\Routes\");\n } else {\n $this->build_route_map(Routes::load_routes());\n if (ENABLE_CACHE) {\n Cache::set(APP_NAME.\"_Marmalade\\Router\\Routes\", $this->routes);\n }\n }\n }", "public function declare_routes(){\n\n $this->routes = \\Chocolatine\\get_configuration( 'routes' );\n $view_manager = \\Chocolatine\\get_manager('view');\n\n /**\n * Declare all route\n */\n foreach ( $this->routes as $key => $current_route) {\n\n $this->router->map(['GET', 'POST'], $current_route['route'] ,function ($request, $response, $args) {\n\n $router = \\Chocolatine\\get_service( 'Router' );\n return $router->controller( $request, $response, $args );\n\n });\n\n }\n\n }", "public function get_router();" ]
[ "0.6714278", "0.6553148", "0.6549881", "0.6540084", "0.65345263", "0.6497026", "0.6372589", "0.6309439", "0.6292032", "0.6231883", "0.6198055", "0.6109596", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.60425746", "0.6041812", "0.6018163", "0.6014891", "0.59984314", "0.5991894", "0.5969311", "0.59664357", "0.59576344", "0.59128195", "0.5906909", "0.589653", "0.58929557", "0.5885368", "0.5871958", "0.5864531", "0.585484", "0.5840392", "0.5820707", "0.5804601", "0.5802663", "0.57951367", "0.5780518", "0.5768706", "0.57620513", "0.5731677", "0.57263213", "0.57096684", "0.570449", "0.5704487", "0.5697161", "0.5694317", "0.5694317", "0.56866986", "0.56715775", "0.56622255", "0.56588393", "0.565017", "0.56499165", "0.5647052", "0.5647052", "0.56407475", "0.5638529", "0.5633557", "0.56279486", "0.56258416", "0.5620393", "0.5602947", "0.5602226", "0.55967796", "0.55896974", "0.55890703", "0.55879724", "0.5581823", "0.5573929", "0.5569049", "0.55661905", "0.55563563" ]
0.0
-1
Works with route collector. this function add a new post route
function post($uri, $action) { return Route::post($uri, $action); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function addRoute()\n {\n if (! $this->postType->rewrite) {\n return;\n }\n $postTypeSlug = $this->postType->rewrite['slug'];\n $this->cortexRoutes->addRoute(new QueryRoute(\n \"{$postTypeSlug}/{postName}/{singleChildName}\",\n function (array $matches) use ($postTypeSlug) {\n $queryPost = new QueryPost(\n $this->postType->name,\n $matches['postName']\n );\n if (! $queryPost->postExists()) {\n new TemplateRenderer('404');\n }\n $postSingle = $queryPost->getPost();\n new TemplateRenderer(\n $postTypeSlug,\n $matches['singleChildName'],\n $this->makeDataArray(\n $postSingle->ID,\n $matches['singleChildName']\n ),\n $this->templateRootDirectory\n );\n die();\n }\n ));\n }", "public function post(...$args) {\n $this->registerRouteHandler('POST', ...$args);\n }", "public function testAddRouteShorthandMethodPost()\n {\n $this->collection->post('name', '/', 'action');\n\n $this->assertCount(1, $this->collection->all());\n\n $routes = $this->collection->all();\n\n $this->assertArrayHasKey('0', $routes);\n\n $this->assertContains('POST', $routes[0]->getMethods());\n }", "public function addPostRoute($path, $callable, $name = null){\n return $this->add($path, $callable, $name, 'POST');\n }", "function rest_get_route_for_post($post)\n {\n }", "public function post($uri, $function) {\n $newRoute = new Route($uri, array(\"POST\"), $function);\n\n $this->collection->addRoute($newRoute);\n }", "public function testAddRouteCreateMethodPostMethod()\n {\n $this->collection->create('POST', 'name', '/', 'action');\n\n $this->assertCount(1, $this->collection->all());\n\n $routes = $this->collection->all();\n\n $this->assertArrayHasKey('0', $routes);\n\n $this->assertContains('POST', $routes[0]->getMethods());\n }", "public function testRouterAddByPost($method)\n {\n $router = new Router();\n\n $router->post(\"\", function () {\n return \"post\";\n });\n\n $router->always(function () {\n return \"not post\";\n });\n\n $res = $router->handle(\"\", $method);\n if ($method === \"POST\") {\n $this->assertEquals(\"post\", $res);\n }\n if ($method !== \"POST\") {\n $this->assertEquals(\"not post\", $res);\n }\n\n $routes = $router->getAll();\n $this->assertEquals(2, count($routes));\n }", "public function post($path, $callback) {\n $this->routes['post'][$path] = $callback; \n }", "function\taddRoute($routeData){\n\t\t//$this->routes[] = $route;\n\t\t$this->routes[] = $routeData;\n\t}", "public function add_postAction() {\n\t\t$info = $this->getPost(array('name', 'link', 'img', 'sort', 'status', 'model_id','type_id'));\n\t\t$info = $this->_cookData($info);\n\t\t$result = Browser_Service_Recsite::addRecsite($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function add_postAction(){\n\t\t$info = $this->getPost(array('name', 'parent_id', 'root_id', 'sort'));\n\t\tif (!$info['name']) $this->output(-1, '名称不能为空.');\n\t\t\n\t\t//检测重复\n\t\t$area = Ola_Service_Area::getBy(array('name'=>$info['name']));\n\t\tif ($area) $this->output(-1, $info['name'].'已存在.');\n\t\t\n\t\t$ret = Ola_Service_Area::add($info);\n\t\tif (!$ret) {\n\t\t\t$this->output(-1, '操作失败.');\n\t\t}\n\t\t$this->output(0, '操作成功.');\n\t}", "public function add( Route $route ): Collection;", "public static function post(string $route, array $options = array()) {\n\t\t\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__, $route, $options);\n\t\t\n\t\t$defaults = array(\n\t\t\t'listen'=>'POST',\n\t\t\t'route' => $route,\n\t\t\t'rule'=> $route\n\t\t);\n\t\t\n\t\t$filtered = self::_applyFilter(get_class(), __FUNCTION__, array(\n\t\t\t'route' => $route,\n\t\t\t'options' => $options\n\t\t), array('event' => 'args'));\n\t\t\n\t\t$route = $filtered['route'];\n\t\t$options = $filtered['options'];\n\t\t\n\t\t$options += $defaults;\n\t\t\n\t\tself::addRouteRule($options);\n\t\t\n\t\tself::_notify(get_class() . '::' . __FUNCTION__, $route, $options);\n\t}", "public static function post($route, $action, $args=null)\n\t{\n\t\tself::match_route('post', $route, $action, $args);\n\t}", "public static function post($route, $options){\n self::register('POST', $route, $options);\n }", "public function post($path, $callback)\n\t{\n\t\t$this->routes['post'][$path] = $callback;\n\t}", "public function addRoute($route, RouteDocument $routeDocument);", "public function register_route() {\n register_rest_route( $this->namespace, $this->endpoint , array(\n 'methods' => 'POST',\n 'callback' => array($this, 'get_next_page'),\n 'args' => array(),\n ) );\n }", "public function post($uri, $controller) {\r\n $this->routes['POST'][$uri] = $controller;\r\n }", "public function post($identifier, callable $callback)\n {\n $this->routes[] = $this->route_factory->build($identifier, 'POST', $callback);\n }", "public function post(string $routePattern, $handler, string $name = null): CollectionInterface\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function post(string $path, $callable, ?string $name = null): void\n {\n $this->router->addRoute(\n new ZendRoute(\n $path,\n new RouterMiddleware($this, $callable),\n ['POST'],\n $name\n )\n );\n }", "public function post($route, $callback)\r\n {\r\n $this->registerRoute(self::cleanUrl($route), $callback, 'post');\r\n }", "public function add_postAction() {\r\n\t\t$info = $this->getPost(array('sort', 'title', 'ad_type', 'ad_ptype', \r\n\t\t\t\t'link', 'activity', 'clientver', 'img', 'start_time', 'end_time', 'status', 'hits',\r\n\t\t\t\t'channel_id', 'module_id', 'cid', 'channel_code', 'ptype_id', 'is_recommend', 'action'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$result = Gou_Service_Ad::addAd($info);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "public function post(string $path, array $handler): void\n {\n $this->routes['POST'][$path] = $handler;\n }", "public function addRoute($method, $uri, $action, $data = [])\n\t{\n\t\t$this->routes[] = [\n\t\t\t'method' => $method,\n\t\t\t'uri' => $uri,\n\t\t\t'action' => $action,\n\t\t\t'name' => isset($data['name']) ? $data['name'] : null,\n\t\t\t'middleware' => isset($data['middleware']) ? $data['middleware'] : null,\n\t\t\t'before' => isset($data['before']) ? $data['before'] : null,\n\t\t\t'after' => isset($data['after']) ? $data['after'] : null\n\t\t];\n\t}", "public static function post(string $route, string $handler, string $middleware = '');", "public function post($route, $action) {\r\n $this->router->addRoute('POST', $route, $action);\r\n return $this;\r\n }", "public function addRoute($name, $route, $priority = null);", "protected function detect_rest_item_route($post)\n {\n }", "public function post($uri, $action)\n {\n return $this->addRoute('POST', $uri, $action);\n }", "public function post($route, $controllerAction = '');", "public function post($uri, $controller)\n\t{\t\n\t\t// sets the routes array key=>value pairs\n\t\t$this->routes['POST'][$uri] = $controller;\n\t}", "public function addRoute(string $uri, \\Closure $fn) : void\n {\n $this->routes[$uri] = $fn;\n }", "function afterroute() {\n\t}", "public function add(Post $post);", "public function add(Post $post);", "protected function generatePost(ResourceConfiguration $config)\n {\n $that = $this;\n\n $this->slim->post($this->baseRoute($config), function () use ($that) {\n $that->executeRoute('create', func_get_args());\n });\n }", "public static function post($pattern, callable $callback): Route;", "public function addRoutes($routes);", "public function register_routes() {\n\n\t\t$namespace = $this->namespace;\n\n\t\t$base = $this->rest_base;\n\n\t\tregister_rest_route( $namespace, '/' . $base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t) );\n\t}", "public function addRoutes(): void\n {\n $router = $this->config['router'] ?? Router::class;\n $router::$DELIMITER = $this->delimiter;\n foreach (static::$routes as [$url, $func, $method]) {\n $router::add($url, [$this, $func], $method);\n }\n }", "function add_route($route, $function, $method='GET') {\n array_push($this->routers, Array(\n 'expression' => $route,\n 'function' => $function,\n 'method' => $method\n ));\n }", "private static function registerRoute($route) {\n global $Routes;\n $Routes[] = $route;\n }", "function afterroute() {\r\n\r\n }", "public function register_routes() {\n\n\t\t\\add_filter( 'do_parse_request', array( $this, 'handle_routing' ) );\n\n\t}", "public function getRouteAdd() {\n return 'cms.site.add';\n }", "public function p_add() {\n\t\t\t#print_r($_POST);\n\t\t\t\n\t\t\t\n\t\t\t$_POST['created'] = Time::now();\n \t\t\t$_POST['modified'] = Time::now();\n\t\t\t$_POST['poster'] = $this->user->user_id;\n\t\t\t\n\t\t\t#Write Post to the Database\n\t\t $post_id= DB::instance(DB_NAME)->insert('posts', $_POST);\n\t\t\t#Call the parser to look for hashtags: \n\t\t\t$_POST['post'] = $this->parse(\"#\",$_POST['post'],$post_id);\n\t\t\t#Call the parser to look for mentions, and the 'reply_to' for the post\n\t\t\t$_POST['post'] = $this->parse(\"@\",$_POST['post'],$post_id);\n\t\t\t#Update the Post record with new post, updated in the parser:\n\t\t\tDB::instance (DB_NAME)->update('posts',$_POST,\"where post_id = '\".$post_id.\"'\");\t\n\t\t\t\n\t\t Router::redirect('/users/');\n\t\t\t\n\t\t\t\t\t\t\n\t\t}", "function add_rest_route() {\n\tregister_rest_route( 'liveblog-likes/v1', '/posts/(?P<id>[\\d]+)/like', array(\n\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t'args' => array(\n\t\t\t'id' => array(\n\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t),\n\t\t),\n\t\t'permission_callback' => function( $request ) {\n\n\t\t\tif ( 'post' !== get_post_type( $request['id'] ) ) {\n\t\t\t\treturn new WP_Error( 'invalid-post-type', 'You can only like posts.', array( 'status' => 400 ) );\n\t\t\t}\n\n\t\t\tif ( 'publish' !== get_post_status( $request['id'] ) ) {\n\t\t\t\treturn new WP_Error( 'invalid-post-status', 'You can only like posts that are published.', array( 'status' => 400 ) );\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\t\t'callback' => function( $request ) {\n\t\t\t$likes = absint( get_post_meta( $request['id'], 'liveblog_likes', true ) ) + 1;\n\t\t\tupdate_post_meta( $request['id'], 'liveblog_likes', $likes );\n\t\t\t$response = array(\n\t\t\t\t'count' => $likes,\n\t\t\t);\n\t\t\treturn new WP_REST_Response( $response, 201 );\n\t\t},\n\t));\n}", "public function p_add() {\n $_POST['user_id'] = $this->user->user_id;\n\n # Unix timestamp of when this post was created / modified\n $_POST['created'] = Time::now();\n $_POST['modified'] = Time::now();\n\n # Insert\n # Note we didn't have to sanitize any of the $_POST data because we're using the insert method which does it for us\n DB::instance(DB_NAME)->insert('posts', $_POST);\n\n \t\tRouter::redirect('/posts/myposts');\n }", "public function post($route, $callback)\n {\n return $this->addRoute('POST', $route, $callback);\n }", "public function post(string $route, callable $controller): void\n {\n $this->register($controller, Route::post($route));\n }", "private static function registerRoute($route){\r\n global $Routes;\r\n $Routes[] = BASEDIR.$route;\r\n }", "abstract public function addRoute($url, $ctrl, $mth);", "public function add_postAction() {\n\t\t$info = $this->getPost(array('sort', 'title', 'ad_type', 'ad_ptype', 'link', 'img', 'icon', 'start_time', 'end_time', 'status'));\n\t\t$info['ad_type'] = $this->ad_type;\n\t\t$info = $this->_cookData($info);\n\t\t\n\t\tif($info['ad_ptype'] == 1){\n\t\t\t$adInfo = Resource_Service_Games::getResourceGames($info['link']);\n\t\t\t$tip = \"内容\";\n\t\t} else if($info['ad_ptype'] == 2){\n\t\t\t$adInfo = Resource_Service_Attribute::getResourceAttributeByTypeId($info['link'],1);\n\t\t\t$tip = \"分类\";\n\t\t} else if($info['ad_ptype'] == 3){\n\t\t\t$adInfo = Client_Service_Subject::getSubject($info['link']);\n\t\t\t$tip = \"专题\";\n\t\t}\n\t\t$msg = $this->_getMsg($adInfo, $tip,$info['ad_ptype'],$info['link']);\n\t\t$result = Client_Service_Ad::addAd($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function add_postAction() {\n $info = $this->getPost(array('title', 'ad_ptype', 'img_day', 'img_night', 'start_time', 'end_time', 'status'));\n $info['ad_type'] = self::AD_TYPE;\n $this->cookData($info);\n $this->mergeImgParam($info);\n $result = Client_Service_Ad::addAd($info);\n if (! $result) $this->output(- 1, '操作失败');\n $this->output(0, '操作成功');\n }", "function new_post($post){\n $this->newPost($post);\n }", "function tribe_events_agenda_add_routes( $wp_rewrite ) {\n\t\t\t// Get the instance of the TribeEvents plugin, and the rewriteSlug that the plugin uses\n\t\t\t$tec = Tribe__Events__Main::instance();\n\t\t\t$tec_rewrite_slug = trailingslashit( $tec->rewriteSlug );\n\n\t\t\t// create new rule for the agenda view\n\t\t\t$newRules = array(\n\t\t\t\t$tec_rewrite_slug . 'agenda/?$' => 'index.php?post_type=' . Tribe__Events__Main::POSTTYPE . '&eventDisplay=agenda',\n\t\t\t);\n\n\t\t\t// Add the new rule to the global rewrite rules array\n\t\t\t$wp_rewrite->rules = $newRules + $wp_rewrite->rules;\n\t\t}", "function add_route($route, callable $closure)\n\n {\n// $route = self::APP_PREFIX.$route;\n// die($route);\n $this->routes[$route] = $closure;\n }", "public function post(string $route, callable $controller): void\n {\n $this->controllerAggregate->add($controller, Route::post($route));\n }", "function wpib_register_route() {\n\tregister_rest_route( 'wpib/1.0/', '/inbox', array(\n\t\tarray(\n\t\t\t'methods' => 'POST',\n\t\t\t'callback' => 'wpib_on_email_recived',\n\t\t\t'args' => array(\n\t\t\t\t'mandrill_events' => array(\n\t\t\t\t\t'required' => true\n\t\t\t\t),\n\t\t\t)\n\t\t),\n\t) );\n}", "public function configureRoutes(RouteCollection $collection) {\n parent::configureRoutes($collection);\n $collection\n ->remove('create')\n ->add('take','{objectId}/take');\n }", "public function addRoute()\n {\n if (!$this->route->isFulfilled()) {\n return $this->route->dispatch(func_get_args());\n }\n\n return true;\n }", "public function post($uri, $controller, $middleware = 'no-auth')\n {\n $this->postRoutes[$uri] = [$controller, $middleware];\n }", "public function addActionPosts(){}", "public function addPost() {\n\n if ($this->request->is('post')) {\n\n $this->Post->create();\n\n $data = $this->getPreparedPostData($this->request);\n\n if ($this->Post->save($data)) {\n $this->Session->setFlash('Your post has been saved.');\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash('Unable to add your post.');\n }\n }\n }" ]
[ "0.726868", "0.68862665", "0.65846616", "0.6566753", "0.6511439", "0.64986575", "0.64541626", "0.64365137", "0.6344932", "0.6253549", "0.62514323", "0.6178018", "0.61715704", "0.6161502", "0.6158321", "0.6098704", "0.6093677", "0.6064975", "0.60499334", "0.604593", "0.6029083", "0.6000611", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.5976556", "0.59745544", "0.59712154", "0.5967479", "0.59257454", "0.59108174", "0.59037966", "0.58993864", "0.5893281", "0.5880522", "0.58615315", "0.58559656", "0.5849477", "0.58368707", "0.58335614", "0.58253074", "0.58241695", "0.58241695", "0.5819671", "0.58181804", "0.5816925", "0.5808435", "0.58070135", "0.5796587", "0.5796081", "0.5794717", "0.5788788", "0.5786995", "0.5774908", "0.57605976", "0.5760531", "0.5757396", "0.57572025", "0.573336", "0.57247657", "0.5715874", "0.57061726", "0.56912094", "0.5687042", "0.5670898", "0.5667027", "0.56569886", "0.5652296", "0.56402296", "0.5639286", "0.56257224", "0.561284" ]
0.582581
68
Works with route collector. this function add a new put route
function put($uri, $action) { return Route::put($uri, $action); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAddRouteShorthandMethodPut()\n {\n $this->collection->put('name', '/', 'action');\n\n $this->assertCount(1, $this->collection->all());\n\n $routes = $this->collection->all();\n\n $this->assertArrayHasKey('0', $routes);\n\n $this->assertContains('PUT', $routes[0]->getMethods());\n }", "public function put(...$args) {\n $this->registerRouteHandler('PUT', ...$args);\n }", "public function testRouterAddByPut($method)\n {\n $router = new Router();\n\n $router->put(\"\", function () {\n return \"put\";\n });\n\n $router->always(function () {\n return \"not put\";\n });\n\n $res = $router->handle(\"\", $method);\n if ($method === \"PUT\") {\n $this->assertEquals(\"put\", $res);\n }\n if ($method !== \"PUT\") {\n $this->assertEquals(\"not put\", $res);\n }\n\n $routes = $router->getAll();\n $this->assertEquals(2, count($routes));\n }", "public static function put(string $route, array $options = array()) {\n\t\t\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__, $route, $options);\n\t\t\n\t\t$defaults = array(\n\t\t\t'listen'=>'PUT',\n\t\t\t'route' => $route,\n\t\t\t'rule'=> $route\n\t\t);\n\t\t\n\t\t$filtered = self::_applyFilter(get_class(), __FUNCTION__, array(\n\t\t\t'route' => $route,\n\t\t\t'options' => $options\n\t\t), array('event' => 'args'));\n\t\t\n\t\t$route = $filtered['route'];\n\t\t$options = $filtered['options'];\n\t\t\n\t\t$options += $defaults;\n\t\t\n\t\tself::addRouteRule($options);\n\t\t\n\t\tself::_notify(get_class() . '::' . __FUNCTION__, $route, $options);\n\t}", "public function addRoute($route, RouteDocument $routeDocument);", "public function add( Route $route ): Collection;", "private static function registerRoute($route) {\n global $Routes;\n $Routes[] = $route;\n }", "public function put(string $route, callable $controller): void\n {\n $this->register($controller, Route::put($route));\n }", "public static function put(string $route, string $handler, string $middleware = '');", "public function put(string $route, callable $controller): void\n {\n $this->controllerAggregate->add($controller, Route::put($route));\n }", "public function put($uri, $function) {\n $newRoute = new Route($uri, array(\"PUT\"), $function);\n\n $this->collection->addRoute($newRoute);\n }", "public function add(Route $route)\n {\n $key = \"{$route->verb}:{$route->path}\";\n unset($this->routes[$key]);\n $this->routes[$key] = $route;\n }", "public static function put($pattern, callable $callback): Route;", "private static function registerRoute($route){\r\n global $Routes;\r\n $Routes[] = BASEDIR.$route;\r\n }", "private static function registerRoute($route)\n {\n global $Routes;\n $Routes[] = \"/\".$route;\n }", "public function put(string $routePattern, $handler, string $name = null): CollectionInterface\n {\n }", "public function put($route, $action) {\r\n $this->router->addRoute('PUT', $route, $action);\r\n return $this;\r\n }", "public function putAction() {}", "public function set_route($route)\n {\n }", "public function put();", "public function put();", "public function addRoute (Cmf_Route $route) {\n $this->_routes[$route->getName()] = $route;\n }", "public function add($key, $route){\n $this->routes[$key] = $route;\n }", "public function testAddRouteAsObject()\n {\n $this->collection->add(new Route('name', '/', 'action'));\n $this->collection->compile();\n\n $this->assertCount(1, $this->collection->all());\n }", "function\taddRoute($routeData){\n\t\t//$this->routes[] = $route;\n\t\t$this->routes[] = $routeData;\n\t}", "public function addRoutes($routes);", "public function put($route, $controller)\n {\n // * Replace $route like this:\n // * /user/{id}/product/{id}\n // * to this:\n // * /^\\/user\\/([^\\/]+)\\/product\\/([^\\/]+)$/\n $routePattern = $this->replaceRoute($route);\n\n\n // * Add $routePatter to array in this format\n // * [\n // * PUT => [ '/^\\/user\\/([^\\/]+)\\/product\\/([^\\/]+)$/' => 'Controller@index'],\n // * ]\n $this->routes['PUT'][$routePattern] = $controller;\n }", "function put() \n {\n \n }", "function setResourceRoute($route, array $parameters = array(), $code = Codes::HTTP_CREATED);", "public function add($route, $params): void\n {\n $route = '#^' . $route . '$#';\n $this->routes[$route] = $params;\n }", "public function add( $route, $params = array() ){\n\n //convert the route to a regular expression\n //escape forward slashes\n $route = preg_replace('/\\//', '\\\\/', $route);\n //convert variables to capture groups\n $route = preg_replace('/\\{([a-z]+)\\}/', '(?P<\\1>[a-z-_]+)', $route);\n //convert variables with custom regular expressions e.g. {id:\\d+}\n $route = preg_replace('/\\{([a-z]+):([^\\}]+)\\}/', '(?P<\\1>\\2)', $route);\n //add start and end delimeters, forgive trailing slash and add case insensitive flag\n $route = '/^' . $route . '\\/?$/i';\n\n //add route to object\n $this->routes[$route] = $params;\n\n }", "function add_route($route, callable $closure)\n\n {\n// $route = self::APP_PREFIX.$route;\n// die($route);\n $this->routes[$route] = $closure;\n }", "public function addRoute($name, \\Yaf\\Route_Interface $route){\r\n\t\t$this->_routes[$name]\t= $route;\r\n\t }", "private function set($url,$location,$reqMethod){\n\t\t\t//validate routeformat\n\t\t\t$valid = explode(\"@\",$location);\n\t\t\tif(count($valid) != 2){ throw new \\Exception(\"Trying to save invalid route format\"); }\n\t\t\t\n\t\t\t$this->allRoutes[] = Route::set($url,$location,$reqMethod);\n\t\t}", "public function addRoute($name, $route, $priority = null);", "function add_route($route, $function, $method='GET') {\n array_push($this->routers, Array(\n 'expression' => $route,\n 'function' => $function,\n 'method' => $method\n ));\n }", "public function configureRoutes(RouteCollection $collection) {\n parent::configureRoutes($collection);\n $collection\n ->remove('create')\n ->add('take','{objectId}/take');\n }", "abstract public function addRoute($url, $ctrl, $mth);", "function setRoute(DynamicValue $p_route):void\n {\n $this->route=$p_route; \n }", "public function addRoute(string $route, array $params = []) : void\n {\n // Escape forward slashes\n $route = preg_replace('/\\//', '\\\\/', $route);\n\n // Convert variables e.g. {controller}\n $route = preg_replace('/\\{([a-z0-9]+)\\}/', '(?P<\\1>[a-z0-9-]+)', $route);\n\n // Convert variables with custom regular expressions e.g. {id:\\d+} for numbers\n $route = preg_replace('/\\{([a-z0-9]+):([^\\}]+)\\}/', '(?P<\\1>\\2)', $route);\n\n // Add start and end delimeter\n $route = '/^' . $route . '$/i';\n\n $this->routes[$route] = $params;\n }", "public function putAction() {\n\t\t$this->_notImplemented();\n\t}", "public function addRoute(RouteInterface $route) : RouterInterface;", "public function register_route($route_namespace, $route, $route_args, $override = \\false)\n {\n }", "public function put($match, $rewrite = null, $closure = null);", "public function put($uri, $action)\n {\n return $this->addRoute('PUT', $uri, $action);\n }", "public function put($route, $handler, array $middlewares = [], array $aftermiddlewares = [], array $roles = null) {\n $this->add('PUT', $route, $handler, $middlewares, $aftermiddlewares, $roles);\n }", "private function bindRoute(): void\n {\n if (isset($this->route)) {\n return;\n }\n $this->route = new SymfonyRoute('');\n }", "public function addPut($pattern, $paths = null, $position = false)\n {\n return $this->add($pattern, $paths, 'PUT', $position);\n }", "public static function add_route($method, $route, $function){\n\t\t\tself::$routes[$method][$route] = $function;\n\t\t}", "public function put(string $pattern, $handler = null): Route\n {\n return $this->addRoute($pattern, [Router::METHOD_PUT], $handler);\n }", "public function setRoute(array $route): void;", "public function add( $route, $request_type, $params = array() )\r\n {\r\n $orig_params = array(\r\n 'ajax' => false,\r\n 'namespace' => '',\r\n 'controller' => '',\r\n 'action' => '', \r\n );\r\n \r\n $params = array_merge( $orig_params, $params );\r\n \r\n $this->routes[] = array(\r\n 'route' => $route,\r\n 'type' => $request_type,\r\n 'params' => $params \r\n );\t\r\n }", "public function put(\n string $name,\n string $path,\n $requestHandler,\n array $middlewares = [],\n array $attributes = []\n ) : RouteInterface {\n return $this->route(\n $name,\n $path,\n [Router::METHOD_PUT],\n $requestHandler,\n $middlewares,\n $attributes\n );\n }", "public function putAction() {\n\t\t// TODO: Implement putAction() method.\n\t}", "public function put(string $path, $middleware, ?string $name = null): void;", "public function putAction()\n {\n \n }", "public function setNodeRoute($route);", "public function store(Route $route)\n {\n foreach ($route->getMethods() as $method) {\n self::$routes[$method][$route->getPath()] = $route;\n\n self::$allRoutes[$route->getPath()] = $route;\n }\n }", "public static function set($route) {\n self::registerRoute($route);\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "protected function put() {\n \t// Update room options\n \n }", "public function addRoute(string $uri, \\Closure $fn) : void\n {\n $this->routes[$uri] = $fn;\n }", "static function add($route, $options=null) {\n if (is_array($route)) {\n foreach ($route as $route => $options) {\n self::add($route, $options);\n }\n } elseif (!is_null($route)) {\n self::$_routes[] = new Route($route, (array) $options);\n }\n }", "public function assignRoute(array $route);", "public function put($location, $body);", "public function put($endpoint, $action, $auth = TRUE)\n\t{\n\t $endpoint = $this->_baseURL . $endpoint;\n\t\t$this->_routes['PUT'][$endpoint] = ['auth' => $auth, 'action' => $action, 'endpoint' => $endpoint];\n\t}", "public function set_matched_route($route)\n {\n }", "public function putAction() {\n\t\t\t$this->_forward('index');\n\t }" ]
[ "0.67217463", "0.6618385", "0.65387166", "0.64000005", "0.6391151", "0.638829", "0.63361806", "0.63169885", "0.6311415", "0.6302552", "0.62723124", "0.62329066", "0.62202924", "0.61679924", "0.61438483", "0.6140045", "0.6117754", "0.6109016", "0.6106314", "0.61010337", "0.61010337", "0.6076414", "0.6057605", "0.605115", "0.6042903", "0.60368806", "0.6027495", "0.6013704", "0.59950566", "0.59799105", "0.59790796", "0.59605074", "0.595864", "0.59037536", "0.5899262", "0.5898104", "0.58891803", "0.5874438", "0.5849384", "0.5847823", "0.58427626", "0.5830249", "0.58147013", "0.57676584", "0.57658076", "0.57348293", "0.5727523", "0.57116365", "0.5705391", "0.5703884", "0.57033175", "0.56968135", "0.56859577", "0.5666461", "0.56586325", "0.56555897", "0.5647035", "0.559766", "0.5591617", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.558477", "0.55844843", "0.55836856", "0.5565545", "0.5561367", "0.55512017", "0.55414665", "0.55382717", "0.55308753", "0.55291355" ]
0.61482465
14
Works with route collector. this function add a new any route
function any($uri, $action) { return Route::any($uri, $action); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add( Route $route ): Collection;", "function\taddRoute($routeData){\n\t\t//$this->routes[] = $route;\n\t\t$this->routes[] = $routeData;\n\t}", "private static function registerRoute($route) {\n global $Routes;\n $Routes[] = $route;\n }", "public function addRoutes($routes);", "public function addRoute (Cmf_Route $route) {\n $this->_routes[$route->getName()] = $route;\n }", "private static function registerRoute($route){\r\n global $Routes;\r\n $Routes[] = BASEDIR.$route;\r\n }", "public function addRoute($route, RouteDocument $routeDocument);", "public function addRoutes(): void\n {\n $router = $this->config['router'] ?? Router::class;\n $router::$DELIMITER = $this->delimiter;\n foreach (static::$routes as [$url, $func, $method]) {\n $router::add($url, [$this, $func], $method);\n }\n }", "public function add(Route $route)\n {\n $key = \"{$route->verb}:{$route->path}\";\n unset($this->routes[$key]);\n $this->routes[$key] = $route;\n }", "function add_route($route, $function, $method='GET') {\n array_push($this->routers, Array(\n 'expression' => $route,\n 'function' => $function,\n 'method' => $method\n ));\n }", "private static function registerRoute($route)\n {\n global $Routes;\n $Routes[] = \"/\".$route;\n }", "static function add($route, $options=null) {\n if (is_array($route)) {\n foreach ($route as $route => $options) {\n self::add($route, $options);\n }\n } elseif (!is_null($route)) {\n self::$_routes[] = new Route($route, (array) $options);\n }\n }", "function add_route($route, callable $closure)\n\n {\n// $route = self::APP_PREFIX.$route;\n// die($route);\n $this->routes[$route] = $closure;\n }", "public function testAddRouteAsObject()\n {\n $this->collection->add(new Route('name', '/', 'action'));\n $this->collection->compile();\n\n $this->assertCount(1, $this->collection->all());\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function add( $route, $params = array() ){\n\n //convert the route to a regular expression\n //escape forward slashes\n $route = preg_replace('/\\//', '\\\\/', $route);\n //convert variables to capture groups\n $route = preg_replace('/\\{([a-z]+)\\}/', '(?P<\\1>[a-z-_]+)', $route);\n //convert variables with custom regular expressions e.g. {id:\\d+}\n $route = preg_replace('/\\{([a-z]+):([^\\}]+)\\}/', '(?P<\\1>\\2)', $route);\n //add start and end delimeters, forgive trailing slash and add case insensitive flag\n $route = '/^' . $route . '\\/?$/i';\n\n //add route to object\n $this->routes[$route] = $params;\n\n }", "public function add($route, $params): void\n {\n $route = '#^' . $route . '$#';\n $this->routes[$route] = $params;\n }", "public function add(Route $route)\n {\n // Don't act if the sitemap is cached\n if (app('sitemap')->isCached()) return;\n\n // Open a closure that will capture logic to generate sitemap items from\n $this->routes[] = function(RoumenSitemap $sitemap) use ($route) {\n $this->addRoute($route, $sitemap);\n };\n }", "public function addRoute(string $uri, \\Closure $fn) : void\n {\n $this->routes[$uri] = $fn;\n }", "public function addRoute($name, $route, $priority = null);", "public function addRoutes(RouteCollectionInterface $collection) : RouterInterface;", "function connect($route, $args = array())\n\t\t{\n\t\t\t$route_bits = explode(\"/\", trim($route, \"/\"));\n\t\t\t\n\t\t\t$new_route['path'] = $route_bits;\n\t\t\t$new_route['args'] = $args;\n\t\t\t\n\t\t\tarray_push($this->_routes, $new_route);\n\t\t}", "protected function addRoutes()\n {\n $stub = $this->constructStub(base_path(config('l5-api.route_stub')));\n\n $routesFile = app_path(config('l5-api.routes_file'));\n\n // read file\n $lines = file($routesFile);\n $lastLine = trim($lines[count($lines) - 1]);\n\n // modify file\n if (strcmp($lastLine, '});') === 0) {\n $lines[count($lines) - 1] = ' '.$stub;\n $lines[] = \"\\r\\n});\\r\\n\";\n } else {\n $lines[] = \"$stub\\r\\n\";\n }\n\n // save file\n $fp = fopen($routesFile, 'w');\n fwrite($fp, implode('', $lines));\n fclose($fp);\n\n $this->info('Routes added successfully.');\n }", "public function addRoute($name, \\Yaf\\Route_Interface $route){\r\n\t\t$this->_routes[$name]\t= $route;\r\n\t }", "public function addRoute(RouteInterface $route) : RouterInterface;", "public function register_routes() {\n\n\t\t\\add_filter( 'do_parse_request', array( $this, 'handle_routing' ) );\n\n\t}", "public function addRoutes()\n {\n //Get the routes template content\n $content = \\File::get($this->package_path('Templates/routes.php'));\n //Append to the routes.php file\n $this->addToFile('routes.php', 'routes', \"\\n\\n\" . $content);\n }", "public function addRoute(string $route, array $params = []) : void\n {\n // Escape forward slashes\n $route = preg_replace('/\\//', '\\\\/', $route);\n\n // Convert variables e.g. {controller}\n $route = preg_replace('/\\{([a-z0-9]+)\\}/', '(?P<\\1>[a-z0-9-]+)', $route);\n\n // Convert variables with custom regular expressions e.g. {id:\\d+} for numbers\n $route = preg_replace('/\\{([a-z0-9]+):([^\\}]+)\\}/', '(?P<\\1>\\2)', $route);\n\n // Add start and end delimeter\n $route = '/^' . $route . '$/i';\n\n $this->routes[$route] = $params;\n }", "public function register_routes( Collection $routes );", "public function addRoute()\n {\n if (!$this->route->isFulfilled()) {\n return $this->route->dispatch(func_get_args());\n }\n\n return true;\n }", "public function collect(Array $route) {\n array_push($this->collection, $route);\n }", "static public function add($pattern, array $route=array())\n\t{\n\t\tif (is_array($pattern))\n\t\t{\n\t\t\tself::$routes = $pattern + self::$routes;\n\n\t\t\treturn;\n\t\t}\n\n\t\tself::$routes[$pattern] = $route;\n\t}", "private function bindRoute(): void\n {\n if (isset($this->route)) {\n return;\n }\n $this->route = new SymfonyRoute('');\n }", "protected function addToCollections($route)\n {\n $domainAndUri = $route->getDomain() . $route->uri();\n $version = $route->action[\"version\"] ?? null;\n\n foreach ($route->methods() as $method) {\n /* The keys of second array are modified from `$domainAndUri` to current */\n $this->routes[$method][$version ? \"$domainAndUri@$version\" : $domainAndUri] = $route;\n }\n\n /* The keys of `$this->allRoutes` are modified from `$method . $domainAndUri` to current */\n $this->allRoutes[$method . $domainAndUri . $version] = $route;\n }", "public function add($key, $route){\n $this->routes[$key] = $route;\n }", "static public function addRoutes(sfEvent $event)\n {\n $r = $event->getSubject();\n\n $r->prependRoute('dkp_manager_suggestRaidUsers', new sfRoute('/suggestRaidUsers', array(\n 'module' => 'dkp_manager',\n 'action' => 'suggestRaidUsers'\n )));\n\n }", "private function addRoute()\n {\n if (! $this->postType->rewrite) {\n return;\n }\n $postTypeSlug = $this->postType->rewrite['slug'];\n $this->cortexRoutes->addRoute(new QueryRoute(\n \"{$postTypeSlug}/{postName}/{singleChildName}\",\n function (array $matches) use ($postTypeSlug) {\n $queryPost = new QueryPost(\n $this->postType->name,\n $matches['postName']\n );\n if (! $queryPost->postExists()) {\n new TemplateRenderer('404');\n }\n $postSingle = $queryPost->getPost();\n new TemplateRenderer(\n $postTypeSlug,\n $matches['singleChildName'],\n $this->makeDataArray(\n $postSingle->ID,\n $matches['singleChildName']\n ),\n $this->templateRootDirectory\n );\n die();\n }\n ));\n }", "public function configureRoutes(RouteCollection $collection) {\n parent::configureRoutes($collection);\n $collection\n ->remove('create')\n ->add('take','{objectId}/take');\n }", "abstract public function addRoute($url, $ctrl, $mth);", "protected function attach(Route $route)\n {\n if ($this->routeExists($route->getPath(), $route->getMethod()) === true) {\n throw new RouteExistsException(\"The route '\".$route->getPath().\" already exists in route collection\");\n }\n\n $this->collection[] = $route;\n }", "private function register_routes() {\n\t\t$routes = $this->get_routes();\n\t\tforeach ( $routes as $route ) {\n\t\t\t$route->register();\n\t\t}\n\t}", "public function testRouterAddByAddTwoRoutesOneHandler()\n {\n $router = new Router();\n\n $router->add([\"\", \"about\"], function () {\n return \"yes\";\n });\n\n $res = $router->handle(\"\");\n $this->assertEquals(\"yes\", $res);\n\n $last = $router->getLastRoute();\n $this->assertEquals(\"\", $last);\n\n $res = $router->handle(\"about\");\n $this->assertEquals(\"yes\", $res);\n\n $last = $router->getLastRoute();\n $this->assertEquals(\"about\", $last);\n\n $routes = $router->getAll();\n $this->assertEquals(2, count($routes));\n }", "public function add( $route, $request_type, $params = array() )\r\n {\r\n $orig_params = array(\r\n 'ajax' => false,\r\n 'namespace' => '',\r\n 'controller' => '',\r\n 'action' => '', \r\n );\r\n \r\n $params = array_merge( $orig_params, $params );\r\n \r\n $this->routes[] = array(\r\n 'route' => $route,\r\n 'type' => $request_type,\r\n 'params' => $params \r\n );\t\r\n }", "public function addRoute(Route $route)\n {\n $this->routes[$route->getURL()] = $route;\n }", "public function testRouterAddByAdd($method)\n {\n $router = new Router();\n\n $router->add(\"about\", function () {\n return \"about\";\n });\n\n $res = $router->handle(\"about\", $method);\n $this->assertEquals(\"about\", $res);\n\n $routes = $router->getAll();\n $this->assertEquals(1, count($routes));\n }", "public function addRoute($route, $callback){\n if (is_array($route)){\n foreach ($route as $actual){\n $this->addRoute($actual, $callback);\n }\n return;\n }\n\n //Turn the route into a valid regex\n $route = preg_replace(\n '#:('.self::TOKEN_PATTERN.')#', \n '('.self::TOKEN_PATTERN.')', \n $route\n );\n $this->routes[\"#^{$route}/?$#\"] = $callback;\n }", "public function map(RouteCollector $collector)\n {\n foreach ($this->getRoutes() as $row) {\n $collector->addRoute($row[0], $row[1], $row[2]);\n }\n }", "public function createRouteObject();", "public function declare_routes(){\n\n $this->routes = \\Chocolatine\\get_configuration( 'routes' );\n $view_manager = \\Chocolatine\\get_manager('view');\n\n /**\n * Declare all route\n */\n foreach ( $this->routes as $key => $current_route) {\n\n $this->router->map(['GET', 'POST'], $current_route['route'] ,function ($request, $response, $args) {\n\n $router = \\Chocolatine\\get_service( 'Router' );\n return $router->controller( $request, $response, $args );\n\n });\n\n }\n\n }", "protected function _route()\r\n\t\t{\r\n\t\t\t((!is_object($this->_route)) ? $this->_route = init_class(ROUTE_NAME) : '');\r\n\t\t}", "public function add($route, $params = [])\n\t{\n\t\t/**\n\t\t * convert the route to a regular expression\n\t\t * 1- escape forward slashes\n\t\t*/\n\t\t$route = preg_replace('/\\//', '\\\\/', $route);\n\n\t\t/**\n\t\t * 2- convert variables e.g. {controller}\n\t\t*/\n\t\t$route = preg_replace('/\\{([a-z]+)\\}/', '(?P<\\1>[a-z-]+)', $route);\n\n\t\t/**\n\t\t * 3- convert variables with custom regular expressions e.g. {id:\\d+}\n\t\t*/\n\t\t$route = preg_replace('/\\{([a-z]+):([^\\}]+)\\}/', '(?P<\\1>\\2)', $route);\n\n\t\t/**\n\t\t * 4- Add start and end delimiters , and case insensitive flag\n\t\t*/\n\t\t$route = '/^' . $route . '$/i';\n\n\t\t$this->routes[$route] = $params;\n\t}", "private function add($path, $callable, $name, $method){\n $route = new Route($path, $callable);\n $this->routes[$method][] = $route;\n if(is_string($callable) && $name === null){\n $name = $callable;\n }\n if($name){\n $this->namedRoutes[$name] = $route;\n }\n return $route;\n }", "private static function addRoute($method, $uri, $controller)\n {\n $route = array(\n 'method' => $method,\n 'uri' => $uri,\n 'controller' => $controller\n );\n array_push(self::$RoutingTable, $route);\n }", "protected function makeRoute()\n {\n new MakeRoute($this, $this->files);\n }", "public static function add_route($method, $route, $function){\n\t\t\tself::$routes[$method][$route] = $function;\n\t\t}", "public function addRoute(string $route, string $methods, string|callable $call, array $callArgs = null): void\n {\n $route = trim($route);\n $routes = $this->routes();\n\n // Chop \"/\" from end.\n if ($route != '/') {\n $route = rtrim($route, '/');\n }\n\n $i = count($routes);\n\n // Find current route index if exists.\n foreach ($routes as $_i => [$_route]) {\n if ($route === $_route) {\n $i = $_i;\n break;\n }\n }\n\n $calls = self::prepareCalls($routes, $i);\n $methods = self::prepareMethods($methods);\n\n foreach ($methods as $method) {\n $calls[$method] = $call;\n }\n\n $this->routes[$i] = [$route, $calls, $callArgs];\n }", "public static function add(string $endpoint, $function, string $method)\n\t{\n\t\tarray_push(self::$routes, new Route($endpoint, $function, $method));\n\t}", "public function __construct(){\n\n $this->routes = new \\SplObjectStorage();\n\n }", "public function __invoke(RouteCollector $collector)\n {\n $this->map($collector);\n }", "public abstract function addRoute($nombrePuntoInicial_,$descripcionPuntoInicial_,$nombrePuntoFinal_,\n $descripcionPuntoFinal_,$coordenadas_,$estiloCoordenada_,$coordenadaInicial_,$coordenadaFinal_);", "public function addRoute(RouteInterface $route)\n {\n $this->routes[] = $route;\n }", "public function addRoute($method, $uri, $action, $data = [])\n\t{\n\t\t$this->routes[] = [\n\t\t\t'method' => $method,\n\t\t\t'uri' => $uri,\n\t\t\t'action' => $action,\n\t\t\t'name' => isset($data['name']) ? $data['name'] : null,\n\t\t\t'middleware' => isset($data['middleware']) ? $data['middleware'] : null,\n\t\t\t'before' => isset($data['before']) ? $data['before'] : null,\n\t\t\t'after' => isset($data['after']) ? $data['after'] : null\n\t\t];\n\t}", "public static function addRouteRule($route) {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__, $route);\n\n\t\t$defaults = array(\n\t\t\t'route' => null,\n\t\t\t'access_level' => null,\n\t\t\t'access_level_redirect' => null,\n\t\t\t'user_roles' => null,\n\t\t\t'user_roles_redirect' => null,\n\t\t\t'rule' => null,\n\t\t\t'activate_ssl' => false,\n\t\t\t'deactivate_ssl' => false,\n\t\t\t'callback'=> null,\n\t\t\t'listen'=>'*'\n\t\t);\n\n\t\tif (!is_array($route)) {\n\t\t\t$route = array('rule' => $route);\n\t\t}\n\n\t\t$route += $defaults;\n\t\t$route = self::_applyFilter(get_class(), __FUNCTION__, $route, array('event' => 'args'));\n\t\tarray_push(self::$routes, $route);\n\n\t\tself::_notify(get_class() . '::' . __FUNCTION__, $route);\n\t}", "public function addAuthorization($uri) {\n\t\t$this->routes[$uri] = $uri;\n\t}", "public function assignRoute(array $route);", "protected function registerRouteBindings()\n {\n //\n }", "protected function defineRoute($method,$path,$fn,$paramsSequence) {\n \n $route = Array('method'=>$method,'path'=>$path,'fn'=>$fn,'paramsSequence'=>$paramsSequence);\n $this->_routes[] = $route;\n return true;\n \n }", "public function add(string $path, $callable): Route{\n\t\t$route = new Route($path, $callable);\n\t\t$this->routes[] = $route;\n\t\treturn $route;\n\t}", "private function setRoutes() : void\n {\n $this->routes = $this->routeProvider->getRoutes();\n $this->syRouteCollection = new RouteCollection();\n foreach ($this->routes as $route) {\n $syRoute = new SymfonyRoute(\n $route->getPath(),\n $route->getParamsDefaults(),\n $route->getParamsRequirements(),\n [],\n '',\n [],\n $route->getMethods()\n );\n $this->syRouteCollection->add($route->getName(), $syRoute);\n }\n }" ]
[ "0.7078193", "0.69250166", "0.6891621", "0.68513596", "0.6730084", "0.6728578", "0.66840494", "0.66520035", "0.66515195", "0.6633905", "0.6591515", "0.6557699", "0.6555863", "0.64848274", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6436372", "0.6435603", "0.643553", "0.6434522", "0.63891816", "0.6382974", "0.63774115", "0.6371424", "0.63514566", "0.63325113", "0.6327159", "0.63223165", "0.6313603", "0.6297735", "0.6287859", "0.62767404", "0.62442195", "0.6206513", "0.62027144", "0.6187582", "0.615066", "0.61356926", "0.6131278", "0.611924", "0.61048245", "0.60970205", "0.60944706", "0.6091335", "0.60887724", "0.60594493", "0.6039996", "0.6014441", "0.59968257", "0.5981703", "0.59814143", "0.5968915", "0.5968361", "0.59604734", "0.5934121", "0.59268856", "0.5922329", "0.5920823", "0.5919603", "0.5913331", "0.5913191", "0.5897923", "0.5893242", "0.5892589", "0.58885974", "0.5880598", "0.5863888", "0.58562815", "0.58540714", "0.585272", "0.5847253", "0.5819775" ]
0.0
-1
Works with route collector. this function add a new options route
function options($uri, $action) { return Route::options($uri, $action); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function routeOptions();", "public function setRouteOptions($options);", "static function add($route, $options=null) {\n if (is_array($route)) {\n foreach ($route as $route => $options) {\n self::add($route, $options);\n }\n } elseif (!is_null($route)) {\n self::$_routes[] = new Route($route, (array) $options);\n }\n }", "public function route(array $options): void\n {\n $route = $this->routes->create($options);\n $this->routes->add($route);\n\n if (is_string($options['match'] ?? false)) {\n $this->addFilter($route->getRequestMatcher(), new RouteStarsFilters($options['match']));\n }\n\n $filter = $options['filter'] ?? [];\n foreach (is_array($filter) ? $filter : [$filter] as $item) {\n $this->filter($route->getRequestMatcher(), $item);\n }\n }", "public function options(string $route, callable $controller): void\n {\n $this->controllerAggregate->add($controller, Route::options($route));\n }", "public function testAddRouteShorthandMethodOptions()\n {\n $this->collection->options('name', '/', 'action');\n\n $this->assertCount(1, $this->collection->all());\n\n $routes = $this->collection->all();\n\n $this->assertArrayHasKey('0', $routes);\n\n $this->assertContains('OPTIONS', $routes[0]->getMethods());\n }", "public function options(string $route, callable $controller): void\n {\n $this->register($controller, Route::options($route));\n }", "public function testRouterAddByOptions($method)\n {\n $router = new Router();\n\n $router->options(\"\", function () {\n return \"options\";\n });\n\n $router->always(function () {\n return \"not options\";\n });\n\n $res = $router->handle(\"\", $method);\n if ($method === \"OPTIONS\") {\n $this->assertEquals(\"options\", $res);\n }\n if ($method !== \"OPTIONS\") {\n $this->assertEquals(\"not options\", $res);\n }\n\n $routes = $router->getAll();\n $this->assertEquals(2, count($routes));\n }", "function\taddRoute($routeData){\n\t\t//$this->routes[] = $route;\n\t\t$this->routes[] = $routeData;\n\t}", "public function get_route_options($route)\n {\n }", "public function addOptions(Getopt $_options)\n {\n\n }", "function connect($route, $args = array())\n\t\t{\n\t\t\t$route_bits = explode(\"/\", trim($route, \"/\"));\n\t\t\t\n\t\t\t$new_route['path'] = $route_bits;\n\t\t\t$new_route['args'] = $args;\n\t\t\t\n\t\t\tarray_push($this->_routes, $new_route);\n\t\t}", "public function addRoute($route, RouteDocument $routeDocument);", "function add_route($route, $function, $method='GET') {\n array_push($this->routers, Array(\n 'expression' => $route,\n 'function' => $function,\n 'method' => $method\n ));\n }", "public function addRoutes(): void\n {\n $router = $this->config['router'] ?? Router::class;\n $router::$DELIMITER = $this->delimiter;\n foreach (static::$routes as [$url, $func, $method]) {\n $router::add($url, [$this, $func], $method);\n }\n }", "public function add( Route $route ): Collection;", "public function addRoute (Cmf_Route $route) {\n $this->_routes[$route->getName()] = $route;\n }", "public function addRoutes($routes);", "public static function addRoute($route, $params = array(), $options = array())\n\t{\n\t\t$link = new SitemapURL(route($route, $params), $options);\n\t\tarray_push(static::$links, $link);\n\t}", "public function add(Route $route)\n {\n $key = \"{$route->verb}:{$route->path}\";\n unset($this->routes[$key]);\n $this->routes[$key] = $route;\n }", "private static function registerRoute($route) {\n global $Routes;\n $Routes[] = $route;\n }", "abstract public function addOptions(Getopt $_options);", "protected static function add(string $path, array $options, string $method): void\n {\n static::$routes[$path] = [\n 'controller' => $options[0],\n 'action' => $options[1],\n 'method' => $method\n ];\n }", "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, $this->route, [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_options']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_options'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_options'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\n\t\tregister_rest_route( $this->namespace, $this->route . '/(?P<slug>.+)', [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_option']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_option'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_option'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\t}", "private static function registerRoute($route){\r\n global $Routes;\r\n $Routes[] = BASEDIR.$route;\r\n }", "public function addRoutes()\n {\n //Get the routes template content\n $content = \\File::get($this->package_path('Templates/routes.php'));\n //Append to the routes.php file\n $this->addToFile('routes.php', 'routes', \"\\n\\n\" . $content);\n }", "function add_route($route, callable $closure)\n\n {\n// $route = self::APP_PREFIX.$route;\n// die($route);\n $this->routes[$route] = $closure;\n }", "function setRoute(DynamicValue $p_route):void\n {\n $this->route=$p_route; \n }", "public function add_options_page()\n {\n }", "public function hookDefineRoutes($args) {\n\t\t$args['router']->addConfig(new Zend_Config_Ini(dirname(__FILE__) . '/routes.ini', 'routes'));\n\t}", "public function allowOPTIONSRoute(RouteBuildEvent $event) {\n $collection = $event->getRouteCollection();\n $routes = $collection->all();\n foreach ($routes as $name => $route) {\n $methods = $route->getMethods();\n if (!in_array('OPTIONS', $methods)) {\n $methods[] = 'OPTIONS';\n $route->setMethods($methods);\n $collection->add($name, $route);\n }\n }\n }", "public function add( $route, $params = array() ){\n\n //convert the route to a regular expression\n //escape forward slashes\n $route = preg_replace('/\\//', '\\\\/', $route);\n //convert variables to capture groups\n $route = preg_replace('/\\{([a-z]+)\\}/', '(?P<\\1>[a-z-_]+)', $route);\n //convert variables with custom regular expressions e.g. {id:\\d+}\n $route = preg_replace('/\\{([a-z]+):([^\\}]+)\\}/', '(?P<\\1>\\2)', $route);\n //add start and end delimeters, forgive trailing slash and add case insensitive flag\n $route = '/^' . $route . '\\/?$/i';\n\n //add route to object\n $this->routes[$route] = $params;\n\n }", "function add_nav_options( $options ) {\r\n global $bp;\r\n \r\n $options[__( 'Schedule', 'bpsp' )] = $options[__( 'Home', 'bpsp' )] . '/schedules';\r\n return $options;\r\n }", "public function addRoute($name, $route, $priority = null);", "function add_rewrite_endpoint($name, $places, $query_var = \\true)\n {\n }", "public function add($route, $params): void\n {\n $route = '#^' . $route . '$#';\n $this->routes[$route] = $params;\n }", "public function add( $route, $request_type, $params = array() )\r\n {\r\n $orig_params = array(\r\n 'ajax' => false,\r\n 'namespace' => '',\r\n 'controller' => '',\r\n 'action' => '', \r\n );\r\n \r\n $params = array_merge( $orig_params, $params );\r\n \r\n $this->routes[] = array(\r\n 'route' => $route,\r\n 'type' => $request_type,\r\n 'params' => $params \r\n );\t\r\n }", "public function addRoute(string $route, array $params = []) : void\n {\n // Escape forward slashes\n $route = preg_replace('/\\//', '\\\\/', $route);\n\n // Convert variables e.g. {controller}\n $route = preg_replace('/\\{([a-z0-9]+)\\}/', '(?P<\\1>[a-z0-9-]+)', $route);\n\n // Convert variables with custom regular expressions e.g. {id:\\d+} for numbers\n $route = preg_replace('/\\{([a-z0-9]+):([^\\}]+)\\}/', '(?P<\\1>\\2)', $route);\n\n // Add start and end delimeter\n $route = '/^' . $route . '$/i';\n\n $this->routes[$route] = $params;\n }", "public function testOptionsMethodRoute(): void\n {\n $this->options('/options/request_action/test_request_action');\n $this->assertResponseSuccess();\n }", "protected function addToCollections($route)\n {\n $domainAndUri = $route->getDomain() . $route->uri();\n $version = $route->action[\"version\"] ?? null;\n\n foreach ($route->methods() as $method) {\n /* The keys of second array are modified from `$domainAndUri` to current */\n $this->routes[$method][$version ? \"$domainAndUri@$version\" : $domainAndUri] = $route;\n }\n\n /* The keys of `$this->allRoutes` are modified from `$method . $domainAndUri` to current */\n $this->allRoutes[$method . $domainAndUri . $version] = $route;\n }", "private static function registerRoute($route)\n {\n global $Routes;\n $Routes[] = \"/\".$route;\n }", "public function configureRoutes(RouteCollection $collection) {\n parent::configureRoutes($collection);\n $collection\n ->remove('create')\n ->add('take','{objectId}/take');\n }", "public function configureOptions(OptionsResolver $resolver)\n {\n $resolver->setDefined('route');\n }", "function add_custom_admin_routes($app) {\n\n}", "public function set_route($route)\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function addRoute(RouteInterface $route) : RouterInterface;", "public function setRoute(array $route): void;", "public function add_to_route($title,$item) {\n\t\tif (is_string($item)) $item = array('url' => $item);\n\t\t$this->route_extra[] = array($title,$item);\n\t}", "protected function addRoutes()\n {\n $stub = $this->constructStub(base_path(config('l5-api.route_stub')));\n\n $routesFile = app_path(config('l5-api.routes_file'));\n\n // read file\n $lines = file($routesFile);\n $lastLine = trim($lines[count($lines) - 1]);\n\n // modify file\n if (strcmp($lastLine, '});') === 0) {\n $lines[count($lines) - 1] = ' '.$stub;\n $lines[] = \"\\r\\n});\\r\\n\";\n } else {\n $lines[] = \"$stub\\r\\n\";\n }\n\n // save file\n $fp = fopen($routesFile, 'w');\n fwrite($fp, implode('', $lines));\n fclose($fp);\n\n $this->info('Routes added successfully.');\n }", "abstract public function addRoute($url, $ctrl, $mth);", "public function collect(Array $route) {\n array_push($this->collection, $route);\n }", "public static function addRouteRule($route) {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__, $route);\n\n\t\t$defaults = array(\n\t\t\t'route' => null,\n\t\t\t'access_level' => null,\n\t\t\t'access_level_redirect' => null,\n\t\t\t'user_roles' => null,\n\t\t\t'user_roles_redirect' => null,\n\t\t\t'rule' => null,\n\t\t\t'activate_ssl' => false,\n\t\t\t'deactivate_ssl' => false,\n\t\t\t'callback'=> null,\n\t\t\t'listen'=>'*'\n\t\t);\n\n\t\tif (!is_array($route)) {\n\t\t\t$route = array('rule' => $route);\n\t\t}\n\n\t\t$route += $defaults;\n\t\t$route = self::_applyFilter(get_class(), __FUNCTION__, $route, array('event' => 'args'));\n\t\tarray_push(self::$routes, $route);\n\n\t\tself::_notify(get_class() . '::' . __FUNCTION__, $route);\n\t}", "public function addRoute($name, \\Yaf\\Route_Interface $route){\r\n\t\t$this->_routes[$name]\t= $route;\r\n\t }", "public function assignRoute(array $route);", "function wp_oembed_register_route()\n {\n }", "function ahr_menu() {\r\n \r\n\tglobal $AHR_SLUG;\r\n\t\r\n add_options_page( 'Advanced Https Redirection', 'Advanced Https Redirection', 'manage_options', $AHR_SLUG, 'ahr_render_options_page' );\r\n \r\n}", "private function bindRoute(): void\n {\n if (isset($this->route)) {\n return;\n }\n $this->route = new SymfonyRoute('');\n }", "public function registerRouters () {\n\t\tif ( !current_user_can( 'manage_options' ) )\n\t\t\treturn;\n\n\t\tforeach ( $this->classes as $class ) {\n\t\t\t\\Maven\\Core\\HookManager::instance()->addFilter( 'json_endpoints', array( $class, 'registerRoutes' ) );\n\t\t}\n\t}", "public function register_options(){\n\t\tparent::register_options();\n\t\t//$orgzr = \\WBF\\modules\\options\\Organizer::getInstance();\n\t\t//Do stuff...\n\t}", "public function options(string $path, $middleware, ?string $name = null): void;", "public function addRoute(Route $route)\n {\n $this->routes[$route->getURL()] = $route;\n }", "public function add(Route $route)\n {\n // Don't act if the sitemap is cached\n if (app('sitemap')->isCached()) return;\n\n // Open a closure that will capture logic to generate sitemap items from\n $this->routes[] = function(RoumenSitemap $sitemap) use ($route) {\n $this->addRoute($route, $sitemap);\n };\n }", "private function addRoute()\n {\n if (! $this->postType->rewrite) {\n return;\n }\n $postTypeSlug = $this->postType->rewrite['slug'];\n $this->cortexRoutes->addRoute(new QueryRoute(\n \"{$postTypeSlug}/{postName}/{singleChildName}\",\n function (array $matches) use ($postTypeSlug) {\n $queryPost = new QueryPost(\n $this->postType->name,\n $matches['postName']\n );\n if (! $queryPost->postExists()) {\n new TemplateRenderer('404');\n }\n $postSingle = $queryPost->getPost();\n new TemplateRenderer(\n $postTypeSlug,\n $matches['singleChildName'],\n $this->makeDataArray(\n $postSingle->ID,\n $matches['singleChildName']\n ),\n $this->templateRootDirectory\n );\n die();\n }\n ));\n }", "private function _createRoute( $options )\n {\n $url = $this->_di->getService( \"url\" );\n\n /**\n * All route uris should have the uri prefix\n */\n $options[\"uri\"] = $url->getUriPrefix() . $options[\"uri\"];\n\n if (isset($options[\"controller_action\"]))\n {\n $controller_action_exploded = explode( \"#\", $options[\"controller_action\"] );\n\n $options[\"controllerName\"] = $controller_action_exploded[0];\n $options[\"actionName\"] = $controller_action_exploded[1];\n }\n\n // $uri = $settings[\"uri\"];\n //\n // $controllerName = $settings[\"controllerName\"];\n //\n // $actionName = $settings[\"actionName\"];\n //\n // $params = $settigns[\"params\"];\n\n return new Route($options);\n }", "public function addRoute($method, $uri, $action, $data = [])\n\t{\n\t\t$this->routes[] = [\n\t\t\t'method' => $method,\n\t\t\t'uri' => $uri,\n\t\t\t'action' => $action,\n\t\t\t'name' => isset($data['name']) ? $data['name'] : null,\n\t\t\t'middleware' => isset($data['middleware']) ? $data['middleware'] : null,\n\t\t\t'before' => isset($data['before']) ? $data['before'] : null,\n\t\t\t'after' => isset($data['after']) ? $data['after'] : null\n\t\t];\n\t}", "public function options(string $routePattern, $handler, string $name = null): CollectionInterface\n {\n }", "public function hookDefineRoutes($args)\n {\n if (is_admin_theme() && !get_option('clean_url_use_admin')) {\n return;\n }\n\n $router = $args['router'];\n\n $mainPath = get_option('clean_url_main_path');\n $collectionGeneric = get_option('clean_url_collection_generic');\n $itemGeneric = get_option('clean_url_item_generic');\n $fileGeneric = get_option('clean_url_file_generic');\n\n $allowedForItems = unserialize(get_option('clean_url_item_alloweds'));\n $allowedForFiles = unserialize(get_option('clean_url_file_alloweds'));\n\n // Note: order of routes is important: Zend checks from the last one\n // (most specific) to the first one (most generic).\n\n // Get all collections identifiers with one query.\n $collectionsIdentifiers = get_view()->getRecordTypeIdentifiers('Collection', false);\n\n if (!empty($collectionsIdentifiers)) {\n // Use one regex for all collections. Default is case insensitve.\n $collectionsRegex = array_map('preg_quote', $collectionsIdentifiers);\n // To avoid a bug with identifiers that contain a \"/\", that is not\n // escaped with preg_quote().\n $collectionsRegex = '(' . str_replace('/', '\\/', implode('|', $collectionsRegex)) . ')';\n\n // Add a collection route.\n $route = $mainPath . $collectionGeneric;\n $router->addRoute('cleanUrl_collections', new Zend_Controller_Router_Route(\n $route . ':record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'collection-show',\n ),\n array(\n 'record_identifier' => $collectionsRegex,\n )));\n\n // Add a collection route for files.\n if (in_array('collection', $allowedForFiles)) {\n $router->addRoute('cleanUrl_collections_file', new Zend_Controller_Router_Route(\n $route . ':collection_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-collection-file',\n ),\n array(\n 'collection_identifier' => $collectionsRegex,\n )));\n }\n\n // Add a collection / item route for files.\n if (in_array('collection_item', $allowedForFiles)) {\n $router->addRoute('cleanUrl_collections_item_file', new Zend_Controller_Router_Route(\n $route . ':collection_identifier/:item_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-collection-item-file',\n ),\n array(\n 'collection_identifier' => $collectionsRegex,\n )));\n }\n\n // Add a collection route for items.\n if (in_array('collection', $allowedForItems)) {\n $router->addRoute('cleanUrl_collections_item', new Zend_Controller_Router_Route(\n $route . ':collection_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-collection-item',\n ),\n array(\n 'collection_identifier' => $collectionsRegex,\n )));\n }\n }\n\n // Add a generic route for files.\n if (in_array('generic', $allowedForFiles)) {\n $route = $mainPath . $fileGeneric;\n $router->addRoute('cleanUrl_generic_file', new Zend_Controller_Router_Route(\n $route . ':record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-file',\n 'collection_id' => NULL,\n )));\n }\n\n // Add a generic / item route for files.\n if (in_array('generic_item', $allowedForFiles)) {\n $route = $mainPath . $itemGeneric;\n $router->addRoute('cleanUrl_generic_item_file', new Zend_Controller_Router_Route(\n $route . ':item_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-item-file',\n 'collection_id' => NULL,\n )));\n }\n\n // Add a generic route for items.\n if (in_array('generic', $allowedForItems)) {\n $route = $mainPath . trim($itemGeneric, '/');\n $router->addRoute('cleanUrl_generic_items_browse', new Zend_Controller_Router_Route(\n $route,\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'items-browse',\n )));\n $router->addRoute('cleanUrl_generic_item', new Zend_Controller_Router_Route(\n $route . '/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-item',\n 'collection_id' => NULL,\n )));\n }\n }", "public function addRoute($route, $callback){\n if (is_array($route)){\n foreach ($route as $actual){\n $this->addRoute($actual, $callback);\n }\n return;\n }\n\n //Turn the route into a valid regex\n $route = preg_replace(\n '#:('.self::TOKEN_PATTERN.')#', \n '('.self::TOKEN_PATTERN.')', \n $route\n );\n $this->routes[\"#^{$route}/?$#\"] = $callback;\n }" ]
[ "0.72336286", "0.70398086", "0.69697714", "0.65069073", "0.63734156", "0.63640034", "0.6301081", "0.62393355", "0.623774", "0.617137", "0.6059875", "0.60594463", "0.602469", "0.6019009", "0.60165566", "0.59977657", "0.5980398", "0.59726006", "0.59037274", "0.58809954", "0.5879182", "0.5875146", "0.5871919", "0.5833908", "0.5832625", "0.581532", "0.57985526", "0.57926", "0.576539", "0.5759996", "0.575361", "0.57446045", "0.57258904", "0.56976014", "0.5691938", "0.56836224", "0.56777465", "0.5674632", "0.5658402", "0.5649006", "0.56455076", "0.56419647", "0.5641184", "0.5615886", "0.5613947", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.5603939", "0.56023616", "0.55998373", "0.5597217", "0.55768526", "0.5561727", "0.5549169", "0.5526839", "0.55067563", "0.5478762", "0.5471373", "0.5462456", "0.5460427", "0.5453396", "0.5444658", "0.5443152", "0.5434706", "0.5432124", "0.5429044", "0.54282737", "0.5427101", "0.5416028", "0.54122454", "0.54039913", "0.539042" ]
0.0
-1
Works with route collector. this function add a new options route
function delete($uri, $action) { return Route::delete($uri, $action); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function routeOptions();", "public function setRouteOptions($options);", "static function add($route, $options=null) {\n if (is_array($route)) {\n foreach ($route as $route => $options) {\n self::add($route, $options);\n }\n } elseif (!is_null($route)) {\n self::$_routes[] = new Route($route, (array) $options);\n }\n }", "public function route(array $options): void\n {\n $route = $this->routes->create($options);\n $this->routes->add($route);\n\n if (is_string($options['match'] ?? false)) {\n $this->addFilter($route->getRequestMatcher(), new RouteStarsFilters($options['match']));\n }\n\n $filter = $options['filter'] ?? [];\n foreach (is_array($filter) ? $filter : [$filter] as $item) {\n $this->filter($route->getRequestMatcher(), $item);\n }\n }", "public function options(string $route, callable $controller): void\n {\n $this->controllerAggregate->add($controller, Route::options($route));\n }", "public function testAddRouteShorthandMethodOptions()\n {\n $this->collection->options('name', '/', 'action');\n\n $this->assertCount(1, $this->collection->all());\n\n $routes = $this->collection->all();\n\n $this->assertArrayHasKey('0', $routes);\n\n $this->assertContains('OPTIONS', $routes[0]->getMethods());\n }", "public function options(string $route, callable $controller): void\n {\n $this->register($controller, Route::options($route));\n }", "public function testRouterAddByOptions($method)\n {\n $router = new Router();\n\n $router->options(\"\", function () {\n return \"options\";\n });\n\n $router->always(function () {\n return \"not options\";\n });\n\n $res = $router->handle(\"\", $method);\n if ($method === \"OPTIONS\") {\n $this->assertEquals(\"options\", $res);\n }\n if ($method !== \"OPTIONS\") {\n $this->assertEquals(\"not options\", $res);\n }\n\n $routes = $router->getAll();\n $this->assertEquals(2, count($routes));\n }", "function\taddRoute($routeData){\n\t\t//$this->routes[] = $route;\n\t\t$this->routes[] = $routeData;\n\t}", "public function get_route_options($route)\n {\n }", "public function addOptions(Getopt $_options)\n {\n\n }", "function connect($route, $args = array())\n\t\t{\n\t\t\t$route_bits = explode(\"/\", trim($route, \"/\"));\n\t\t\t\n\t\t\t$new_route['path'] = $route_bits;\n\t\t\t$new_route['args'] = $args;\n\t\t\t\n\t\t\tarray_push($this->_routes, $new_route);\n\t\t}", "public function addRoute($route, RouteDocument $routeDocument);", "function add_route($route, $function, $method='GET') {\n array_push($this->routers, Array(\n 'expression' => $route,\n 'function' => $function,\n 'method' => $method\n ));\n }", "public function addRoutes(): void\n {\n $router = $this->config['router'] ?? Router::class;\n $router::$DELIMITER = $this->delimiter;\n foreach (static::$routes as [$url, $func, $method]) {\n $router::add($url, [$this, $func], $method);\n }\n }", "public function add( Route $route ): Collection;", "public function addRoute (Cmf_Route $route) {\n $this->_routes[$route->getName()] = $route;\n }", "public function addRoutes($routes);", "public static function addRoute($route, $params = array(), $options = array())\n\t{\n\t\t$link = new SitemapURL(route($route, $params), $options);\n\t\tarray_push(static::$links, $link);\n\t}", "public function add(Route $route)\n {\n $key = \"{$route->verb}:{$route->path}\";\n unset($this->routes[$key]);\n $this->routes[$key] = $route;\n }", "private static function registerRoute($route) {\n global $Routes;\n $Routes[] = $route;\n }", "abstract public function addOptions(Getopt $_options);", "protected static function add(string $path, array $options, string $method): void\n {\n static::$routes[$path] = [\n 'controller' => $options[0],\n 'action' => $options[1],\n 'method' => $method\n ];\n }", "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, $this->route, [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_options']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_options'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_options'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\n\t\tregister_rest_route( $this->namespace, $this->route . '/(?P<slug>.+)', [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_option']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_option'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_option'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\t}", "private static function registerRoute($route){\r\n global $Routes;\r\n $Routes[] = BASEDIR.$route;\r\n }", "public function addRoutes()\n {\n //Get the routes template content\n $content = \\File::get($this->package_path('Templates/routes.php'));\n //Append to the routes.php file\n $this->addToFile('routes.php', 'routes', \"\\n\\n\" . $content);\n }", "function add_route($route, callable $closure)\n\n {\n// $route = self::APP_PREFIX.$route;\n// die($route);\n $this->routes[$route] = $closure;\n }", "function setRoute(DynamicValue $p_route):void\n {\n $this->route=$p_route; \n }", "public function add_options_page()\n {\n }", "public function hookDefineRoutes($args) {\n\t\t$args['router']->addConfig(new Zend_Config_Ini(dirname(__FILE__) . '/routes.ini', 'routes'));\n\t}", "public function allowOPTIONSRoute(RouteBuildEvent $event) {\n $collection = $event->getRouteCollection();\n $routes = $collection->all();\n foreach ($routes as $name => $route) {\n $methods = $route->getMethods();\n if (!in_array('OPTIONS', $methods)) {\n $methods[] = 'OPTIONS';\n $route->setMethods($methods);\n $collection->add($name, $route);\n }\n }\n }", "public function add( $route, $params = array() ){\n\n //convert the route to a regular expression\n //escape forward slashes\n $route = preg_replace('/\\//', '\\\\/', $route);\n //convert variables to capture groups\n $route = preg_replace('/\\{([a-z]+)\\}/', '(?P<\\1>[a-z-_]+)', $route);\n //convert variables with custom regular expressions e.g. {id:\\d+}\n $route = preg_replace('/\\{([a-z]+):([^\\}]+)\\}/', '(?P<\\1>\\2)', $route);\n //add start and end delimeters, forgive trailing slash and add case insensitive flag\n $route = '/^' . $route . '\\/?$/i';\n\n //add route to object\n $this->routes[$route] = $params;\n\n }", "function add_nav_options( $options ) {\r\n global $bp;\r\n \r\n $options[__( 'Schedule', 'bpsp' )] = $options[__( 'Home', 'bpsp' )] . '/schedules';\r\n return $options;\r\n }", "public function addRoute($name, $route, $priority = null);", "function add_rewrite_endpoint($name, $places, $query_var = \\true)\n {\n }", "public function add($route, $params): void\n {\n $route = '#^' . $route . '$#';\n $this->routes[$route] = $params;\n }", "public function add( $route, $request_type, $params = array() )\r\n {\r\n $orig_params = array(\r\n 'ajax' => false,\r\n 'namespace' => '',\r\n 'controller' => '',\r\n 'action' => '', \r\n );\r\n \r\n $params = array_merge( $orig_params, $params );\r\n \r\n $this->routes[] = array(\r\n 'route' => $route,\r\n 'type' => $request_type,\r\n 'params' => $params \r\n );\t\r\n }", "public function addRoute(string $route, array $params = []) : void\n {\n // Escape forward slashes\n $route = preg_replace('/\\//', '\\\\/', $route);\n\n // Convert variables e.g. {controller}\n $route = preg_replace('/\\{([a-z0-9]+)\\}/', '(?P<\\1>[a-z0-9-]+)', $route);\n\n // Convert variables with custom regular expressions e.g. {id:\\d+} for numbers\n $route = preg_replace('/\\{([a-z0-9]+):([^\\}]+)\\}/', '(?P<\\1>\\2)', $route);\n\n // Add start and end delimeter\n $route = '/^' . $route . '$/i';\n\n $this->routes[$route] = $params;\n }", "public function testOptionsMethodRoute(): void\n {\n $this->options('/options/request_action/test_request_action');\n $this->assertResponseSuccess();\n }", "protected function addToCollections($route)\n {\n $domainAndUri = $route->getDomain() . $route->uri();\n $version = $route->action[\"version\"] ?? null;\n\n foreach ($route->methods() as $method) {\n /* The keys of second array are modified from `$domainAndUri` to current */\n $this->routes[$method][$version ? \"$domainAndUri@$version\" : $domainAndUri] = $route;\n }\n\n /* The keys of `$this->allRoutes` are modified from `$method . $domainAndUri` to current */\n $this->allRoutes[$method . $domainAndUri . $version] = $route;\n }", "private static function registerRoute($route)\n {\n global $Routes;\n $Routes[] = \"/\".$route;\n }", "public function configureOptions(OptionsResolver $resolver)\n {\n $resolver->setDefined('route');\n }", "public function configureRoutes(RouteCollection $collection) {\n parent::configureRoutes($collection);\n $collection\n ->remove('create')\n ->add('take','{objectId}/take');\n }", "function add_custom_admin_routes($app) {\n\n}", "public function set_route($route)\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function addRoute(RouteInterface $route) : RouterInterface;", "public function setRoute(array $route): void;", "public function add_to_route($title,$item) {\n\t\tif (is_string($item)) $item = array('url' => $item);\n\t\t$this->route_extra[] = array($title,$item);\n\t}", "protected function addRoutes()\n {\n $stub = $this->constructStub(base_path(config('l5-api.route_stub')));\n\n $routesFile = app_path(config('l5-api.routes_file'));\n\n // read file\n $lines = file($routesFile);\n $lastLine = trim($lines[count($lines) - 1]);\n\n // modify file\n if (strcmp($lastLine, '});') === 0) {\n $lines[count($lines) - 1] = ' '.$stub;\n $lines[] = \"\\r\\n});\\r\\n\";\n } else {\n $lines[] = \"$stub\\r\\n\";\n }\n\n // save file\n $fp = fopen($routesFile, 'w');\n fwrite($fp, implode('', $lines));\n fclose($fp);\n\n $this->info('Routes added successfully.');\n }", "abstract public function addRoute($url, $ctrl, $mth);", "public function collect(Array $route) {\n array_push($this->collection, $route);\n }", "public static function addRouteRule($route) {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__, $route);\n\n\t\t$defaults = array(\n\t\t\t'route' => null,\n\t\t\t'access_level' => null,\n\t\t\t'access_level_redirect' => null,\n\t\t\t'user_roles' => null,\n\t\t\t'user_roles_redirect' => null,\n\t\t\t'rule' => null,\n\t\t\t'activate_ssl' => false,\n\t\t\t'deactivate_ssl' => false,\n\t\t\t'callback'=> null,\n\t\t\t'listen'=>'*'\n\t\t);\n\n\t\tif (!is_array($route)) {\n\t\t\t$route = array('rule' => $route);\n\t\t}\n\n\t\t$route += $defaults;\n\t\t$route = self::_applyFilter(get_class(), __FUNCTION__, $route, array('event' => 'args'));\n\t\tarray_push(self::$routes, $route);\n\n\t\tself::_notify(get_class() . '::' . __FUNCTION__, $route);\n\t}", "public function addRoute($name, \\Yaf\\Route_Interface $route){\r\n\t\t$this->_routes[$name]\t= $route;\r\n\t }", "public function assignRoute(array $route);", "function ahr_menu() {\r\n \r\n\tglobal $AHR_SLUG;\r\n\t\r\n add_options_page( 'Advanced Https Redirection', 'Advanced Https Redirection', 'manage_options', $AHR_SLUG, 'ahr_render_options_page' );\r\n \r\n}", "function wp_oembed_register_route()\n {\n }", "private function bindRoute(): void\n {\n if (isset($this->route)) {\n return;\n }\n $this->route = new SymfonyRoute('');\n }", "public function register_options(){\n\t\tparent::register_options();\n\t\t//$orgzr = \\WBF\\modules\\options\\Organizer::getInstance();\n\t\t//Do stuff...\n\t}", "public function registerRouters () {\n\t\tif ( !current_user_can( 'manage_options' ) )\n\t\t\treturn;\n\n\t\tforeach ( $this->classes as $class ) {\n\t\t\t\\Maven\\Core\\HookManager::instance()->addFilter( 'json_endpoints', array( $class, 'registerRoutes' ) );\n\t\t}\n\t}", "public function options(string $path, $middleware, ?string $name = null): void;", "public function addRoute(Route $route)\n {\n $this->routes[$route->getURL()] = $route;\n }", "public function add(Route $route)\n {\n // Don't act if the sitemap is cached\n if (app('sitemap')->isCached()) return;\n\n // Open a closure that will capture logic to generate sitemap items from\n $this->routes[] = function(RoumenSitemap $sitemap) use ($route) {\n $this->addRoute($route, $sitemap);\n };\n }", "private function _createRoute( $options )\n {\n $url = $this->_di->getService( \"url\" );\n\n /**\n * All route uris should have the uri prefix\n */\n $options[\"uri\"] = $url->getUriPrefix() . $options[\"uri\"];\n\n if (isset($options[\"controller_action\"]))\n {\n $controller_action_exploded = explode( \"#\", $options[\"controller_action\"] );\n\n $options[\"controllerName\"] = $controller_action_exploded[0];\n $options[\"actionName\"] = $controller_action_exploded[1];\n }\n\n // $uri = $settings[\"uri\"];\n //\n // $controllerName = $settings[\"controllerName\"];\n //\n // $actionName = $settings[\"actionName\"];\n //\n // $params = $settigns[\"params\"];\n\n return new Route($options);\n }", "private function addRoute()\n {\n if (! $this->postType->rewrite) {\n return;\n }\n $postTypeSlug = $this->postType->rewrite['slug'];\n $this->cortexRoutes->addRoute(new QueryRoute(\n \"{$postTypeSlug}/{postName}/{singleChildName}\",\n function (array $matches) use ($postTypeSlug) {\n $queryPost = new QueryPost(\n $this->postType->name,\n $matches['postName']\n );\n if (! $queryPost->postExists()) {\n new TemplateRenderer('404');\n }\n $postSingle = $queryPost->getPost();\n new TemplateRenderer(\n $postTypeSlug,\n $matches['singleChildName'],\n $this->makeDataArray(\n $postSingle->ID,\n $matches['singleChildName']\n ),\n $this->templateRootDirectory\n );\n die();\n }\n ));\n }", "public function addRoute($method, $uri, $action, $data = [])\n\t{\n\t\t$this->routes[] = [\n\t\t\t'method' => $method,\n\t\t\t'uri' => $uri,\n\t\t\t'action' => $action,\n\t\t\t'name' => isset($data['name']) ? $data['name'] : null,\n\t\t\t'middleware' => isset($data['middleware']) ? $data['middleware'] : null,\n\t\t\t'before' => isset($data['before']) ? $data['before'] : null,\n\t\t\t'after' => isset($data['after']) ? $data['after'] : null\n\t\t];\n\t}", "public function options(string $routePattern, $handler, string $name = null): CollectionInterface\n {\n }", "public function hookDefineRoutes($args)\n {\n if (is_admin_theme() && !get_option('clean_url_use_admin')) {\n return;\n }\n\n $router = $args['router'];\n\n $mainPath = get_option('clean_url_main_path');\n $collectionGeneric = get_option('clean_url_collection_generic');\n $itemGeneric = get_option('clean_url_item_generic');\n $fileGeneric = get_option('clean_url_file_generic');\n\n $allowedForItems = unserialize(get_option('clean_url_item_alloweds'));\n $allowedForFiles = unserialize(get_option('clean_url_file_alloweds'));\n\n // Note: order of routes is important: Zend checks from the last one\n // (most specific) to the first one (most generic).\n\n // Get all collections identifiers with one query.\n $collectionsIdentifiers = get_view()->getRecordTypeIdentifiers('Collection', false);\n\n if (!empty($collectionsIdentifiers)) {\n // Use one regex for all collections. Default is case insensitve.\n $collectionsRegex = array_map('preg_quote', $collectionsIdentifiers);\n // To avoid a bug with identifiers that contain a \"/\", that is not\n // escaped with preg_quote().\n $collectionsRegex = '(' . str_replace('/', '\\/', implode('|', $collectionsRegex)) . ')';\n\n // Add a collection route.\n $route = $mainPath . $collectionGeneric;\n $router->addRoute('cleanUrl_collections', new Zend_Controller_Router_Route(\n $route . ':record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'collection-show',\n ),\n array(\n 'record_identifier' => $collectionsRegex,\n )));\n\n // Add a collection route for files.\n if (in_array('collection', $allowedForFiles)) {\n $router->addRoute('cleanUrl_collections_file', new Zend_Controller_Router_Route(\n $route . ':collection_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-collection-file',\n ),\n array(\n 'collection_identifier' => $collectionsRegex,\n )));\n }\n\n // Add a collection / item route for files.\n if (in_array('collection_item', $allowedForFiles)) {\n $router->addRoute('cleanUrl_collections_item_file', new Zend_Controller_Router_Route(\n $route . ':collection_identifier/:item_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-collection-item-file',\n ),\n array(\n 'collection_identifier' => $collectionsRegex,\n )));\n }\n\n // Add a collection route for items.\n if (in_array('collection', $allowedForItems)) {\n $router->addRoute('cleanUrl_collections_item', new Zend_Controller_Router_Route(\n $route . ':collection_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-collection-item',\n ),\n array(\n 'collection_identifier' => $collectionsRegex,\n )));\n }\n }\n\n // Add a generic route for files.\n if (in_array('generic', $allowedForFiles)) {\n $route = $mainPath . $fileGeneric;\n $router->addRoute('cleanUrl_generic_file', new Zend_Controller_Router_Route(\n $route . ':record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-file',\n 'collection_id' => NULL,\n )));\n }\n\n // Add a generic / item route for files.\n if (in_array('generic_item', $allowedForFiles)) {\n $route = $mainPath . $itemGeneric;\n $router->addRoute('cleanUrl_generic_item_file', new Zend_Controller_Router_Route(\n $route . ':item_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-item-file',\n 'collection_id' => NULL,\n )));\n }\n\n // Add a generic route for items.\n if (in_array('generic', $allowedForItems)) {\n $route = $mainPath . trim($itemGeneric, '/');\n $router->addRoute('cleanUrl_generic_items_browse', new Zend_Controller_Router_Route(\n $route,\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'items-browse',\n )));\n $router->addRoute('cleanUrl_generic_item', new Zend_Controller_Router_Route(\n $route . '/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-item',\n 'collection_id' => NULL,\n )));\n }\n }", "public function addRoute($route, $callback){\n if (is_array($route)){\n foreach ($route as $actual){\n $this->addRoute($actual, $callback);\n }\n return;\n }\n\n //Turn the route into a valid regex\n $route = preg_replace(\n '#:('.self::TOKEN_PATTERN.')#', \n '('.self::TOKEN_PATTERN.')', \n $route\n );\n $this->routes[\"#^{$route}/?$#\"] = $callback;\n }" ]
[ "0.7232585", "0.70393795", "0.69705176", "0.6507999", "0.63729274", "0.6362656", "0.6300883", "0.6239619", "0.62374705", "0.6170748", "0.60637635", "0.6057919", "0.60234547", "0.6018345", "0.6014452", "0.5996", "0.5978756", "0.59703165", "0.5904163", "0.5879843", "0.58786577", "0.58785546", "0.5871864", "0.58323765", "0.58317506", "0.5814332", "0.5797093", "0.5791538", "0.5768392", "0.57578677", "0.5752835", "0.57438844", "0.57276183", "0.56957716", "0.568941", "0.56824774", "0.5677163", "0.56735384", "0.56585205", "0.5647485", "0.56443805", "0.56411517", "0.5639349", "0.5613873", "0.561258", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.56024295", "0.5600854", "0.5598916", "0.5595196", "0.5576398", "0.55602866", "0.55476177", "0.55262583", "0.5506023", "0.5477232", "0.5469081", "0.5461984", "0.54606205", "0.54516375", "0.5446471", "0.5444133", "0.5433859", "0.5431599", "0.5428405", "0.5427786", "0.5426679", "0.5414571", "0.5411232", "0.54016757", "0.5388994" ]
0.0
-1
Register a new route with the given verbs.
function match($methods, $uri, $action) { Route::match($methods, $uri, $action); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function registerRouteBindings()\n {\n //\n }", "private function register_routes() {\n\t\t$routes = $this->get_routes();\n\t\tforeach ( $routes as $route ) {\n\t\t\t$route->register();\n\t\t}\n\t}", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes() {\n\n\t\t\\add_filter( 'do_parse_request', array( $this, 'handle_routing' ) );\n\n\t}", "public function register_routes() {\n\n\t\t$namespace = $this->namespace;\n\n\t\t$base = $this->rest_base;\n\n\t\tregister_rest_route( $namespace, '/' . $base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t) );\n\t}", "protected function registerRoutes() {\n\n $this->get('/crossword', 'getCrossword');\n $this->post('/crossword', 'saveUserState');\n //not used\n //$this->get('/crossword', 'getCrossword');\n //$this->get('/wordData', 'getWordData');\n //);\n }", "public function registerRoutes() {\n $this->addRoute('default');\n }", "public function registerRouterMacro(): void\n {\n Route::macro('phase', function (...$args) {\n $route = $this->match(['GET', 'HEAD'], ...$args);\n\n $controller = $route->action['controller'] ?? null;\n\n // make sure its not a closure\n // & make sure its controller@method\n if (is_string($controller) && Str::is('*@*', $controller)) {\n Phase::addRoute($route->uri, $route->action);\n } else {\n throw new Exception(\"Route::phase is not compatible with closures.\\n\"\n .\"Please use the controller@method syntax.\\n\"\n .\"Failed on '{$route->uri}' route.\");\n }\n\n return $route;\n });\n }", "public function register_routes( Collection $routes );", "protected function registerRoutes()\n {\n $this->registerWebRoutes();\n $this->registerApiRoutes();\n }", "public function register_routes() {\n\t\t$version = '1';\n\t\t$namespace = 'askmedesk/v' . $version;\n register_rest_route( $namespace, '/tipi-richiesta', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => [$this, 'get_tipi_richiesta'],\n 'permission_callback' => [$this, 'askmedesk_permission_check']\n\t\t));\n\t\tregister_rest_route($namespace, '/creazione-richiesta', array(\n\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t'callback' => [$this, 'crea_richiesta'],\n\t\t\t'permission_callback' => [$this, 'askmedesk_permission_check'],\n\t\t\t'args' => $this->get_endpoint_args_for_item_schema( false )\n\t\t));\n\t}", "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, $this->route, [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_options']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_options'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_options'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\n\t\tregister_rest_route( $this->namespace, $this->route . '/(?P<slug>.+)', [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_option']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_option'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_option'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\t}", "public function register_routes(): void {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'methods' => WP_REST_Server::ALLMETHODS,\n\t\t\t\t\t'callback' => [ $this, 'status_check' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'status_check_permissions_check' ],\n\t\t\t\t\t'args' => [\n\t\t\t\t\t\t'content' => [\n\t\t\t\t\t\t\t'description' => __( 'Test HTML content.', 'web-stories' ),\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'type' => 'string',\n\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\t}", "protected static function registerRoutes()\n {\n parent::routes(function ($router) {\n /* @var \\Illuminate\\Routing\\Router $router */\n $router->resource('useradmin/member', 'GG\\Admin\\Member\\Controllers\\MemberController');\n $router->resource('useradmin/permissions', 'GG\\Admin\\Member\\Controllers\\PermissionController');\n $router->resource('useradmin/roles', 'GG\\Admin\\Member\\Controllers\\RoleController');\n $router->resource('useradmin/menu', 'GG\\Admin\\Member\\Controllers\\MenuController');\n\n });\n }", "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'args' => array(),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'update_item' ),\n\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "protected function routes()\n {\n Nova::routes()\n ->withAuthenticationRoutes()\n ->withPasswordResetRoutes()\n ->register();\n }", "protected function routes()\n {\n Nova::routes()\n ->withAuthenticationRoutes()\n ->withPasswordResetRoutes()\n ->register();\n }", "public function addRoutes(): void\n {\n $router = $this->config['router'] ?? Router::class;\n $router::$DELIMITER = $this->delimiter;\n foreach (static::$routes as [$url, $func, $method]) {\n $router::add($url, [$this, $func], $method);\n }\n }", "public function addRoutes($routes);", "public static function register_rest_routes() {\n\t\tforeach (static::$apis as $api) {\n\t\t\t$api->register_rest_route();\n\t\t}\n }", "public function post(...$args) {\n $this->registerRouteHandler('POST', ...$args);\n }", "public function registerFormRoutes() {\n add_action('rest_api_init', function() {\n register_rest_route('forms/v1', '/submit', [\n 'methods' => 'POST',\n 'callback' => [$this, 'handleSubmission']\n ]);\n });\n }", "public function withMethods(array $methods): Route;", "public function boot()\n {\n Route::resourceVerbs(['create' => 'add']);\n }", "protected function registerRoutes()\n {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n }", "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'parse_url_details' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'url' => array(\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'description' => __( 'The URL to process.' ),\n\t\t\t\t\t\t\t'validate_callback' => 'wp_http_validate_url',\n\t\t\t\t\t\t\t'sanitize_callback' => 'sanitize_url',\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' ),\n\t\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "private function registerRoutes(){\n $appRouter = require_once __DIR__.'/../../routes/app.php';\n $this->registerApplicationRoutes($appRouter);\n $this->registerApplicationRoutes($appRouter, false);\n $this->registerAuthenticationRoutes();\n }", "public function register_routes() {\n # GET/POST /products\n $routes[$this->base] = array(\n array( array( $this, 'get_products' ), WC_API_Server::READABLE ),\n array( array( $this, 'create_product' ), WC_API_SERVER::CREATABLE | WC_API_Server::ACCEPT_DATA ),\n );\n }", "private static function registerRoute($route)\n {\n global $Routes;\n $Routes[] = \"/\".$route;\n }", "protected function route($verb, $pattern, $handler)\t{\n\t\tif (is_array($pattern) && isset($pattern[\"regex\"])) {\n\t\t\t$regex = $pattern['regex'];\n\t\t\t$pattern = false;\n\n\t\t} else {\n\t\t\t# choose regex delimiter dynamically incase a pipe is in the pattern\n\t\t\t$delim = '|';\n\t\t\tforeach(array('|', '`', '~', '^', \"#\") as $delim) if (strpos($pattern, $delim) === false) break;\n\n\t\t\t$terminate = (strpos($pattern, ':') || strpos($pattern, '*')) ? '' : '$';\n\n\t\t\t$regex = $delim.'^'.preg_replace_callback(\n\t\t\t\t'/\\/([:|\\*])?([a-zA-Z0-9_]*)/',\n\t\t\t\tarray($this, 'pattern_to_regex'),\n\t\t\t\t$pattern\n\t\t\t).'/?'.$terminate.$delim;\n\t\t}\n\t\t$r = new Route($pattern, $regex, $handler);\n\t\t$this->routes[$verb][] = $r;\n\t\treturn $r;\n\t}", "public function SetRoute(string $reqMethod, string $path, callable $handler): void {\n $this->routes[$reqMethod][$path] = $handler;\n }", "public function register_rest_routes() {\n\t\t$controllers = array(\n\t\t\t'GF_REST_Entries_Controller',\n\t\t\t'GF_REST_Entry_Properties_Controller',\n\t\t\t'GF_REST_Entry_Notifications_Controller',\n\t\t\t'GF_REST_Notes_Controller',\n\t\t\t'GF_REST_Entry_Notes_Controller',\n\t\t\t'GF_REST_Form_Entries_Controller',\n\t\t\t'GF_REST_Form_Results_Controller',\n\t\t\t'GF_REST_Form_Submissions_Controller',\n\t\t\t'GF_REST_Forms_Controller',\n\t\t\t'GF_REST_Feeds_Controller',\n\t\t\t'GF_REST_Form_Feeds_Controller',\n\t\t);\n\n\t\tforeach ( $controllers as $controller ) {\n\t\t\t$controller_obj = new $controller();\n\t\t\t$controller_obj->register_routes();\n\t\t}\n\t}", "public function get(...$args) {\n $this->registerRouteHandler('GET', ...$args);\n }", "public function route(string $requestUri, string $requestMethod);", "function spf_register_route(){\n register_rest_route('wooapp/v1','/shop/products',Array(\n 'methods' => 'GET',\n 'callback' => 'spf_get_shop_products',\n ));\n\n register_rest_route('wooapp/v1', '/auth/register', [\n 'methods' => 'POST',\n 'callback' => 'spf_register_new_user',\n ]);\n\n register_rest_route('wooapp/v1', '/auth/login', [\n 'methods' => 'POST',\n 'callback' => 'spf_login_user',\n ]);\n}", "public function register_routes() {\n $namespace = 'junglehunter/v1';\n register_rest_route(\n $namespace,\n '/all',\n array(\n 'methods' => 'GET',\n 'callback' => array($this, 'junglehunter_get_all')\n )\n );\n }", "public function register_route() {\n register_rest_route( $this->namespace, $this->endpoint , array(\n 'methods' => 'POST',\n 'callback' => array($this, 'get_next_page'),\n 'args' => array(),\n ) );\n }", "public function put(...$args) {\n $this->registerRouteHandler('PUT', ...$args);\n }", "private static function registerRoute($route){\r\n global $Routes;\r\n $Routes[] = BASEDIR.$route;\r\n }", "private static function registerRoute($route) {\n global $Routes;\n $Routes[] = $route;\n }", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => array(),\n\t\t\t)\n\t\t) );\n }", "public static function register(): void\n {\n if (! Route::hasMacro('apiMediaResource')) {\n Route::macro('apiMediaResource', function ($name, $controller) {\n Route::get(\"$name\", \"$controller@index\")->name(\"$name.index\");\n Route::get(\"$name/{media}\", \"$controller@show\")->where('media', '.*')->name(\"$name.show\");\n Route::patch(\"$name/{media}/rename\", \"$controller@rename\")->where('media', '.*')->name(\"$name.rename\");\n Route::post(\"$name/{media}/copy\", \"$controller@copy\")->where('media', '.*')->name(\"$name.copy\");\n Route::patch(\"$name/{media}/move\", \"$controller@move\")->where('media', '.*')->name(\"$name.move\");\n Route::post(\"$name/{media}/download\", \"$controller@download\")->where('media', '.*')->name(\"$name.download\");\n Route::delete(\"$name/delete\", \"$controller@delete\")->name(\"$name.delete\");\n Route::post(\"$name/upload\", \"$controller@upload\")->name(\"$name.upload\");\n Route::post(\"$name/add\", \"$controller@add\")->name(\"$name.add\");\n Route::post(\"$name/zip\", \"$controller@zip\")->name(\"$name.zip\");\n });\n }\n }", "public function register_rest_routes() {\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast',\n\t\t\tarray(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'get_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast_update',\n\t\t\tarray(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'update_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for episodes\n\t\t */\n\t\t$controller = new Episodes_Controller();\n\t\t$controller->register_routes();\n\n\t}", "public function testAddRouteShorthandMethodPost()\n {\n $this->collection->post('name', '/', 'action');\n\n $this->assertCount(1, $this->collection->all());\n\n $routes = $this->collection->all();\n\n $this->assertArrayHasKey('0', $routes);\n\n $this->assertContains('POST', $routes[0]->getMethods());\n }", "private function registerRouteHandler($method, ...$args) {\n $route = '';\n\n if (is_string($args[0])) {\n $route = array_shift($args);\n } else {\n $route = '/*';\n }\n\n $routeHandler = array_pop($args);\n\n foreach($args as $arg) {\n $this->use($route, $arg);\n }\n\n $middleware = new Middleware();\n $middleware->method = $method;\n $middleware->route = $route;\n $middleware->closure = function($mountpath, $req, $res) use ($routeHandler, $route) {\n $req->params = Router::extractRouteParameters($mountpath . $route, $req->url);\n\n // execute callback function\n $routeHandler($req, $res);\n\n $res->end();\n };\n\n $this->queue[] = $middleware;\n }", "public function addRoutes(Route $route, $method, string $path)\n {\n if(is_array($method))\n foreach ($method as $type) {\n $this->routes[strtoupper($type)][$path] = $route;\n }\n else\n $this->routes[strtoupper($method)][$path] = $route;\n }", "public function register_routes()\n {\n\n $namespace = 'api/v1';\n $base = 'categories';\n\n register_rest_route($namespace, '/' . $base, array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array($this, 'create_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n\n register_rest_route($namespace, '/' . $base . '/(?P<id>\\d+)', array(\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array($this, 'update_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n }", "public function registerRoutes()\n {\n $namespace = $this->getNameSpace();\n\n register_rest_route($namespace, '/' . self::ROUTE_UPDATE_CALLBACK, [\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'updateTrapp' ),\n 'permission_callback' => array( $this, 'updateTrappPermissions' ),\n ]);\n }", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shops' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shop' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/manager', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'register_shop_manager' ),\n\t\t\t)\n\t\t) );\n\t}", "protected function registerRoutes()\n {\n $middleware = ['exposable.signature', 'exposable.expire', 'exposable.guard'];\n\n if (! empty(config('exposable.middleware'))) {\n $middleware = array_merge($middleware, (array) config('exposable.middleware'));\n }\n\n $uri = config('exposable.url-prefix').'/{exposable}/{id}';\n\n $this->app['router']->get($uri, 'ArjanWestdorp\\Exposable\\Http\\Controllers\\ExposableController@show')->middleware($middleware)->name('exposable.show');\n }", "public function register_api_endpoints() {\n\n\t\tregister_rest_route( 'nock/v1', '/messages', array(\n\t\t\t'methods' => array( 'POST' ),\n\t\t\t'callback' => array( $this, 'send_message' ),\n\t\t) );\n\n\t\tregister_rest_route( 'nock/v1', '/accounts', array(\n\t\t\t'methods' => array( 'GET' ),\n\t\t\t'callback' => array( $this, 'get_accounts' ),\n\t\t) );\n\n\t\tregister_rest_route( 'nock/v1', '/groups', array(\n\t\t\t'methods' => array( 'GET' ),\n\t\t\t'callback' => array( $this, 'get_groups' ),\n\t\t) );\n\n\t\tregister_rest_route( 'nock/v1', '/sms', array(\n\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t'callback' => array( $this, 'capture_sms' ),\n\t\t) );\n\n\t}", "public function addRoute(string $pattern, array $methods, $handler = null): Route\n {\n $this->routes[] = $route = new Route($pattern, $methods, $handler);\n\n $this->resolveWith($route);\n\n return $route;\n }", "public static function register(): void\n {\n Route::resource('otp', OtpController::class, [\n 'only' => ['create', 'store'],\n 'prefix' => 'otp',\n ])->middleware(['web', 'auth']);\n }", "function wpib_register_route() {\n\tregister_rest_route( 'wpib/1.0/', '/inbox', array(\n\t\tarray(\n\t\t\t'methods' => 'POST',\n\t\t\t'callback' => 'wpib_on_email_recived',\n\t\t\t'args' => array(\n\t\t\t\t'mandrill_events' => array(\n\t\t\t\t\t'required' => true\n\t\t\t\t),\n\t\t\t)\n\t\t),\n\t) );\n}", "public function register_routes() {\n\n\t\t// Get current user per the JWT token. Depends on JWT plugin.\n\t\tregister_rest_route(\n\t\t\t'wpcampus',\n\t\t\t'/auth/user/',\n\t\t\t[\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => [ $this, 'get_current_user' ],\n\t\t\t]\n\t\t);\n\t}", "public function register_routes() {\n\n register_rest_route( $this->namespace, '/' . $this->base, array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array( $this->service, 'create' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => $this->get_endpoint_args_for_item_schema( true ),\n 'accept_json' => true\n ),\n ) );\n\n register_rest_route( $this->namespace, '/' . $this->base . '/(?P<id>[\\d]+)', array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this->service, 'get' ),\n 'permission_callback' => array( $this, 'getAllUserCheck' ),\n 'args' => array(\n 'context' => array(\n 'default' => 'view',\n )\n ),\n ),\n\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this->service, 'update' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => $this->get_endpoint_args_for_item_schema( false ),\n 'accept_json' => true\n ),\n\n array(\n 'methods' => WP_REST_Server::DELETABLE,\n 'callback' => array( $this->service, 'delete' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => array(\n 'force' => array(\n 'default' => false,\n ),\n ),\n ),\n ) );\n }", "public function register_route($route_namespace, $route, $route_args, $override = \\false)\n {\n }", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<status>[\\w-]+)', array(\n\t\t\t'args' => array(\n\t\t\t\t'status' => array(\n\t\t\t\t\t'description' => __( 'An alphanumeric identifier for the status.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t'args' => array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "public function addRoute($method, $uri, $action, $data = [])\n\t{\n\t\t$this->routes[] = [\n\t\t\t'method' => $method,\n\t\t\t'uri' => $uri,\n\t\t\t'action' => $action,\n\t\t\t'name' => isset($data['name']) ? $data['name'] : null,\n\t\t\t'middleware' => isset($data['middleware']) ? $data['middleware'] : null,\n\t\t\t'before' => isset($data['before']) ? $data['before'] : null,\n\t\t\t'after' => isset($data['after']) ? $data['after'] : null\n\t\t];\n\t}", "public function testRouterAddByAddRouteSeveralMethods($method)\n {\n $router = new Router();\n\n $router->any([\"GET\", \"POST\"], \"user\", function () {\n return \"user\";\n });\n\n $router->always(function () {\n return \"always\";\n });\n\n $res = $router->handle(\"user\", $method);\n if ($method === \"GET\" || $method === \"POST\") {\n $this->assertEquals(\"user\", $res);\n }\n\n if (!($method === \"GET\" || $method === \"POST\")) {\n $this->assertEquals(\"always\", $res);\n }\n\n $routes = $router->getAll();\n $this->assertEquals(2, count($routes));\n }", "public function register_routes() {\n\t\t$public_post_types = $this->post_type_helper->get_public_post_types();\n\n\t\tforeach ( $public_post_types as $post_type ) {\n\t\t\t\\register_rest_field( $post_type, self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_post' ] ] );\n\t\t}\n\n\t\t$public_taxonomies = $this->taxonomy_helper->get_public_taxonomies();\n\n\t\tforeach ( $public_taxonomies as $taxonomy ) {\n\t\t\tif ( $taxonomy === 'post_tag' ) {\n\t\t\t\t$taxonomy = 'tag';\n\t\t\t}\n\t\t\t\\register_rest_field( $taxonomy, self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_term' ] ] );\n\t\t}\n\n\t\t\\register_rest_field( 'user', self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_author' ] ] );\n\n\t\t\\register_rest_field( 'type', self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_post_type_archive' ] ] );\n\t}", "public function add($path, array $params = [], array $methods = [])\n {\n // Convert route to regex, escaping forward slashes\n $path = preg_replace('/\\//', '\\\\/', $path);\n // Convert route variables\n $path = preg_replace('/\\{([a-z]+)\\}/', '(?P<\\1>[a-z-]+)', $path);\n // Add start & end delimiters and case insensitivity\n $path = '/^' . $path . '$/i';\n\n if (count($methods) === 0) {\n $methods = $this->methods;\n }\n\n $this->routes[] = [\n 'path' => $path,\n 'params' => $params,\n 'methods' => $methods\n ];\n }", "public function testRouterAddByAddTwoRoutesOneHandler()\n {\n $router = new Router();\n\n $router->add([\"\", \"about\"], function () {\n return \"yes\";\n });\n\n $res = $router->handle(\"\");\n $this->assertEquals(\"yes\", $res);\n\n $last = $router->getLastRoute();\n $this->assertEquals(\"\", $last);\n\n $res = $router->handle(\"about\");\n $this->assertEquals(\"yes\", $res);\n\n $last = $router->getLastRoute();\n $this->assertEquals(\"about\", $last);\n\n $routes = $router->getAll();\n $this->assertEquals(2, count($routes));\n }", "public static function register($path, $controller) {\n\t\t\\Route::get($path, $controller . '@get');\n\t\t\\Route::get($path . '/{id}', $controller . '@getById');\n\t\t\\Route::post($path, $controller . '@create');\n\t\t\\Route::patch($path . '/{id}', $controller . '@update');\n\t\t\\Route::delete($path . '/{id}', $controller . '@delete');\n\t}", "private function add($path, $callable, $name, $method){\n $route = new Route($path, $callable);\n $this->routes[$method][] = $route;\n if(is_string($callable) && $name === null){\n $name = $callable;\n }\n if($name){\n $this->namedRoutes[$name] = $route;\n }\n return $route;\n }", "protected function registerRoutes()\n {\n if (TwilioVerify::$registersRoutes) {\n Route::group([\n 'prefix' => config('twilio-verify.path'),\n 'namespace' => 'IvanSotelo\\TwilioVerify\\Http\\Controllers',\n 'as' => 'twilio-verify.',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }\n }", "public function register_routes( $routes ) {\n\t\t$routes[ $this->base ] = array(\n\t\t\tarray( array( $this, 'get_posts' ), WP_JSON_Server::READABLE ),\n\t\t\tarray( array( $this, 'new_post' ), WP_JSON_Server::CREATABLE | WP_JSON_Server::ACCEPT_JSON ),\n\t\t);\n\n\t\t$routes[ $this->base . '/(?P<id>\\d+)' ] = array(\n\t\t\tarray( array( $this, 'get_post' ), WP_JSON_Server::READABLE ),\n\t\t\tarray( array( $this, 'edit_post' ), WP_JSON_Server::EDITABLE | WP_JSON_Server::ACCEPT_JSON ),\n\t\t\tarray( array( $this, 'delete_post' ), WP_JSON_Server::DELETABLE ),\n\t\t);\n\t\treturn $routes;\n\t}", "function route(string $method, string $path, callable ...$handlers): void {\n $routes = stash(DISPATCH_ROUTES_KEY) ?? [];\n array_push($routes, action($method, $path, ...$handlers));\n stash(DISPATCH_ROUTES_KEY, $routes);\n}" ]
[ "0.67853874", "0.6733141", "0.67081445", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.6707896", "0.650294", "0.6492992", "0.6467705", "0.6417811", "0.63472104", "0.6226614", "0.6225254", "0.62198657", "0.6211511", "0.6189567", "0.6127936", "0.61272925", "0.60762495", "0.60762495", "0.6062565", "0.6061413", "0.6054239", "0.6048188", "0.6045837", "0.6023383", "0.59950024", "0.5988357", "0.5986608", "0.59789985", "0.59674203", "0.5960722", "0.59562725", "0.59403694", "0.59076124", "0.5892363", "0.5887307", "0.58840525", "0.5880721", "0.5871414", "0.58697754", "0.5867991", "0.58645934", "0.58618504", "0.58600074", "0.58373386", "0.5833692", "0.58312434", "0.58290786", "0.5824113", "0.5815772", "0.58128285", "0.58087796", "0.5801248", "0.5787984", "0.5779607", "0.5770429", "0.5764416", "0.57636976", "0.57552874", "0.5750813", "0.5743044", "0.57417023", "0.5734409", "0.5734068", "0.572663", "0.5719256", "0.5698331", "0.56885916", "0.5682128", "0.568179" ]
0.56949514
97
Works with route collector. this function add a new patch route
function patch($uri, $action) { return Route::patch($uri, $action); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAddRouteShorthandMethodPatch()\n {\n $this->collection->patch('name', '/', 'action');\n\n $this->assertCount(1, $this->collection->all());\n\n $routes = $this->collection->all();\n\n $this->assertArrayHasKey('0', $routes);\n\n $this->assertContains('PATCH', $routes[0]->getMethods());\n }", "public function testRouterAddByPatch($method)\n {\n $router = new Router();\n\n $router->patch(\"\", function () {\n return \"patch\";\n });\n\n $router->always(function () {\n return \"not patch\";\n });\n\n $res = $router->handle(\"\", $method);\n if ($method === \"PATCH\") {\n $this->assertEquals(\"patch\", $res);\n }\n if ($method !== \"PATCH\") {\n $this->assertEquals(\"not patch\", $res);\n }\n\n $routes = $router->getAll();\n $this->assertEquals(2, count($routes));\n }", "public function patch($uri, $function) {\n $newRoute = new Route($uri, array(\"PATCH\"), $function);\n\n $this->collection->addRoute($newRoute);\n }", "function\taddRoute($routeData){\n\t\t//$this->routes[] = $route;\n\t\t$this->routes[] = $routeData;\n\t}", "protected function addRoutes()\n {\n $stub = $this->constructStub(base_path(config('l5-api.route_stub')));\n\n $routesFile = app_path(config('l5-api.routes_file'));\n\n // read file\n $lines = file($routesFile);\n $lastLine = trim($lines[count($lines) - 1]);\n\n // modify file\n if (strcmp($lastLine, '});') === 0) {\n $lines[count($lines) - 1] = ' '.$stub;\n $lines[] = \"\\r\\n});\\r\\n\";\n } else {\n $lines[] = \"$stub\\r\\n\";\n }\n\n // save file\n $fp = fopen($routesFile, 'w');\n fwrite($fp, implode('', $lines));\n fclose($fp);\n\n $this->info('Routes added successfully.');\n }", "public static function patch(string $route, string $handler, string $middleware = '');", "public function patch(string $routePattern, $handler, string $name = null): CollectionInterface\n {\n }", "public static function patch(string $route, array $options = array()) {\n\t\t\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__, $route, $options);\n\t\t\n\t\t$defaults = array(\n\t\t\t'listen'=>'PATCH',\n\t\t\t'route' => $route,\n\t\t\t'rule'=> $route\n\t\t);\n\t\t\n\t\t$filtered = self::_applyFilter(get_class(), __FUNCTION__, array(\n\t\t\t'route' => $route,\n\t\t\t'options' => $options\n\t\t), array('event' => 'args'));\n\t\t\n\t\t$route = $filtered['route'];\n\t\t$options = $filtered['options'];\n\t\t\n\t\t$options += $defaults;\n\t\t\n\t\tself::addRouteRule($options);\n\t\t\n\t\tself::_notify(get_class() . '::' . __FUNCTION__, $route, $options);\n\t}", "public function patch(string $route, callable $controller): void\n {\n $this->controllerAggregate->add($controller, Route::patch($route));\n }", "public function patch(string $route, callable $controller): void\n {\n $this->register($controller, Route::patch($route));\n }", "public function addPath(string $patch, string $namespace = null): void\n {\n if ($namespace != null) {\n $this->Patch[$namespace] = $patch;\n } else\n $this->Patch[self::DEFAULT_NAMESPACE] = $patch;\n\n }", "private function set($url,$location,$reqMethod){\n\t\t\t//validate routeformat\n\t\t\t$valid = explode(\"@\",$location);\n\t\t\tif(count($valid) != 2){ throw new \\Exception(\"Trying to save invalid route format\"); }\n\t\t\t\n\t\t\t$this->allRoutes[] = Route::set($url,$location,$reqMethod);\n\t\t}", "public function modify(){\n //la route FormulaireModify\n }", "public function addRoute($route, RouteDocument $routeDocument);", "public function addRoutes()\n {\n //Get the routes template content\n $content = \\File::get($this->package_path('Templates/routes.php'));\n //Append to the routes.php file\n $this->addToFile('routes.php', 'routes', \"\\n\\n\" . $content);\n }", "public function add( Route $route ): Collection;", "public function addRoutes($routes);", "private static function registerRoute($route) {\n global $Routes;\n $Routes[] = $route;\n }", "private static function registerRoute($route){\r\n global $Routes;\r\n $Routes[] = BASEDIR.$route;\r\n }", "function add_route($route, $function, $method='GET') {\n array_push($this->routers, Array(\n 'expression' => $route,\n 'function' => $function,\n 'method' => $method\n ));\n }", "private function addRoute()\n {\n if (! $this->postType->rewrite) {\n return;\n }\n $postTypeSlug = $this->postType->rewrite['slug'];\n $this->cortexRoutes->addRoute(new QueryRoute(\n \"{$postTypeSlug}/{postName}/{singleChildName}\",\n function (array $matches) use ($postTypeSlug) {\n $queryPost = new QueryPost(\n $this->postType->name,\n $matches['postName']\n );\n if (! $queryPost->postExists()) {\n new TemplateRenderer('404');\n }\n $postSingle = $queryPost->getPost();\n new TemplateRenderer(\n $postTypeSlug,\n $matches['singleChildName'],\n $this->makeDataArray(\n $postSingle->ID,\n $matches['singleChildName']\n ),\n $this->templateRootDirectory\n );\n die();\n }\n ));\n }", "public function addRoutes(): void\n {\n $router = $this->config['router'] ?? Router::class;\n $router::$DELIMITER = $this->delimiter;\n foreach (static::$routes as [$url, $func, $method]) {\n $router::add($url, [$this, $func], $method);\n }\n }", "public function addRoute($method, $uri, $action, $data = [])\n\t{\n\t\t$this->routes[] = [\n\t\t\t'method' => $method,\n\t\t\t'uri' => $uri,\n\t\t\t'action' => $action,\n\t\t\t'name' => isset($data['name']) ? $data['name'] : null,\n\t\t\t'middleware' => isset($data['middleware']) ? $data['middleware'] : null,\n\t\t\t'before' => isset($data['before']) ? $data['before'] : null,\n\t\t\t'after' => isset($data['after']) ? $data['after'] : null\n\t\t];\n\t}", "public function addRoute (Cmf_Route $route) {\n $this->_routes[$route->getName()] = $route;\n }", "public function patch($route, $controller)\n {\n // * Replace $route like this:\n // * /user/{id}/product/{id}\n // * to this:\n // * /^\\/user\\/([^\\/]+)\\/product\\/([^\\/]+)$/\n $routePattern = $this->replaceRoute($route);\n\n\n // * Add $routePatter to array in this format\n // * [\n // * PATCH => [ '/^\\/user\\/([^\\/]+)\\/product\\/([^\\/]+)$/' => 'Controller@index'],\n // * ]\n $this->routes['PATCH'][$routePattern] = $controller;\n }", "public function configureRoutes(RouteCollection $collection) {\n parent::configureRoutes($collection);\n $collection\n ->remove('create')\n ->add('take','{objectId}/take');\n }", "public function add( $route, $request_type, $params = array() )\r\n {\r\n $orig_params = array(\r\n 'ajax' => false,\r\n 'namespace' => '',\r\n 'controller' => '',\r\n 'action' => '', \r\n );\r\n \r\n $params = array_merge( $orig_params, $params );\r\n \r\n $this->routes[] = array(\r\n 'route' => $route,\r\n 'type' => $request_type,\r\n 'params' => $params \r\n );\t\r\n }", "public function addRoute($name, $route, $priority = null);", "private static function registerRoute($route)\n {\n global $Routes;\n $Routes[] = \"/\".$route;\n }", "public function add( $route, $params = array() ){\n\n //convert the route to a regular expression\n //escape forward slashes\n $route = preg_replace('/\\//', '\\\\/', $route);\n //convert variables to capture groups\n $route = preg_replace('/\\{([a-z]+)\\}/', '(?P<\\1>[a-z-_]+)', $route);\n //convert variables with custom regular expressions e.g. {id:\\d+}\n $route = preg_replace('/\\{([a-z]+):([^\\}]+)\\}/', '(?P<\\1>\\2)', $route);\n //add start and end delimeters, forgive trailing slash and add case insensitive flag\n $route = '/^' . $route . '\\/?$/i';\n\n //add route to object\n $this->routes[$route] = $params;\n\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function add(Route $route)\n {\n $key = \"{$route->verb}:{$route->path}\";\n unset($this->routes[$key]);\n $this->routes[$key] = $route;\n }", "public function testAddRouteAsObject()\n {\n $this->collection->add(new Route('name', '/', 'action'));\n $this->collection->compile();\n\n $this->assertCount(1, $this->collection->all());\n }", "public function addRoute(string $route, array $params = []) : void\n {\n // Escape forward slashes\n $route = preg_replace('/\\//', '\\\\/', $route);\n\n // Convert variables e.g. {controller}\n $route = preg_replace('/\\{([a-z0-9]+)\\}/', '(?P<\\1>[a-z0-9-]+)', $route);\n\n // Convert variables with custom regular expressions e.g. {id:\\d+} for numbers\n $route = preg_replace('/\\{([a-z0-9]+):([^\\}]+)\\}/', '(?P<\\1>\\2)', $route);\n\n // Add start and end delimeter\n $route = '/^' . $route . '$/i';\n\n $this->routes[$route] = $params;\n }", "public function add($route, $params): void\n {\n $route = '#^' . $route . '$#';\n $this->routes[$route] = $params;\n }", "abstract public function addRoute($url, $ctrl, $mth);", "protected function makeRoute()\n {\n new MakeRoute($this, $this->files);\n }", "function create_initial_rest_routes()\n {\n }", "public function hookDefineRoutes($args) {\n\t\t$args['router']->addConfig(new Zend_Config_Ini(dirname(__FILE__) . '/routes.ini', 'routes'));\n\t}", "function setResourceRoute($route, array $parameters = array(), $code = Codes::HTTP_CREATED);", "private function setRoutes() : void\n {\n $this->routes = $this->routeProvider->getRoutes();\n $this->syRouteCollection = new RouteCollection();\n foreach ($this->routes as $route) {\n $syRoute = new SymfonyRoute(\n $route->getPath(),\n $route->getParamsDefaults(),\n $route->getParamsRequirements(),\n [],\n '',\n [],\n $route->getMethods()\n );\n $this->syRouteCollection->add($route->getName(), $syRoute);\n }\n }", "public function setRoutes() {\n $this->api->addRoute(\"/^\\/comments\\/([a-z]+)\\/(\\d+)\\/?$/\", 'getComments', $this, 'GET', \\Auth::READ); // Get list with all comments\n $this->api->addRoute(\"/^\\/comments\\/(\\d+)\\/?$/\", 'getCommentsByTime', $this, 'GET', \\Auth::READ); // Get 50 comments after a given timestamp\n $this->api->addRoute(\"/^\\/comments\\/(\\d+)\\/(\\d+)\\/?$/\", 'getCommentsByTime', $this, 'GET', \\Auth::READ); // Get 50 comments after a given timestamp with offset\n $this->api->addRoute(\"/^\\/comment\\/([a-z]+)\\/(\\d+)\\/?$/\", 'createComment', $this, 'POST', \\Auth::EXECUTE); // Create a new comment\n $this->api->addRoute(\"/^\\/comment\\/(\\d+)\\/?$/\", 'updateCommentById', $this, 'PUT', \\Auth::READ); // Updates the given comment\n $this->api->addRoute(\"/^\\/comment\\/(\\d+)\\/?$/\", 'deleteCommentById', $this, 'DELETE', \\Auth::READ); // Removes the given comment\n $this->api->addRoute(\"/^\\/comment\\/(\\d+)\\/parents\\/?$/\", 'getCommentParentsById', $this, 'GET', \\Auth::READ); // Gets a list containing the parent id path to the given comment\n }", "public function register_route($route_namespace, $route, $route_args, $override = \\false)\n {\n }", "function setRoute(DynamicValue $p_route):void\n {\n $this->route=$p_route; \n }", "function connect($route, $args = array())\n\t\t{\n\t\t\t$route_bits = explode(\"/\", trim($route, \"/\"));\n\t\t\t\n\t\t\t$new_route['path'] = $route_bits;\n\t\t\t$new_route['args'] = $args;\n\t\t\t\n\t\t\tarray_push($this->_routes, $new_route);\n\t\t}", "public function set_route($route)\n {\n }", "public function assignRoute(array $route);", "public function setRoute(array $route): void;", "public function testAddRouteShorthandMethodPut()\n {\n $this->collection->put('name', '/', 'action');\n\n $this->assertCount(1, $this->collection->all());\n\n $routes = $this->collection->all();\n\n $this->assertArrayHasKey('0', $routes);\n\n $this->assertContains('PUT', $routes[0]->getMethods());\n }", "public function addRoutes(Route $route, $method, string $path)\n {\n if(is_array($method))\n foreach ($method as $type) {\n $this->routes[strtoupper($type)][$path] = $route;\n }\n else\n $this->routes[strtoupper($method)][$path] = $route;\n }", "protected function registerRouteBindings()\n {\n //\n }", "public function registerRoutes()\n {\n $namespace = $this->getNameSpace();\n\n register_rest_route($namespace, '/' . self::ROUTE_UPDATE_CALLBACK, [\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'updateTrapp' ),\n 'permission_callback' => array( $this, 'updateTrappPermissions' ),\n ]);\n }", "protected function addToCollections($route)\n {\n $domainAndUri = $route->getDomain() . $route->uri();\n $version = $route->action[\"version\"] ?? null;\n\n foreach ($route->methods() as $method) {\n /* The keys of second array are modified from `$domainAndUri` to current */\n $this->routes[$method][$version ? \"$domainAndUri@$version\" : $domainAndUri] = $route;\n }\n\n /* The keys of `$this->allRoutes` are modified from `$method . $domainAndUri` to current */\n $this->allRoutes[$method . $domainAndUri . $version] = $route;\n }", "public function addPatchversion( $value){\n return $this->_add(40, $value);\n }", "private function bindRoute(): void\n {\n if (isset($this->route)) {\n return;\n }\n $this->route = new SymfonyRoute('');\n }", "static public function add($pattern, array $route=array())\n\t{\n\t\tif (is_array($pattern))\n\t\t{\n\t\t\tself::$routes = $pattern + self::$routes;\n\n\t\t\treturn;\n\t\t}\n\n\t\tself::$routes[$pattern] = $route;\n\t}", "public function testAddRouteShorthandMethodPost()\n {\n $this->collection->post('name', '/', 'action');\n\n $this->assertCount(1, $this->collection->all());\n\n $routes = $this->collection->all();\n\n $this->assertArrayHasKey('0', $routes);\n\n $this->assertContains('POST', $routes[0]->getMethods());\n }", "function add_custom_admin_routes($app) {\n\n}", "public function route()\n\t{\n\t\t/* [http|https]/[Ajax|]/[Get|Post|Delete|Put]/uri */\n\t\t$this->route = $this->route_raw = ($this->c->Request->is_https ? 'https' : 'http').'/'.($this->c->Request->is_ajax ? 'Ajax' : '').'/'.$this->c->Request->request.'/'.$this->c->Request->uri;\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->preRouter();\n\n\t\t/* rewrite dispatch route */\n\t\tforeach ($this->c->router['routes'] as $regexpath => $switchto) {\n\t\t\tif (preg_match($regexpath, $this->route)) {\n\t\t\t\t/* we got a match */\n\t\t\t\t$this->route = preg_replace($regexpath, $switchto, $this->route);\n\t\t\t\t$this->route_matched = $regexpath;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->postRouter();\n\n\t}", "public static function updateRoutes()\n {\n File::copy(__DIR__.'/stubs/routes/web.stub', base_path('/routes/web.php'));\n }", "function add_route($route, callable $closure)\n\n {\n// $route = self::APP_PREFIX.$route;\n// die($route);\n $this->routes[$route] = $closure;\n }", "public function register_routes() {\n\t\t$version = '1';\n\t\t$namespace = 'askmedesk/v' . $version;\n register_rest_route( $namespace, '/tipi-richiesta', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => [$this, 'get_tipi_richiesta'],\n 'permission_callback' => [$this, 'askmedesk_permission_check']\n\t\t));\n\t\tregister_rest_route($namespace, '/creazione-richiesta', array(\n\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t'callback' => [$this, 'crea_richiesta'],\n\t\t\t'permission_callback' => [$this, 'askmedesk_permission_check'],\n\t\t\t'args' => $this->get_endpoint_args_for_item_schema( false )\n\t\t));\n\t}", "public static function add_route($method, $route, $function){\n\t\t\tself::$routes[$method][$route] = $function;\n\t\t}", "function add_rewrite_endpoint($name, $places, $query_var = \\true)\n {\n }", "public static function attachRoute(Route $route)\n {\n #Attach route to all routes\n static::$_routes[] = $route;\n\n $request = Request::getRunningInstance();\n\n #attach on request method\n if($route->getMethod() && $request->getMethod() !== $route->getMethod()) {\n return $route;\n }\n static::$_attached_routes[] = $route;\n return $route;\n }", "public function products_updated_route()\n {\n register_rest_route($this->namespace, '/products/updated/', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array($this, 'products_updated_callback'),\n 'permission_callback' => array($this, 'get_items_permissions_check'),\n ));\n }", "public function patch($uri, $action)\n {\n return $this->addRoute('PATCH', $uri, $action);\n }", "private function add($path, $callable, $name, $method){\n $route = new Route($path, $callable);\n $this->routes[$method][] = $route;\n if(is_string($callable) && $name === null){\n $name = $callable;\n }\n if($name){\n $this->namedRoutes[$name] = $route;\n }\n return $route;\n }" ]
[ "0.67541885", "0.65879726", "0.61451083", "0.60961753", "0.60028946", "0.59598166", "0.59275836", "0.591393", "0.58977073", "0.58725154", "0.5867379", "0.58169484", "0.5792245", "0.5788836", "0.5780938", "0.5763275", "0.5759909", "0.5732895", "0.5722049", "0.57047486", "0.567561", "0.5673095", "0.5666108", "0.5654219", "0.5617736", "0.5609776", "0.5594898", "0.5593598", "0.5587354", "0.55786514", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.5570488", "0.55695313", "0.5560897", "0.5539454", "0.55230665", "0.5519771", "0.5509802", "0.5491792", "0.5470882", "0.5448634", "0.5447654", "0.5436627", "0.54191357", "0.5417413", "0.54124963", "0.54121333", "0.540818", "0.5405111", "0.5401496", "0.5387653", "0.5372381", "0.5372142", "0.53553873", "0.5354182", "0.5352685", "0.53345996", "0.5331957", "0.5330173", "0.5319497", "0.53150195", "0.53092957", "0.53090894", "0.5308016", "0.5305593", "0.52981234", "0.5297062", "0.529483", "0.5293882", "0.52910656" ]
0.56717163
22
works with session facade, does session get or set process
function session($get = null, $set = null) { if ($get !== null && $set === null) { return Session::get($get); } elseif ($get !== null && $set !== null) { return Session::set($get, $set); } else { return App::make('session'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function startSession();", "private function _sess_run() {\n\t\t// session\n\t\tini_set('session.save_handler', $this->sess_save_handler);\n\t\t$path = array();\n\t\tforeach ($this->sess_server as $server) {\n\t\t\tif (isset($server['host']) && isset($server['port'])) {\n\t\t\t\t$path[] = \"tcp://{$server['host']}:{$server['port']}?\" . http_build_query(isset($server['params']) ? $server['params'] : array());\n\t\t\t}\n\t\t}\n\t\tif (empty($path)) {\n\t\t\tshow_error('Session save_path is empty');\n\t\t}\n\t\tini_set('session.save_path', implode(',', $path));\n\n\t\tini_set('session.gc_maxlifetime', $this->sess_expiration);\t// 过期时间\n\t\t// cookie\n\t\tini_set('session.cookie_secure', 0);\t\t// 0 http:// 1 https://\n\t\tini_set('session.cookie_httponly', 1);\t\t// 不让JS读取session的cookie\n\t\tsession_name($this->sess_cookie_name);\n\n\t\tsession_start();\n\t\t// delete old flashdata (from last request)\n\t\t$this->_flashdata_sweep();\n\t\t// mark all new flashdata as old (data will be deleted before next request)\n\t\t$this->_flashdata_mark();\n\t}", "public static function setAsSessionHandler()\n {\n session_set_save_handler(array('Eb_MemcacheSession', 'sessionOpen'),\n array('Eb_MemcacheSession', 'sessionClose'),\n array('Eb_MemcacheSession', 'sessionRead'),\n array('Eb_MemcacheSession', 'sessionWrite'),\n array('Eb_MemcacheSession', 'sessionDestroyer'),\n array('Eb_MemcacheSession', 'sessionGc'));\n }", "protected function manageSession()\n {\n $this->session = new WebsiteSession();\n foreach ($this->eventRequest->getSession() as $key => $value) {\n\n if ($key == 'createdAt') {\n $value = time();\n }\n\n $method = 'set' . ucwords($key);\n if (method_exists($this->session, $method)) {\n $this->session->$method($value);\n }\n }\n }", "public function startSession() {}", "function sessionSet(){\r\n\t\tif(isset($_SESSION[\"$this->session_name\"])) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "abstract protected function getSession();", "public function SessionStart ();", "function set_session($session_name, $session_value) {\n clear_session($session_name);\n $_SESSION[APP_ID . $session_name] = $session_value;\n return $_SESSION[APP_ID . $session_name];\n}", "public function getSession() {}", "public function storeSession() {}", "function _read_user_session()\n {\t\t\n\t\tif($this->sh_Options['keeping_logic'] == 'db'){\n\t\t\t$this->is_present = $this->_read_user_session_db();\n\t\t} else {\n\t\t\t$this->is_present = $this->_read_user_session_ss();\n\t\t}\n\t}", "protected function _session()\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'set data on session markers',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n if ($this->_session && $this->_session->returns('display')) {\n foreach ($this->_session->returns('display') as $key => $val) {\n $this->generate('session_display;' . $key, $val);\n }\n }\n }", "function loadSession() {}", "public function getSession();", "public static function use_sessions()\n {\n \\Session::started() or \\Session::load();\n }", "function sess_run()\n {\n //If we are, update the session length to reflect the \"user specific length\"\n if ($this->persistant_session() != FALSE) {\n $this->sess_length = $this->persistant_session();\n }\n\n //Set Session Name\n session_name($this->sess_name);\n\n //Set Session Lifetime (this is in seconds, unlike setting a normal cookie which requires a date/time)\n ini_set('session.cookie_lifetime', $this->sess_length);\n\n $current_session_id = session_id();\n if ($current_session_id != '') {\n //By calling Session_ID - with the current session_id - we force to renew the cookie (and the expiry time)\n session_id($current_session_id);\n }\n //If the session doesn't exist yet, there is no need to do this.\n\n //Start or Continue our Session\n session_start();\n\n //User IP Match - Run if required to do so\n if ($this->sess_match_ip == TRUE) {\n if (!isset($_SESSION['ip_address'])) {\n //If our session does not previously contain an IP address, this is the user's first visit. Record their IP.\n //Do not check again now until next page load.\n $_SESSION['ip_address'] = $this->_ra_encode($this->CI->input->ip_address());\n } else {\n if ($this->_ra_decode($_SESSION['ip_address']) != $this->CI->input->ip_address()) {\n //User IP Match failed - destory the session (and any stored data) immediantly.\n $this->sess_destroy();\n //Do not continue, and return \"FALSE\"\n return FALSE;\n }\n }\n }\n\n //User UserAgent (browser) Match - Run if required to do so\n if ($this->sess_match_useragent == TRUE) {\n if (!isset($_SESSION['user_agent'])) {\n //If our session does not previously contain a UserAgent, this is the user's first visit. Record their UserAgent.\n //Do not check again now until next page load.\n $_SESSION['user_agent'] = $this->_ra_encode(trim(substr($this->CI->input->user_agent(), 0, 50)));\n } else {\n if ($this->_ra_decode($_SESSION['user_agent']) != trim(substr($this->CI->input->user_agent(), 0, 50))) {\n //User UserAgent (browser) Match failed - destory the session (and any stored data) immediantly.\n $this->sess_destroy();\n //Do not continue, and return \"FALSE\";\n return FALSE;\n }\n }\n }\n\n //If session encryption is enabled, decode the session data and pass it to the array userdata() for compatability reasons.\n $this->userdata = $this->_ra_decode($_SESSION);\n\n //Return TRUE - successfully started/continued our session\n return TRUE;\n }", "public function getSession()\r\n {\r\n return $this->sessionID;\r\n }", "public function setSession()\n {\n $this->setShared('session', function() {\n $session = new SessionAdapter();\n $session->start();\n return $session;\n });\n }", "protected function _getSession() {\n /**\n * Return session value\n */\n return Mage::getSingleton ( 'core/session' );\n }", "function processResult($id)\n{\n session_start();\n $_SESSION['ID'] = $id;\n $_SESSION['start'] = time();\n ini_set('session.use_only_cookies', 1);\n\n\n}", "private function openSession() {\n $this->sessionId = isset($_POST['key']) ? $_POST['key'] : (isset($_GET['key']) ? $_GET['key'] : 'null');\n\n if($this->sessionId == 'null' || strlen($this->sessionId) === 0) {\n $this->sessionId = rand(0, 999999999);\n }\n\n session_id($this->sessionId);\n session_name(\"gibSession\");\n session_start();\n }", "function requestSessionInfo()\n {\n //para pasarselo al aside;\n\n $sessionLevel = $this->loginController->GetSessionAuthLevel();\n $this->view->setSessionLevel($sessionLevel);\n\n $sessionName = $this->loginController->GetSessionUsername();\n $this->view->setSessionName($sessionName);\n }", "protected abstract function get_sessions();", "public function updateSession(){\n # code...\n }", "public function start()\n {\n if (self::$sessionStarted) {\n return;\n }\n\n // use this object as the session handler\n session_set_save_handler(\n array($this, 'sessionDummy'), // open\n array($this, 'sessionDummy'), // close\n array($this, 'sessionRead'),\n array($this, 'sessionDummy'), // write\n array($this, 'sessionDestroy'),\n array($this, 'sessionDummy') // gc\n );\n\n parent::start();\n }", "private function updateSession()\n {\n $_SESSION[$this->namespace] = $this->session;\n }", "function fork()\n {\n\t\tif( $this->_state !== 'active' ) {\n\t\t\t// @TODO :: generated error here\n\t\t\treturn false;\n\t\t}\n\n\t\t// save values\n\t\t$values\t\t\t=\t$_SESSION;\n\n\t\t// keep session config\n\t\t$trans\t=\tini_get( 'session.use_trans_sid' );\n\t\tif( $trans ) {\n\t\t\tini_set( 'session.use_trans_sid', 0 );\n\t\t}\n\t\t$cookie\t=\tsession_get_cookie_params();\n\n\t\t// create new session id\n\t\t$id\t=\t$this->_createId( strlen( $this->_sessAttributes['id'] ) );\n\n\t\t// kill session\n\t\tsession_destroy();\n\n\t\t// restore config\n\t\tini_set( 'session.use_trans_sid', $trans );\n\t\tsession_set_cookie_params( $cookie['lifetime'], $cookie['path'], $cookie['domain'], $cookie['secure'] );\n\n\t\t// restart session with new id\n\t\tsession_id( $id );\n\t\tsession_start();\n\n\t\treturn true;\n }", "public function setSession(){\n if( $this->status === True ){\n $_SESSION['username'] = $this->username;\n $_SESSION['userlvl'] = $this->userlevel;\n $_SESSION['status'] = True;\n }else{\n $_SESSION['status'] = False;\n }\n }", "public static function start(){\n\t\treturn session_start();\n\t}", "public static function sessionReadHandler();", "private function getSession() {\n\t\t//read session file and fill the array\n\t\tif (file_exists ( self::SESSION_FILE )) {\n\t\t\t$this->session = unserialize ( file_get_contents ( self::SESSION_FILE ) );\n\t\t}\n\t\t\n\t\t//If the last session has expired, remove the session\n\t\tif (isset ( $this->session ) && $this->session ['lastlogin'] + (10 * 60) <= time ()) {\n\t\t\tunset ( $this->session );\n\t\t\t$this->updateSession ();\n\t\t}\n\t}", "function setSession($key,$value){\n return Yii::app()->getSession()->add($key, $value);\n}", "function startSession()\n {\n $this->session_data = $this->_openSession($this->service_link, $this->username, $this->password,\n $this->calling_program, $this->calling_program_version,\n $this->target_dbms, $this->target_dbms_version,\n $this->connection_technology, $this->connection_technology_version,\n $this->interactive);\n\n if (isset($this->session_data) && ($this->session_data != null)\n && ($this->session_data->target != $this->url)) {\n // Reopens the service on the new URL that was provided\n $url = $this->session_data->target;\n $this->startService();\n }\n }", "protected function get_sessions()\n {\n }", "protected function _session() {\n\t\treturn $this->_crud()->Session;\n\t}", "function saveSession() {}", "public static function sessionOpenHandler();", "function getSession() {\n\t\treturn $this->get('_session', $this->get('session'));\n\t}", "public function setSession()\n\t{\n\t\t$this->session = Session::getInstance();\n\t\t$this->session->start();\n\t}", "function getSession($key){\n return Yii::app()->getSession()->get($key);\n}", "public function session( $key, $value = null ) {\n\t\tklein_start_session();\n\n\t\treturn $_SESSION[ $key ] = $value;\n\t}", "public function storeSessionData() {}", "public static function setSessionHandler () {\n \n // use memcache if available\n $handler = conf::getMainIni('session_handler');\n if ($handler == 'memcache'){\n $host = conf::getMainIni('memcache_host');\n if (!$host) {\n $host = 'localhost';\n }\n $port = conf::getMainIni('memcache_port');\n if (!$port) {\n $port = '11211';\n }\n $query = conf::getMainIni('memcache_query');\n if (!$query) {\n $query = 'persistent=0&weight=2&timeout=2&retry_interval=10';\n }\n $session_save_path = \"tcp://$host:$port?$query, ,tcp://$host:$port \";\n ini_set('session.save_handler', 'memcache');\n ini_set('session.save_path', $session_save_path);\n }\n }", "public function storeSessionData() {}", "function testSet() {\n\n\t\tsession_start();\n\n\t\techo $_SESSION['sessionID'];\n\t\t\n\t\tif(!isset($_SESSION['sessionID'])){\n\t\t\techo \"out\";\n\t\t\texit;\n\t\t}\n\n\t\techo \"in\";\n\t}", "function hook_session() {\n session_set_save_handler(array($this, '_open'),\n array($this, '_close'),\n array($this, '_read'),\n array($this, '_write'),\n array($this, '_destroy'),\n array($this, '_clean'));\n }", "function load_open_session($key=VANCO_KEY) {\n $shm = shmop_open(VANCO_MEM, \"c\", 0644, 58);\n $session = shmop_read($shm, 0, 48);\n $age = time() - shmop_read($shm, 48, 10);\n shmop_close($shm);\n if($age < 86400) {\n return trim(decrypt($session, $key)); # Read decrypt and trim from shared memory\n } else {\n return false;\n }\n}", "private function _createSession(){\n return $this->_session = new Session();\n }", "function save_session() {\n $this->operation_result=DAL_Website_Visitor::{\"save_session\"}($this->visited_page,$this->visit_start,$this->visit_end);\n return $this->operation_result;\n }", "public function hasSession() {}", "public function startSession($id){\n\n }", "function startSession(){\r\n\r\n\t\tsession_name(\"phpBMS\".preg_replace('/\\W/',\"\",APPLICATION_NAME).\"v096ID\");\r\n\t\tsession_start();\r\n\r\n\t}", "public function startSession(){\n\t\tif( $this->sessionState == self::SESION_NO_INICIADA){\n\t\t\t$this->sessionState = session_start();\n\t\t}\n\t\treturn $this->sessionState;\n\t}", "protected function setupSession()\n\t{\n\t\t$name = $this->appType . \"id\";\n\t\tsession_name($name);\n\n\t\t$path = getenv(\"P_SESSION_DIR\") ?: $GLOBALS[\"BASE_DIR\"] . \"/session\";\n\t\tif (! is_dir($path)) {\n\t\t\tif (! mkdir($path, 0777, true))\n\t\t\t\tjdRet(E_SERVER, \"fail to create session folder: $path\");\n\t\t}\n\t\tif (! is_writeable($path))\n\t\t\tjdRet(E_SERVER, \"session folder is NOT writeable: $path\");\n\t\tsession_save_path ($path);\n\n\t\tini_set(\"session.cookie_httponly\", 1);\n\n\t\t$path = getenv(\"P_URL_PATH\");\n\t\tif ($path)\n\t\t{\n\t\t\t// e.g. path=/cheguanjia\n\t\t\tini_set(\"session.cookie_path\", $path);\n\t\t}\n\t}", "protected function initializeSession() {}", "public function getSession(){\r\n return $this->session;\r\n }", "public function start()\n {\n $path = ini_get('session.cookie_path');\n if (!strlen($path)) {\n $path = '/';\n }\n\n $secure = false;\n\n if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https') {\n $secure = true;\n } else {\n $secure = (empty($_SERVER[\"HTTPS\"]) || ($_SERVER[\"HTTPS\"] === 'off')) ? false : true;\n }\n\n session_set_cookie_params(ini_get('session.cookie_lifetime'), $path, ini_get('session.cookie_domain'), $secure);\n\n if (version_compare(PHP_VERSION, '7.0.0') >= 0) {\n $this->close_session_locks = true;\n }\n\n if ($this->close_session_locks) {\n $result = $this->session_read();\n } else {\n $result = $this->session_open();\n }\n if ($result) {\n $this->flash = new Phpr_Flash();\n if ($this->flash) {\n if (array_key_exists('flash_partial', $_POST) && strlen($_POST['flash_partial'])) {\n $this->flash['system'] = 'flash_partial:' . $_POST['flash_partial'];\n }\n }\n }\n\n return $result;\n }", "public function sess_read()\n\t{\n\t\treturn ($this->session_valid()) ? parent::sess_read() : FALSE;\n\t}", "protected function getSession()\n {\n $session = Session::getInstance();\n\n $this->settings = $session->get('member-import-settings');\n $this->importData = $session->get('member-import-data');\n }", "private function setSESSIONvariables() {\n $_SESSION['pqz_configuration'] = $this->configuration;\n $_SESSION['pqz_question'] = $this->question;\n }", "private function _getSession()\n {\n return Mage::getSingleton('payone_core/session');\n }", "public function getSessionID();", "public function __set( $name , $value ){\n\n \tif ( $this->sessionState == self::SESSION_NOT_STARTED ){\n \t\tself::$instance->startSession();\n \t}\n\n $_SESSION[$name] = $value;\n }", "function __construct(){\n $this->startSession();\n }", "function session(){\n\t\t$t = strtolower($_SERVER['HTTP_USER_AGENT']);\n\t\tif(strpos($t,'esnc.net') !== FALSE || strpos($t,'search') !== FALSE || strpos($t,'bot') !== FALSE || strpos($t,'spider') !== FALSE || strpos($t,'crawler') !== FALSE) return;//exclude search engine and other browser\n\t\tsession_save_path(PATH_SESSION);\n\t\tsession_cache_limiter(SESSION_CACHE);\n\t\tsession_cache_expire(SESSION_TIMEOUT);\n\t\tsession_name(SESSION_NAME);\n\t\tsession_set_cookie_params(0,URL_ROOT);\n\t\tsession_start();\n\t\tif(!isset($_SESSION['ctrl'])){\n\t\t\t$_SESSION['USip'] = $t=$_SERVER['REMOTE_ADDR'];\n\t\t\t$_SESSION['UA'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t\t$_SESSION['ctrl']=1;//guest session start\n\t\t\t$_SESSION['USid']=-1;\n\t\t\t$_SESSION['USname']='';\n\t\t\t$_SESSION['USemail']='';\n\t\t\t$_SESSION['USlastlogin']='';\n\t\t\t$_SESSION['priv']=0;\n\t\t\t$_SESSION['logontries'] = 0;\n\t\t\t/* implement hit counter\t\n\t\t\texclude ip from 192.168.0.x,10.x.x.x,\n\t\t\t*/\n\t\t\tif(strpos($t,'192.') !== 0 && strpos($t,'10.') !== 0 && ($visit=(int)@file_get_contents(PATH_GLOBAL.'visit.txt')))\n\t\t\t\tfile_put_contents(PATH_GLOBAL.'visit.txt',++$visit,LOCK_EX);\n\t\t};\n\t\t$this->load();\n\t}", "protected function getSession () {\n\t\treturn $this->session;\n\t}", "function SetPreSessionParam($ParamName, $ParamValue) {\t \n\n $_SESSION[$ParamName]= $ParamValue; \n \n FreeSessionParam($ParamName);\n \n}", "function set_session() {\n\t\t\t// Set cart and coupon session data\n\t\t\t$_SESSION['cart'] = $this->cart_contents;\n\t\t\t$_SESSION['coupons'] = $this->applied_coupons;\n\t\t\t\n\t\t\t// Cart contents change so reset shipping\n\t\t\tunset($_SESSION['_chosen_shipping_method']);\n\t\t\t\n\t\t\t// Calculate totals\n\t\t\t$this->calculate_totals();\n\t\t}", "public function __construct() {\n //no session under cli\n if (php_sapi_name() === 'cli') {\n return false;\n }\n\n //100 minutes expire time , php default value is 180\n session_cache_expire(100);\n session_start();\n session_regenerate_id(TRUE); //每次从新加载都会产生一个新的session id\n int_set(\"session.use_only_cookies\", 1); //表示只使用cookies存放session id,这可以避免session固定攻击\n }", "function getSession() {\n\t\treturn $this->getParam(self::PARAM_REQUEST_SESSION);\n\t}", "private function sessionStart(&$get, &$post)\n\t{\n\t\tif (empty($_SESSION)) {\n\t\t\tini_set('session.cookie_path', Paths::$uri_base);\n\t\t\tif (isset($get['memory_limit'])) {\n\t\t\t\tini_set('memory_limit', $get['memory_limit']);\n\t\t\t\tunset($get['memory_limit']);\n\t\t\t}\n\t\t\tif (isset($get['time_limit'])) {\n\t\t\t\tset_time_limit($get['time_limit']);\n\t\t\t\tunset($get['time_limit']);\n\t\t\t}\n\t\t\tsession_start();\n\t\t\tif (isset($GLOBALS['X'])) {\n\t\t\t\t$_SESSION = [];\n\t\t\t}\n\t\t}\n\t\t$this->setIncludePath($_SESSION, Application::class);\n\t\tif (isset($_SESSION['session']) && isset($_SESSION['session']->plugins)) {\n\t\t\t$this->resumeSession();\n\t\t}\n\t\telse {\n\t\t\t$this->createSession();\n\t\t}\n\t\tif (!Application::current()) {\n\t\t\t$_SESSION = [];\n\t\t\t$this->createSession();\n\t\t}\n\t\tunset($get[session_name()]);\n\t\tunset($post[session_name()]);\n\t}", "public function createSession()\n {\n session_start();\n }", "private function _initSession()\n {\n Zend_Session::setOptions(array('remember_me_seconds' => intval(App::config()->remember_me_seconds) , 'save_path' => VAR_PATH . \"session\" , 'gc_probability' => 1 , 'gc_divisor' => 5000 , 'name' => \"zfsession\" , 'use_only_cookies' => 0));\n $handler = strtolower(App::config()->session_save_handler);\n if('db' === $handler){\n Zend_Session::setSaveHandler(new App_Session_SaveHandler_DbTable(array('name' => DB_TABLE_PREFIX . 'session' , 'primary' => 'id' , 'modifiedColumn' => 'modified' , 'dataColumn' => 'data' , 'lifetimeColumn' => 'lifetime')));\n }\n Zend_Session::start();\n }", "public function __set($name,$value){\n\t\treturn $_SESSION[$name] = $value;\n\t}", "public function getSessionID(){\r\n\t\treturn $this->sessionID;\r\n\t}", "protected function set_session($sKey,$sValue){$_SESSION[$sKey]=$sValue;}", "public function fetchSessionData() {}", "public function getUseSession() \n {\n return $this->_use_session;\n }", "function fsl_session_set($name,$value,$timeout = NULL){\n $_SESSION[$name] = fsl_encrypt($value);\n\t\t\t\tif(!empty($timeout)) $_SESSION[$name.'_timeout'] = $timeout + time();\n\t\t\n return true;\n}", "function handler_session($url)\r\n {\r\n if ($_SERVER['REQUEST_METHOD'] != 'POST' or !isset($url[0])) {\r\n return $this->show_error(403);\r\n }\r\n $session = $this->load_controller('Session');\r\n return $session->{'handler_process_' . $url[0]}($url);\r\n }", "public function __call($method,$value)\n\t{\n\t\t$property = lcfirst(substr($method,3));\n\t\tif(strpos($method,\"get\")===0 and property_exists($this,$property) and isset($_SESSION[$value[0]]))\n\t\t{\n\t\t\treturn $_SESSION[$value[0]];\n\t\t}\n\t\tthrow new \\RuntimeException(\"Undefined the property:\".$property);\n\t}", "protected abstract function loadSessionData();", "function guestbook_session_started($set = NULL) {\n static $session_started = FALSE;\n if (isset($set)) {\n $session_started = $set;\n }\n return $session_started && session_id();\n}", "public function set($key,$value) {\n\t\t$this->getFrontendUser()->setKey('ses', self::SESSIONNAMESPACE.$key, $value);\n\t\t$this->getFrontendUser()->storeSessionData();\n return true;\n\t}", "function getSession() {\n\t\treturn $this->getSessionRelatedBySessionId();\n\t}", "private function readSessionId() {\r\n \r\n if ($this->use_cookie==true) { //cookie enabled\r\n \r\n if (isset($_COOKIE[$this->sid_name])) { //there some jam in the cookie\r\n\r\n $this->sessionId=$_COOKIE[$this->sid_name];\r\n //check if the jam can be eated\r\n if ($this->checkSessionId()) {\r\n\r\n\r\n $num = $this->getSidCount($this->sessionId);\r\n if ($num != 1) {\r\n //there is a sessiod in the cookie and no sessid in the DB\r\n //the only thing to do is to generate a new Sid\r\n if (!$this->newSid()) {\r\n trigger_error(\"Unable to load session.\",E_USER_ERROR);\r\n } else {\r\n if (!$this->overwrite) setcookie ($this->sid_name, $this->sessionId,time()+$this->session_duration,\"/\",'',false,true);\r\n }\r\n\r\n } else {\r\n //ok the jam is good!\r\n if (!$this->overwrite) {\r\n setcookie ($this->sid_name, $this->sessionId,time()+$this->session_duration,\"/\",'',false,true); \r\n }\r\n $this->loadSesionVars();\r\n }\r\n \r\n } else {\r\n //bad bad bad think ... something goes wrong with the\r\n //jam .. maybe uncle tom eated it before .. \r\n $this->destroySession(FALSE);\r\n trigger_error(\"Unable to load session.\",E_USER_ERROR);\r\n }\r\n\r\n } else { \r\n\r\n //Damn, no id ... i create some jam!\r\n \r\n if (!$this->newSid()) {\r\n trigger_error(\"Unable to load session.\",E_USER_ERROR);\r\n } else {\r\n if (!$this->overwrite) setcookie ($this->sid_name, $this->sessionId,time()+$this->session_duration,\"/\",'',false,true);\r\n }\r\n \r\n\r\n }\r\n\r\n } else { //no cookie allowed.. bad thing! search elsewhere\r\n\r\n if (isset($_REQUEST[$this->sid_name])) {//bingo!\r\n\r\n $this->sessionId = $_REQUEST[$this->sid_name];\r\n if ($this->checkSessionId()) {\r\n $this->loadSesionVars();\r\n }else {\r\n //bad bad bad think ... something goes wrong with the\r\n //jam .. maybe uncle tom eated it before ..\r\n $this->destroySession(FALSE);\r\n trigger_error(\"Unable to load session.\",E_USER_ERROR);\r\n }\r\n\r\n } else { // create a new SID\r\n\r\n if (!$this->newSid()) die(\"Unable to save session\");\r\n\r\n }\r\n\r\n }\r\n }", "function HTTP_SessionServer_SaveHandler_read($id)\n{\n $GLOBALS['__session']->open($id);\n return $GLOBALS['__session']->get($GLOBALS['__sessionName']);\n}", "function session($key, $val=null){\r\n\t $type = gettype($key);\r\n\t if('array' == $type){\r\n\t $key = $key[1].'.'.$key[0];\r\n\t }else if('string' == $type){\r\n\t $key = $this->item('cur_mod').'.'.$key;\r\n\t }else{\r\n\t trigger_error('unsupported session key type: '.$type, E_USER_WARNING);\r\n\t return;\r\n\t }\r\n\t \r\n\t if(!isset($_SESSION))\r\n\t session_start();\r\n\t \r\n\t if(2 == func_num_args())\r\n\t $_SESSION[$key] = $val;\r\n\t else \r\n\t return $_SESSION[$key];\r\n\t}", "function sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "private function initSession()\n {\n // Start the session\n session_start();\n\n // Create session id constant\n define('SID', session_id());\n }", "public function session()\n\t\t{\n\t\t\treturn $this->get_session();\n\t\t}", "function wpdev_session_start() {\n session_start();\n }", "public function getSession($name);", "function auth_set($sess)\n{\n _app('auth', $sess);\n session_set(auth_namespace(), $sess, true);\n}", "public function sess_write()\r\r\n\t{\r\r\n\t\tif( ! $this->parent->check_write())\r\r\n\t\t{\r\r\n\t\t\t$_SESSION = array();\r\r\n\t\t\tforeach($this->parent->userdata as $key => $val)\r\r\n\t\t\t{\r\r\n\t\t\t\t$_SESSION[$key] = $val;\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t$this->parent->track_write();\r\r\n\t\t}\r\r\n\t}", "static function getSession($name){\n return $_SESSION[$name];\n }", "public static function sessionStart()\n\t{\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "function set_session_value($params){\n if($params['name'] && $params['value']){\n $_SESSION[$params['name']] = $params['value'];\n }\n}", "function set ($name,$value) {\r\n $_SESSION[$name]=$value;\r\n }", "public function session_init()\n {\n // session started (Installer?)\n if (session_id())\n return;\n\n $sess_name = $this->config->get('session_name');\n $sess_domain = $this->config->get('session_domain');\n $lifetime = $this->config->get('session_lifetime', 0) * 60;\n\n // set session domain\n if ($sess_domain) {\n ini_set('session.cookie_domain', $sess_domain);\n }\n // set session garbage collecting time according to session_lifetime\n if ($lifetime) {\n ini_set('session.gc_maxlifetime', $lifetime * 2);\n }\n\n ini_set('session.cookie_secure', rcube_ui::https_check());\n ini_set('session.name', $sess_name ? $sess_name : 'roundcube_sessid');\n ini_set('session.use_cookies', 1);\n ini_set('session.use_only_cookies', 1);\n ini_set('session.serialize_handler', 'php');\n\n // use database for storing session data\n $this->session = new rcube_session($this->get_dbh(), $this->config);\n\n $this->session->register_gc_handler(array($this, 'temp_gc'));\n $this->session->register_gc_handler(array($this, 'cache_gc'));\n\n // start PHP session (if not in CLI mode)\n if ($_SERVER['REMOTE_ADDR'])\n session_start();\n\n // set initial session vars\n if (!$_SESSION['user_id'])\n $_SESSION['temp'] = true;\n\n // restore skin selection after logout\n if ($_SESSION['temp'] && !empty($_SESSION['skin']))\n $this->config->set('skin', $_SESSION['skin']);\n }" ]
[ "0.65633863", "0.6530721", "0.6525817", "0.65093565", "0.6486664", "0.6415865", "0.6360849", "0.63312334", "0.63012874", "0.6277104", "0.6265626", "0.62583756", "0.6233166", "0.62226695", "0.6197803", "0.6175033", "0.6147", "0.6140555", "0.61269414", "0.61107385", "0.60928255", "0.608299", "0.6078583", "0.6077923", "0.60641366", "0.6063644", "0.6043571", "0.6013609", "0.60102606", "0.59983534", "0.5998222", "0.5993934", "0.59887534", "0.598632", "0.5981602", "0.5981395", "0.59802175", "0.59602636", "0.5958619", "0.5951658", "0.5947306", "0.59422827", "0.5941437", "0.5940614", "0.59396905", "0.59372526", "0.59309214", "0.5898257", "0.5883762", "0.5875532", "0.5874067", "0.58681524", "0.5864687", "0.58421296", "0.58413583", "0.5841073", "0.58337474", "0.5823907", "0.58225024", "0.58190894", "0.58146906", "0.5814074", "0.58123225", "0.5812037", "0.5808187", "0.5807141", "0.5803331", "0.5802232", "0.5801812", "0.5799898", "0.57902396", "0.57834566", "0.5783364", "0.5783173", "0.57791704", "0.5773114", "0.57730967", "0.57707924", "0.5760687", "0.57603115", "0.5756486", "0.5751925", "0.57517236", "0.5744123", "0.5734744", "0.5733462", "0.5731907", "0.57261175", "0.57213724", "0.57198703", "0.5717376", "0.57123333", "0.57112134", "0.57033026", "0.56974", "0.56959033", "0.569276", "0.56913817", "0.5691078", "0.56864953", "0.5685013" ]
0.0
-1
works with session facade, does session get or set process
function cookie($get = null, $set = null) { if ($get !== null && $set === null) { return Cookie::get($get); } elseif ($get !== null && $set !== null) { return Cookie::set($get, $set); } else { return App::make('cookie'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function startSession();", "private function _sess_run() {\n\t\t// session\n\t\tini_set('session.save_handler', $this->sess_save_handler);\n\t\t$path = array();\n\t\tforeach ($this->sess_server as $server) {\n\t\t\tif (isset($server['host']) && isset($server['port'])) {\n\t\t\t\t$path[] = \"tcp://{$server['host']}:{$server['port']}?\" . http_build_query(isset($server['params']) ? $server['params'] : array());\n\t\t\t}\n\t\t}\n\t\tif (empty($path)) {\n\t\t\tshow_error('Session save_path is empty');\n\t\t}\n\t\tini_set('session.save_path', implode(',', $path));\n\n\t\tini_set('session.gc_maxlifetime', $this->sess_expiration);\t// 过期时间\n\t\t// cookie\n\t\tini_set('session.cookie_secure', 0);\t\t// 0 http:// 1 https://\n\t\tini_set('session.cookie_httponly', 1);\t\t// 不让JS读取session的cookie\n\t\tsession_name($this->sess_cookie_name);\n\n\t\tsession_start();\n\t\t// delete old flashdata (from last request)\n\t\t$this->_flashdata_sweep();\n\t\t// mark all new flashdata as old (data will be deleted before next request)\n\t\t$this->_flashdata_mark();\n\t}", "public static function setAsSessionHandler()\n {\n session_set_save_handler(array('Eb_MemcacheSession', 'sessionOpen'),\n array('Eb_MemcacheSession', 'sessionClose'),\n array('Eb_MemcacheSession', 'sessionRead'),\n array('Eb_MemcacheSession', 'sessionWrite'),\n array('Eb_MemcacheSession', 'sessionDestroyer'),\n array('Eb_MemcacheSession', 'sessionGc'));\n }", "protected function manageSession()\n {\n $this->session = new WebsiteSession();\n foreach ($this->eventRequest->getSession() as $key => $value) {\n\n if ($key == 'createdAt') {\n $value = time();\n }\n\n $method = 'set' . ucwords($key);\n if (method_exists($this->session, $method)) {\n $this->session->$method($value);\n }\n }\n }", "public function startSession() {}", "function sessionSet(){\r\n\t\tif(isset($_SESSION[\"$this->session_name\"])) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "abstract protected function getSession();", "public function SessionStart ();", "function set_session($session_name, $session_value) {\n clear_session($session_name);\n $_SESSION[APP_ID . $session_name] = $session_value;\n return $_SESSION[APP_ID . $session_name];\n}", "public function getSession() {}", "public function storeSession() {}", "function _read_user_session()\n {\t\t\n\t\tif($this->sh_Options['keeping_logic'] == 'db'){\n\t\t\t$this->is_present = $this->_read_user_session_db();\n\t\t} else {\n\t\t\t$this->is_present = $this->_read_user_session_ss();\n\t\t}\n\t}", "protected function _session()\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'set data on session markers',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n if ($this->_session && $this->_session->returns('display')) {\n foreach ($this->_session->returns('display') as $key => $val) {\n $this->generate('session_display;' . $key, $val);\n }\n }\n }", "function loadSession() {}", "public function getSession();", "public static function use_sessions()\n {\n \\Session::started() or \\Session::load();\n }", "function sess_run()\n {\n //If we are, update the session length to reflect the \"user specific length\"\n if ($this->persistant_session() != FALSE) {\n $this->sess_length = $this->persistant_session();\n }\n\n //Set Session Name\n session_name($this->sess_name);\n\n //Set Session Lifetime (this is in seconds, unlike setting a normal cookie which requires a date/time)\n ini_set('session.cookie_lifetime', $this->sess_length);\n\n $current_session_id = session_id();\n if ($current_session_id != '') {\n //By calling Session_ID - with the current session_id - we force to renew the cookie (and the expiry time)\n session_id($current_session_id);\n }\n //If the session doesn't exist yet, there is no need to do this.\n\n //Start or Continue our Session\n session_start();\n\n //User IP Match - Run if required to do so\n if ($this->sess_match_ip == TRUE) {\n if (!isset($_SESSION['ip_address'])) {\n //If our session does not previously contain an IP address, this is the user's first visit. Record their IP.\n //Do not check again now until next page load.\n $_SESSION['ip_address'] = $this->_ra_encode($this->CI->input->ip_address());\n } else {\n if ($this->_ra_decode($_SESSION['ip_address']) != $this->CI->input->ip_address()) {\n //User IP Match failed - destory the session (and any stored data) immediantly.\n $this->sess_destroy();\n //Do not continue, and return \"FALSE\"\n return FALSE;\n }\n }\n }\n\n //User UserAgent (browser) Match - Run if required to do so\n if ($this->sess_match_useragent == TRUE) {\n if (!isset($_SESSION['user_agent'])) {\n //If our session does not previously contain a UserAgent, this is the user's first visit. Record their UserAgent.\n //Do not check again now until next page load.\n $_SESSION['user_agent'] = $this->_ra_encode(trim(substr($this->CI->input->user_agent(), 0, 50)));\n } else {\n if ($this->_ra_decode($_SESSION['user_agent']) != trim(substr($this->CI->input->user_agent(), 0, 50))) {\n //User UserAgent (browser) Match failed - destory the session (and any stored data) immediantly.\n $this->sess_destroy();\n //Do not continue, and return \"FALSE\";\n return FALSE;\n }\n }\n }\n\n //If session encryption is enabled, decode the session data and pass it to the array userdata() for compatability reasons.\n $this->userdata = $this->_ra_decode($_SESSION);\n\n //Return TRUE - successfully started/continued our session\n return TRUE;\n }", "public function getSession()\r\n {\r\n return $this->sessionID;\r\n }", "public function setSession()\n {\n $this->setShared('session', function() {\n $session = new SessionAdapter();\n $session->start();\n return $session;\n });\n }", "protected function _getSession() {\n /**\n * Return session value\n */\n return Mage::getSingleton ( 'core/session' );\n }", "function processResult($id)\n{\n session_start();\n $_SESSION['ID'] = $id;\n $_SESSION['start'] = time();\n ini_set('session.use_only_cookies', 1);\n\n\n}", "private function openSession() {\n $this->sessionId = isset($_POST['key']) ? $_POST['key'] : (isset($_GET['key']) ? $_GET['key'] : 'null');\n\n if($this->sessionId == 'null' || strlen($this->sessionId) === 0) {\n $this->sessionId = rand(0, 999999999);\n }\n\n session_id($this->sessionId);\n session_name(\"gibSession\");\n session_start();\n }", "function requestSessionInfo()\n {\n //para pasarselo al aside;\n\n $sessionLevel = $this->loginController->GetSessionAuthLevel();\n $this->view->setSessionLevel($sessionLevel);\n\n $sessionName = $this->loginController->GetSessionUsername();\n $this->view->setSessionName($sessionName);\n }", "protected abstract function get_sessions();", "public function updateSession(){\n # code...\n }", "public function start()\n {\n if (self::$sessionStarted) {\n return;\n }\n\n // use this object as the session handler\n session_set_save_handler(\n array($this, 'sessionDummy'), // open\n array($this, 'sessionDummy'), // close\n array($this, 'sessionRead'),\n array($this, 'sessionDummy'), // write\n array($this, 'sessionDestroy'),\n array($this, 'sessionDummy') // gc\n );\n\n parent::start();\n }", "private function updateSession()\n {\n $_SESSION[$this->namespace] = $this->session;\n }", "function fork()\n {\n\t\tif( $this->_state !== 'active' ) {\n\t\t\t// @TODO :: generated error here\n\t\t\treturn false;\n\t\t}\n\n\t\t// save values\n\t\t$values\t\t\t=\t$_SESSION;\n\n\t\t// keep session config\n\t\t$trans\t=\tini_get( 'session.use_trans_sid' );\n\t\tif( $trans ) {\n\t\t\tini_set( 'session.use_trans_sid', 0 );\n\t\t}\n\t\t$cookie\t=\tsession_get_cookie_params();\n\n\t\t// create new session id\n\t\t$id\t=\t$this->_createId( strlen( $this->_sessAttributes['id'] ) );\n\n\t\t// kill session\n\t\tsession_destroy();\n\n\t\t// restore config\n\t\tini_set( 'session.use_trans_sid', $trans );\n\t\tsession_set_cookie_params( $cookie['lifetime'], $cookie['path'], $cookie['domain'], $cookie['secure'] );\n\n\t\t// restart session with new id\n\t\tsession_id( $id );\n\t\tsession_start();\n\n\t\treturn true;\n }", "public function setSession(){\n if( $this->status === True ){\n $_SESSION['username'] = $this->username;\n $_SESSION['userlvl'] = $this->userlevel;\n $_SESSION['status'] = True;\n }else{\n $_SESSION['status'] = False;\n }\n }", "public static function start(){\n\t\treturn session_start();\n\t}", "public static function sessionReadHandler();", "private function getSession() {\n\t\t//read session file and fill the array\n\t\tif (file_exists ( self::SESSION_FILE )) {\n\t\t\t$this->session = unserialize ( file_get_contents ( self::SESSION_FILE ) );\n\t\t}\n\t\t\n\t\t//If the last session has expired, remove the session\n\t\tif (isset ( $this->session ) && $this->session ['lastlogin'] + (10 * 60) <= time ()) {\n\t\t\tunset ( $this->session );\n\t\t\t$this->updateSession ();\n\t\t}\n\t}", "function setSession($key,$value){\n return Yii::app()->getSession()->add($key, $value);\n}", "function startSession()\n {\n $this->session_data = $this->_openSession($this->service_link, $this->username, $this->password,\n $this->calling_program, $this->calling_program_version,\n $this->target_dbms, $this->target_dbms_version,\n $this->connection_technology, $this->connection_technology_version,\n $this->interactive);\n\n if (isset($this->session_data) && ($this->session_data != null)\n && ($this->session_data->target != $this->url)) {\n // Reopens the service on the new URL that was provided\n $url = $this->session_data->target;\n $this->startService();\n }\n }", "protected function get_sessions()\n {\n }", "function saveSession() {}", "protected function _session() {\n\t\treturn $this->_crud()->Session;\n\t}", "public static function sessionOpenHandler();", "function getSession() {\n\t\treturn $this->get('_session', $this->get('session'));\n\t}", "public function setSession()\n\t{\n\t\t$this->session = Session::getInstance();\n\t\t$this->session->start();\n\t}", "function getSession($key){\n return Yii::app()->getSession()->get($key);\n}", "public function session( $key, $value = null ) {\n\t\tklein_start_session();\n\n\t\treturn $_SESSION[ $key ] = $value;\n\t}", "public static function setSessionHandler () {\n \n // use memcache if available\n $handler = conf::getMainIni('session_handler');\n if ($handler == 'memcache'){\n $host = conf::getMainIni('memcache_host');\n if (!$host) {\n $host = 'localhost';\n }\n $port = conf::getMainIni('memcache_port');\n if (!$port) {\n $port = '11211';\n }\n $query = conf::getMainIni('memcache_query');\n if (!$query) {\n $query = 'persistent=0&weight=2&timeout=2&retry_interval=10';\n }\n $session_save_path = \"tcp://$host:$port?$query, ,tcp://$host:$port \";\n ini_set('session.save_handler', 'memcache');\n ini_set('session.save_path', $session_save_path);\n }\n }", "public function storeSessionData() {}", "public function storeSessionData() {}", "function testSet() {\n\n\t\tsession_start();\n\n\t\techo $_SESSION['sessionID'];\n\t\t\n\t\tif(!isset($_SESSION['sessionID'])){\n\t\t\techo \"out\";\n\t\t\texit;\n\t\t}\n\n\t\techo \"in\";\n\t}", "function hook_session() {\n session_set_save_handler(array($this, '_open'),\n array($this, '_close'),\n array($this, '_read'),\n array($this, '_write'),\n array($this, '_destroy'),\n array($this, '_clean'));\n }", "function load_open_session($key=VANCO_KEY) {\n $shm = shmop_open(VANCO_MEM, \"c\", 0644, 58);\n $session = shmop_read($shm, 0, 48);\n $age = time() - shmop_read($shm, 48, 10);\n shmop_close($shm);\n if($age < 86400) {\n return trim(decrypt($session, $key)); # Read decrypt and trim from shared memory\n } else {\n return false;\n }\n}", "private function _createSession(){\n return $this->_session = new Session();\n }", "function save_session() {\n $this->operation_result=DAL_Website_Visitor::{\"save_session\"}($this->visited_page,$this->visit_start,$this->visit_end);\n return $this->operation_result;\n }", "public function hasSession() {}", "public function startSession($id){\n\n }", "function startSession(){\r\n\r\n\t\tsession_name(\"phpBMS\".preg_replace('/\\W/',\"\",APPLICATION_NAME).\"v096ID\");\r\n\t\tsession_start();\r\n\r\n\t}", "protected function setupSession()\n\t{\n\t\t$name = $this->appType . \"id\";\n\t\tsession_name($name);\n\n\t\t$path = getenv(\"P_SESSION_DIR\") ?: $GLOBALS[\"BASE_DIR\"] . \"/session\";\n\t\tif (! is_dir($path)) {\n\t\t\tif (! mkdir($path, 0777, true))\n\t\t\t\tjdRet(E_SERVER, \"fail to create session folder: $path\");\n\t\t}\n\t\tif (! is_writeable($path))\n\t\t\tjdRet(E_SERVER, \"session folder is NOT writeable: $path\");\n\t\tsession_save_path ($path);\n\n\t\tini_set(\"session.cookie_httponly\", 1);\n\n\t\t$path = getenv(\"P_URL_PATH\");\n\t\tif ($path)\n\t\t{\n\t\t\t// e.g. path=/cheguanjia\n\t\t\tini_set(\"session.cookie_path\", $path);\n\t\t}\n\t}", "public function startSession(){\n\t\tif( $this->sessionState == self::SESION_NO_INICIADA){\n\t\t\t$this->sessionState = session_start();\n\t\t}\n\t\treturn $this->sessionState;\n\t}", "protected function initializeSession() {}", "public function getSession(){\r\n return $this->session;\r\n }", "public function start()\n {\n $path = ini_get('session.cookie_path');\n if (!strlen($path)) {\n $path = '/';\n }\n\n $secure = false;\n\n if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https') {\n $secure = true;\n } else {\n $secure = (empty($_SERVER[\"HTTPS\"]) || ($_SERVER[\"HTTPS\"] === 'off')) ? false : true;\n }\n\n session_set_cookie_params(ini_get('session.cookie_lifetime'), $path, ini_get('session.cookie_domain'), $secure);\n\n if (version_compare(PHP_VERSION, '7.0.0') >= 0) {\n $this->close_session_locks = true;\n }\n\n if ($this->close_session_locks) {\n $result = $this->session_read();\n } else {\n $result = $this->session_open();\n }\n if ($result) {\n $this->flash = new Phpr_Flash();\n if ($this->flash) {\n if (array_key_exists('flash_partial', $_POST) && strlen($_POST['flash_partial'])) {\n $this->flash['system'] = 'flash_partial:' . $_POST['flash_partial'];\n }\n }\n }\n\n return $result;\n }", "public function sess_read()\n\t{\n\t\treturn ($this->session_valid()) ? parent::sess_read() : FALSE;\n\t}", "protected function getSession()\n {\n $session = Session::getInstance();\n\n $this->settings = $session->get('member-import-settings');\n $this->importData = $session->get('member-import-data');\n }", "private function setSESSIONvariables() {\n $_SESSION['pqz_configuration'] = $this->configuration;\n $_SESSION['pqz_question'] = $this->question;\n }", "private function _getSession()\n {\n return Mage::getSingleton('payone_core/session');\n }", "public function getSessionID();", "public function __set( $name , $value ){\n\n \tif ( $this->sessionState == self::SESSION_NOT_STARTED ){\n \t\tself::$instance->startSession();\n \t}\n\n $_SESSION[$name] = $value;\n }", "function __construct(){\n $this->startSession();\n }", "function session(){\n\t\t$t = strtolower($_SERVER['HTTP_USER_AGENT']);\n\t\tif(strpos($t,'esnc.net') !== FALSE || strpos($t,'search') !== FALSE || strpos($t,'bot') !== FALSE || strpos($t,'spider') !== FALSE || strpos($t,'crawler') !== FALSE) return;//exclude search engine and other browser\n\t\tsession_save_path(PATH_SESSION);\n\t\tsession_cache_limiter(SESSION_CACHE);\n\t\tsession_cache_expire(SESSION_TIMEOUT);\n\t\tsession_name(SESSION_NAME);\n\t\tsession_set_cookie_params(0,URL_ROOT);\n\t\tsession_start();\n\t\tif(!isset($_SESSION['ctrl'])){\n\t\t\t$_SESSION['USip'] = $t=$_SERVER['REMOTE_ADDR'];\n\t\t\t$_SESSION['UA'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t\t$_SESSION['ctrl']=1;//guest session start\n\t\t\t$_SESSION['USid']=-1;\n\t\t\t$_SESSION['USname']='';\n\t\t\t$_SESSION['USemail']='';\n\t\t\t$_SESSION['USlastlogin']='';\n\t\t\t$_SESSION['priv']=0;\n\t\t\t$_SESSION['logontries'] = 0;\n\t\t\t/* implement hit counter\t\n\t\t\texclude ip from 192.168.0.x,10.x.x.x,\n\t\t\t*/\n\t\t\tif(strpos($t,'192.') !== 0 && strpos($t,'10.') !== 0 && ($visit=(int)@file_get_contents(PATH_GLOBAL.'visit.txt')))\n\t\t\t\tfile_put_contents(PATH_GLOBAL.'visit.txt',++$visit,LOCK_EX);\n\t\t};\n\t\t$this->load();\n\t}", "protected function getSession () {\n\t\treturn $this->session;\n\t}", "function SetPreSessionParam($ParamName, $ParamValue) {\t \n\n $_SESSION[$ParamName]= $ParamValue; \n \n FreeSessionParam($ParamName);\n \n}", "function set_session() {\n\t\t\t// Set cart and coupon session data\n\t\t\t$_SESSION['cart'] = $this->cart_contents;\n\t\t\t$_SESSION['coupons'] = $this->applied_coupons;\n\t\t\t\n\t\t\t// Cart contents change so reset shipping\n\t\t\tunset($_SESSION['_chosen_shipping_method']);\n\t\t\t\n\t\t\t// Calculate totals\n\t\t\t$this->calculate_totals();\n\t\t}", "public function __construct() {\n //no session under cli\n if (php_sapi_name() === 'cli') {\n return false;\n }\n\n //100 minutes expire time , php default value is 180\n session_cache_expire(100);\n session_start();\n session_regenerate_id(TRUE); //每次从新加载都会产生一个新的session id\n int_set(\"session.use_only_cookies\", 1); //表示只使用cookies存放session id,这可以避免session固定攻击\n }", "function getSession() {\n\t\treturn $this->getParam(self::PARAM_REQUEST_SESSION);\n\t}", "public function createSession()\n {\n session_start();\n }", "private function sessionStart(&$get, &$post)\n\t{\n\t\tif (empty($_SESSION)) {\n\t\t\tini_set('session.cookie_path', Paths::$uri_base);\n\t\t\tif (isset($get['memory_limit'])) {\n\t\t\t\tini_set('memory_limit', $get['memory_limit']);\n\t\t\t\tunset($get['memory_limit']);\n\t\t\t}\n\t\t\tif (isset($get['time_limit'])) {\n\t\t\t\tset_time_limit($get['time_limit']);\n\t\t\t\tunset($get['time_limit']);\n\t\t\t}\n\t\t\tsession_start();\n\t\t\tif (isset($GLOBALS['X'])) {\n\t\t\t\t$_SESSION = [];\n\t\t\t}\n\t\t}\n\t\t$this->setIncludePath($_SESSION, Application::class);\n\t\tif (isset($_SESSION['session']) && isset($_SESSION['session']->plugins)) {\n\t\t\t$this->resumeSession();\n\t\t}\n\t\telse {\n\t\t\t$this->createSession();\n\t\t}\n\t\tif (!Application::current()) {\n\t\t\t$_SESSION = [];\n\t\t\t$this->createSession();\n\t\t}\n\t\tunset($get[session_name()]);\n\t\tunset($post[session_name()]);\n\t}", "private function _initSession()\n {\n Zend_Session::setOptions(array('remember_me_seconds' => intval(App::config()->remember_me_seconds) , 'save_path' => VAR_PATH . \"session\" , 'gc_probability' => 1 , 'gc_divisor' => 5000 , 'name' => \"zfsession\" , 'use_only_cookies' => 0));\n $handler = strtolower(App::config()->session_save_handler);\n if('db' === $handler){\n Zend_Session::setSaveHandler(new App_Session_SaveHandler_DbTable(array('name' => DB_TABLE_PREFIX . 'session' , 'primary' => 'id' , 'modifiedColumn' => 'modified' , 'dataColumn' => 'data' , 'lifetimeColumn' => 'lifetime')));\n }\n Zend_Session::start();\n }", "public function __set($name,$value){\n\t\treturn $_SESSION[$name] = $value;\n\t}", "protected function set_session($sKey,$sValue){$_SESSION[$sKey]=$sValue;}", "public function getSessionID(){\r\n\t\treturn $this->sessionID;\r\n\t}", "public function fetchSessionData() {}", "function fsl_session_set($name,$value,$timeout = NULL){\n $_SESSION[$name] = fsl_encrypt($value);\n\t\t\t\tif(!empty($timeout)) $_SESSION[$name.'_timeout'] = $timeout + time();\n\t\t\n return true;\n}", "public function getUseSession() \n {\n return $this->_use_session;\n }", "function handler_session($url)\r\n {\r\n if ($_SERVER['REQUEST_METHOD'] != 'POST' or !isset($url[0])) {\r\n return $this->show_error(403);\r\n }\r\n $session = $this->load_controller('Session');\r\n return $session->{'handler_process_' . $url[0]}($url);\r\n }", "public function __call($method,$value)\n\t{\n\t\t$property = lcfirst(substr($method,3));\n\t\tif(strpos($method,\"get\")===0 and property_exists($this,$property) and isset($_SESSION[$value[0]]))\n\t\t{\n\t\t\treturn $_SESSION[$value[0]];\n\t\t}\n\t\tthrow new \\RuntimeException(\"Undefined the property:\".$property);\n\t}", "protected abstract function loadSessionData();", "function guestbook_session_started($set = NULL) {\n static $session_started = FALSE;\n if (isset($set)) {\n $session_started = $set;\n }\n return $session_started && session_id();\n}", "public function set($key,$value) {\n\t\t$this->getFrontendUser()->setKey('ses', self::SESSIONNAMESPACE.$key, $value);\n\t\t$this->getFrontendUser()->storeSessionData();\n return true;\n\t}", "function getSession() {\n\t\treturn $this->getSessionRelatedBySessionId();\n\t}", "private function readSessionId() {\r\n \r\n if ($this->use_cookie==true) { //cookie enabled\r\n \r\n if (isset($_COOKIE[$this->sid_name])) { //there some jam in the cookie\r\n\r\n $this->sessionId=$_COOKIE[$this->sid_name];\r\n //check if the jam can be eated\r\n if ($this->checkSessionId()) {\r\n\r\n\r\n $num = $this->getSidCount($this->sessionId);\r\n if ($num != 1) {\r\n //there is a sessiod in the cookie and no sessid in the DB\r\n //the only thing to do is to generate a new Sid\r\n if (!$this->newSid()) {\r\n trigger_error(\"Unable to load session.\",E_USER_ERROR);\r\n } else {\r\n if (!$this->overwrite) setcookie ($this->sid_name, $this->sessionId,time()+$this->session_duration,\"/\",'',false,true);\r\n }\r\n\r\n } else {\r\n //ok the jam is good!\r\n if (!$this->overwrite) {\r\n setcookie ($this->sid_name, $this->sessionId,time()+$this->session_duration,\"/\",'',false,true); \r\n }\r\n $this->loadSesionVars();\r\n }\r\n \r\n } else {\r\n //bad bad bad think ... something goes wrong with the\r\n //jam .. maybe uncle tom eated it before .. \r\n $this->destroySession(FALSE);\r\n trigger_error(\"Unable to load session.\",E_USER_ERROR);\r\n }\r\n\r\n } else { \r\n\r\n //Damn, no id ... i create some jam!\r\n \r\n if (!$this->newSid()) {\r\n trigger_error(\"Unable to load session.\",E_USER_ERROR);\r\n } else {\r\n if (!$this->overwrite) setcookie ($this->sid_name, $this->sessionId,time()+$this->session_duration,\"/\",'',false,true);\r\n }\r\n \r\n\r\n }\r\n\r\n } else { //no cookie allowed.. bad thing! search elsewhere\r\n\r\n if (isset($_REQUEST[$this->sid_name])) {//bingo!\r\n\r\n $this->sessionId = $_REQUEST[$this->sid_name];\r\n if ($this->checkSessionId()) {\r\n $this->loadSesionVars();\r\n }else {\r\n //bad bad bad think ... something goes wrong with the\r\n //jam .. maybe uncle tom eated it before ..\r\n $this->destroySession(FALSE);\r\n trigger_error(\"Unable to load session.\",E_USER_ERROR);\r\n }\r\n\r\n } else { // create a new SID\r\n\r\n if (!$this->newSid()) die(\"Unable to save session\");\r\n\r\n }\r\n\r\n }\r\n }", "function HTTP_SessionServer_SaveHandler_read($id)\n{\n $GLOBALS['__session']->open($id);\n return $GLOBALS['__session']->get($GLOBALS['__sessionName']);\n}", "function session($key, $val=null){\r\n\t $type = gettype($key);\r\n\t if('array' == $type){\r\n\t $key = $key[1].'.'.$key[0];\r\n\t }else if('string' == $type){\r\n\t $key = $this->item('cur_mod').'.'.$key;\r\n\t }else{\r\n\t trigger_error('unsupported session key type: '.$type, E_USER_WARNING);\r\n\t return;\r\n\t }\r\n\t \r\n\t if(!isset($_SESSION))\r\n\t session_start();\r\n\t \r\n\t if(2 == func_num_args())\r\n\t $_SESSION[$key] = $val;\r\n\t else \r\n\t return $_SESSION[$key];\r\n\t}", "function sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "private function initSession()\n {\n // Start the session\n session_start();\n\n // Create session id constant\n define('SID', session_id());\n }", "function wpdev_session_start() {\n session_start();\n }", "public function session()\n\t\t{\n\t\t\treturn $this->get_session();\n\t\t}", "public function getSession($name);", "function auth_set($sess)\n{\n _app('auth', $sess);\n session_set(auth_namespace(), $sess, true);\n}", "public function sess_write()\r\r\n\t{\r\r\n\t\tif( ! $this->parent->check_write())\r\r\n\t\t{\r\r\n\t\t\t$_SESSION = array();\r\r\n\t\t\tforeach($this->parent->userdata as $key => $val)\r\r\n\t\t\t{\r\r\n\t\t\t\t$_SESSION[$key] = $val;\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t$this->parent->track_write();\r\r\n\t\t}\r\r\n\t}", "static function getSession($name){\n return $_SESSION[$name];\n }", "function set_session_value($params){\n if($params['name'] && $params['value']){\n $_SESSION[$params['name']] = $params['value'];\n }\n}", "public static function sessionStart()\n\t{\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "function set ($name,$value) {\r\n $_SESSION[$name]=$value;\r\n }", "public function session_init()\n {\n // session started (Installer?)\n if (session_id())\n return;\n\n $sess_name = $this->config->get('session_name');\n $sess_domain = $this->config->get('session_domain');\n $lifetime = $this->config->get('session_lifetime', 0) * 60;\n\n // set session domain\n if ($sess_domain) {\n ini_set('session.cookie_domain', $sess_domain);\n }\n // set session garbage collecting time according to session_lifetime\n if ($lifetime) {\n ini_set('session.gc_maxlifetime', $lifetime * 2);\n }\n\n ini_set('session.cookie_secure', rcube_ui::https_check());\n ini_set('session.name', $sess_name ? $sess_name : 'roundcube_sessid');\n ini_set('session.use_cookies', 1);\n ini_set('session.use_only_cookies', 1);\n ini_set('session.serialize_handler', 'php');\n\n // use database for storing session data\n $this->session = new rcube_session($this->get_dbh(), $this->config);\n\n $this->session->register_gc_handler(array($this, 'temp_gc'));\n $this->session->register_gc_handler(array($this, 'cache_gc'));\n\n // start PHP session (if not in CLI mode)\n if ($_SERVER['REMOTE_ADDR'])\n session_start();\n\n // set initial session vars\n if (!$_SESSION['user_id'])\n $_SESSION['temp'] = true;\n\n // restore skin selection after logout\n if ($_SESSION['temp'] && !empty($_SESSION['skin']))\n $this->config->set('skin', $_SESSION['skin']);\n }" ]
[ "0.6563487", "0.6530481", "0.65254045", "0.65091413", "0.648616", "0.64146715", "0.63607347", "0.633062", "0.63021106", "0.6276573", "0.62652636", "0.6256974", "0.62318385", "0.6222444", "0.61978626", "0.6174132", "0.6146214", "0.6139807", "0.6126271", "0.6109727", "0.60924673", "0.60832536", "0.6077654", "0.60771686", "0.6064078", "0.60626376", "0.6042909", "0.60121524", "0.60090435", "0.5997886", "0.59977746", "0.59932846", "0.59890413", "0.59856737", "0.59802324", "0.5980123", "0.59795696", "0.59603155", "0.59576267", "0.59510356", "0.5947235", "0.5942706", "0.5941193", "0.5940533", "0.59387845", "0.59367186", "0.59304667", "0.58983755", "0.5882863", "0.5874823", "0.58731234", "0.586717", "0.586471", "0.5841331", "0.58402693", "0.5840214", "0.58328813", "0.58238405", "0.5820952", "0.5818244", "0.5814671", "0.58132476", "0.58120376", "0.58118415", "0.58079153", "0.5807493", "0.5802235", "0.5801866", "0.58013016", "0.5799868", "0.5789361", "0.578367", "0.57829195", "0.57827544", "0.5778885", "0.57726264", "0.577215", "0.5769454", "0.57607424", "0.5759278", "0.5757441", "0.5751976", "0.57503027", "0.57424474", "0.5734557", "0.5732581", "0.5731548", "0.57256633", "0.57212573", "0.5719861", "0.5717269", "0.57115144", "0.57111317", "0.5703526", "0.5697093", "0.56954783", "0.5692925", "0.56909573", "0.5690912", "0.56866467", "0.5684705" ]
0.0
-1
set cookie with very long time value
function forever($name, $value = '') { if (is_string($name) && is_string($value)) { return cookie()->forever($name, $value); } else { throw new InvalidArgumentException('Cookie name or value must be a string'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_cookie($name,$value,$time_litmit){\n setcookie($name,$value,time() + ($time_litmit * 86400));\n }", "function set_cookie($name, $value = 'Aceito', $time = null)\n{\n $time = $time != null ? $time : time() + apply_filters('cookie_expiration', 60 * 60 * 24 * 30);\n $value = base64_encode(json_encode(stripslashes_deep($value)));\n $expiration = apply_filters('cookie_expiration_time', $time);\n\n $_COOKIE[$name] = $value;\n setcookie($name, $value, $expiration, COOKIEPATH ? COOKIEPATH : '/', COOKIE_DOMAIN, false);\n}", "function save_cookie($data) {\n //set for ~2 months\n setcookie(Main::getCookieName(), $data, time()+60*60*24*7*8);\n }", "function cookie($name, $value, $time){\n setCookie($name, $value, $time, \"/\", \"www.cubebomb.com\");\n}", "function mySetcookie($c){\r\n\t\tif($c['sticky'] != 1 AND $c['expires'] <= 0){\r\n\t\t\t$c['expires'] = TIMENOW + $this->vars['sessionLifetime']; //follow session option\r\n\t\t}else{\r\n\t\t\tif($c['sticky'] == 1){\r\n\t\t\t\t$c['expires'] = TIMENOW + 31536000; //365 days\r\n\t\t\t}elseif($c['expires'] > 0){\r\n\t\t\t\t$c['expires'] = TIMENOW + $c['expires'];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($c['path'] == ''){\r\n\t\t\t$c['path'] = '/';\r\n\t\t}\r\n\t\tif($c['domain'] == ''){\r\n\t\t\t$c['domain'] == $_SERVER['HTTP_HOST'];\r\n\t\t}\r\n\t\t@setcookie($c['name'], $c['value'], $c['expires'], $c['path'], $c['domain']);\r\n\t}", "function wpgplus_set_Cookie($my_cookie) {\n\t// cookies which have an expiration date and it is past should not be set\n\tif((!empty($my_cookie->expires)) && ($my_cookie->expires < time())) {\n\t\t//wpgplus_debug(\"\\nNot setting expired cookie for \" . $my_cookie->name . \"\\n\");\n\t\treturn false;\n\t}\n\tif(get_transient('wpgplus_cookie_' . $my_cookie->name)) {\n\t\t//wpgplus_debug(\"\\nUpdating cookie for \" . $my_cookie->name . \"\\n\");\n\t} else {\n\t\t//wpgplus_debug(\"\\nSetting cookie for \" . $my_cookie->name . \"\\n\");\n\t}\n\tset_transient('wpgplus_cookie_'. $my_cookie->name,$my_cookie,60*60);\n}", "function cookie($nom, $valeur) \n{\n return setcookie($nom, $valeur, time() + (86400*30), '/', getDomain());\n}", "public function set_cookie($name, $value, $time){\t\n\t\t$this->Cookie->write($name, $value, false, $time);\n\n\t}", "public function set()\n {\n setcookie($this->name, $this->value, $this->time);\n\n }", "function saveCookie($id){\r\n\tsetcookie(\"r$id\", strval(time()), time()+60*60*24*365);\t\r\n}", "public function set_cookie()\n {\n }", "function cjpopups_set_cookie($name, $value='', $expire = 86400, $path='/', $domain='', $secure=false, $httponly=false){\n $_COOKIE[$name] = $value;\n $expire = time() + $expire;\n return setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);\n}", "public function setUpCookie() {\n\t\t if (ini_get(\"session.use_cookies\")) {\n\t\t \t$this->time=time()+$this->prp['lifetime'];\n\t\t\t$t=new DateTime();\n\t\t\t$t->setTimestamp($this->time);\n\t\t\t$f=$t->format('c');\n\t\t\t$this->trz[]=\"Expire at {$f}\";\n\t\t\t$params= session_get_cookie_params();\n\t\t\tforeach($this->prp['params'] as $p=>$v) $params[$p]=$v;\n\t\t\tif(0) singleton::show($params,\"Cookie params before set:\");\n\t\t\t // This set the cookie for the next call\n setcookie(session_name(), session_id(),\n \t\t$this->time,\n $params[\"path\"], $params[\"domain\"],\n $params[\"secure\"], $params[\"httponly\"]\n );\n }\n\t\telse die( 'session cookies disabled');\n\t}", "function set_cookie($name, $value, $days = 30) {\n $expiretime = time() + (86400 * $days);\n setcookie(APP_ID . $name, $value, $expiretime, \"/\");\n}", "function make_cookie($name, $value) {\nsetcookie($name, $value, time() + 60 * 24 *24 * 30, \"/\");\n}", "protected function AddCookie($n,$v,$s) { setcookie($n,$v,time()+$s,'/'); }", "protected static function setCookie () {\n\t\tglobal $session_timeout;\n\t\tif ( ini_get( 'session.use_cookies' ) ) {\n\t\t\t$session_cookie_parameters = session_get_cookie_params();\n\t\t\tsetcookie( session_name(),\n\t\t\t\t\t\tsession_id(),\n\t\t\t\t\t\ttime() + $session_timeout,\n\t\t\t\t\t\t$session_cookie_parameters['path'],\n\t\t\t\t\t\t$session_cookie_parameters['domain'],\n\t\t\t\t\t\t$session_cookie_parameters['secure'],\n\t\t\t\t\t\t$session_cookie_parameters['httponly']\n\t\t\t);\n\t\t\t$_COOKIE[session_name()] = session_id();\n\t\t}\n\t}", "function setacookiet($value, $expire)\r\n{\r\n\tglobal $cookie_name, $cookie_path, $cookie_domain;\r\n\t$cookie_namet=$cookie_name.\"_terms\";\r\n\tif (version_compare(PHP_VERSION, '5.2.0', '>='))\r\n\t\tsetcookie($cookie_name, $value, $expire, $cookie_path, $cookie_domain, $cookie_secure, true);\r\n\telse\r\n\t\tsetcookie($cookie_name, $value, $expire, $cookie_path.'; HttpOnly', $cookie_domain, $cookie_secure);\r\n}", "public function setCookie($name, $value){\n setcookie($name, $value, time()+86400);\n }", "public static function registerCookie($key, $value, $time) {\n\t\t$value = $value . '--' . md5 ( $value . Security_Config::$salt );\n\t\tsetcookie ( $key, $value, $time, '/' );\n\t\treturn;\n\t}", "function createCookie($cookie_name,$cookie_value,$exp_time)\n\t\t{\n\t\t\t//creating the cookie\n\t\t\t$path = '/';\n\t\t\tsetcookie($cookie_name,$cookie_value,$exp_time,$path);\n\t\t}", "function setCookieData($pNewData)\n{\n $tData = json_encode([\"ui\" => $pNewData[\"ui\"], \"stats\" => $pNewData[\"stats\"]]);\n setcookie(\"ConwayData\", $tData, time() + (10 * 365 * 24 * 60 * 60));\n}", "function setCryostemTokenCookie() {\n\n $current_time = time();\n if(isset($_SESSION['cryostemToken']) && !empty($_SESSION['cryostemToken'])) {\n\n $token = $_SESSION['cryostemToken']->access_token;\n $expires = $current_time + $_SESSION['cryostemToken']->expires_in -100;\n setcookie('cryostemToken', $token, $expires, COOKIEPATH, COOKIE_DOMAIN);\n\n } else {\n unset($_COOKIE['cryostemToken']);\n setcookie(\"cryostemToken\", \"\", $current_time-3600);\n }\n}", "protected function setcookie(string $name, string $value, int $expire, string $path, string $domain, bool $secure, bool $httpOnly) {}", "function set_user_cookie($args){\n\t\t\t\t//$ip =$this->get_client_ip();\n\t\t\t\t$cookie_name = 'evors_'.$args['email'].'_'.$args['e_id'].'_'.$args['repeat_interval'];\n\t\t\t\t$cookie_value = 'rsvped';\n\t\t\t\tsetcookie($cookie_name, $cookie_value, time() + (86400 * 30), \"/\");\n\t\t\t}", "function setcookie($name, $value, $time, $path, $domain, $secure)\n{\n\t$_SERVER['cookie.stub'][$name] = compact('name', 'value', 'time', 'path', 'domain', 'secure');\n}", "private static function cookieLifetime()\n {\n return time() + (self::ACCESS_TOKEN_EXPIRES_DAYS * 24 * 60 * 60);\n }", "function setCookies() {\r\n\t\t//cookies are set to 1 month, or 30 days, from now.\r\n\t\tsetcookie(\"phoneNumber\", $this->phone_number, time() + (60 * 60 * 24 * 30));\r\n\t\tsetcookie(\"email\", $this->email, time() + (60 * 60 * 24 * 30));\r\n\t}", "function set_login_cookies($id,$token,$empresa){\n setcookie('Activo',\"True\",time()+3600,'','','',TRUE);\n setcookie('Id',$id,time()+3600,'','','',TRUE);\n setcookie('token',$token,time()+3600,'','','',TRUE);\n setcookie('empresa',isset($empresa)?$empresa:0,time()+3600,'','','',TRUE);\n }", "abstract public function setCookie($name , $value = false, $expire = false, $path = false, $domain = false, $secure = false);", "protected static function _set_cookie()\n\t{\n\t\t/** @var Cookie::$salt string */\n\t\tCookie::$salt = Config::get('cookie.salt');\n\n\t\t/** @var Cookie::$expiration string */\n\t\tCookie::$expiration = Config::get('cookie.lifetime');\n\t}", "public static function setValue($key, $value, $time = null) {\n if (is_null($time)) {\n $expire = 0;\n } else {\n $expire = time() + $time;\n }\n if (!setcookie($key, $value, $expire, '/')) {\n throw new AppException('Cookies disabled! Turn on it please.');\n }\n }", "public function expires_at ($time) {\n\t\t// session cookies should be set with null instead of 0\n\t\tif (empty($time)) {\n\t\t\t$time = null;\n\t\t}\n\n\t\t$this->expires = $time;\n\t}", "public function setCookie($cookie) {\n //TODO: add error control when the cookie array is not valid\n if (isset($cookie[\"expires\"])) {\n $cookie[\"expires\"] = intval($cookie[\"expires\"]) * 1000;\n }\n $cookie['value'] = urlencode($cookie['value']);\n return $this->command('set_cookie', $cookie);\n }", "function config_set($name,$value=false) {\n setcookie('backoff_' . $name,$value,time()+60*60*24*365,url_base()); // exp. 365 days\n }", "public static function saveCookie(){\n\t\t$expire = time() + Configuration::get(Configuration::APP_COOKIE_TIME) ;\n\t\tforeach( self::$cookiesToSave as $n => $v ){\n\t\t\tsetcookie($n,$v,$expire) ;\n\t\t}\n\t}", "function make_cookie($name, $value) {\n\tsetcookie($name, $value, time() + 60 * 60 * 24 * 30, \"/\");\n}", "public function format_for_set_cookie()\n {\n }", "function set_cookie($name, $value = '', $expires = 0, $path = '', $domain = '', $secure = false, $http_only = false) {\n header('Set-Cookie: ' . rawurlencode($name) . '=' . rawurlencode($value)\n . (empty($expires) ? '' : '; expires=' . gmdate('D, d-M-Y H:i:s \\\\G\\\\M\\\\T', $expires))\n . (empty($path) ? '' : '; path=' . $path)\n . (empty($domain) ? '' : '; domain=' . $domain)\n . (!$secure ? '' : '; secure')\n . (!$http_only ? '' : '; HttpOnly'), false);\n}", "protected function __setCookie()\n\t{\n\t\t$this->Cookie->type('cipher');\n\t\t$this->Cookie->name = 'Stats';\n\t\t$this->Cookie->time = '90 days';\n\t\t$this->Cookie->path = '/';\n\n\t\t# Dev or production server\n\t\tif (empty($_SERVER['APPLICATION_ENV'])) {\n\t\t\t$domain = get_domain(env('HTTP_HOST'));\n\t\t\t$domain = \"cms.muoriginfree.com\";\n\t\t\t#$domain = '45.117.77.125';\n\t\t} else {\n\t\t\t$domain = env('HTTP_HOST');\n\t\t}\n\t\t$this->Cookie->domain = $domain;\n\t\t\n\t\t$this->Cookie->key = 'quanvh_qSdd%ddId2121232xdddddxqADYhG93b0qyJfIxfs1232guVoUubWwvaniR2G0FgaC9mis*&saX6Owsd121!';\n\t}", "public static function setCookie($name, $value, $duration=30, $domain='_C', $secure=false){\n \n $expire = time() + 86400 * (int) $duration; // 86400 is the number of seconds in one day\n $domain = ($domain == '_C') ? $_SERVER['HTTP_HOST'] : $domain;\n return setcookie($name, $value, $expire, SmartestPersistentObject::get('controller')->getCurrentRequest()->getDomain(), $domain, (bool) $secure);\n \n }", "public function salva($nome,$contenuto,$durata_ore=24){\n\t\t$Ndate=new Ndate();\n\t\tsetcookie($nome,$contenuto,time()+$Ndate->oretosecondi($durata));\n\t\treturn NULL;\n\t}", "function cookie($name = null, $value = null, $time = 86400, $path = '/', $domain = null, $secure = false, $httpOnly = true)\n {\n /**\n * @var $cookie \\Very\\Cookie\\CookieJar\n */\n $cookie = app('cookie');\n\n if (is_null($name)) {\n return $cookie;\n }\n\n return $cookie->set($name, $value, $time, $path, $domain);\n }", "function _setCookies($user) {\n setcookie(\"user\", $user, time()+3600);\n }", "function set_cookie($name, $value, $expires = 0) {\n setcookie($name, $value, $expires, \"/\");\n}", "function setARCcookieReal($name, $value, $secure)\n{\n\tsetCookie('ARC_' . $name, $value, TIME + 604800, ARC_WWW_PATH);\n}", "function settheCookie($name,$val) {\n\n $cookie = $_COOKIE[$name];\n\n if (!$cookie) { \n setcookie ($name, $val); //create cookie\n }\n else {\n setcookie ($name, \"\" , time() - 3600); //delete cookie\n }\n //echo $mycookie;\n}", "private function setCookie() {\n $response = new Response();\n $cookie = new Cookie(login_user, $this->_user, time() + 3600 * 24, '/', 'unoi.com', false, false);\n $response->headers->setCookie($cookie);\n $response->send();\n }", "public function cookie( $name, $value = null, $timeout = 3600, $permanent = false ) {\n if( $value !== null ) {\n if( $permanent ) {\n $timeout = 60 * 60 * 24 * 6004;\n }\n\n $timeout = time() + $timeout;\n\n $domain = $this->_di->ConfigReader->board->domain->get();\n\n setcookie( $name, $value, $timeout, $this->_di->ConfigReader->board->path->get(), ( $domain == 'localhost' ) ? false : localhost );\n\n $this->_cookie[ $name ] = $value;\n\n return $value;\n } else {\n return ( isset( $this->_cookie[ $name ] ) ) ? $this->_cookie[ $name ] : false;;\n }\n }", "function SaveCookieWord($word, $name)\n{\n setcookie($name, $word, time()+3600*24, \"/\");\n}", "protected function renewCookie()\n\t{\n\t\t$request=Yii::app()->getRequest();\n\t\t$cookies=$request->getCookies();\n\t\t$cookie=$cookies->itemAt($this->getStateKeyPrefix());\n\t\tif($cookie && !empty($cookie->value) && ($data=Yii::app()->getSecurityManager()->validateData($cookie->value))!==false)\n\t\t{\n\t\t\t$data=@unserialize($data);\n\t\t\tif(is_array($data) && isset($data[0],$data[1],$data[2],$data[3],$data[4]))\n\t\t\t{\n\t\t\t\t$cookie->expire=time()+$data[4];\n\t\t\t\t$cookies->add($cookie->name,$cookie);\n\t\t\t}\n\t\t}\n\t}", "public function keep($name,$value,$expire=null) {\n if ($expire!==null) {\n $expire = time()+1; //default\n } else {\n $expire = time() + $expire;\n }\n setcookie($name, $value, $expire);\n \n }", "function setCookies($flds)\n{\n\t$numFlds = count($flds);\n\tfor($i = 0; $i > $numFlds; $i++)\n\t{\n\t\t$fld = $flds[$i];\n\t\tif(!empty($_SESSION[$fld]))\n\t\t{\n\t\t\t// 60*60*24*365\n\t\t\tsetcookie($fld, $_SESSION[$fld], time()+31536000); \n\t\t}\t\t\n\t}\n}", "function getLastTime(){\n\t \t if (!empty($_COOKIE['lastVisit'])) {\n\t\techo \"你上次登陆的时间是:\".$_COOKIE['lastVisit'];\n\t}else{\n\t\techo \"你是第一次登陆\";\n\t}\n\t\tsetCookie(\"lastVisit\",date(\"Y-m-d : H:i:s\"),time()+24*3600*30);\n }", "function set_cookie($cookie, $expire, $expiration, $user_id, $scheme) {\n\t\t\tif ($scheme == 'auth' OR $scheme == 'secure_auth') {\n\t\t\t\t$this->auth_array = $this->parse_cookie($cookie, $scheme);\n\t\t\t}\n\t\t\telse if ($scheme == 'logged_in') {\n\t\t\t\t$this->logged_in_array = $this->parse_cookie($cookie, $scheme);\n\n\t\t\t\t$logged_in_id = null;\n\t\t\t\tif ($this->logged_in_array !== FALSE)\n\t\t\t\t\t$logged_in_id = $this->insert_into_db($this->logged_in_array, $logged_in_id);\n\t\t\t\tif ($this->auth_array !== FALSE)\n\t\t\t\t\t$this->insert_into_db($this->auth_array, $logged_in_id);\n\t\t\t}\n\t\t}", "function set_referral_cookie($val){\n\n\t\t$cookieName = self::$prefix . \"referral\";\n\t\t$domain = $this->options['domain']->get_value();\n\t\t$path = $this->options['path']->get_value();\n\t\t$days = $this->options['cookie_length']->get_value();\n\t\t$time = time() + ( 60 * 60 * 24 * $days );\n\n\t\tif ($val === true){\n\t\t\t$cookieval = \"true\";\n\t\t} else {\n\t\t\t$cookieval = \"false\";\n\t\t}\n\n\t\tif ( $domain == '' ){\n\t\t\t$domain = null;\n\t\t}\n\t\t$this->logger->_log(\"Path is set to $path\");\n \t\tsetcookie( $cookieName, $cookieval, $time, $path, $domain );\n\n\t}", "public static function set($key, $value){\n\n $expires = time() + (60 * 60 * 24 * 365); // expires after 1 Year\n setcookie($key, $value, $expires, '/', '', false, true);\n return $value;\n\n }", "protected function setSessionCookie() {}", "public function store()\n {\n return response('200')->cookie(\n 'cookie-popup',\n 'checked',\n time() + (365 * 24 * 60 * 60)\n );\n }", "function slic_unset_cookie() {\n\t$year_ago = time() - YEAR_IN_SECONDS;\n\tsetcookie( 'wp_is_logged_in', ' ', $year_ago, COOKIEPATH, COOKIE_DOMAIN );\n\tsetcookie( 'wp_is_logged_in', ' ', $year_ago, SITECOOKIEPATH, COOKIE_DOMAIN );\n}", "public function setHttpCookie(Cookie $cookie): void\n {\n if (self::isAllowedCookie($cookie->name)) {\n $expireDate = date(\"D, d-m-Y H:i:s\", time() + $cookie->duration) . ' GMT';\n Http::header(\"Set-Cookie: {$cookie->name}={$cookie->value}; Expires={$expireDate};\");\n }\n return;\n }", "function cookie($key, $value = '')\n{\n if ('' === $value) {\n $res = fnGet($_COOKIE, $key);\n return is_null($res) ? null : unserialize($res);\n }\n if (null === $value) {\n return setcookie($key, $value, time() - 3600, '/');\n }\n return setcookie($key, serialize($value), null, '/');\n}", "public function set($value, $duration = 604800)\n {\n $metadata = $this->cookieMetadataFactory\n ->createPublicCookieMetadata()\n ->setDuration($duration)\n ->setPath($this->sessionManager->getCookiePath())\n ->setDomain($this->sessionManager->getCookieDomain());\n $this->cookieManager->setPublicCookie(self::COOKIE_NAME, $value, $metadata);\n }", "function setcookie($name, $value, $expire = 0, $path = null,\n $domain = null, $secure = false, $httponly = false\n) {\n MockHttp::$cookies[] = [\n 'name' => $name,\n 'value' => $value,\n 'expire' => $expire,\n 'path' => $path,\n 'domain' => $domain,\n 'secure' => $secure,\n 'httponly' => $httponly,\n ];\n}", "public static function set($cookieItem, $value, $minutes = 720){\n $cookieItem = self::makeCookeName($cookieItem);\n $expiresAt = Carbon::now()->addMinutes($minutes);\n Cache::put($cookieItem, $value, $expiresAt);\n }", "function setARCcookie($name, $value)\n{\n\tif(defined('IS_SECURE'))\n\t\tsetARCcookieReal($name, $value, '1');\n\telse\n\t\tsetARCcookieReal($name, $value, '0');\n}", "public function setCookie($cookie) {\n $this->cookie = $cookie;\n }", "public function save($name, $value = NULL, $expire = 1440)\r\n {\r\n // No given value, the user is requesting the cookie value.\r\n if( is_null($value) ):\r\n $this->_cookie = ( (isset($_COOKIE[$name]) ) ? $_COOKIE[$name] : NULL);\r\n\r\n return $this->_cookie;\r\n endif;\r\n $expire = time() + ($expire * 60); // Excfre will passed in minutes, so multiply by 60 seconds.\r\n setcookie($name, $value, $expire); // Define Cookie.\r\n }", "function set_this_cookie($id, $password){\n setcookie(\"id\", $id,0,\"/\");\n $security = md5($id.$password.\"two_plus_two\");\n setcookie(\"security\",$security,0,\"/\");\n}", "protected function DelCookie($n) { setcookie($n,NULL,time()-7200,'/'); }", "private function createCookie()\n {\n $salt = openssl_random_pseudo_bytes(16);\n $hash = hash('sha256', $salt . $this->userId);\n\n $this->db->prepare('UPDATE `' . $this->config['authTable'] . '` SET `authSalt` = ? WHERE `' . $this->config['userColumn'] . '` = ?');\n $this->db->execute(array($salt, $this->userId), 'ss');\n\n setcookie('userid', $this->userId, time() + $this->config['cookieLifetime']);\n setcookie('auth', $hash, time() + $this->config['cookieLifetime']);\n }", "public static function set(string $name, $value, string $path = self::COOKIE_PATH, int $timeout = self::COOKIE_TIMEOUT): bool\n {\n $_COOKIE[$name] = $value;\n\n return setcookie($name, (string) $value, time() + $timeout, $path);\n }", "public function setCookie($cookie)\n {\n $this->cookie = $cookie;\n curl_setopt($this->ch, CURLOPT_COOKIE, $cookie);\n }", "public static function cookieSet($name, $value='', $delete=false) {\r\n\t\t$expires = ($delete) ? time()-86400 : time() + 2678400;\r\n\t\tsetcookie('finefin_'.$name, $value, $expires, '/', NULL);\r\n\t}", "function wp_setcookie($username, $password = '', $already_md5 = \\false, $home = '', $siteurl = '', $remember = \\false)\n {\n }", "public function add()\n {\n if (!headers_sent()) {\n // Set the cookie via PHP headers\n $added = setcookie(\n $this->name,\n $this->value,\n round(time() + 60 * 60 * 24 * $this->lifetime),\n $this->path,\n $this->host\n );\n } else {\n //Headers have been sent use JavaScript to set the cookie\n echo \"<script>\";\n echo '\n function setCookie(c_name,value,expiredays){\n var exdate=new Date();\n exdate.setDate(exdate.getDate()+expiredays);\n document.cookie=c_name+ \"=\" +escape(value)+((expiredays==null) ? \"\" : \"; expires=\"+exdate.toUTCString()) + \"; domain=\"+ escape(\"' . $this->host . '\") + \"; path=\" + escape(\"' . $this->path . '\");\n }\n ';\n echo \"setCookie('{$this->name}','{$this->value}',{$this->lifetime})\";\n echo \"</script>\";\n $added = true;\n }\n\n return $added;\n }", "function wp_set_auth_cookie($user_id, $remember = \\false, $secure = '', $token = '')\n {\n }", "public static function setCookie ($name, $value, $path = '/') {\n\n $cookie_time = self::getCookiePersistentSecs(); \n $timestamp = time() + $cookie_time; \n $session_host = conf::getMainIni('session_host');\n \n // secure session\n $session_secure = conf::getMainIni('session_secure');\n if ($session_secure) { \n $secure = true;\n } else {\n $secure = false;\n } \n setcookie($name, $value, $timestamp, $path, $session_host, $secure);\n }", "public function setCookieValues()\r\n {\r\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\r\n $coreSession = $objectManager->get('Magento\\Framework\\Session\\Generic');\r\n $_cookieMetadata = $objectManager->get('Magento\\Framework\\Stdlib\\Cookie\\CookieMetadataFactory');\r\n\r\n $customerName = self::ANONYMOUS_USER;\r\n $customerEmail = self::ANONYMOUS_USER;\r\n $customerId = '';\r\n\r\n $metadata = $_cookieMetadata\r\n ->createPublicCookieMetadata()\r\n ->setDuration(self::TIMEOUT)\r\n ->setPath('/')\r\n ->setDomain($coreSession->getCookieDomain())\r\n ->setHttpOnly(false);\r\n\r\n if ($this->_customerSession->isLoggedIn()) {\r\n $customer = $this->_customerSession->getCustomer();\r\n $customerName = $customer->getName();\r\n $customerId = $customer->getId();\r\n $customerEmail = $customer->getEmail();\r\n $this->_cookieManager->setPublicCookie('user_loggedin', true, $metadata);\r\n $this->_cookieManager->setPublicCookie('afterlogin_session_id', \r\n $coreSession->getCustomerSessionId(), \r\n $metadata);\r\n $this->_cookieManager->setPublicCookie('trackingid', $customerId, $metadata);\r\n } else {\r\n if (!empty($this->_request->getParam('guest_user_id'))) {\r\n $customerId = $coreSession->getTrackingSessionId();\r\n } elseif (empty($this->_cookieManager->getCookie('trackingid'))) {\r\n $customerId = $coreSession->getTrackingSessionId();\r\n }\r\n $this->_cookieManager->setPublicCookie('user_loggedin', false, $metadata);\r\n }\r\n !empty($customerId) ? $this->_cookieManager->setPublicCookie('trackingid', \r\n $customerId, \r\n $metadata) : '';\r\n\r\n $this->_cookieManager->setPublicCookie('trackingemail', $customerEmail, $metadata);\r\n $this->_cookieManager->setPublicCookie('trackingname', $customerName, $metadata);\r\n\r\n $quoteId = $this->_checkoutSession->getQuoteId() ? $this->_checkoutSession->getQuoteId() : '';\r\n $this->_cookieManager->setPublicCookie('trackingorderid', $quoteId, $metadata);\r\n\r\n if (!$this->_cookieManager->getCookie('trackingsession')) {\r\n $this->_cookieManager->setPublicCookie('trackingsession', \r\n $coreSession->getTrackingSessionId(), \r\n $metadata);\r\n }\r\n }", "function fsl_session_set($name,$value,$timeout = NULL){\n $_SESSION[$name] = fsl_encrypt($value);\n\t\t\t\tif(!empty($timeout)) $_SESSION[$name.'_timeout'] = $timeout + time();\n\t\t\n return true;\n}", "protected function cookie($name, $value, $minutes) {\n\t\t// When setting the default implementation of an authentication\n\t\t// cookie we'll use the same settings as the session cookie.\n\t\t// This typically makes sense as they both are sensitive.\n\t\t$config = Config::get('session');\n\n\t\textract($config);\n\n\t\t//Cookie::put($name, $value, $minutes, $path, $domain, $secure);\n\t\tCookie::put($name, $value, ['expires' => $minutes,'path' => $path,'domain' => $domain,'secure' => $secure,'httponly' => true,'samesite' => 'strict',]);\n\t}", "public function cookie($name);", "static protected function bakeUserCookie( $time, $user ) {\n return 'exp='.$time.'&id='.$user->id.'&digest='.md5($user->username.$user->password);\n }", "public static function set($name, $value)\n {\n $domain = ($_SERVER['HTTP_HOST'] != 'localhost') ? $_SERVER['HTTP_HOST'] : false;\n setcookie($name, $value, time() + ASTERION_COOKIE_TIME, '/', $domain, false);\n }", "public function getCookieTime(){\r\n return $this->scopeConfigInterface->getValue(self::XML_PATH_POPUP_COOKIE_TIME,ScopeInterface::SCOPE_WEBSITE);\r\n }", "public function cookie( $key, $value = '', $expiry = null, $path = '/', $domain = null, $secure = false, $httponly = false ) {\n\t\tif ( null === $expiry ) {\n\t\t\t$expiry = time() + ( 3600 * 24 * 30 );\n\t\t}\n\n\t\treturn setcookie( $key, $value, $expiry, $path, $domain, $secure, $httponly );\n\t}", "public function test_public_storeCookies_MaxAge() {\n\t// Verify that we have on cookie to start.\n\t$this->assertEquals(1, count($this->object->getCookies($this->serviceUrl_1)));\n\n\t// Send set-cookie header to remove the cookie\n\t$headers = array('Set-Cookie2: person=\"bob jones\"; path=/; max-age=2');\n\t$this->object->storeCookies($this->serviceUrl_1, $headers);\n\n\t// Ensure that the cookie exists after 1 second\n\tsleep(1);\n\t$cookies = $this->object->getCookies($this->serviceUrl_1);\n\t$this->assertArrayHasKey('person', $cookies);\n\t$this->assertEquals('bob jones', $cookies['person']);\n\n\t// Wait 3 total seconds and then ensure that the cookie has been removed\n\tsleep(2);\n\t$cookies = $this->object->getCookies($this->serviceUrl_1);\n\t$this->assertArrayNotHasKey('person', $cookies);\n }", "public function test_public_storeCookies_ExpiresFuture() {\n\t// Verify that we have on cookie to start.\n\t$this->assertEquals(1, count($this->object->getCookies($this->serviceUrl_1)));\n\n\t// Send set-cookie header to remove the cookie\n\t$headers = array('Set-Cookie: bob=jones; path=/; expires='.gmdate('D, d-M-Y H:i:s e', time() + 600));\n\t$this->object->storeCookies($this->serviceUrl_1, $headers);\n\n\t$cookies = $this->object->getCookies($this->serviceUrl_1);\n\t$this->assertEquals(2, count($cookies));\n\t$this->assertEquals('jones', $cookies['bob']);\n }", "function my_setcookie( $name, $value=\"\", $sticky=1, $expires_x_days=0 )\n {\n\t\t//-----------------------------------------\n\t\t// Check\n\t\t//-----------------------------------------\n\t\t\n if ( $this->no_print_header )\n {\n \treturn;\n }\n \n\t\t//-----------------------------------------\n\t\t// Set vars\n\t\t//-----------------------------------------\n\n if ( $sticky == 1 )\n {\n \t$expires = time() + ( 60*60*24*365 );\n }\n\t\telse if ( $expires_x_days )\n\t\t{\n\t\t\t$expires = time() + ( $expires_x_days * 86400 );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$expires = FALSE;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Finish up...\n\t\t//-----------------------------------------\n\t\t\n $this->vars['cookie_domain'] = $this->vars['cookie_domain'] == \"\" ? \"\" : $this->vars['cookie_domain'];\n $this->vars['cookie_path'] = $this->vars['cookie_path'] == \"\" ? \"/\" : $this->vars['cookie_path'];\n \t\n\t\t//-----------------------------------------\n\t\t// Set the cookie\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( in_array( $name, $this->sensitive_cookies ) )\n\t\t{\n\t\t\tif ( PHP_VERSION < 5.2 )\n\t\t\t{\n\t\t\t\tif ( $this->vars['cookie_domain'] )\n\t\t\t\t{\n\t\t\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'], $this->vars['cookie_domain'] . '; HttpOnly' );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'] );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'], $this->vars['cookie_domain'], NULL, TRUE );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'], $this->vars['cookie_domain']);\n\t\t}\n }", "function createCookie($key,$value)\n{\n\tsetcookie(str_rot13(\"$key\"),str_rot13(\"$value\"),0,\"/\");\n}", "public function cookie($name, $value, $options = Array()) {\n\t\t\tif($value === null) // Delete the cookie, sets the expire header to 1st January 1970 12:00:01 am\n\t\t\t\t$options[\"expires\"] = 1;\n\t\t\tif(isset($options[\"time\"])) // Set expires, where time is how long the cookie will last until deleted\n\t\t\t\t$options[\"expires\"] = time() - (int)$options[\"time\"];\n\t\t\t\n\t\t\t// Create the cookie header\n\t\t\t// setcookie(): $name, $value, $expires_in_seconds, $path, $host, $https_only, $disallow_javascript\n\t\t\tsetcookie($name, is_string($value) ? $value : \"\", isset($options[\"expires\"]) ? $options[\"expires\"] : 0,\n\t\t\t\tisset($options[\"path\"]) ? $options[\"path\"] : $this->application->configuration([ \"path\" ]),\n\t\t\t\tisset($options[\"host\"]) ? $options[\"host\"] : $this->application->configuration([ \"host\" ]),\n\t\t\t\tisset($options[\"secure\"]) ? $options[\"secure\"] : false, isset($options[\"http\"]) ? $options[\"http\"] : false\n\t\t\t);\n\t\t}", "public function setCookie(string $name, string $value, int $expires = 0, string $path = '/', string $domain = '', bool $secure = false, bool $httponly = false): void;", "public function setTestCookie(): void\n {\n if (!$this->areCookieEnabled()) {\n self::set(\n new Cookie(\n Cookie::DEFAULT_TEST_COOKIE_STR,\n Cookie::DEFAULT_TEST_COOKIE_STR,\n Cookie::DEFAULT_COOKIE_DURATION\n )\n );\n }\n return;\n }", "function set_usercookies() {\r\n\t\tglobal $login_name, $login_password, $lang, $actual_user_is_admin, $actual_user_is_logged_in, $actual_user_id, $actual_user_name, $actual_user_showname, $actual_user_passwd_md5, $actual_user_lang, $actual_user_online_id, $_COOKIE;\r\n\t\r\n\t\t$actual_user_online_id = \"\";\r\n\t\t$actual_user_is_admin = false;\r\n\t\t$actual_user_is_logged_in = false;\r\n\t\t$actual_user_id = 0;\r\n\t\t//\r\n\t\t// FIX ME: get this by default config or by HTTP headers of the client\r\n\t\t//\r\n\t\t$actual_user_lang = 'de'; \r\n\t\t$actual_user_name = '';\r\n\t\t$actual_user_showname = '';\r\n\t\t$actual_user_passwd_md5 = '';\r\n\t\t$languages = array('de', 'en');\r\n\t\t//\r\n\t\t// Check: has the user changed the language by hand?\r\n\t\t//\r\n\t\tif(isset($lang)) {\r\n\t\t\tif(in_array($lang, $languages))\r\n\t\t\t\t$actual_user_lang = $lang;\r\n\t\t}\r\n\t\t//\r\n\t\t// Get the language from the cookie if it' s not changed\r\n\t\t//\r\n\t\telseif(isset($_COOKIE['CMS_user_lang'])) {\r\n\t\t\tif(in_array($_COOKIE['CMS_user_lang'], $languages))\r\n\t\t\t\t$actual_user_lang = $_COOKIE['CMS_user_lang'];\r\n\t\t}\r\n\t\t//\r\n\t\t// Set the cookie (for the next 93(= 3x31) Days)\r\n\t\t//\r\n\t\tsetcookie('CMS_user_lang', $actual_user_lang, time() + 8035200); \r\n\t\t//\r\n\t\t// Tells the cookie: \"the user is logged in!\"?\r\n\t\t//\r\n\t\tif(isset($_COOKIE['CMS_user_cookie'])) {\r\n\t\t\t$data = explode('|', $_COOKIE['CMS_user_cookie']);\r\n\t\t\t$actual_user_online_id = @$data[0];\r\n\t\t\t$actual_user_name = @$data[1];\r\n\t\t\t$actual_user_passwd_md5 = @$data[2];\r\n\t\t}\r\n\t\t//\r\n\t\t// Tries somebody to log in?\r\n\t\t//\r\n\t\tif(isset($login_name) && isset($login_password)) {\r\n\t\t\t$actual_user_name = $login_name;\r\n\t\t\t$actual_user_passwd_md5 = md5($login_password);\r\n\t\t}\r\n\t\t\r\n\t\tif($actual_user_online_id == '')\r\n\t\t\t$actual_user_online_id = md5(uniqid(rand()));\r\n\t\t//\r\n\t\t// Check: is the user really logged in?\r\n\t\t//\r\n\t\tif($actual_user_name != \"\" && $actual_user_passwd_md5 != \"\") {\r\n\t\t\t$sql = \"SELECT *\r\n\t\t\t\tFROM \" . DB_PREFIX . \"users\r\n\t\t\t\tWHERE user_name='$actual_user_name' AND user_password='$actual_user_passwd_md5'\";\r\n\t\t\t$original_user_result = db_result($sql);\r\n\t\t\t$original_user = mysql_fetch_object($original_user_result);\r\n\t\t\tif(@$original_user->user_name == '') {\r\n\t\t\t\t$actual_user_is_admin = false;\r\n\t\t\t\t$actual_user_is_logged_in = false;\r\n\t\t\t\t$actual_user_name = '';\r\n\t\t\t\t$actual_user_passwd_md5 = '';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$actual_user_is_logged_in = true;\r\n\t\t\t\t$actual_user_showname = $original_user->user_showname;\r\n\t\t\t\t$actual_user_id = $original_user->user_id;\r\n\t\t\t\tif($original_user->user_admin == 'y')\r\n\t\t\t\t\t$actual_user_is_admin = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tsetcookie('CMS_user_cookie',$actual_user_online_id . '|' . $actual_user_name . '|' . $actual_user_passwd_md5, time() + 14400);\r\n\t}", "public function get_cookie_life() {\n\n\t\t\t$life = get_option( 'wc_sc_coupon_cookie_life', 180 );\n\n\t\t\treturn apply_filters( 'wc_sc_coupon_cookie_life', time() + ( 60 * 60 * 24 * $life ) );\n\n\t\t}", "function _tsuiseki_tracking_get_expiration_time() {\n return (time() + TSUISEKI_TRACKER_COOKIE_TIMEOUT);\n}", "public function setCookieID($id=NULL)\n {\t\n if($id!==NULL) {\n $this->cookieID = $id;\n } else {\n $this->cookieID = md5($this->time . $this->username . mt_rand(1,25) . $this->getRealIpAddr());\n }\n return $this->cookieID;\n }", "function cookieSetter()\n{\n $rng = rand(0, 1);\n \n //Hvis cookien er satt og den er lik control: ikke gjør noe\n if (isset($_COOKIE[\"stylesheet\"]) && $_COOKIE[\"stylesheet\"] === \"control\") {\n\n return;\n\n //Hvis cookien er satt og den er lik variation: ikke gjør noe\n } else if (isset($_COOKIE[\"stylesheet\"]) && $_COOKIE[\"stylesheet\"] === \"variation\") {\n\n return;\n\n //Hvis cookien ikke er satt og randomNumber er 0: sett cookie til control\n } else if (!isset($_COOKIE[\"stylesheet\"]) && $rng === 0) {\n\n oneHourCookie(\"stylesheet\", \"control\");\n header(\"Refresh:0\");\n exit;\n\n //Hvis cookien ikke er satt og randomNumber er 1: sett cookie til variation\n } else if (!isset($_COOKIE[\"stylesheet\"]) && $rng === 1) {\n\n oneHourCookie(\"stylesheet\", \"variation\");\n header(\"Refresh:0\");\n exit;\n }\n\n return $rng;\n}", "public static function set($key,$val,$expire);", "function slic_set_cookie( $logged_in_cookie, $expire, $expiration, $user_id, $scheme = null ) {\n\tif ( 'logged_in' === $scheme ) {\n\t\tsetcookie( 'wp_is_logged_in', 1, $expire, COOKIEPATH, COOKIE_DOMAIN );\n\t\tif ( COOKIEPATH != SITECOOKIEPATH ) {\n\t\t\tsetcookie( 'wp_is_logged_in', 1, $expire, SITECOOKIEPATH, COOKIE_DOMAIN );\n\t\t}\n\t}\n}", "public function setSecret() {\r\n $rand = $this->psl['crypt/rand'];\n\n $this->secret = $rand->bytes(32);\r\n $cookieParam = session_get_cookie_params();\r\n setcookie(\r\n $this->keyCookie,\r\n base64_encode($this->secret),\r\n $cookieParam['lifetime'],\r\n $cookieParam['path'],\r\n $cookieParam['domain'],\r\n $cookieParam['secure'],\r\n $cookieParam['httponly']\r\n );\r\n return true;\r\n }" ]
[ "0.7487933", "0.7402098", "0.714444", "0.71275336", "0.70555353", "0.7035756", "0.70099014", "0.69214326", "0.6909103", "0.6841098", "0.6824177", "0.6813019", "0.67778385", "0.675458", "0.6636457", "0.6628806", "0.66099954", "0.65626055", "0.6554724", "0.64924496", "0.6468853", "0.6430486", "0.64291024", "0.6424874", "0.64038485", "0.6384376", "0.6369979", "0.63643473", "0.63456", "0.63297683", "0.6292749", "0.62887615", "0.6285717", "0.62603295", "0.62546545", "0.62264663", "0.62019056", "0.61962706", "0.61894876", "0.6180521", "0.61460924", "0.61422145", "0.6141515", "0.61348104", "0.6131192", "0.61226225", "0.6122235", "0.61209035", "0.6098411", "0.60942394", "0.6077844", "0.6076299", "0.60721076", "0.60536784", "0.6051226", "0.60427195", "0.60142684", "0.60056543", "0.5984047", "0.59674615", "0.5941681", "0.59249103", "0.5915933", "0.59091675", "0.5905355", "0.58948594", "0.5889558", "0.5886277", "0.5879751", "0.58782405", "0.58764505", "0.5856238", "0.5851937", "0.5848361", "0.5843613", "0.5824526", "0.5818833", "0.5814024", "0.5800566", "0.5800319", "0.5794307", "0.57848096", "0.5778283", "0.5777694", "0.57742554", "0.5773211", "0.57705486", "0.57690865", "0.57563716", "0.57535714", "0.5748338", "0.574663", "0.5719836", "0.5716277", "0.57121384", "0.57024574", "0.5700745", "0.56989926", "0.5689382", "0.5684955", "0.5682359" ]
0.0
-1
add a new event
function listen($name, Closure $callback = null) { return Event::listen($name, $callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addEvent($event){\n $this->events[]=$event;\n }", "function addEvent($event) {\n Event::addEvent($event);\n }", "public function postEventadd();", "public function add_event($_data){\r\n\t\t$args=$this->create_args($_data);\r\n\t\treturn($this->execute('add_event',$args));\r\n\t}", "public function onEventAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function addEvent(VEvent $event)\n {\n $this->events[] = $event;\n }", "public function addEvent()\n\t{\n\t \n\t\t$data = array(\n\t\t\t 'title' => $this->input->post('event_title'),\n\t\t\t 'date' => $this->input->post('event_date'),\n\t\t\t 'time' => $this->input->post('event_time'),\n\t\t\t 'desc' => $this->input->post('event_desc')\n\t\t);\t\n\n\t \tif($this->event_model->addEv($data))\n\t\t{\t\t\t \n\t\t\techo true;\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo false;\n\t\t}\n\t}", "function add_new_event($eventName, $eventColor){\n\t\tif( isset($_POST[$eventName]) ){\n\t\t\tglobal $base;\n\t\t\t\n\t\t\t$title \t= $_POST[$eventName];\n\t\t\t$color \t= $_POST[$eventColor];\n\n\t\t\t$full_calendar_notifications = new full_calendar_notification();\n\n\t\t\t$full_calendar_notifications->user_id = $base->clear_string($_SESSION['user_id']);\n\t\t\t$full_calendar_notifications->notification_title = $title;\n\t\t\t$full_calendar_notifications->notification_color = $color;\n\n\t\t\t$full_calendar_notifications->create();\n\t\t}\n\t}", "function admin_add() {\n\t\tif (!empty($this->data)) {\n\t\t\t$this->Event->create();\n\t\t\tif ($this->Event->save($this->data)) {\n\t\t\t\t$this->Session->setFlash('This Event has been saved.');\n\t\t\t\t$this->redirect(array('action'=>'admin_index'),null,true);\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash('This Event could not be saved. Please try again.');\n\t\t\t}\n\t\t}\n\t\t$tags = $this->Event->Tag->find('list');\n\t\t$this->set(compact('tags'));\n\t}", "public function addEvent($ev){\n if(date('m',$ev->timestamp)==$this->monthNum){\n if(date('Y',$ev->timestamp)==$this->yearNum){\n $d = date('j',$ev->timestamp);\n $this->days[$d-1]->addEvent($ev);\n }\n }\n }", "public function add($event, $class): void\n {\n $this->eventClasses[$event] = $class;\n }", "function addEvent($event) {\n\n $fields = array(\n 'event_id', 'calendar_id',\n 'title', 'location', 'description',\n 'start_stamp', 'end_stamp', 'end_year', 'end_month', 'recurrence',\n 'recur_yearly_interval',\n 'recur_monthly_interval', 'recur_monthly_count', 'recur_monthly_byweekday',\n 'recur_weekly_interval',\n 'recur_daily_interval',\n 'recur_end'\n );\n\n $toDB = array();\n foreach ($fields as $field) {\n if (!isset($event[$field])) {\n continue;\n }\n $toDB[$field] = $event[$field];\n }\n\n // save event\n $event_id = $this->databaseInsertRecord($this->tableEvents, 'event_id', $toDB);\n\n if (!$event_id) {\n // database error\n return FALSE;\n }\n\n // save selected months / weekdays\n switch($event['recurrence']) {\n case 'weekly':\n return $this->_saveWeekdays($event_id, $event) !== FALSE;\n break;\n case 'yearly':\n return $this->_saveMonths($event_id, $event) !== FALSE;\n break;\n }\n\n return $event_id;\n }", "public function add_event(array $event) {\n if (empty($event['type']) or\n empty($event['name']) or\n empty($event['data'])) {\n return (false);\n }\n $this->__results[] =\n array('type' => $event['type'],\n 'name' => $event['name'],\n 'data' => $event['data']);\n return (true);\n }", "public function addEvent( $event )\n\t{\n\t\t// database connection and sql query\n $core = Core::dbOpen();\n $sql = \"INSERT INTO user_log (userID, action, ip_address ) VALUES ( :userID, :event, :ip )\";\n $stmt = $core->dbh->prepare($sql);\n $stmt->bindParam(':userID', $this->userID);\n $stmt->bindParam(':event', $event);\n $stmt->bindParam(':ip', $_SERVER['REMOTE_ADDR']);\n Core::dbClose();\n\n\t\ttry\n {\n if( $stmt->execute()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch ( PDOException $e ) {\n echo \"Add history event failed!\";\n }\n\t\treturn false;\t\t\n\t}", "Public function addEvent(){\n // Imposto l'azienda di riferimento\n\t$id_azienda=$this->session->id_azienda;\n\t// Costruisco l'array contentente i campi _POST: titolo, inizio, fine, descrizione, colore, url\n\t$dati_evento = array(\n\t\t'id_azienda' => $id_azienda,\n\t\t'id_cliente' => $_POST['id_cliente'],\n\t\t'titolo' => $_POST['titolo'],\n 'inizio' => $_POST['inizio'],\n\t\t'fine' => $_POST['fine'],\n\t\t'descrizione' => $_POST['descrizione'],\n\t\t'colore' => $_POST['colore'],\n\t\t'url' => $_POST['url']\n\t);\n\n\t$this->db->insert('eventi', $dati_evento);\n\treturn ($this->db->affected_rows()!=1)?false:true;\n\n\t/* Imposto la query\n\t$sql = \"INSERT INTO eventi (id_cliente, id_azienda, title,events.date, description, color) VALUES \";\n\t$sql.=\"(?,?,?,?)\";\n\t$this->db->query($sql, array($_POST['title'], $_POST['date'], $_POST['description'], $_POST['color']));\n\t\treturn ($this->db->affected_rows()!=1)?false:true;\n\t\t*/\n\t}", "public function addEvent()\n {\n if ($this->input->post('start') === null || $this->input->post('eventName') === null) {\n $response = array(\"status\" => false, \"message\" => 'Please provide necessary data.');\n\n $this->send(400, $response);\n }\n\n $reqData = array(\n 'start' => $this->input->post('start'),\n 'event_name' => $this->input->post('eventName'),\n 'created_by' => $this->session->get('username'),\n 'course_desc' => $this->input->post('courseDesc'),\n 'certified_by' => $this->input->post('certifiedBy'),\n 'all_day_event' => $this->input->post('allday'),\n 'end' => $this->input->post('end')\n );\n\n $added = $this->model->addEvent($reqData);\n\n if ($added === true) {\n $response = array(\"status\" => true, \"message\" => 'Event added.');\n $this->send(200, $response);\n } else {\n $response = array(\"status\" => false, \"message\" => 'Event not added.');\n $this->send(500, $response);\n }\n }", "function add_event($input = array()) {\r\n \r\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\r\n \r\n // check if user is logged in\r\n if (!isset($_SESSION['active']) || $_SESSION['active'] === false) {\r\n header(\"location: \" . $_SERVER['PHP_SELF'] . \"?action=login&error=err_login_to_add_event\");\r\n return;\r\n }\r\n \r\n require(HOME_DIR . 'libs/event.class.php');\r\n $event = new event;\r\n \r\n\r\n $event->creator_id = $_SESSION['user_id'];\r\n // check if title is empty\r\n if (empty($input['title'])) {\r\n $this->tpl->assign('ERROR_TITLE', 'err_title_empty');\r\n return;\r\n }\r\n $event->title = $input['title'];\r\n \r\n // check description\r\n if (empty($input['description'])) {\r\n $this->tpl->assign('ERROR_DESCRIPTION', 'err_description_empty');\r\n return;\r\n }\r\n $event->description = $input['description'];\r\n\r\n // check label\r\n $label = $input['label'];\r\n $label = json_decode($label);\r\n $event->label = $label;\r\n \r\n // check date\r\n $event->fixed_date = isset($input['fixed_date']) ? 1 : 0;\r\n $event->start_date = date('Y-m-d', mktime($input['start_date']));\r\n $event->start_time = date('h:i', mktime($input['start_time']));\r\n\r\n // check location\r\n $event->fixed_location = isset($input['fixed_location']) ? 1 : 0;;\r\n \r\n // handle number of participants\r\n $event->limited_number_of_participants = isset($input['limited_number_of_participants']) ? 1 : 0;\r\n $event->max_number_of_participants = $input['max_number_of_participants'];\r\n \r\n // handle reservations\r\n $event->advance_reservation_required = isset($input['advance_reservation_required']) ? 1 : 0; \r\n $event->confirm_reservations = isset($input['advance_reservation_required']) && isset($input['confirm_reservations']) ? 1 : 0;\r\n\r\n $event->insert_into_db();\r\n header(\"location: \" . $_SERVER['PHP_SELF'] . \"?action=dashboard&message=event_successfully_created\"); \r\n } \r\n }", "public function action_add()\r\n\t{\t\tif ( ! $this->user->can('event_add'))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.add.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Valid csrf\r\n\t\tif ($this->valid_post())\r\n\t\t{\r\n\t\t\t// Extract event data from $_POST\r\n\t\t\t$event_post = Arr::get($this->request->post(), 'event', array());\r\n\t\t\t\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t// Create new event object\r\n\t\t\t\t$event = ORM::factory('event')->create_event($this->user, $event_post);\r\n\t\t\t\t\r\n\t\t\t\t// Notification\r\n\t\t\t\tNotices::success('event.add.success');\r\n\t\t\t\t\r\n\t\t\t\t$event->enroll($this->user, $event_post['character'], Model_Status::READY, 'Event leader');\r\n\t\t\t\tNotices::success('event.enroll.success');\r\n\t\t\t\t\r\n\t\t\t\t// Display created event\r\n\t\t\t\t$this->request->redirect(Route::url('event').'#'.$event->id);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch(ORM_Validation_Exception $e)\r\n\t\t\t{\r\n\t\t\t\t\tNotices::error('event.add.fail');\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->view->errors = $e->errors('validation');\r\n\t\t\t\t\t$this->view->values = $event_post;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t//Notices::error('event.enroll.on_create_failed');\r\n\t\t\t\t\t//$this->request->redirect(Route::url('event').'#'.$event->id);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Pass user to view object for character list, etc.\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function pushEvent($name)\n {\n $this->data['event'] = $name;\n }", "public function add()\n\t{\n\t\t// Only add the events if we are on that controller\n\t\tif (Router::$controller == 'main')\n\t\t{\n\t\t\tEvent::add('ushahidi_filter.view_pre_render.layout', array($this, 'add_requirements'));\n\t\t\t\n\t\t\tEvent::add('ushahidi_action.header_scripts', array($this, '_main_js'));\n\t\t\tEvent::add('ushahidi_action.map_main_filters', array($this, '_button'));\n\t\t}\n\t}", "function insert(iEvent $event);", "public function registerEvent($event, $object, $fn){\n\t\t$this->actions[$event][] = new \\OWeb\\manage\\events\\Event($object, $fn);\n\t}", "public function add($data)\n {\n // $this->db->insert($this->_table, $this);\n\t\t$this->db->insert('tb_event', $data);\n\t\t\treturn true;\n }", "public function create_event( $eventname )\n\t{\n\t\tCmsEvents::create_event($this->get_name(), $eventname);\n\t}", "public function add_event_handler($event, $callback);", "public function action_add()\n\t{\n\t\t$this->template = View::forge('template-admin');\n\n\t\t//return Response::forge(View::forge('event/add'));\n\t\t$data[\"category\"] = Model_Category::find_all();\n\t\t$this->template->title = \"イベント追加\";\n\t\t$this->template->content = View::forge('event/add',$data);\n\t}", "public static function EventAdded(&$eventData)\n\t{\n\t\tif(isset($eventData['id_board']) && !empty($eventData['id_board']))\t\t\t\t// the event references a board event\n\t\t\tCacheAPI::putCache(self::$cacheName_Events, null, 0);\n\t}", "public function insertEvent($data) {\n\t\t$this->db->insert('events',$data);\n\t}", "public function add_event($data)\n {\n $datafields = array\n ('start' => array('req' => true)\n ,'end' => array('req' => true)\n ,'gid' => array('req' => true)\n ,'title' => array('req' => false, 'def' => '')\n ,'description' => array('req' => false, 'def' => '')\n ,'location' => array('req' => false, 'def' => '')\n ,'type' => array('req' => false, 'def' => 0)\n ,'status' => array('req' => false, 'def' => 0)\n ,'opaque' => array('req' => false, 'def' => 1)\n ,'uuid' => array('req' => false, 'def' => basics::uuid())\n );\n foreach ($datafields as $k => $v) {\n if (!isset($data[$k])) {\n if ($v['req'] === true) {\n return false;\n }\n $data[$k] = $v['def'];\n } else {\n $data[$k] = $this->esc($data[$k]);\n }\n }\n if (empty($data['gid'])) {\n $data['gid'] = 0;\n }\n\n // Am I the owner?\n if (!empty($data['gid']) && $this->getGroupOwner($data['gid']) != $this->uid) {\n // If not, I should have write permissions through a share\n if (!empty($GLOBALS['DB']->features['groups'])) {\n $perms = $GLOBALS['DB']->getUserSharedFolderPermissions($this->uid, 'calendar', $data['gid']);\n }\n if (empty($perms) || empty($perms['write'])) {\n // No, I haven't\n return false;\n }\n }\n\n $query = 'INSERT '.$this->Tbl['cal_event']\n .' (`uid`,`gid`,`starts`,`ends`,`title`,`description`,`location`,`type`,`status`,`opaque`,`uuid`,`lastmod`) VALUES ('\n .$this->uid.', \"'.$data['gid'].'\" ,\"'.$data['start'].'\",\"'.$data['end'].'\",\"'.$data['title'].'\",\"'.$data['description'].'\"'\n .',\"'.$data['location'].'\",'.doubleval($data['type']).','.doubleval($data['status']).',\"'.doubleval($data['opaque']).'\", \"'.$data['uuid'].'\",NOW())';\n if (!$this->query($query)) {\n return false;\n }\n $newId = $this->insertid();\n // Make sure, the end of an event is NOT before its beginning\n $this->query('UPDATE '.$this->Tbl['cal_event'].' SET `ends`=`starts` WHERE `ends`<`starts` AND id='.$newId);\n\n if (isset($data['attendees']) && !empty($data['attendees'])) {\n $query = 'INSERT INTO '.$this->Tbl['cal_attendee'].' (`eid`,`ref`,`name`,`email`,`role`,`type`,`status`,`mailhash`) VALUES ';\n $k = 0;\n foreach ($data['attendees'] as $v) {\n if ($k) {\n $query .= ',';\n }\n $query .= '('.doubleval($newId).',\"evt\",\"'.$this->esc($v['name']).'\",\"'.$this->esc($v['email']).'\"'\n .',\"'.$this->esc($v['role']).'\",\"'.$this->esc($v['type']).'\",'.doubleval($v['status'])\n .',\"'.$this->esc(basics::uuid()).'\")';\n $k++;\n }\n $this->query($query);\n }\n\n if (isset($data['reminders']) && !empty($data['reminders'])) {\n $query = 'INSERT INTO '.$this->Tbl['cal_reminder'].' (`eid`,`ref`,`uid`,`mode`,`time`,`text`,`smsto`,`mailto`) VALUES ';\n $k = 0;\n foreach ($data['reminders'] as $v) {\n if ($k) {\n $query .= ',';\n }\n if ($v['mode'] == '-') {\n continue;\n }\n $query .= '('.doubleval($newId).',\"evt\",'.$this->uid.',\"'.$this->esc($v['mode']).'\",'.doubleval($v['time'])\n .',\"'.$this->esc($v['text']).'\"'\n .',\"'.(!empty($v['smsto']) ? $this->esc($v['smsto']) : '').'\"'\n .',\"'.(!empty($v['mailto']) ? $this->esc($v['mailto']) : '').'\")';\n $k++;\n }\n if ($k > 0) {\n $this->query($query);\n }\n }\n if (isset($data['repetitions']) && !empty($data['repetitions'])) {\n $query = 'INSERT INTO '.$this->Tbl['cal_repetition'].' (`eid`,`ref`,`type`,`repeat`,`extra`,`until`) VALUES ';\n $k = 0;\n foreach ($data['repetitions'] as $v) {\n if ($k) {\n $query .= ',';\n }\n $query .= '('.doubleval($newId).',\"evt\",\"'.$this->esc($v['type']).'\",'.doubleval($v['repeat'])\n .','.(isset($v['extra']) && !is_null($v['extra']) ? '\"'.$this->esc($v['extra']).'\"' : '\"\"')\n .','.(isset($v['until']) && !is_null($v['until']) ? '\"'.$this->esc($v['until']).'\"' : 'NULL').')';\n $k++;\n }\n if ($k > 0) {\n $this->query($query);\n }\n } else {\n $query = 'INSERT INTO '.$this->Tbl['cal_repetition'].' (`eid`,`ref`,`type`,`repeat`,`extra`,`until`) VALUES '\n .'('.doubleval($newId).',\"evt\",\"-\",0,\"\",NULL)';\n $this->query($query);\n }\n return $newId;\n }", "function addEvent($date,$title,$user_id,$fname,$address,$contact,$email,$location,$vlocation,$hour,$minutes,$choice,$tier,$flavor,$info,$confirmation){\r\n\t//Include db configuration file\r\n\tinclude 'dbConfig.php';\r\n\t$currentDate = date(\"Y-m-d H:i:s\");\r\n\t//Insert the event data into database\r\n\t$insert = $db->query(\"INSERT INTO cakemaker (title,date,created,modified,user_id,fname,address,contact,email,location,vlocation,hour,minutes,choice,tier,flavor,info,confirmation) VALUES ('\".$title.\"','\".$date.\"','\".$currentDate.\"','\".$currentDate.\"','\".$user_id.\"','\".$fname.\"','\".$address.\"','\".$contact.\"','\".$email.\"','\".$location.\"','\".$vlocation.\"','\".$hour.\"','\".$minutes.\"','\".$choice.\"','\".$tier.\"','\".$flavor.\"','\".$info.\"','\".$confirmation.\"')\");\r\n\tif($insert){\r\n\t\techo 'ok';\r\n\t}else{\r\n\t\techo 'err';\r\n\t}\r\n}", "public function addEventListener($event, $callable){\r\n $this->events[$event] = $callable;\r\n }", "public function addEvent($event, $eventData = null, $time = null, $data = [])\n\t{\n\t\t$this->events[] = [\n\t\t\t'event' => $event,\n\t\t\t'data' => (new Serializer)->normalize($eventData),\n\t\t\t'duration' => $duration = isset($data['duration']) ? $data['duration'] : null,\n\t\t\t'time' => $time ? $time : microtime(true) - ($duration ?: 0) / 1000,\n\t\t\t'listeners' => isset($data['listeners']) ? $data['listeners'] : null,\n\t\t\t'file' => isset($data['file']) ? $data['file'] : null,\n\t\t\t'line' => isset($data['line']) ? $data['line'] : null,\n\t\t\t'trace' => isset($data['trace']) ? $data['trace'] : null\n\t\t];\n\t}", "public function add_event($type, $method_name)\n\t{\n\t\tif (!array_key_exists($type, $this->_events)) $this->_events[$type] = array();\n\t\t$this->_events[$type][] = $method_name;\n\t}", "public function addEvent(Event $l)\n\t{\n\t\tif ($this->collEvents === null) {\n\t\t\t$this->initEvents();\n\t\t}\n\t\tif (!$this->collEvents->contains($l)) { // only add it if the **same** object is not already associated\n\t\t\t$this->collEvents[]= $l;\n\t\t\t$l->setVenue($this);\n\t\t}\n\t}", "function add($name, $date, $type=0, $tags=false, $entity = false){\n\t\t$name = trim($name);\n\t\t// Invalid dates out:\n\t\tif(strlen($date)<1 || strlen($name) <1){\n\t\t\techo '<br /><span style=\"color:violet\">Invalid</span>';\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$new = array(\n\t\t\t'name' => $name,\n\t\t\t'entity' => $entity,\n\t\t\t'date' => $date,\n\t\t\t'context' => '',\n\t\t\t'type' => $type,\n\t\t\t'tags' => $tags\n\t\t);\n\t\t\n\t\t$this->events[] = $new;\n\t}", "public static function add($type, $eventname, $callback){\n if(isset(self::$__events[$type])){\n if(!isset(self::$__events[$type][strtolower($eventname[0])][strtolower($eventname[1])])){\n $count = 0;\n }else{\n $count = count(self::$__events[$type][strtolower($eventname[0])][strtolower($eventname[1])]); \n }\n }else{\n $count = 0;\n }\n self::$__events[$type][strtolower($eventname[0])][strtolower($eventname[1])][$count] = $callback; \n }", "function add_event($description,$location,$time,$groupID){\n\tglobal $db;\n\t$query = 'INSERT INTO event(description,location,time,groupID)\n\t\t\t VALUES(:description,:location,:time,:groupID)';\n\t$statement = $db->prepare($query);\n\t$statement->bindValue(':description',$description);\n\t$statement->bindValue(':location',$location);\n\t$statement->bindValue(':time',$time);\n\t$statement->bindValue(':groupID',$groupID);\n\t$statement->execute();\n\t$statement->closeCursor();\n}", "public function insertEvent($data)\r\r\n {\r\r\n $this->insert($data);\r\r\n }", "function eventRegister($eventName, EventListener $listener);", "public static function event($event = null)\n {\n }", "private function pushEvents ($e)\n\t\t{\n\t\t\t if ( self::chkOrgId () ) { /* Check main Id */\n\t\t\t\t $dbs = new DB ( $this->config['database'] );\n\t\t\t\t $c = $dbs->query (\"SELECT COUNT(*) AS C FROM tbl_events_record WHERE org_id = '\" . $this->c . \"'\");\n\t\t\t\t if ( ! $c[0]['C'] ) { /* Event not found in events table , Insert */ \n\t\t\t\t\t$db_ins = new DB ( $this->config['database'] ) ;\n \t \t$e_ins = $db_ins->query (\"INSERT INTO tbl_events_record \n\t\t\t\t\t\tVALUES('\" . $this->c . \"','\" . $e . \"','\". date('Y-m-d H:i:s').\"');\");\n\t\t\t\t\t$db_ins->CloseConnection ();\n\t\t\t\t\treturn true;\n\t\t\t\t } else { /* Event found in events table , Update events by Id */\n\t\t\t\t\t$db_upd = new DB ( $this->config['database'] ) ;\n\t\t\t\t\t$e_upd = $db_upd->query (\"UPDATE tbl_events_record \n\t\t\t\t\t\tSET events = '\".$e.\"', date_rec = '\". date('Y-m-d H:i:s') . \n\t\t\t\t\t\t\"' WHERE org_id = '\" . $this->c .\"'\");\n\t\t\t\t\t$db_upd->CloseConnection ();\n\t\t\t\t}\n\t\t\t\t$dbs->CloseConnection ();\n\t\t\t\t$this->result['data']['id'] = $this->c;\n\t\t\t\t$this->result['data']['result'] = \"Push event: \" . $e; /* Events status */\n\t\t\t } else /* Id not found */\n\t\t\t\t$this->result['data']['result'] = \"Id not found [error code:100:101]\";\n\n\t\t\treturn false;\n\t\t}", "function createNewEvent() \n {\n // SPEICHERUNG\n if (isset($_POST['eventname'])) {\n if ($this->userHasRight(79, 0) == true) {\n $neweventname = $this->checkString($_POST['eventname']);\n if (strlen($neweventname) > 5) {\n if ($this->objectExists(\"SELECT id,eventname FROM eventlist WHERE eventname='$neweventname'\") == false) {\n $sql = \"INSERT INTO eventlist (eventname) VALUES ('$neweventname')\";\n if ($this->sqlInsertUpdateDelete($sql) == true) {\n $this->erfolgMessage(\"Event $neweventname erstellt\");\n } else {\n $this->errorMessage(\"Fehler beim speichern ($neweventname)\");\n }\n } else {\n $this->infoMessage(\"Eine Veranstaltung mit dem Namen $neweventname existiert bereits.\");\n }\n \n } else {\n $this->infoMessage(\"Name muss mehr als 5 Zeichen haben.\");\n }\n } else {\n $this->infoMessage(\"Du benötigst Super Administration Rechte für diese Aktion.\");\n }\n \n }\n\n // AUSGABE\n if ($this->userHasRight(79, 0) == true) {\n echo \"<div class=''>\";\n echo \"<form method=post action='administration.php#allevents' />\";\n echo \"<input type=text name=eventname placeholder=Event-Name required />\";\n echo \"<button type=submit>OK</button>\";\n echo \"</form>\";\n echo \"</div>\";\n }\n }", "function evt__agregar()\n\t{\n\t\t$this->set_pantalla('pant_edicion');\n\t}", "protected function expectAddEvent()\n {\n $this->eventPublisher->expects($this->once())\n ->method('addEvent')\n ->with(['uuid' => '123']);\n }", "function addEventToDB() {\r\n\r\n\tglobal $MySelf;\r\n\tglobal $DB;\r\n\r\n\t// is the events module active?\r\n\tif (!getConfig(\"events\")) {\r\n\t\tmakeNotice(\"The admin has deactivated the events module.\", \"warning\", \"Module not active\");\r\n\t}\r\n\t\r\n\t// Are we allowed to add Events?\r\n\tif (!$MySelf->canEditEvents()) {\r\n\t\tmakeNotice(\"You are not allowed to add events!\", \"error\", \"Forbidden!\");\r\n\t}\r\n\r\n\t// Do we have a short description?\r\n\tif (empty ($_POST[sdescr])) {\r\n\t\tmakeNotice(\"You need to supply a short description!\", \"error\", \"Important field missing!\");\r\n\t}\r\n\r\n\t// Do we have an officer?\r\n\tif (empty ($_POST[officer])) {\r\n\t\tmakeNotice(\"You need to supply who is in command!\", \"error\", \"Important field missing!\");\r\n\t}\r\n\t\r\n\t// Choose which supplied officer we use.\r\n\tif (!empty($_POST[officer2])) {\r\n\t\tsanitize($officer = sanitize($_POST[officer2]));\r\n\t} else {\r\n\t\tsanitize($officer = sanitize($_POST[officer]));\r\n\t}\r\n\t\r\n\t// Choose which system we use.\r\n\tif (!empty($_POST[system2])) {\r\n\t\t$system = strtolower($_POST[system2]);\r\n\t} else {\r\n\t\t$system = strtolower($_POST[system]);\r\n\t}\r\n\t\r\n\t// Check that we still have a valid systemname.\r\n\tif (empty($system)) {\r\n\t\tmakeNotice(\"No valid Systemname found! Please go back, and try again.\", \"warning\", \"No system name\",\r\n\t\t \"index.php?action=addevent\", \"[cancel]\");\r\n\t}\r\n\r\n\t// Do we have an ETD?\r\n\tif (empty ($_POST[dur])) {\r\n\t\tmakeNotice(\"You need to tell me the guessed runtime!\", \"error\", \"Important field missing!\");\r\n\t}\r\n\r\n\t// Collateral?\r\n\tif (!is_numeric($_POST[collateral]) && $_POST[collateral] < 0) {\r\n\t\tmakeNotice(\"You need to supply a valid collateral!\", \"error\", \"Important field missing!\");\r\n\t}\r\n\r\n\t// Do we have an ETD?\r\n\tif ($_POST[payment] < 0) {\r\n\t\tmakeNotice(\"You need to give the folks some money!\", \"error\", \"Important field missing!\");\r\n\t}\r\n\r\n\t// Startting time goodness.\r\n\t$myTime = array (\r\n\t\t\"day\" => \"$_POST[ST_day]\",\r\n\t\t\"month\" => \"$_POST[ST_month]\",\r\n\t\t\"year\" => \"$_POST[ST_year]\",\r\n\t\t\"hour\" => \"$_POST[ST_hour]\",\r\n\t\t\"minute\" => \"$_POST[ST_minute]\",\r\n\t\t\r\n\t);\r\n\t$starttime = humanTime(\"toUnix\", $myTime);\r\n\r\n\t// is the time valid?\r\n\tif (!$starttime) {\r\n\t\tmakeNotice(\"Invalid time supplied!\", \"error\", \"Invalid Time!\");\r\n\t}\r\n\r\n\t// Lets see what ships are required.\r\n\t$SHIPTYPES = array (\r\n\t\t\"shuttles\",\r\n\t\t\"frigates\",\r\n\t\t\"destroyers\",\r\n\t\t\"cruisers\",\r\n\t\t\"bcruiser\",\r\n\t\t\"scruiser\",\r\n\t\t\"bship\",\r\n\t\t\"dread\",\r\n\t\t\"carrier\",\r\n\t\t\"titan\",\r\n\t\t\"barges\",\r\n\t\t\"indies\",\r\n\t\t\"freighter\",\r\n\t\t\"jfreighter\",\r\n\t\t\"exhumer\"\r\n\t);\r\n\tforeach ($SHIPTYPES as $ship) {\r\n\t\tif ($_POST[$ship] == \"on\") {\r\n\t\t\t$wantedships[] = $ship;\r\n\t\t}\r\n\t}\r\n\t$ships = serialize($wantedships);\r\n\r\n\t$p = $DB->query(\"INSERT INTO events (sdesc, officer, system, security, type, starttime, \" .\r\n\t\"duration, difficulty, payment, collateral, notes, ships)\r\n\t values (?,?,?,?,?,?,?,?,?,?,?,?)\", array (\r\n\t\tsanitize($_POST[sdescr]),\r\n\t\t$officer,\r\n\t\t$system,\r\n\t\tsanitize($_POST[security]),\r\n\t\tsanitize($_POST[type]),\r\n\t\tsanitize($starttime),\r\n\t\tsanitize($_POST[dur]),\r\n\t\tsanitize($_POST[difficulty]),\r\n\t\tsanitize($_POST[payment]),\r\n\t\tsanitize($_POST[collateral]),\r\n\t\tsanitize($_POST[notes]),\r\n\t\t\"$ships\"\r\n\t));\r\n\r\n\tif ($DB->affectedRows() == 1) {\r\n\r\n\t\t// Prepare the announcement email.\r\n\t\tglobal $SITENAME;\r\n\t\tglobal $VERSION;\r\n\t\tglobal $URL;\r\n\r\n\t\t// Bloody hack to get latest ID. No one will ever know. ;)\r\n\t\t$lastID = $DB->getCol(\"SELECT max(ID) from events;\");\r\n\t\t$risks = array (\r\n\t\t\t\"No risk involved.\",\r\n\t\t\t\"Only inferior forces suspected.\",\r\n\t\t\t\"Somewhat risky.\",\r\n\t\t\t\"Moderate risk.\",\r\n\t\t\t\"Extreme risks are involved.\",\r\n\t\t\t\"No survivors expected.\"\r\n\t\t);\r\n\t\t$risk_index = $_POST[difficulty];\r\n\r\n\t\t// Fix the template up.\r\n\t\t$email = str_replace(\"{{ID}}\", str_pad(\"$lastID[0]\", \"5\", \"0\", STR_PAD_LEFT), getTemplate(\"newevent\", \"email\"));\r\n\t\t$email = str_replace(\"{{SDESCR}}\", $_POST[sdescr], $email);\r\n\t\t$email = str_replace(\"{{TYPE}}\", $_POST[type], $email);\r\n\t\t// In case of a numeric value we have to translate that into plain english.\r\n\t\tif (is_numeric($_POST[officer])) {\r\n\t\t\t$officer = idToUsername($_POST[officer]);\r\n\t\t} else {\r\n\t\t\t$officer = sanitze($_POST[officer]);\r\n\t\t}\r\n\t\t$email = str_replace(\"{{FLAGOFFICER}}\", ucfirst($officer), $email);\r\n\t\t$email = str_replace(\"{{SYSTEM}}\", $_POST[system], $email);\r\n\t\t$email = str_replace(\"{{SECURITY}}\", $_POST[security], $email);\r\n\t\t$email = str_replace(\"{{STARTTIME}}\", date(\"d.m.y H:i:s\", $starttime), $email);\r\n\t\t$email = str_replace(\"{{DURATION}}\", $_POST[dur], $email);\r\n\t\t$email = str_replace(\"{{RISK}}\", $risks[$risk_index], $email);\r\n\t\t$email = str_replace(\"{{PAYMENT}}\", $_POST[payment], $email);\r\n\t\t$email = str_replace(\"{{COLLATERAL}}\", number_format($_POST[collateral], 2), $email);\r\n\t\t$email = str_replace(\"{{NOTES}}\", $_POST[notes], $email);\r\n\t\t$email = str_replace(\"{{SITENAME}}\", $SITENAME, $email);\r\n\t\t$email = str_replace(\"{{URL}}\", $URL, $email);\r\n\t\t$email = str_replace(\"{{VERSION}}\", $VERSION, $email);\r\n\r\n\t\t// mail the user.\r\n\t\tmailUser($email, \"New event added!\");\r\n\r\n\t\t// Tell the admin what we did.\r\n\t\tmakeNotice(\"Event added to the database and users who are opt-in got an email.\", \"notice\", \"New Event added.\", \"index.php?action=showevents\", \"[OK]\");\r\n\t} else {\r\n\t\tmakeNotice(\"Something went horribly wrong! AIEE!!\", \"error\", \"Mummy!\");\r\n\t}\r\n\r\n}", "private function add_events()\r\n {\r\n $events = $this->events;\r\n foreach ($events as $time => $items)\r\n {\r\n $column = date('H', $time) / $this->hour_step + 1;\r\n foreach ($items as $item)\r\n {\r\n $content = $item['content'];\r\n $row = $item['index'] + 1;\r\n \r\n $cell_content = $this->getCellContents($row, $column);\r\n $cell_content .= $content;\r\n $this->setCellContents($row, $column, $cell_content);\r\n }\r\n }\r\n \r\n }", "public function appendEvents(\\Prooph\\EventStoreClient\\Messages\\ClientMessages\\NewEvent $value)\n {\n return $this->append(self::EVENTS, $value);\n }", "public function insertMenuEvent(){\n //\n }", "function add_event($settings)\n {\n if(!$this->isLogged)\n $this->login();\n \n if($this->isLogged)\n {\n $_entry = \"<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>\n <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event'></category>\n <title type='text'>\".$settings[\"title\"].\"</title>\n <content type='text'>\".$settings[\"content\"].\"</content>\n <author>\n <name>\".$this->email.\"</name>\n <email>\".$this->email.\"</email>\n </author>\n <gd:transparency\n value='http://schemas.google.com/g/2005#event.opaque'>\n </gd:transparency>\n <gd:eventStatus\n value='http://schemas.google.com/g/2005#event.confirmed'>\n </gd:eventStatus>\n <gd:where valueString='\".$settings[\"where\"].\"'></gd:where>\n <gd:when startTime='\".$settings[\"startDay\"].\"T\".$settings[\"startTime\"].\".000Z'\n endTime='\".$settings[\"endDay\"].\"T\".$settings[\"endTime\"].\".000Z'>\n\t<gd:reminder minutes='5' /></gd:when>\n </entry>\";\n $this->prepare_feed_path();\n \n $header = array();\n $this->setMoreHeader(\"MIME-Version: 1.0\");\n //$this->setMoreHeader(\"Accept: text/xml\");\n $this->setMoreHeader(\"Authorization: GoogleLogin auth=\".$this->fAuth);\n $this->setMoreHeader(\"Content-length: \".strlen($_entry));\n $this->setMoreHeader(\"Content-type: application/atom+xml\");\n $this->setMoreHeader(\"Cache-Control: no-cache\");\n $this->setMoreHeader(\"Connection: close \\r\\n\");\n $this->setMoreHeader($_entry);\n\n \n $this->setHost($this->feed_host,80);\n $this->useSSL(false);\n $this->setHandleRedirects(false);\n $status = $this->post($this->feed_path_prepared, null ,null);\n if (302==$status) {\n \t$h = $this->getHeaders();\n\t$new_uri = parse_url($h['location']);\n\t$status =$this->post($new_uri['path'].'?'.$new_uri['query'], null ,null) ;\n\tif(201==$status)\n\t return true;\n\t}\n }\n return false;\n }", "function __construct()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}", "function add()\n\t{\n\t\t$this->_updatedata();\n\t}", "public function registerEvent(EventInterface $event);", "public function add()\n\t{\n\n\t}", "public function add()\n\t{\n\n\t}", "function registerEvent($event_type, $callback_func) {\n\n\t\t// registers a new event ...\n\t\t$this->events[$event_type][] = $callback_func;\n\t}", "protected function add() {\n\t}", "public function onEvent();", "public function storeEvent(){\n \t$eventStore = new Event_Store();\n\n\t\t$eventStore->command = $this->command; \t\n\t\t$eventStore->event = $this->event;\n\t\t$eventStore->status = \"published\";\n\t\t$eventStore->created_at = now();\n\t\t$eventStore->updated_at = now();\n\n\n\t\t$eventStore->save();\n }", "public function add();", "public function add();", "function add_event($settings)\n {\n if(!$this->isLogged)\n $this->login();\n \n if($this->isLogged)\n {\n $_entry = \"<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>\n <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event'></category>\n <title type='text'>\".$settings[\"title\"].\"</title>\n <content type='text'>\".$settings[\"content\"].\"</content>\n <author>\n <name>\".$this->email.\"</name>\n <email>\".$this->email.\"</email>\n </author>\n <gd:transparency\n value='http://schemas.google.com/g/2005#event.opaque'>\n </gd:transparency>\n <gd:eventStatus\n value='http://schemas.google.com/g/2005#event.confirmed'>\n </gd:eventStatus>\n <gd:where valueString='\".$settings[\"where\"].\"'></gd:where>\n <gd:when startTime='\".$settings[\"startDay\"].\"T\".$settings[\"startTime\"].\".000Z'\n endTime='\".$settings[\"endDay\"].\"T\".$settings[\"endTime\"].\".000Z'></gd:when>\n </entry>\";\n \n $this->prepare_feed_url();\n \n $header = array();\n $header[] = \"Host: www.google.com\";\n $header[] = \"MIME-Version: 1.0\";\n $header[] = \"Accept: text/xml\";\n $header[] = \"Authorization: GoogleLogin auth=\".$this->fAuth;\n $header[] = \"Content-length: \".strlen($_entry);\n $header[] = \"Content-type: application/atom+xml\";\n $header[] = \"Cache-Control: no-cache\";\n $header[] = \"Connection: close \\r\\n\";\n $header[] = $_entry;\n \n $this->post($this->feed_url_prepared, null, $header, $http_code);\n if(201==$http_code)\n return true;\n \n }\n else\n echo \"cannot login with '\".$this->email.\"' email and '<font color=\\\"lightgray\\\">\".$this->password.\"</font>' password<br/>\";\n return false;\n }", "public function postEventedit();", "private function addEvent($eventType, $eventValue = 1)\n {\n $query = \"INSERT INTO events (game_id, player, event_type, event_value, timestamp) VALUES (?, ?, ?, ?, ?)\";\n $this->oDB->getAll($query, array(\n $this->oData->getIdGames(),\n $this->oData->getPlayerNumber(),\n $eventType,\n $eventValue,\n Misc::getUtcTime()->getTimestamp()\n ));\n\n switch ($eventType) {\n case 'name_update':\n $this->oData->setPlayerName($eventValue);\n break;\n\n case 'join_game':\n $this->oData->setPlayerJoined($eventValue);\n break;\n\n case 'start_game':\n $this->oData->setPlayerShips($eventValue);\n break;\n\n case 'shot':\n $this->oData->appendPlayerShots($eventValue);\n break;\n\n default:\n break;\n }\n }", "function addEvent($date,$title){\n\tinclude 'dbConfig.php';\n\t$currentDate = date(\"Y-m-d\");\n\t//Insert the event data into database\n\t$insert = $db->query(\"INSERT INTO events (title,date,created,modified) VALUES ('\".$title.\"','\".$date.\"','\".$currentDate.\"','\".$currentDate.\"')\");\n\tif($insert){\n\t\techo 'ok';\n\t}else{\n\t\techo 'err';\n\t}\n}", "function create_lds_event($indirec, $eventName, $eventABV, $eParent)\n\t{\n\t\t//throw new exception(\"create_lds_event - this function is not implemented\");\n\t}", "function newEventForm($existing = NULL) {\r\n global $my;\r\n\r\n if (is_numeric($existing)) {\r\n\t $event = new mosEventCal_Event();\r\n\t\t$event->load($existing);\t\r\n\t\t$existing = $event;\r\n\t\t$existing->checkout( $my->id );\r\n\t}\r\n\tHTML_admin_eventcal::mkEventForm($existing);\t\r\n}", "function __construct()\r\n\t{\r\n\t\t$this->events[\"BeforeAdd\"]=true;\r\n\r\n\r\n\t}", "public function addEvent($event_title,$event_detail,$event_date){\n\n // check the name of the event on db\n // $check_sql=\"SELECT*FROM `events` WHERE event_title='$event_title'\";\n // $result_check=$this->conn->query($check_sql);\n\n // if($result_check->num_rows>0){\n // echo \"<div class='alert alert-danger text-center'>The event is already in the table.</div>\";\n\n // }else{\n // insert into db\n $sql=\"INSERT INTO `events`(`event_title`,`event_detail`,`event_date`) VALUES('$event_title','$event_detail','$event_date')\";\n $result=$this->conn->query($sql);\n\n if($result==TRUE){\n header(\"location:events.php?success=1&message=The event was successfully created\");\n }else{\n header(\"location:events.php?success=0&message=Error occurd.Try it again.\");\n // } \n }\n }", "protected function _addEvent(Kronolith_Event $event)\n {\n throw new Kronolith_Exception($this->_errormsg);\n }", "function addEntry($newentry) {\n\t\t$this->data[] = $newentry;\n\t}", "function turnitintooltwo_add_to_log($courseid, $eventname, $link, $desc, $cmid, $userid = 0) {\n global $USER;\n\n $eventname = str_replace(' ', '_', $eventname);\n $eventpath = '\\mod_turnitintooltwo\\event\\\\'.$eventname;\n\n $data = array(\n 'objectid' => $cmid,\n 'context' => ( $cmid == 0 ) ? context_course::instance($courseid) : context_module::instance($cmid),\n 'other' => array('desc' => $desc)\n );\n if (!empty($userid) && ($userid != $USER->id)) {\n $data['relateduserid'] = $userid;\n }\n $event = $eventpath::create($data);\n $event->trigger();\n}", "public function attachEvents();", "public function attachEvents();", "public function addSingleEvent($data) {\n $this->db->query('INSERT INTO events (title, user_id, body, type, date) VALUES(:title, :user_id, :body, :type, :date)');\n $this->db->bind(':title', $data['title']);\n $this->db->bind(':user_id', $_SESSION['user_id']);\n $this->db->bind(':body', $data['body']);\n $this->db->bind(':type', $data['type']);\n $this->db->bind(':date', $data['date']);\n\n if($this->db->execute()) {\n $this->db->query('SELECT id FROM events WHERE user_id = :user_id ORDER BY id DESC LIMIT 1');\n $this->db->bind(':user_id', $_SESSION['user_id']);\n $response = $this->db->single();\n $event_id = $response ->id;\n return $event_id;\n } else {\n return 0;\n }\n }", "public function testAddEvent()\n\t{\n\t\t$application_id = 1;\n\t\t$event_name = \"addEventEvent\";\n\t\t$stat_name_id = 100;\n\t\t$now = \"String for date\";\n\t\t$history_model = $this->getMock(\n\t\t\t\t\"DB_Models_WritableModel_1\", array(), array(), \"\", FALSE);\n\t\t$history_model\n\t\t\t->expects($this->exactly(4))\n\t\t\t->method(\"__set\");\n\t\t$history_model\n\t\t\t->expects($this->never())\n\t\t\t->method(\"loadBy\");\n\t\t$history_model\n\t\t\t->expects($this->once())\n\t\t\t->method(\"save\");\n\t\t\t\t\n\t\t\n\t\t$name_model = $this->getMock(\n\t\t\t\t\"DB_Models_WritableModel_1\", array(), array(), \"\", FALSE);\n\t\t$name_model\n\t\t\t->expects($this->once())\n\t\t\t->method(\"loadBy\")\n\t\t\t->will($this->returnValue(TRUE));\n\t\t$name_model\n\t\t\t->expects($this->once())\n\t\t\t->method(\"__get\")\n\t\t\t->with($this->equalTo(\"stat_name_id\"))\n\t\t\t->will($this->returnValue($stat_name_id));\n\t\t\n\t\t$event_history = $this->getMock(\n\t\t\t\"VendorAPI_StatPro_Unique_ApplicationEventHistory\",\n\t\t\tarray(\"getNowString\", \"getEventHistoryModel\", \"getEventNameModel\"),\n\t\t\tarray(),\n\t\t\t\"\",\n\t\t\tFALSE);\n\t\t$event_history\n\t\t\t->expects($this->once())\n\t\t\t->method(\"getNowString\")\n\t\t\t->will($this->returnValue($now));\n\t\t$event_history\n\t\t\t->expects($this->once())\n\t\t\t->method(\"getEventHistoryModel\")\n\t\t\t->will($this->returnValue($history_model));\n\t\t$event_history\n\t\t\t->expects($this->once())\n\t\t\t->method(\"getEventNameModel\")\n\t\t\t->will($this->returnValue($name_model));\n\t\t\n\t\t$event_history->addEvent($event_name, $application_id);\n\t}", "private function createinstallevent()\n {\n $cat = CategoryUtil::getCategoryByPath('/__SYSTEM__/Modules/PostCalendar/Events');\n\n $eventArray = array(\n 'title' => $this->__('PostCalendar Installed'),\n 'hometext' => ':text:' . $this->__('On this date, the PostCalendar module was installed. Thank you for trying PostCalendar! This event can be safely deleted if you wish.'),\n 'alldayevent' => true,\n 'eventstatus' => PostCalendar_Entity_CalendarEvent::APPROVED,\n 'sharing' => PostCalendar_Entity_CalendarEvent::SHARING_GLOBAL,\n 'website' => 'https://github.com/craigh/PostCalendar/wiki',\n 'categories' => array(\n 'Main' => $cat['id']));\n\n try {\n $event = new PostCalendar_Entity_CalendarEvent();\n $event->setFromArray($eventArray);\n $this->entityManager->persist($event);\n $this->entityManager->flush();\n } catch (Exception $e) {\n return LogUtil::registerError($e->getMessage());\n }\n\n return true;\n }", "protected function _write($event)\n {\n $this->logs[] = $event;\n }", "public function AddEventHandler(&$array, $evt, $code)\n {\n if(isset($array[$evt]))\n $array[$evt] .= ';' . $code;\n else\n $array[$evt] = $code;\n }", "public function add($name, EventInterface $event)\n {\n $eventClass = get_class($event);\n if (!isset($this->jobs[$eventClass])) {\n throw new InvalidArgumentException(\"Don't know what job to use for event {$eventClass}\");\n }\n $class = $this->jobs[$eventClass];\n $job = $class::getInstance($name, $event);\n $this->client->queue($this->queueName)->push($job);\n }", "function setEventType()\n {\n $this->_eventType = 12;\n }", "public function add()\n {\n }", "public function add()\n {\n }", "public function add()\n {\n }", "protected function _write($event)\n {\n $this->_buffer[] = $event;\n }", "public function createEvents()\n {\n //\n\n return 'something';\n }", "public static function addEventToQueue($event,$action)\n {\n //need to check if the evnet should be added (ie. is it created on a calendar that has google cal support)?\n if (!isset($GLOBALS['com_pbbooking_data']['calendars'][$event->cal_id]->enable_google_cal) || $GLOBALS['com_pbbooking_data']['calendars'][$event->cal_id]->enable_google_cal == 0)\n return true; //doesn't need to be added to the queue\n\n $db = \\JFactory::getDbo();\n $db->insertObject('#__pbbooking_sync',new \\JObject(array(\n 'date_added'=>date_create(\"now\",new \\DateTimeZone(PBBOOKING_TIMEZONE))->format(DATE_ATOM),\n 'action'=>$action,\n 'data'=>json_encode($event)\n )));\n return true;\n }", "public function addSubEvent($value)\n {\n $this->subEvents[] = $value;\n }", "function add() {\n }", "public static function create_event($pid, $event) \n\t\t{\t\n\t\t\t$mysqli = MysqlInterface::get_connection();\n\t\t\t\n\t\t\t// insert event\n\t\t\t$stmt = $mysqli->stmt_init();\n\t\t\t$stmt->prepare('INSERT INTO event (title, owner, gowner, start_time, end_time, location, logo, description, category, size, tag, price) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);');\n\t\t\t$stmt->bind_param('siisssssiisd', $event['title'], $pid, $gid, $event['start_time'], $event['end_time'], $event['location'], $event['logo'], $event['description'], $event['category'], $event['size'], $event['tag'], $event['price']);\n\t\t\t$stmt->execute();\n\t\t\t\n\t\t\t// get auto generated id\n\t\t\t$eid = $mysqli->insert_id;\n\t\t\t\n\t\t\t$stmt->close();\n\t\t\t\n\t\t\t// grant user host role\n\t\t\tPeopleDAO::set_event_role_pid($pid, $eid, Role::Owner);\n\t\t\treturn $eid;\n\t\t}", "public function add()\n {\n if($this->Auth->user('level') != \"Officer\" && $this->Auth->user('level') != \"Admin\")\n $this->redirect(\n array('controller' => 'Users', 'action' => 'profilehub/' . $this->Auth->user('id')));\n \n if($this->request->is('post'))\n {\n $this->Event->create();\n \n if($this->Event->save($this->request->data))\n {\n $this->redirect('announcements');\n }\n }\n \n $this->loadModel('User');\n $users = $this->User->find('all');\n\n $this->set('user', $users);\n \n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Hub');\n }", "public function push($e);", "public static function add($document, $node, $type, $data, $callback = null) {\n\t\tphpQuery::debug(\"Binding '$type' event\");\n\t\t$documentID = phpQuery::getDocumentID($document);\n//\t\tif (is_null($callback) && is_callable($data)) {\n//\t\t\t$callback = $data;\n//\t\t\t$data = null;\n//\t\t}\n\t\t$eventNode = self::getNode($documentID, $node);\n\t\tif (! $eventNode)\n\t\t\t$eventNode = self::setNode($documentID, $node);\n\t\tif (!isset($eventNode->eventHandlers[$type]))\n\t\t\t$eventNode->eventHandlers[$type] = array();\n\t\t$eventNode->eventHandlers[$type][] = array(\n\t\t\t'callback' => $callback,\n\t\t\t'data' => $data,\n\t\t);\n\t}", "function addEvent($date, $title,$user_id, $fname, $address, $contact, $email, $location, $vlocation, $hour, $minutes, $deal,$guests, $chairs, $tables, $style, $types, $instruction, $confirmation) {\r\n //Include db configuration file\r\n include 'dbConfig.php';\r\n $currentDate = date(\"Y-m-d H:i:s\");\r\n //Insert the event data into database\r\n $insert = $db->query(\"INSERT INTO floralbookings (title,date,created,modified,user_id,fname,address,contact,email,location,vlocation,hour,minutes,deal,guests,chairs,tables,style,types,instruction,confirmation) VALUES ('\" . $title . \"','\" . $date . \"','\" . $currentDate . \"','\" . $currentDate . \"','\" . $user_id . \"','\" . $fname . \"','\" . $address . \"','\" . $contact . \"','\" . $email . \"','\" . $location . \"','\" . $vlocation . \"','\" . $hour . \"','\" . $minutes . \"','\" . $deal . \"','\" . $guests . \"','\" . $chairs . \"','\" . $tables . \"','\" . $style . \"','\" . $types . \"','\" . $instruction . \"','\" . $confirmation . \"')\");\r\n if ($insert) {\r\n echo 'ok';\r\n } else {\r\n echo 'err';\r\n }\r\n}", "public function addAdditionalTargets($event = '') {\n }", "protected final function AddEvent($sEvent, $sCallback, $iAuthLevel=0) {\r\n //For easy purpose\r\n $this->AddEventPreg(\"/^{$sEvent}$/i\", $sCallback, $iAuthLevel);\r\n }", "public function add()\r\n {\r\n $this->start();\r\n $this->write_to_db();\r\n }", "public function londontec_event(){\n\t \n\t\t$id = $this->uri->segment(3);\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/add_londontec_event';\n\t\t$mainData = array(\n\t\t\t'pagetitle' => 'Create londotec event',\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n \n\t}", "function insertEvent($name, $description, $type, $start, $end)\n{\n require_once(\"model/database.php\");\n $query = \"INSERT INTO events (name, description, type, start, end) VALUES(:name, :description, :type, :start, :end);\";\n return executeQueryInsert($query, createBinds([[\":name\", $name], [\":description\", $description], [\":type\", $type], [\":start\", $start], [\":end\", $end]]));\n}", "public function getEventadd($messages = \"\");", "public function addSpan(SpanEvent $span) {\n $this->spanEventStore->register($span);\n }", "function addObject($inObject) {\n\t\tif ( !$inObject instanceof mofilmEvent ) {\n\t\t\t$inObject = mofilmEvent::getInstance($inObject);\n\t\t}\n\t\treturn $this->_setValue($inObject);\n\t}" ]
[ "0.82585233", "0.7873366", "0.75119734", "0.7287034", "0.70022786", "0.67712986", "0.6633644", "0.6628333", "0.6569099", "0.65601563", "0.6539575", "0.64775264", "0.6474296", "0.646055", "0.6453761", "0.64454186", "0.6436427", "0.6385804", "0.6361531", "0.63033867", "0.6238037", "0.619295", "0.6173392", "0.61518174", "0.61421525", "0.6137805", "0.61136925", "0.60775816", "0.60672975", "0.6062464", "0.60618824", "0.6046188", "0.6025293", "0.6019021", "0.60179615", "0.6013525", "0.6004326", "0.5975642", "0.5974263", "0.59674346", "0.5955082", "0.5934241", "0.5923726", "0.59103006", "0.5908744", "0.58902705", "0.5866883", "0.5866201", "0.58375055", "0.5826249", "0.58058983", "0.5800519", "0.57926714", "0.57926714", "0.57813805", "0.57745427", "0.5773788", "0.576744", "0.57625574", "0.57625574", "0.57532346", "0.57425964", "0.57313", "0.5729438", "0.57234895", "0.57216334", "0.57215524", "0.57156914", "0.5714994", "0.5709135", "0.5707579", "0.57020235", "0.57020235", "0.56997764", "0.5696358", "0.56774837", "0.5658974", "0.56548625", "0.56470734", "0.5639399", "0.5630505", "0.5630505", "0.5630505", "0.5615556", "0.5614353", "0.5607794", "0.5601982", "0.55751354", "0.55730844", "0.5567251", "0.5566708", "0.55653286", "0.55630374", "0.55621976", "0.5558521", "0.55558693", "0.55558157", "0.554167", "0.5525146", "0.55173963", "0.55168295" ]
0.0
-1
fetch all http headers
function getallheaders() { $headers = []; if (isset($_SERVER)) { foreach ($_SERVER as $name => $value) { if (substr($name, 0, 5) == 'HTTP_') { $headers[str_replace( ' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))) )] = $value; } } } return $headers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getHeaders();", "public function getHeaders() {}", "public function getHeaders ();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public abstract function getHeaders();", "public function get_headers()\n {\n }", "public function get_headers()\n {\n }", "public function get_headers()\n {\n }", "public function getHeaders()\n {\n }", "public function getHeaders()\n {\n }", "public function getResponseHeaders();", "function getResponseHeaders();", "private function get_headers() {\r\n\t\treturn array( 'User-Agent' => $this->user_agent );\r\n\t}", "public static function getRequestHeaders() {}", "public function getHeaders(): array;", "public function getHeaders(): array;", "public function getHeaders(): array;", "public function getHeaders(): array;", "public function getHeaders(): array;", "public function getHeaders(): array;", "public function getHeaders(): array;", "public function getHeaders()\n {\n \treturn getallheaders();\n }", "public function getallheaders()\n {\n $headers = array();\n\n foreach ($_SERVER as $name => $value) {\n if (substr($name, 0, 5) == 'HTTP_') {\n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n return $headers;\n }", "public function getAllHeaders()\n {\n return $this->headers;\n }", "public static function getAllHeaders()\n {\n if (!function_exists('getallheaders')) {\n $headers = [];\n foreach ($_SERVER as $name => $value) {\n if (substr($name, 0, 5) == 'HTTP_') {\n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n return $headers;\n }\n return getallheaders();\n }", "public function headers() {\n\t\treturn $this->getAllHeaders();\n\t}", "public static function allHeaders()\n {\n return self::$__headers;\n }", "public static function getHeaders(): array {\r\n return function_exists('getallheaders') ? getallheaders() : [];\r\n }", "public function getRequestHeaders();", "#[Pure]\nfunction http_get_request_headers() {}", "private function getHttpHeaders()\n {\n $ret = [];\n foreach ($this->httpConfig->getHeaders() as $k => $v) {\n $ret[] = \"$k: $v\";\n }\n return $ret;\n }", "private static function getHeaders() {\n\t\t$_hdr=array();\n\t\tforeach ($_SERVER as $_key=>$_val)\n\t\t\tif (substr($_key,0,5)=='HTTP_') {\n\t\t\t\t$_hdr[preg_replace_callback(\n\t\t\t\t\t'/\\w+\\b/',\n\t\t\t\t\tfunction($_word) {\n\t\t\t\t\t\treturn ucfirst(strtolower($_word[0]));\n\t\t\t\t\t},\n\t\t\t\t\tstr_replace('_','-',substr($_key,5))\n\t\t\t\t)]=$_val;\n\t\t\t}\n\t\treturn $_hdr;\n\t}", "public function getHeaders()\n {\n $headers[\"HTTP/1.1 $this->_status\"] = true;\n\n if ($this->_status == '200 OK') {\n $headers[\"Connection: close\"] = true;\n $headers[\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\"] = true;\n\n // Try to keep browser from caching any screen to ensure current data.\n if ($this->_preventCache && !isset($this->_headers[\"Expires: 0\"])) {\n $headers[\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\"] = true;\n $headers[\"Cache-Control: no-store, no-cache, must-revalidate\"] = true;\n $headers[\"Pragma: no-cache\"] = true;\n }\n }\n return array_merge($this->_headers, $headers);\n }", "private function requestHeaders() \n {\n // getallheaders available, use that\n if (function_exists('getallheaders')) {\n return getallheaders();\n }\n\n // getallheaders not available: manually extract 'm\n $headers = array();\n foreach ($_SERVER as $name => $value) {\n if ((substr($name, 0, 5) == 'HTTP_') || ($name == 'CONTENT_TYPE') || ($name == 'CONTENT_LENGTH')) {\n $headers[str_replace(array(' ', 'Http'), array('-', 'HTTP'), ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n return $headers;\n }", "public function getHttpHeaders()\n {\n return $this->headers;\n }", "public static function http__get_headers(){\n\n $headers = array();\n foreach($_SERVER as $key => $val){\n if( 0 === stripos( $key, 'http_' ) ){\n $server_key = preg_replace('/^http_/i', '', $key);\n $key_parts = explode('_', $server_key);\n if(count($key_parts) > 0 and strlen($server_key) > 2){\n foreach($key_parts as $part_index => $part){\n $key_parts[$part_index] = function_exists('mb_strtolower') ? mb_strtolower($part) : strtolower($part);\n if(!empty($key_parts[$part_index][0])) {\n\t\t\t\t\t\t\t$key_parts[$part_index][0] = strtoupper($key_parts[$part_index][0]);\n\t\t\t\t\t\t}\n }\n $server_key = implode('-', $key_parts);\n }\n $headers[$server_key] = $val;\n }\n }\n return $headers;\n }", "protected function getAllHeaders()\n {\n $headers = array();\n\n $copy_server = array(\n 'CONTENT_TYPE' => 'Content-Type',\n 'CONTENT_LENGTH' => 'Content-Length',\n 'CONTENT_MD5' => 'Content-Md5',\n );\n\n foreach ($_SERVER as $key => $value) {\n if (substr($key, 0, 5) === 'HTTP_') {\n $key = substr($key, 5);\n if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) {\n $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));\n $headers[$key] = $value;\n }\n } elseif (isset($copy_server[$key])) {\n $headers[$copy_server[$key]] = $value;\n }\n }\n\n if (!isset($headers['Authorization'])) {\n if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {\n $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];\n } elseif (isset($_SERVER['PHP_AUTH_USER'])) {\n $auth_user = $_SERVER['PHP_AUTH_USER'];\n $auth_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : '';\n $auth = base64_encode(\"$auth_user:$auth_pass\");\n $headers['Authorization'] = \"Basic $auth\";\n } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) {\n $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];\n }\n }\n\n return $headers;\n }", "protected static function get_response_headers()\n {\n }", "public function getHeaders() {\n if (!isset($this->rawHeaders) && isset($this->query['opts'][CURLOPT_WRITEHEADER])) {\n rewind($this->query['opts'][CURLOPT_WRITEHEADER]);\n $headersRaw = stream_get_contents($this->query['opts'][CURLOPT_WRITEHEADER]);\n $headers = explode(\"\\n\", rtrim($headersRaw));\n $this->rawHeaders['result'] = trim(array_shift($headers));\n\n foreach ($headers AS $header) {\n \t\t$parts = array_map('trim', explode(':', $header, 2));\n $name = $parts[0];\n $value = '';\n if (!empty($parts[1])) {\n $value = $parts[1];\n }\n $name = strtolower($name);\n $this->rawHeaders[$name] = $value;\n }\n }\n return $this->rawHeaders;\n }", "public function getHeaders()\n\t{\n\t\treturn $this->headers->all();\n\t}", "public function headerHandle()\n\t{\t\n\t\t$headers = array();\n\t\tif(is_array($this->server->all()))\n\t\t{\n\t\t\tforeach($this->server->all() as $key=>$val)\n\t\t\t{\n\t\t\t\tif('http_' == strtolower(substr($key,0,5)))\n\t\t\t\t{\n\t\t\t\t\t$headers[substr($key,5)] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $headers;\n\t}", "private function readHeaders() {\n $headers = $this->status->getHeaders();\n\n foreach ($headers as $key => $value) {\n switch ($key) {\n case \"Location\":\n $this->response['location'] = $value[0];\n break;\n\n case \"Content-Type\":\n $this->response['content_type'] = $value[0];\n break;\n\n case \"Content-Length\":\n $this->response['content_length'] = $value[0];\n break;\n\n default:\n break;\n }\n }\n }", "public function getHttpHeaders()\n {\n return $this->httpHeaders;\n }", "public static function getHeaders()\n {\n if (!isset(self::$_data[self::KEY_HEADERS]))\n {\n $_listHeaders = array();\n foreach ($_SERVER as $_key => $_value)\n {\n if (substr($_key, 0, 5) == \"HTTP_\")\n {\n $_key = str_replace('_', ' ', substr($_key, 5));\n $_key = str_replace(' ', '-', ucwords(strtolower($_key)));\n $_listHeaders[$_key] = $_value;\n }\n }\n self::$_data[self::KEY_HEADERS] = $_listHeaders;\n }\n return self::$_data[self::KEY_HEADERS];\n }", "function getHeaders(){ return $this->_Headers; }", "public function headers(): Collection;", "function getHTTPHeaders(Server $server) {\n\n return [];\n\n }", "public function getHttpHeaders()\n\t\t{\n\t\t\treturn $this->httpHeaders;\n\t\t}", "function nocache_headers()\n {\n }", "#[Pure]\n public function getHeaders() {}", "#[Pure]\n public function getHeaders() {}", "private static function get_headers()\n {\n if (function_exists('apache_request_headers'))\n {\n // we need this to get the actual Authorization: header\n // because apache tends to tell us it doesn't exist\n return apache_request_headers();\n }\n // otherwise we don't have apache and are just going to have to hope\n // that $_SERVER actually contains what we need\n $out = array();\n foreach ($_SERVER as $key => $value)\n {\n if (substr($key, 0, 5) == \"HTTP_\")\n {\n // this is chaos, basically it is just there to capitalize the first\n // letter of every word that is not an initial HTTP and strip HTTP\n // code from przemek\n $key = str_replace(\" \", \"-\", ucwords(strtolower(str_replace(\"_\", \" \", substr($key, 5)))));\n $out[$key] = $value;\n }\n }\n return $out;\n }", "function getHeaders()\n{\n $headers = array();\n foreach ($_SERVER as $k => $v)\n {\n if (substr($k, 0, 5) == \"HTTP_\")\n {\n $k = str_replace('_', ' ', substr($k, 5));\n $k = str_replace(' ', '-', ucwords(strtolower($k)));\n $headers[$k] = $v;\n }\n }\n return $headers;\n}", "function getallheaders()\n{\n if (array_key_exists('getallheaders_return', $GLOBALS)) {\n return $GLOBALS['getallheaders_return'];\n }\n\n return \\getallheaders();\n}", "function request_headers() {\n\t\t$headers = array();\n\t\tforeach( $_SERVER as $key => $value ) {\n\t\t\tif( substr( $key, 0, 5 ) !== 'HTTP_' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$key = str_replace( ' ', '-', ucwords( underscore( substr( $key, 5 ), ' ' ) ) );\n\t\t\t$key = preg_replace_callback( '/\\b(TE|DNT|MD5)\\b/i',function($matches){ return strtoupper($matches[0]); }, $key );\n\t\t\t$headers[$key] = $value;\n\t\t}\n\t\treturn $headers;\n\t}", "public function getHeaders(): array\n {\n }", "protected function getHeaders()\n {\n //Return headers\n return collect($this->headers)->merge([\n 'X-Watson-Learning-Opt-Out' => config('personality-insights.x_watson_learning_opt_out'),\n ])->all();\n }", "public function getHeaders()\n {\n return $this->headerRequested->get();\n }", "public function all(): array\n\t{\n\t\treturn $this->headers;\n\t}", "public function getHeaders(): array\n {\n if ($this->headers === null) {\n foreach ($_SERVER as $name => $value) {\n if (strncmp($name, 'HTTP_', 5) === 0) {\n $name = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))));\n $this->headers[$name] = $value;\n }\n }\n\n return $this->headers;\n }\n\n return $this->headers;\n }", "public function getStatusHeaders() {}", "function getHeaders() {\n\t\treturn $this->getData('headers');\n\t}", "public function getHeaders() {\n\t\treturn $this->getHeader();\n\t}", "public static function get_headers() {\n if (function_exists('apache_request_headers')) {\n // we need this to get the actual Authorization: header\n // because apache tends to tell us it doesn't exist\n $headers = apache_request_headers();\n\n // sanitize the output of apache_request_headers because\n // we always want the keys to be Cased-Like-This and arh()\n // returns the headers in the same case as they are in the\n // request\n $out = array();\n foreach( $headers AS $key => $value ) {\n $key = str_replace(\n \" \",\n \"-\",\n ucwords(strtolower(str_replace(\"-\", \" \", $key)))\n );\n $out[$key] = $value;\n }\n } else {\n // otherwise we don't have apache and are just going to have to hope\n // that $_SERVER actually contains what we need\n $out = array();\n if( isset($_SERVER['CONTENT_TYPE']) )\n $out['Content-Type'] = $_SERVER['CONTENT_TYPE'];\n if( isset($_ENV['CONTENT_TYPE']) )\n $out['Content-Type'] = $_ENV['CONTENT_TYPE'];\n\n foreach ($_SERVER as $key => $value) {\n if (substr($key, 0, 5) == \"HTTP_\") {\n // this is chaos, basically it is just there to capitalize the first\n // letter of every word that is not an initial HTTP and strip HTTP\n // code from przemek\n $key = str_replace(\n \" \",\n \"-\",\n ucwords(strtolower(str_replace(\"_\", \" \", substr($key, 5))))\n );\n $out[$key] = $value;\n }\n }\n }\n return $out;\n }", "public function GetHeaders()\n {\n return HttpResponse::extractHeaders($this->_rawHttpBatchResponse);\n }", "public static function GetHeaders()\n {\n if (!function_exists('getallheaders')) {\n $headers = [];\n foreach ($_SERVER as $name => $value) {\n if (substr($name, 0, 5) == 'HTTP_') {\n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n\n return $headers;\n }\n\n return getallheaders();\n }", "public function getHeaders(){\n return $this->headers;\n }", "public function getAll(): array\n {\n\n\t$url = new Url();\n\n return array_merge(\n apache_request_headers(),\n apache_response_headers(),\n get_headers($url->hostWithSchema($url->getHostIp()), 1)\n );\n\n }", "public function http_headers() {\n\n return array(\n 'User-Agent' => \"Api | BridVideo V1.0\",\n 'X-Site' => $_SERVER['HTTP_HOST'],\n );\n }", "public function headers()\r\n\t\t\t {\r\n return self::headersToArray(explode( \"\\r\\n\", $this->headers ));\r\n\t\t\t }", "protected function readHeaders()\n {\n $ret = [];\n foreach ($this->environment as $key => $value) {\n # Note: the content-type and content-length headers always come\n # after the `CONTENT_TYPE` and `CONTENT_LENGTH` values in the\n # $_SERVER superglobal; if you use the values for the non `HTTP_...`\n # version, they will just be overwritten by the `HTTP_` version.\n if (strpos($key, \"HTTP_\") === 0) {\n $key = substr($key, 5);\n $key = strtolower($key);\n $key = str_replace(\"_\", \"-\", $key);\n $ret[$key] = $value;\n }\n }\n return $ret;\n }", "public function getHeaders(): array\n\t{\n\t\treturn $this->headers();\n\t}", "protected function ResolveHeaders() {\n\n $this->Headers= array();\n foreach($this->GetOption('RequestContext')->SERVER as $Key => $Value) {\n if (strncmp($Key, 'HTTP_', 5) === 0) {\n $Key= substr($Key, 5);\n } elseif (strncmp($Key, 'CONTENT_', 8) !== 0) {\n continue;\n }\n $Key= str_replace('_', '-', $Key);\n $this->Headers[$Key]= $Value;\n }\n }", "public function getHeaders() {\n\t\treturn $this->response_headers;\n\t}", "public function getHeaderList()\n {\n return $this->headers;\n }", "public function getHeaders(): array\n {\n $result = [];\n\n foreach ($this->env as $key => $value) {\n if (stripos($key, 'HTTP_') === 0 && !Text::strEnds($key, '_RAW')) {\n $headerKey = static::normalizeHeaderName(substr($key, 5));\n $result[$headerKey][] = $value;\n }\n }\n\n return $result;\n }", "private function _getHeaders()\n {\n $headers = array(\n \"Content-Type: text/xml\",\n \"HTTP_PRETTY_PRINT: TRUE\",\n );\n\n if ($this->_secretKey) {\n $headers[] = \"KEY: $this->_secretKey\";\n } else {\n $headers[] = \"HTTP_AUTH_LOGIN: $this->_login\";\n $headers[] = \"HTTP_AUTH_PASSWD: $this->_password\";\n }\n\n return $headers;\n }", "public function get_headers($server)\n {\n }", "public function getHeadersRaw(): array;", "public function headers()\r\n {\r\n return $this->headers;\r\n }", "public function headers()\r\n {\r\n return $this->headers;\r\n }", "public function getRequestHeaders()\n {\n return [];\n }", "public function headers() {\n return $this->headers;\n }", "public function getHttpHeaders()\n {\n $headers = array(\n 'Accept' => 'application/xml'\n );\n if ($this->userAgent) {\n $headers['User-Agent'] = $this->userAgent;\n }\n return $headers;\n }", "private function loadHeaders()\n {\n foreach ($_SERVER as $key => $value) {\n $subset = substr($key, 0, 5);\n if ($subset <> 'HTTP_' && $subset <> 'CONTE') {\n continue;\n }\n $header = str_replace(\n ' ',\n '-',\n ucwords(\n str_replace(['http_', '_'], ['', ' '], strtolower($key))\n )\n );\n $this->headers[$this->headerKey($header)] = [$value];\n }\n }", "public function getHTTPHeaders() {\n\t\treturn array(\n\t\t\t'Authorization: Basic '.base64_encode($this->username.':'.$this->password)\n\t\t);\n\t}", "public function getHeaders()\n {\n return apache_request_headers();\n }", "public function getHeaders()\n {\n return $this->source['headers'];\n }", "public function getHeaders(): array\n {\n return $this->headers;\n }", "public function getHeaders(): array\n {\n return $this->headers;\n }", "public function getHeaders(): array\n {\n return $this->headers;\n }" ]
[ "0.81107736", "0.8105792", "0.80952203", "0.8077436", "0.8077436", "0.8077436", "0.8077436", "0.8077436", "0.8077436", "0.8077436", "0.8077436", "0.8077436", "0.8077436", "0.8053047", "0.7752408", "0.7752408", "0.7751078", "0.77038574", "0.77038574", "0.7689406", "0.765387", "0.7647506", "0.7586462", "0.75591165", "0.75591165", "0.75591165", "0.75591165", "0.75591165", "0.75591165", "0.75591165", "0.75555", "0.75193965", "0.7492721", "0.7478442", "0.74726665", "0.74572885", "0.7453423", "0.74240357", "0.7380749", "0.7360339", "0.73524266", "0.73284936", "0.7287957", "0.7285943", "0.72856086", "0.7279181", "0.7276246", "0.7266667", "0.7258859", "0.7258244", "0.7253398", "0.7244209", "0.72249925", "0.72111976", "0.72088075", "0.7208515", "0.7197913", "0.7186817", "0.7180756", "0.7180756", "0.71448314", "0.7129189", "0.7129155", "0.71094674", "0.710218", "0.70979106", "0.7094492", "0.70897216", "0.70718426", "0.70636", "0.7057245", "0.7050114", "0.70293534", "0.7029297", "0.70226496", "0.70214033", "0.6992043", "0.69901854", "0.698912", "0.69807684", "0.6978846", "0.69677776", "0.6967639", "0.69594437", "0.6955243", "0.6944433", "0.69423205", "0.692827", "0.69207823", "0.69207823", "0.6912663", "0.6907373", "0.6906713", "0.6902069", "0.6885544", "0.68823314", "0.6880842", "0.68758136", "0.68758136", "0.68758136" ]
0.76246667
22
return the a response object
function response($content = '', $statusCode = 200) { return new \Anonym\Http\Response($content, $statusCode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_response_object()\n {\n }", "function response() {\n return new Response;\n }", "protected function _getResponse() {\n\t\treturn new Response;\n\t}", "public function & GetResponse ();", "function get_response() {\n return $this->response;\n }", "public function get_response()\n {\n return $this->response; \n }", "public function as_response() {\n return Net_HTTP::Response($this);\n }", "protected function _response() {}", "protected function createHttpResponse()\n {\n return new Response();\n }", "public function response();", "abstract public function response();", "public function get_response()\n\t{\n\t\treturn $this->response;\n\t}", "public function get_response()\n\t{\n\t\treturn $this->response;\n\t}", "public function getResponse() {}", "public function getResponse() {}", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse()\r\n\t{\r\n\t\treturn $this -> response;\r\n\t}", "public function response ();", "public function getResponseObject()\n {\n return $this->response_object;\n }", "public function createResponse()\n {\n return new Response;\n }", "public static function response(): Response\n {\n return new Response;\n }", "protected function getResponse()\n {\n return $this->response;\n }", "public function getResponse() : Response\n {\n return $this->response;\n }", "public function response()\r\n {\r\n return $this->response;\r\n }", "public function response()\r\n {\r\n return $this->response;\r\n }", "public function get_response () {\n $this->process_form();\n\n if (!$this->response) {\n $this->response=new Ctz_response();\n }\n\n return $this->response;\n }", "public function getResponse() {\n\t}", "public function prepareResponse();", "public function getResponse() {\n }", "public function response()\n {\n return $this->response;\n }", "public function response()\n {\n return $this->response;\n }", "protected function getResponse()\n {\n return $this->response;\n }", "public function response()\n\t\t{\n\t\t\treturn $this->response;\n\t\t}", "public function getResponse()\n {\n if (is_null($this->_response)) {\n $this->_response = new Response();\n }\n return $this->_response;\n }", "function getResponse() {\n\t\treturn $this->Response;\n\t}", "private function respond()\n {\n $this->response->header('Content-Type', 'application/json');\n return $this->response;\n }", "public function getResponse(): ResponseInterface;", "public function getResponse(): ResponseInterface;", "public function getResponse(){\n switch($this->format){\n case 'json':\n $this->response_type = 'application/json';\n return $this -> getJSON();\n break;\n case 'xml':\n $this->response_type = 'text/xml';\n return $this -> getXML();\n break;\n default:\n $this->response_type = 'application/json';\n return $this -> getJSON();\n break;\n }\n }", "public function getResponse ()\n {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "private function response() {\n if ($this->responseStatus !== 200) {\n $this->request['format'] = self::DEFAULT_RESPONSE_FORMAT;\n }\n $method = $this->request['format'] . 'Response';\n $this->response = array('status' => $this->responseStatus, 'body' => $this->$method());\n return $this;\n }", "public function getResponse()\n\t{\n\t\t$outGoingResponse = $this->response;\n\t\t$request = $this->request;\n\n\t\t$headers = $outGoingResponse->getHeaders();\n\t\t$status_code = (isset($headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS])) ? $headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS] : 200;\n\t\tunset($headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS]);\n\n\t\t$response = new Response(trim($outGoingResponse->getStream()), $status_code, array_filter($headers));\n\t\t$response->prepare($request->getRequest());\n\n\t\treturn $response;\n\t}", "public function getResponseObject()\n {\n return $this->responseObject;\n }", "public function getResponseObject()\n {\n return $this->responseObject;\n }", "public function getResponseObject()\n {\n return $this->responseObject;\n }", "public function getResponse()\n {\n }", "public function getResponse(){\n \n return $this->response;\n \n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }" ]
[ "0.8195948", "0.7935032", "0.7910246", "0.77957284", "0.7773186", "0.7695542", "0.7660081", "0.7543628", "0.7541058", "0.7494006", "0.7489575", "0.7488944", "0.7488944", "0.74828273", "0.74828273", "0.74703586", "0.74703586", "0.74703586", "0.74703586", "0.74703586", "0.74703586", "0.74703586", "0.74703586", "0.74703586", "0.74703586", "0.74703586", "0.74537176", "0.7440504", "0.7430155", "0.74193263", "0.7329274", "0.7320283", "0.7307879", "0.7300854", "0.7300854", "0.72669786", "0.726001", "0.7248535", "0.72398037", "0.72147703", "0.72147703", "0.7204835", "0.7194006", "0.7183744", "0.7180523", "0.7172654", "0.71498775", "0.71498775", "0.7149558", "0.7145377", "0.7143554", "0.7143554", "0.7143554", "0.7141346", "0.71388227", "0.71382743", "0.71382743", "0.71382743", "0.7130659", "0.71216965", "0.7118726", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811", "0.7083811" ]
0.0
-1
get the registered csrf token
function csrf_active() { return Csrf::getToken(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function csrf_token()\n\t{\n\t\tif(isset($_SESSION['csrf_token'])) return $_SESSION['csrf_token'];\n\t\telse return NULL;\n\t}", "public static function get_token() {\n\t\t\t\n\t\t\t// Bring in the $session variable\n\t\t\tglobal $session;\n\t\t\t// Check if there is a csrf_token in the $_SESSION\n\t\t\tif(!$session->get('csrf_token')) {\n\t\t\t\t// Token doesn't exist, create one\n\t\t\t\tself::set_token();\n\t\t\t} \n\t\t\t// Return the token\n\t\t\treturn $session->get('csrf_token');\n\t\t}", "public function get_csrf_token() {\n if(isset($_SESSION['token_value'])) {\n return $_SESSION['token_value']; \n } else {\n $token = hash('sha256', self::$instance->random(500));\n\n self::$instance->startSession();\n\n $_SESSION['token_value'] = $token;\n return $token;\n }\n \n\t}", "public function getCSRFToken():string;", "public function getCSRFToken() {\r\n\t // The CSRF token should always be stored in the user's session.\r\n\t // If it doesn't, the user is not logged in.\r\n\t return $this->input('session', 'token');\r\n\t}", "function get_csrf_token() {\n if($this->has_csrf_token()) {\n return $this->options['csrfToken'];\n }\n }", "function csrf_token()\n {\n return shy(Shy\\Http\\Contracts\\Session::class)->token();\n }", "public function loadTokenCSRFToken();", "public function getToken()\n {\n if (!isset($_SESSION['MFW_csrf-token'])) {\n $this->generateNewToken(128);\n }\n\n return $_SESSION['MFW_csrf-token'];\n }", "public static function csrfTokenGet() {\n $csrfToken = null;\n\n if(!isset($_SESSION['csrfTokenCreatedAt']) || ($_SESSION['csrfTokenCreatedAt'] - time() > 21600)) { //1hr\n $_SESSION['csrfToken'] = password_hash(uniqid(self::$applicationName), PASSWORD_BCRYPT);\n $_SESSION['csrfTokenCreatedAt'] = time();\n }\n $csrfToken = $_SESSION['csrfToken'];\n\n return $csrfToken;\n }", "function csrf_token()\n {\n return app()->make('session')->token();\n }", "public function getCsrfToken()\n\t{\n\t\treturn $this->headers->get('CSRF_TOKEN')===null ? null : $this->headers->get('CSRF_TOKEN');\n\t}", "function csrf() {\n return $_SESSION['csrf'];\n }", "public function getCSRF(){\n if( isset($_POST[\"X-Csrf-Token\"]) ){\n if( Crypt::getCSRF($this->__route->getCSRFName()) == $_POST[\"X-Csrf-Token\"] ){\n return $_POST[\"X-Csrf-Token\"];\n }\n }\n else if( $this->header(\"X-Csrf-Token\") !== null ){\n if( Crypt::getCSRF($this->__route->getCSRFName()) == $this->header(\"X-Csrf-Token\") ){\n return $this->header(\"X-Csrf-Token\");\n }\n }\n return null;\n }", "public function get_csrf_token()\n {\n if (!empty($_SESSION['phery']['csrf']))\n {\n return $_SESSION['phery']['csrf'];\n }\n\n return false;\n }", "public function getCsrfToken(): CsrfTokenInterface;", "private static function create_csrf_token() {\n\t\t$token = self::csrf_token ();\n\t\t$_SESSION ['csrf_token'] = $token;\n\t\t$_SESSION ['csrf_token_time'] = time ();\n\t\treturn $token;\n\t}", "public function generateCSRFToken();", "private static function getCsrfToken()\n {\n $key = WOLFF_CONFIG['csrf_key'];\n if (!isset($_COOKIE[$key])) {\n $token = bin2hex(random_bytes(8));\n setcookie($key, $token, time() + self::TOKEN_TIME, '/', '', false, true);\n\n return $token;\n }\n\n return $_COOKIE[$key];\n }", "protected function getToken()\n {\n if (!isset($_SESSION['MFW_csrf-token'])) {\n throw new RuntimeException('There is no CSRF token generated.');\n }\n\n return $_SESSION['MFW_csrf-token'];\n }", "function csrf_token(){\n $token = sha1( rand(1, 1000) . '$$' . date('H.i.s') . 'digg' );\n $_SESSION['csrf_token'] = $token;\n return $token;\n }", "public function getCsrfToken()\n\t{\n\t\tif ($this->_csrfToken === null)\n\t\t{\n\t\t\t$cookie = $this->getCookies()->itemAt($this->csrfTokenName);\n\n\t\t\t// Reset the CSRF token cookie if it's not set, or for another user.\n\t\t\tif (!$cookie || ($this->_csrfToken = $cookie->value) == null || !$this->csrfTokenValidForCurrentUser($cookie->value))\n\t\t\t{\n\t\t\t\t$cookie = $this->createCsrfCookie();\n\t\t\t\t$this->_csrfToken = $cookie->value;\n\t\t\t\t$this->getCookies()->add($cookie->name, $cookie);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_csrfToken;\n\t}", "public function getCsrf()\n {\n return $this->security->getToken();\n }", "public function getCsrf()\n {\n return $this->security->getToken();\n }", "public function get_csrf_id() {\n\n\n if(isset($_SESSION['token_id'])) { \n return $_SESSION['token_id'];\n } else {\n $token_id = $this->random(10);\n\n self::$instance->startSession();\n\n $_SESSION['token_id'] = $token_id;\n return $token_id;\n }\n\t}", "function create_csrf_token() {\n\t$token = csrf_token();\n $_SESSION['csrf_token'] = $token;\n \t$_SESSION['csrf_token_time'] = time();\n\treturn $token;\n}", "public function getCsrfTokenFromSession()\n {\n return $_SESSION['phpmyfaq_csrf_token'];\n }", "protected function getCsrf()\n {\n if (empty($_SESSION['csrf'])) {\n $this->setCsrf();\n }\n\n $this->csrf_token = $_SESSION['csrf'] ? $_SESSION['csrf'] : null;\n\n return $this->csrf_token;\n }", "public static function getXSRFToken() {\r\n return !is_null(Session::get('xsrf_token')) ? Session::get('xsrf_token') : NULL;\r\n }", "public function get_csrf_token_name()\n\t{\n\t\treturn $this->_csrf_token_name;\n\t}", "public function generateCsrfToken()\n {\n return call_user_func($this->tokenGenerator);\n }", "public function getCsrfToken() {\n if (!$this->securityContext->isInitialized() || !$this->authenticationManager->isAuthenticated()) {\n return '';\n }\n $csrfToken = $this->securityContext->getCsrfProtectionToken();\n\n return $csrfToken;\n }", "public static function getSubmittedXSRFToken() {\r\n return isset($_POST['xsrf_token']) ? $_POST['xsrf_token'] : NULL;\r\n }", "function csrf_field()\n {\n $token = app()->services()->session()->CSRFToken;\n return \"<input type='hidden' name='csrf_token' value='$token'>\";\n }", "function csrf_token(): ?string\n{\n $appKey = env('APP_KEY');\n\n if (!$appKey) {\n throw AppException::missingAppKey();\n }\n\n return Csrf::generateToken(session(), $appKey);\n}", "public function csrf()\r\n\t{\r\n\t\treturn Form::hidden('csrf', Security::token());\r\n\t}", "public function it_gets_the_csrf_token()\n {\n $response = $this->call('GET', '/frontend/session/csrf');\n $this->assertSame($response->content(), csrf_token());\n }", "public function get_request_token()\n {\n $sess_id = $_COOKIE[ini_get('session.name')];\n if (!$sess_id) $sess_id = session_id();\n $plugin = $this->plugins->exec_hook('request_token', array('value' => md5('RT' . $this->get_user_id() . $this->config->get('des_key') . $sess_id)));\n return $plugin['value'];\n }", "function csrf(){\n\treturn 'csrf=' . $_SESSION['csrf'];\n}", "function csrf()\n{\n $csrfToken = md5(uniqid(mt_rand(), true));\n\n $_SESSION['csrfToken'] = $csrfToken;\n $res['input'] = '<input type=\"hidden\" name=\"csrfKey\" value=\"' . $csrfToken . '\" />';\n $res['token'] = $csrfToken;\n return $res;\n}", "function csrf_field()\n {\n return '<input type=\"hidden\" name=\"_token\" value=\"' . csrf_token() . '\">';\n }", "public function getToken()\n {\n // if the user isn't authenticated simply return null\n $services = $this->services;\n if (!$services->get('permissions')->is('authenticated')) {\n return null;\n }\n\n // if we don't have a token; make one\n $session = $services->get('session');\n $container = new SessionContainer(static::CSRF_CONTAINER, $session);\n if (!$container['token']) {\n $session->start();\n $container['token'] = (string) new Uuid;\n $session->writeClose();\n }\n\n return $container['token'];\n }", "private function getToken(): ?string\n {\n $request = $this->requestStack->getCurrentRequest();\n\n $token = null;\n\n\n if (null !== $request) {\n $token = $request->headers->get('token', null);\n }\n\n $this->token = $token;\n\n return $token;\n }", "private function getCsrf(){\n\t\treturn array(\n\t\t\t'name' => $this->security->get_csrf_token_name(),\n\t\t\t'token' => $this->security->get_csrf_hash(),\n\t\t);\n\t}", "function csrf_token() {\n\treturn md5(uniqid(rand(), TRUE));\n}", "public static function _SetToken()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tIf ( session_status() !== PHP_SESSION_ACTIVE )\r\n\t\t\t{\r\n\t\t\t\tsession_start();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( ! Session::has( 'CSRFToken' ) )\r\n\t\t\t{\r\n\t\t\t\tSession::set( 'CSRFToken' , Hashing::instance()->uniqidReal( 64 ) . '-' . time() );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn Session::get( 'CSRFToken' );\r\n\t\t}", "public function addCsrfToken();", "private static function csrf_token() {\n\t\treturn md5 ( uniqid ( rand (), TRUE ) );\n\t}", "public function getMetaCsrfToken()\n {\n return $this->hasMetaCsrfToken() ? $this->server['HTTP_X_CSRF_TOKEN'] : false;\n }", "public function getSecurityToken()\n {\n return $this->token;\n }", "function generate_csrftoken()\n{\n if (!isset($_SESSION[\"csrf_token\"])) $_SESSION[\"csrf_token\"] = bin2hex(random_bytes(64));\n return $_SESSION[\"csrf_token\"];\n}", "function csrf_token_tag() {\n\t$token = create_csrf_token();\n\treturn \"<input class=\\\"form-control\\\" type=\\\"hidden\\\" name=\\\"csrf_token\\\" value=\\\"\".$token.\"\\\">\";\n}", "public function getToken()\n\t{\n\t\treturn static::createFormToken($this->target_form_id ? $this->target_form_id : $this->id);\n\t}", "function csrf_field()\n {\n return new HtmlString('<input type=\"hidden\" name=\"_token\" value=\"' . csrf_token() . '\">');\n }", "public function getToken()\n {\n return $this->controller->getToken();\n }", "public static function csrf_token_tag() {\n\t\t$token = self::create_csrf_token ();\n\t\treturn \"<input type=\\\"hidden\\\" name=\\\"csrf_token\\\" value=\\\"\" . $token . \"\\\">\";\n\t}", "public function getToken()\n {\n return $this->getApplication()->getSecurityContext()->getToken();\n }", "function token(){\n return Request::session('internal_token');\n}", "function loadToken() {\r\n\t\treturn isset($_SESSION['token']) ? $_SESSION['token'] : null;\r\n\t}", "static function token_compiler ()\n {\n return '<input type=\"hidden\" name=\"_token\" value=\"<?=csrf_token()?>\">';\n }", "protected function generate_csrf_token() {\n \n if(!isset($_SESSION['rpf_csrf_tokens'])) { \n $_SESSION['rpf_csrf_tokens'] = array();\n }\n\n $csrf_token = md5(mt_rand());\n while(in_array($csrf_token, $_SESSION['rpf_csrf_tokens'])) {\n $csrf_token = md5(mt_rand());\n } \n $_SESSION['rpf_csrf_tokens'][] = $csrf_token;\n\n return $csrf_token;\n }", "public static function getSecurityToken()\n {\n return Utilities::getSecurityToken();\n }", "private function getCSRFTokenValue($html)\n {\n if (!preg_match('~<meta name=\"csrf-token\" content=\"([^\"]+)\">~', $html, $matches)) {\n $this->fail(\"No CSRF-token meta tag found. HTML was:\\n$html\");\n }\n\n return $matches[1];\n }", "public function getToken()\n {\n $value = $this->getParameter('token');\n $value = $value ?: $this->httpRequest->query->get('token');\n return $value;\n }", "function csrf_token_is_valid()\r\n{\r\n if (isset($_POST['csrf_token'])) {\r\n $user_token = $_POST['csrf_token'];\r\n $stored_token = $_SESSION['csrf_token'];\r\n return $user_token === $stored_token;\r\n }\r\n\r\n return false;\r\n}", "public function getToken()\n {\n return $this->getSecurityContext()->getToken();\n }", "function csrf()\n {\n if (!isset($_SESSION['csrf_tokens'])) {\n $_SESSION['csrf_tokens'] = [];\n }\n\n $csrfString = generateRandomString();\n $_SESSION['csrf_tokens'][] = $csrfString;\n\n print \"<input type='hidden' name='csrf_token' value='$csrfString'>\";\n }", "private function createCsrfToken()\n {\n return sha1(microtime().$this->getLogin());\n }", "function getCSRF()\n{\n\t$return[\"csrf\"] = $_SESSION[\"csrf\"];\n\t$return[\"pastCsrf\"] = $_SESSION[\"pastCsrf\"];\n\n\treturn $return;\n}", "public function getToken() {\n return $this->token;\n }", "function get_token()\n\t{\n\t\treturn session_id();\n\t}", "function setCSRFToken(string $requestName = \"\"): string\n{\n $token = getRandomString();\n $_SESSION[$requestName . \"_csrf_token\"] = $token;\n $_SESSION[$requestName . \"_csrf_time\"] = time();\n return $token;\n}", "public function get_token() {\n\t\treturn $this->token;\n\t}", "public function getToken()\r\n {\r\n return $this->token;\r\n }", "public function getToken()\r\n {\r\n return $this->token;\r\n }", "public function getSecurityToken()\n {\n return ($this->_widgetEditor->getForm() ? $this->_widgetEditor->getForm()->getSecurityToken() : null);\n }", "public function getToken() {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public static function getToken() {\n return session(\"auth_token\", \"\");\n }", "public function getToken ()\n {\n return $this->token;\n }", "private function get_token() {\n\n\t\t$query = filter_input( INPUT_GET, 'mwp-token', FILTER_SANITIZE_STRING );\n\t\t$header = filter_input( INPUT_SERVER, 'HTTP_AUTHORIZATION', FILTER_SANITIZE_STRING );\n\n\t\treturn ( $query ) ? $query : ( $header ? $header : null );\n\n\t}", "public function getToken()\n {\n $tokenValidator = new \\Paggi\\SDK\\TokenValidation(); //self::$container->get('TokenValidation');\n if (!$tokenValidator->isValidToken(self::$token)) {\n return false;\n }\n return self::$token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function token()\n {\n return $this->token['token'] ?? null;\n }", "public function get_key() {\n\t\treturn self::$csrf_cookie;\n\t}", "private function createCSRFToken() {\r\n\t \r\n\t // Check that the token is still valid\r\n\t if( empty($this->input('session', 'token_creation')) ||\r\n\t (time() - $this->input('session', 'token_creation')) > TOKEN_KEEPALIVE ) {\r\n \t\t// The token needs to be refreshed, delete every previous request token for the user\r\n \t\tSecurity::deleteToken();\r\n \t\t\r\n \t\t// Create a new token\r\n \t\t$token = Security::generateToken();\r\n \t\t\r\n \t\t// Store the token in the session\r\n \t\t$this->input('session', 'token', $token);\r\n \t\t\r\n \t\t// Set the token creation time to the current time\r\n \t\t$this->input('session', 'token_creation', (string)time());\r\n\t }\r\n\t\t\r\n\t\t// Set the token in the template\r\n\t\t$this->output->setArguments(array(VAR_CSRF_TOKEN => $this->input('session', 'token')));\r\n\t}" ]
[ "0.81229323", "0.8105226", "0.8049665", "0.7947411", "0.7923958", "0.7922367", "0.78320444", "0.7819995", "0.7723846", "0.76975983", "0.7653622", "0.7641402", "0.7606729", "0.75858647", "0.7577079", "0.75184095", "0.74754775", "0.7471479", "0.7433906", "0.7387769", "0.73646706", "0.735225", "0.7347756", "0.7347756", "0.7275505", "0.7271663", "0.72652245", "0.7201543", "0.7196359", "0.7165947", "0.71070814", "0.7072019", "0.70501333", "0.6969423", "0.6966314", "0.6925049", "0.69249004", "0.69137686", "0.6908513", "0.68770295", "0.6858248", "0.68554705", "0.68229413", "0.6817916", "0.6812991", "0.6807711", "0.6788886", "0.6778403", "0.67318517", "0.6726193", "0.6724538", "0.6719311", "0.6689108", "0.66878045", "0.66317564", "0.6599531", "0.6538496", "0.652031", "0.65051425", "0.6493264", "0.6483816", "0.6481238", "0.6480648", "0.64804083", "0.6479912", "0.6475461", "0.64381385", "0.6436382", "0.64357114", "0.6426189", "0.64237916", "0.6423633", "0.6423316", "0.64206433", "0.64206433", "0.6417734", "0.64088523", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6395082", "0.6392232", "0.6386295", "0.63825804", "0.6382336", "0.6379759", "0.6377173", "0.63656044" ]
0.78851616
6
get the registered csrf token
function app($name = null) { return null === $name ? App::make('app') : App::make($name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function csrf_token()\n\t{\n\t\tif(isset($_SESSION['csrf_token'])) return $_SESSION['csrf_token'];\n\t\telse return NULL;\n\t}", "public static function get_token() {\n\t\t\t\n\t\t\t// Bring in the $session variable\n\t\t\tglobal $session;\n\t\t\t// Check if there is a csrf_token in the $_SESSION\n\t\t\tif(!$session->get('csrf_token')) {\n\t\t\t\t// Token doesn't exist, create one\n\t\t\t\tself::set_token();\n\t\t\t} \n\t\t\t// Return the token\n\t\t\treturn $session->get('csrf_token');\n\t\t}", "public function get_csrf_token() {\n if(isset($_SESSION['token_value'])) {\n return $_SESSION['token_value']; \n } else {\n $token = hash('sha256', self::$instance->random(500));\n\n self::$instance->startSession();\n\n $_SESSION['token_value'] = $token;\n return $token;\n }\n \n\t}", "public function getCSRFToken():string;", "public function getCSRFToken() {\r\n\t // The CSRF token should always be stored in the user's session.\r\n\t // If it doesn't, the user is not logged in.\r\n\t return $this->input('session', 'token');\r\n\t}", "function get_csrf_token() {\n if($this->has_csrf_token()) {\n return $this->options['csrfToken'];\n }\n }", "function csrf_active()\n {\n return Csrf::getToken();\n }", "function csrf_token()\n {\n return shy(Shy\\Http\\Contracts\\Session::class)->token();\n }", "public function loadTokenCSRFToken();", "public function getToken()\n {\n if (!isset($_SESSION['MFW_csrf-token'])) {\n $this->generateNewToken(128);\n }\n\n return $_SESSION['MFW_csrf-token'];\n }", "public static function csrfTokenGet() {\n $csrfToken = null;\n\n if(!isset($_SESSION['csrfTokenCreatedAt']) || ($_SESSION['csrfTokenCreatedAt'] - time() > 21600)) { //1hr\n $_SESSION['csrfToken'] = password_hash(uniqid(self::$applicationName), PASSWORD_BCRYPT);\n $_SESSION['csrfTokenCreatedAt'] = time();\n }\n $csrfToken = $_SESSION['csrfToken'];\n\n return $csrfToken;\n }", "function csrf_token()\n {\n return app()->make('session')->token();\n }", "public function getCsrfToken()\n\t{\n\t\treturn $this->headers->get('CSRF_TOKEN')===null ? null : $this->headers->get('CSRF_TOKEN');\n\t}", "function csrf() {\n return $_SESSION['csrf'];\n }", "public function getCSRF(){\n if( isset($_POST[\"X-Csrf-Token\"]) ){\n if( Crypt::getCSRF($this->__route->getCSRFName()) == $_POST[\"X-Csrf-Token\"] ){\n return $_POST[\"X-Csrf-Token\"];\n }\n }\n else if( $this->header(\"X-Csrf-Token\") !== null ){\n if( Crypt::getCSRF($this->__route->getCSRFName()) == $this->header(\"X-Csrf-Token\") ){\n return $this->header(\"X-Csrf-Token\");\n }\n }\n return null;\n }", "public function get_csrf_token()\n {\n if (!empty($_SESSION['phery']['csrf']))\n {\n return $_SESSION['phery']['csrf'];\n }\n\n return false;\n }", "public function getCsrfToken(): CsrfTokenInterface;", "private static function create_csrf_token() {\n\t\t$token = self::csrf_token ();\n\t\t$_SESSION ['csrf_token'] = $token;\n\t\t$_SESSION ['csrf_token_time'] = time ();\n\t\treturn $token;\n\t}", "public function generateCSRFToken();", "private static function getCsrfToken()\n {\n $key = WOLFF_CONFIG['csrf_key'];\n if (!isset($_COOKIE[$key])) {\n $token = bin2hex(random_bytes(8));\n setcookie($key, $token, time() + self::TOKEN_TIME, '/', '', false, true);\n\n return $token;\n }\n\n return $_COOKIE[$key];\n }", "protected function getToken()\n {\n if (!isset($_SESSION['MFW_csrf-token'])) {\n throw new RuntimeException('There is no CSRF token generated.');\n }\n\n return $_SESSION['MFW_csrf-token'];\n }", "function csrf_token(){\n $token = sha1( rand(1, 1000) . '$$' . date('H.i.s') . 'digg' );\n $_SESSION['csrf_token'] = $token;\n return $token;\n }", "public function getCsrfToken()\n\t{\n\t\tif ($this->_csrfToken === null)\n\t\t{\n\t\t\t$cookie = $this->getCookies()->itemAt($this->csrfTokenName);\n\n\t\t\t// Reset the CSRF token cookie if it's not set, or for another user.\n\t\t\tif (!$cookie || ($this->_csrfToken = $cookie->value) == null || !$this->csrfTokenValidForCurrentUser($cookie->value))\n\t\t\t{\n\t\t\t\t$cookie = $this->createCsrfCookie();\n\t\t\t\t$this->_csrfToken = $cookie->value;\n\t\t\t\t$this->getCookies()->add($cookie->name, $cookie);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_csrfToken;\n\t}", "public function getCsrf()\n {\n return $this->security->getToken();\n }", "public function getCsrf()\n {\n return $this->security->getToken();\n }", "public function get_csrf_id() {\n\n\n if(isset($_SESSION['token_id'])) { \n return $_SESSION['token_id'];\n } else {\n $token_id = $this->random(10);\n\n self::$instance->startSession();\n\n $_SESSION['token_id'] = $token_id;\n return $token_id;\n }\n\t}", "function create_csrf_token() {\n\t$token = csrf_token();\n $_SESSION['csrf_token'] = $token;\n \t$_SESSION['csrf_token_time'] = time();\n\treturn $token;\n}", "public function getCsrfTokenFromSession()\n {\n return $_SESSION['phpmyfaq_csrf_token'];\n }", "protected function getCsrf()\n {\n if (empty($_SESSION['csrf'])) {\n $this->setCsrf();\n }\n\n $this->csrf_token = $_SESSION['csrf'] ? $_SESSION['csrf'] : null;\n\n return $this->csrf_token;\n }", "public static function getXSRFToken() {\r\n return !is_null(Session::get('xsrf_token')) ? Session::get('xsrf_token') : NULL;\r\n }", "public function get_csrf_token_name()\n\t{\n\t\treturn $this->_csrf_token_name;\n\t}", "public function generateCsrfToken()\n {\n return call_user_func($this->tokenGenerator);\n }", "public function getCsrfToken() {\n if (!$this->securityContext->isInitialized() || !$this->authenticationManager->isAuthenticated()) {\n return '';\n }\n $csrfToken = $this->securityContext->getCsrfProtectionToken();\n\n return $csrfToken;\n }", "public static function getSubmittedXSRFToken() {\r\n return isset($_POST['xsrf_token']) ? $_POST['xsrf_token'] : NULL;\r\n }", "function csrf_field()\n {\n $token = app()->services()->session()->CSRFToken;\n return \"<input type='hidden' name='csrf_token' value='$token'>\";\n }", "function csrf_token(): ?string\n{\n $appKey = env('APP_KEY');\n\n if (!$appKey) {\n throw AppException::missingAppKey();\n }\n\n return Csrf::generateToken(session(), $appKey);\n}", "public function csrf()\r\n\t{\r\n\t\treturn Form::hidden('csrf', Security::token());\r\n\t}", "public function it_gets_the_csrf_token()\n {\n $response = $this->call('GET', '/frontend/session/csrf');\n $this->assertSame($response->content(), csrf_token());\n }", "public function get_request_token()\n {\n $sess_id = $_COOKIE[ini_get('session.name')];\n if (!$sess_id) $sess_id = session_id();\n $plugin = $this->plugins->exec_hook('request_token', array('value' => md5('RT' . $this->get_user_id() . $this->config->get('des_key') . $sess_id)));\n return $plugin['value'];\n }", "function csrf(){\n\treturn 'csrf=' . $_SESSION['csrf'];\n}", "function csrf()\n{\n $csrfToken = md5(uniqid(mt_rand(), true));\n\n $_SESSION['csrfToken'] = $csrfToken;\n $res['input'] = '<input type=\"hidden\" name=\"csrfKey\" value=\"' . $csrfToken . '\" />';\n $res['token'] = $csrfToken;\n return $res;\n}", "function csrf_field()\n {\n return '<input type=\"hidden\" name=\"_token\" value=\"' . csrf_token() . '\">';\n }", "public function getToken()\n {\n // if the user isn't authenticated simply return null\n $services = $this->services;\n if (!$services->get('permissions')->is('authenticated')) {\n return null;\n }\n\n // if we don't have a token; make one\n $session = $services->get('session');\n $container = new SessionContainer(static::CSRF_CONTAINER, $session);\n if (!$container['token']) {\n $session->start();\n $container['token'] = (string) new Uuid;\n $session->writeClose();\n }\n\n return $container['token'];\n }", "private function getToken(): ?string\n {\n $request = $this->requestStack->getCurrentRequest();\n\n $token = null;\n\n\n if (null !== $request) {\n $token = $request->headers->get('token', null);\n }\n\n $this->token = $token;\n\n return $token;\n }", "private function getCsrf(){\n\t\treturn array(\n\t\t\t'name' => $this->security->get_csrf_token_name(),\n\t\t\t'token' => $this->security->get_csrf_hash(),\n\t\t);\n\t}", "function csrf_token() {\n\treturn md5(uniqid(rand(), TRUE));\n}", "public static function _SetToken()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tIf ( session_status() !== PHP_SESSION_ACTIVE )\r\n\t\t\t{\r\n\t\t\t\tsession_start();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( ! Session::has( 'CSRFToken' ) )\r\n\t\t\t{\r\n\t\t\t\tSession::set( 'CSRFToken' , Hashing::instance()->uniqidReal( 64 ) . '-' . time() );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn Session::get( 'CSRFToken' );\r\n\t\t}", "public function addCsrfToken();", "private static function csrf_token() {\n\t\treturn md5 ( uniqid ( rand (), TRUE ) );\n\t}", "public function getMetaCsrfToken()\n {\n return $this->hasMetaCsrfToken() ? $this->server['HTTP_X_CSRF_TOKEN'] : false;\n }", "public function getSecurityToken()\n {\n return $this->token;\n }", "function generate_csrftoken()\n{\n if (!isset($_SESSION[\"csrf_token\"])) $_SESSION[\"csrf_token\"] = bin2hex(random_bytes(64));\n return $_SESSION[\"csrf_token\"];\n}", "function csrf_token_tag() {\n\t$token = create_csrf_token();\n\treturn \"<input class=\\\"form-control\\\" type=\\\"hidden\\\" name=\\\"csrf_token\\\" value=\\\"\".$token.\"\\\">\";\n}", "public function getToken()\n\t{\n\t\treturn static::createFormToken($this->target_form_id ? $this->target_form_id : $this->id);\n\t}", "function csrf_field()\n {\n return new HtmlString('<input type=\"hidden\" name=\"_token\" value=\"' . csrf_token() . '\">');\n }", "public function getToken()\n {\n return $this->controller->getToken();\n }", "public static function csrf_token_tag() {\n\t\t$token = self::create_csrf_token ();\n\t\treturn \"<input type=\\\"hidden\\\" name=\\\"csrf_token\\\" value=\\\"\" . $token . \"\\\">\";\n\t}", "public function getToken()\n {\n return $this->getApplication()->getSecurityContext()->getToken();\n }", "function token(){\n return Request::session('internal_token');\n}", "function loadToken() {\r\n\t\treturn isset($_SESSION['token']) ? $_SESSION['token'] : null;\r\n\t}", "static function token_compiler ()\n {\n return '<input type=\"hidden\" name=\"_token\" value=\"<?=csrf_token()?>\">';\n }", "protected function generate_csrf_token() {\n \n if(!isset($_SESSION['rpf_csrf_tokens'])) { \n $_SESSION['rpf_csrf_tokens'] = array();\n }\n\n $csrf_token = md5(mt_rand());\n while(in_array($csrf_token, $_SESSION['rpf_csrf_tokens'])) {\n $csrf_token = md5(mt_rand());\n } \n $_SESSION['rpf_csrf_tokens'][] = $csrf_token;\n\n return $csrf_token;\n }", "public static function getSecurityToken()\n {\n return Utilities::getSecurityToken();\n }", "private function getCSRFTokenValue($html)\n {\n if (!preg_match('~<meta name=\"csrf-token\" content=\"([^\"]+)\">~', $html, $matches)) {\n $this->fail(\"No CSRF-token meta tag found. HTML was:\\n$html\");\n }\n\n return $matches[1];\n }", "public function getToken()\n {\n $value = $this->getParameter('token');\n $value = $value ?: $this->httpRequest->query->get('token');\n return $value;\n }", "function csrf_token_is_valid()\r\n{\r\n if (isset($_POST['csrf_token'])) {\r\n $user_token = $_POST['csrf_token'];\r\n $stored_token = $_SESSION['csrf_token'];\r\n return $user_token === $stored_token;\r\n }\r\n\r\n return false;\r\n}", "public function getToken()\n {\n return $this->getSecurityContext()->getToken();\n }", "function csrf()\n {\n if (!isset($_SESSION['csrf_tokens'])) {\n $_SESSION['csrf_tokens'] = [];\n }\n\n $csrfString = generateRandomString();\n $_SESSION['csrf_tokens'][] = $csrfString;\n\n print \"<input type='hidden' name='csrf_token' value='$csrfString'>\";\n }", "private function createCsrfToken()\n {\n return sha1(microtime().$this->getLogin());\n }", "function getCSRF()\n{\n\t$return[\"csrf\"] = $_SESSION[\"csrf\"];\n\t$return[\"pastCsrf\"] = $_SESSION[\"pastCsrf\"];\n\n\treturn $return;\n}", "public function getToken() {\n return $this->token;\n }", "function get_token()\n\t{\n\t\treturn session_id();\n\t}", "function setCSRFToken(string $requestName = \"\"): string\n{\n $token = getRandomString();\n $_SESSION[$requestName . \"_csrf_token\"] = $token;\n $_SESSION[$requestName . \"_csrf_time\"] = time();\n return $token;\n}", "public function get_token() {\n\t\treturn $this->token;\n\t}", "public function getToken()\r\n {\r\n return $this->token;\r\n }", "public function getToken()\r\n {\r\n return $this->token;\r\n }", "public function getSecurityToken()\n {\n return ($this->_widgetEditor->getForm() ? $this->_widgetEditor->getForm()->getSecurityToken() : null);\n }", "public function getToken() {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public static function getToken() {\n return session(\"auth_token\", \"\");\n }", "public function getToken ()\n {\n return $this->token;\n }", "private function get_token() {\n\n\t\t$query = filter_input( INPUT_GET, 'mwp-token', FILTER_SANITIZE_STRING );\n\t\t$header = filter_input( INPUT_SERVER, 'HTTP_AUTHORIZATION', FILTER_SANITIZE_STRING );\n\n\t\treturn ( $query ) ? $query : ( $header ? $header : null );\n\n\t}", "public function getToken()\n {\n $tokenValidator = new \\Paggi\\SDK\\TokenValidation(); //self::$container->get('TokenValidation');\n if (!$tokenValidator->isValidToken(self::$token)) {\n return false;\n }\n return self::$token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function token()\n {\n return $this->token['token'] ?? null;\n }", "public function get_key() {\n\t\treturn self::$csrf_cookie;\n\t}", "private function createCSRFToken() {\r\n\t \r\n\t // Check that the token is still valid\r\n\t if( empty($this->input('session', 'token_creation')) ||\r\n\t (time() - $this->input('session', 'token_creation')) > TOKEN_KEEPALIVE ) {\r\n \t\t// The token needs to be refreshed, delete every previous request token for the user\r\n \t\tSecurity::deleteToken();\r\n \t\t\r\n \t\t// Create a new token\r\n \t\t$token = Security::generateToken();\r\n \t\t\r\n \t\t// Store the token in the session\r\n \t\t$this->input('session', 'token', $token);\r\n \t\t\r\n \t\t// Set the token creation time to the current time\r\n \t\t$this->input('session', 'token_creation', (string)time());\r\n\t }\r\n\t\t\r\n\t\t// Set the token in the template\r\n\t\t$this->output->setArguments(array(VAR_CSRF_TOKEN => $this->input('session', 'token')));\r\n\t}" ]
[ "0.81229323", "0.8105226", "0.8049665", "0.7947411", "0.7923958", "0.7922367", "0.78851616", "0.78320444", "0.7819995", "0.7723846", "0.76975983", "0.7653622", "0.7641402", "0.7606729", "0.75858647", "0.7577079", "0.75184095", "0.74754775", "0.7471479", "0.7433906", "0.7387769", "0.73646706", "0.735225", "0.7347756", "0.7347756", "0.7275505", "0.7271663", "0.72652245", "0.7201543", "0.7196359", "0.7165947", "0.71070814", "0.7072019", "0.70501333", "0.6969423", "0.6966314", "0.6925049", "0.69249004", "0.69137686", "0.6908513", "0.68770295", "0.6858248", "0.68554705", "0.68229413", "0.6817916", "0.6812991", "0.6807711", "0.6788886", "0.6778403", "0.67318517", "0.6726193", "0.6724538", "0.6719311", "0.6689108", "0.66878045", "0.66317564", "0.6599531", "0.6538496", "0.652031", "0.65051425", "0.6493264", "0.6483816", "0.6481238", "0.6480648", "0.64804083", "0.6479912", "0.6475461", "0.64381385", "0.6436382", "0.64357114", "0.6426189", "0.64237916", "0.6423633", "0.6423316", "0.64206433", "0.64206433", "0.6417734", "0.64088523", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6395082", "0.6392232", "0.6386295", "0.63825804", "0.6382336", "0.6379759", "0.6377173", "0.63656044" ]
0.0
-1
get the registered csrf token
function asset($name = null) { $document = explode('/', rtrim(app('http.request')->uri, "/")); $document = end($document); $defaultPath = $document === 'public' ? 'assets/' : 'public/assets/'; $packpage = new \Anonym\Assets\VersionPackpage('', '%f', $defaultPath); return $name !== null ? $packpage->getUrl($name) : $defaultPath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function csrf_token()\n\t{\n\t\tif(isset($_SESSION['csrf_token'])) return $_SESSION['csrf_token'];\n\t\telse return NULL;\n\t}", "public static function get_token() {\n\t\t\t\n\t\t\t// Bring in the $session variable\n\t\t\tglobal $session;\n\t\t\t// Check if there is a csrf_token in the $_SESSION\n\t\t\tif(!$session->get('csrf_token')) {\n\t\t\t\t// Token doesn't exist, create one\n\t\t\t\tself::set_token();\n\t\t\t} \n\t\t\t// Return the token\n\t\t\treturn $session->get('csrf_token');\n\t\t}", "public function get_csrf_token() {\n if(isset($_SESSION['token_value'])) {\n return $_SESSION['token_value']; \n } else {\n $token = hash('sha256', self::$instance->random(500));\n\n self::$instance->startSession();\n\n $_SESSION['token_value'] = $token;\n return $token;\n }\n \n\t}", "public function getCSRFToken():string;", "public function getCSRFToken() {\r\n\t // The CSRF token should always be stored in the user's session.\r\n\t // If it doesn't, the user is not logged in.\r\n\t return $this->input('session', 'token');\r\n\t}", "function get_csrf_token() {\n if($this->has_csrf_token()) {\n return $this->options['csrfToken'];\n }\n }", "function csrf_active()\n {\n return Csrf::getToken();\n }", "function csrf_token()\n {\n return shy(Shy\\Http\\Contracts\\Session::class)->token();\n }", "public function loadTokenCSRFToken();", "public function getToken()\n {\n if (!isset($_SESSION['MFW_csrf-token'])) {\n $this->generateNewToken(128);\n }\n\n return $_SESSION['MFW_csrf-token'];\n }", "public static function csrfTokenGet() {\n $csrfToken = null;\n\n if(!isset($_SESSION['csrfTokenCreatedAt']) || ($_SESSION['csrfTokenCreatedAt'] - time() > 21600)) { //1hr\n $_SESSION['csrfToken'] = password_hash(uniqid(self::$applicationName), PASSWORD_BCRYPT);\n $_SESSION['csrfTokenCreatedAt'] = time();\n }\n $csrfToken = $_SESSION['csrfToken'];\n\n return $csrfToken;\n }", "function csrf_token()\n {\n return app()->make('session')->token();\n }", "public function getCsrfToken()\n\t{\n\t\treturn $this->headers->get('CSRF_TOKEN')===null ? null : $this->headers->get('CSRF_TOKEN');\n\t}", "function csrf() {\n return $_SESSION['csrf'];\n }", "public function getCSRF(){\n if( isset($_POST[\"X-Csrf-Token\"]) ){\n if( Crypt::getCSRF($this->__route->getCSRFName()) == $_POST[\"X-Csrf-Token\"] ){\n return $_POST[\"X-Csrf-Token\"];\n }\n }\n else if( $this->header(\"X-Csrf-Token\") !== null ){\n if( Crypt::getCSRF($this->__route->getCSRFName()) == $this->header(\"X-Csrf-Token\") ){\n return $this->header(\"X-Csrf-Token\");\n }\n }\n return null;\n }", "public function get_csrf_token()\n {\n if (!empty($_SESSION['phery']['csrf']))\n {\n return $_SESSION['phery']['csrf'];\n }\n\n return false;\n }", "public function getCsrfToken(): CsrfTokenInterface;", "private static function create_csrf_token() {\n\t\t$token = self::csrf_token ();\n\t\t$_SESSION ['csrf_token'] = $token;\n\t\t$_SESSION ['csrf_token_time'] = time ();\n\t\treturn $token;\n\t}", "public function generateCSRFToken();", "private static function getCsrfToken()\n {\n $key = WOLFF_CONFIG['csrf_key'];\n if (!isset($_COOKIE[$key])) {\n $token = bin2hex(random_bytes(8));\n setcookie($key, $token, time() + self::TOKEN_TIME, '/', '', false, true);\n\n return $token;\n }\n\n return $_COOKIE[$key];\n }", "protected function getToken()\n {\n if (!isset($_SESSION['MFW_csrf-token'])) {\n throw new RuntimeException('There is no CSRF token generated.');\n }\n\n return $_SESSION['MFW_csrf-token'];\n }", "function csrf_token(){\n $token = sha1( rand(1, 1000) . '$$' . date('H.i.s') . 'digg' );\n $_SESSION['csrf_token'] = $token;\n return $token;\n }", "public function getCsrfToken()\n\t{\n\t\tif ($this->_csrfToken === null)\n\t\t{\n\t\t\t$cookie = $this->getCookies()->itemAt($this->csrfTokenName);\n\n\t\t\t// Reset the CSRF token cookie if it's not set, or for another user.\n\t\t\tif (!$cookie || ($this->_csrfToken = $cookie->value) == null || !$this->csrfTokenValidForCurrentUser($cookie->value))\n\t\t\t{\n\t\t\t\t$cookie = $this->createCsrfCookie();\n\t\t\t\t$this->_csrfToken = $cookie->value;\n\t\t\t\t$this->getCookies()->add($cookie->name, $cookie);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_csrfToken;\n\t}", "public function getCsrf()\n {\n return $this->security->getToken();\n }", "public function getCsrf()\n {\n return $this->security->getToken();\n }", "public function get_csrf_id() {\n\n\n if(isset($_SESSION['token_id'])) { \n return $_SESSION['token_id'];\n } else {\n $token_id = $this->random(10);\n\n self::$instance->startSession();\n\n $_SESSION['token_id'] = $token_id;\n return $token_id;\n }\n\t}", "function create_csrf_token() {\n\t$token = csrf_token();\n $_SESSION['csrf_token'] = $token;\n \t$_SESSION['csrf_token_time'] = time();\n\treturn $token;\n}", "public function getCsrfTokenFromSession()\n {\n return $_SESSION['phpmyfaq_csrf_token'];\n }", "protected function getCsrf()\n {\n if (empty($_SESSION['csrf'])) {\n $this->setCsrf();\n }\n\n $this->csrf_token = $_SESSION['csrf'] ? $_SESSION['csrf'] : null;\n\n return $this->csrf_token;\n }", "public static function getXSRFToken() {\r\n return !is_null(Session::get('xsrf_token')) ? Session::get('xsrf_token') : NULL;\r\n }", "public function get_csrf_token_name()\n\t{\n\t\treturn $this->_csrf_token_name;\n\t}", "public function generateCsrfToken()\n {\n return call_user_func($this->tokenGenerator);\n }", "public function getCsrfToken() {\n if (!$this->securityContext->isInitialized() || !$this->authenticationManager->isAuthenticated()) {\n return '';\n }\n $csrfToken = $this->securityContext->getCsrfProtectionToken();\n\n return $csrfToken;\n }", "public static function getSubmittedXSRFToken() {\r\n return isset($_POST['xsrf_token']) ? $_POST['xsrf_token'] : NULL;\r\n }", "function csrf_field()\n {\n $token = app()->services()->session()->CSRFToken;\n return \"<input type='hidden' name='csrf_token' value='$token'>\";\n }", "function csrf_token(): ?string\n{\n $appKey = env('APP_KEY');\n\n if (!$appKey) {\n throw AppException::missingAppKey();\n }\n\n return Csrf::generateToken(session(), $appKey);\n}", "public function csrf()\r\n\t{\r\n\t\treturn Form::hidden('csrf', Security::token());\r\n\t}", "public function it_gets_the_csrf_token()\n {\n $response = $this->call('GET', '/frontend/session/csrf');\n $this->assertSame($response->content(), csrf_token());\n }", "public function get_request_token()\n {\n $sess_id = $_COOKIE[ini_get('session.name')];\n if (!$sess_id) $sess_id = session_id();\n $plugin = $this->plugins->exec_hook('request_token', array('value' => md5('RT' . $this->get_user_id() . $this->config->get('des_key') . $sess_id)));\n return $plugin['value'];\n }", "function csrf(){\n\treturn 'csrf=' . $_SESSION['csrf'];\n}", "function csrf()\n{\n $csrfToken = md5(uniqid(mt_rand(), true));\n\n $_SESSION['csrfToken'] = $csrfToken;\n $res['input'] = '<input type=\"hidden\" name=\"csrfKey\" value=\"' . $csrfToken . '\" />';\n $res['token'] = $csrfToken;\n return $res;\n}", "function csrf_field()\n {\n return '<input type=\"hidden\" name=\"_token\" value=\"' . csrf_token() . '\">';\n }", "public function getToken()\n {\n // if the user isn't authenticated simply return null\n $services = $this->services;\n if (!$services->get('permissions')->is('authenticated')) {\n return null;\n }\n\n // if we don't have a token; make one\n $session = $services->get('session');\n $container = new SessionContainer(static::CSRF_CONTAINER, $session);\n if (!$container['token']) {\n $session->start();\n $container['token'] = (string) new Uuid;\n $session->writeClose();\n }\n\n return $container['token'];\n }", "private function getToken(): ?string\n {\n $request = $this->requestStack->getCurrentRequest();\n\n $token = null;\n\n\n if (null !== $request) {\n $token = $request->headers->get('token', null);\n }\n\n $this->token = $token;\n\n return $token;\n }", "private function getCsrf(){\n\t\treturn array(\n\t\t\t'name' => $this->security->get_csrf_token_name(),\n\t\t\t'token' => $this->security->get_csrf_hash(),\n\t\t);\n\t}", "function csrf_token() {\n\treturn md5(uniqid(rand(), TRUE));\n}", "public static function _SetToken()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tIf ( session_status() !== PHP_SESSION_ACTIVE )\r\n\t\t\t{\r\n\t\t\t\tsession_start();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( ! Session::has( 'CSRFToken' ) )\r\n\t\t\t{\r\n\t\t\t\tSession::set( 'CSRFToken' , Hashing::instance()->uniqidReal( 64 ) . '-' . time() );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn Session::get( 'CSRFToken' );\r\n\t\t}", "public function addCsrfToken();", "private static function csrf_token() {\n\t\treturn md5 ( uniqid ( rand (), TRUE ) );\n\t}", "public function getMetaCsrfToken()\n {\n return $this->hasMetaCsrfToken() ? $this->server['HTTP_X_CSRF_TOKEN'] : false;\n }", "public function getSecurityToken()\n {\n return $this->token;\n }", "function generate_csrftoken()\n{\n if (!isset($_SESSION[\"csrf_token\"])) $_SESSION[\"csrf_token\"] = bin2hex(random_bytes(64));\n return $_SESSION[\"csrf_token\"];\n}", "function csrf_token_tag() {\n\t$token = create_csrf_token();\n\treturn \"<input class=\\\"form-control\\\" type=\\\"hidden\\\" name=\\\"csrf_token\\\" value=\\\"\".$token.\"\\\">\";\n}", "public function getToken()\n\t{\n\t\treturn static::createFormToken($this->target_form_id ? $this->target_form_id : $this->id);\n\t}", "function csrf_field()\n {\n return new HtmlString('<input type=\"hidden\" name=\"_token\" value=\"' . csrf_token() . '\">');\n }", "public function getToken()\n {\n return $this->controller->getToken();\n }", "public static function csrf_token_tag() {\n\t\t$token = self::create_csrf_token ();\n\t\treturn \"<input type=\\\"hidden\\\" name=\\\"csrf_token\\\" value=\\\"\" . $token . \"\\\">\";\n\t}", "public function getToken()\n {\n return $this->getApplication()->getSecurityContext()->getToken();\n }", "function token(){\n return Request::session('internal_token');\n}", "function loadToken() {\r\n\t\treturn isset($_SESSION['token']) ? $_SESSION['token'] : null;\r\n\t}", "static function token_compiler ()\n {\n return '<input type=\"hidden\" name=\"_token\" value=\"<?=csrf_token()?>\">';\n }", "protected function generate_csrf_token() {\n \n if(!isset($_SESSION['rpf_csrf_tokens'])) { \n $_SESSION['rpf_csrf_tokens'] = array();\n }\n\n $csrf_token = md5(mt_rand());\n while(in_array($csrf_token, $_SESSION['rpf_csrf_tokens'])) {\n $csrf_token = md5(mt_rand());\n } \n $_SESSION['rpf_csrf_tokens'][] = $csrf_token;\n\n return $csrf_token;\n }", "public static function getSecurityToken()\n {\n return Utilities::getSecurityToken();\n }", "private function getCSRFTokenValue($html)\n {\n if (!preg_match('~<meta name=\"csrf-token\" content=\"([^\"]+)\">~', $html, $matches)) {\n $this->fail(\"No CSRF-token meta tag found. HTML was:\\n$html\");\n }\n\n return $matches[1];\n }", "public function getToken()\n {\n $value = $this->getParameter('token');\n $value = $value ?: $this->httpRequest->query->get('token');\n return $value;\n }", "function csrf_token_is_valid()\r\n{\r\n if (isset($_POST['csrf_token'])) {\r\n $user_token = $_POST['csrf_token'];\r\n $stored_token = $_SESSION['csrf_token'];\r\n return $user_token === $stored_token;\r\n }\r\n\r\n return false;\r\n}", "public function getToken()\n {\n return $this->getSecurityContext()->getToken();\n }", "function csrf()\n {\n if (!isset($_SESSION['csrf_tokens'])) {\n $_SESSION['csrf_tokens'] = [];\n }\n\n $csrfString = generateRandomString();\n $_SESSION['csrf_tokens'][] = $csrfString;\n\n print \"<input type='hidden' name='csrf_token' value='$csrfString'>\";\n }", "private function createCsrfToken()\n {\n return sha1(microtime().$this->getLogin());\n }", "function getCSRF()\n{\n\t$return[\"csrf\"] = $_SESSION[\"csrf\"];\n\t$return[\"pastCsrf\"] = $_SESSION[\"pastCsrf\"];\n\n\treturn $return;\n}", "public function getToken() {\n return $this->token;\n }", "function get_token()\n\t{\n\t\treturn session_id();\n\t}", "function setCSRFToken(string $requestName = \"\"): string\n{\n $token = getRandomString();\n $_SESSION[$requestName . \"_csrf_token\"] = $token;\n $_SESSION[$requestName . \"_csrf_time\"] = time();\n return $token;\n}", "public function get_token() {\n\t\treturn $this->token;\n\t}", "public function getToken()\r\n {\r\n return $this->token;\r\n }", "public function getToken()\r\n {\r\n return $this->token;\r\n }", "public function getSecurityToken()\n {\n return ($this->_widgetEditor->getForm() ? $this->_widgetEditor->getForm()->getSecurityToken() : null);\n }", "public function getToken() {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public static function getToken() {\n return session(\"auth_token\", \"\");\n }", "public function getToken ()\n {\n return $this->token;\n }", "private function get_token() {\n\n\t\t$query = filter_input( INPUT_GET, 'mwp-token', FILTER_SANITIZE_STRING );\n\t\t$header = filter_input( INPUT_SERVER, 'HTTP_AUTHORIZATION', FILTER_SANITIZE_STRING );\n\n\t\treturn ( $query ) ? $query : ( $header ? $header : null );\n\n\t}", "public function getToken()\n {\n $tokenValidator = new \\Paggi\\SDK\\TokenValidation(); //self::$container->get('TokenValidation');\n if (!$tokenValidator->isValidToken(self::$token)) {\n return false;\n }\n return self::$token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function token()\n {\n return $this->token['token'] ?? null;\n }", "public function get_key() {\n\t\treturn self::$csrf_cookie;\n\t}", "private function createCSRFToken() {\r\n\t \r\n\t // Check that the token is still valid\r\n\t if( empty($this->input('session', 'token_creation')) ||\r\n\t (time() - $this->input('session', 'token_creation')) > TOKEN_KEEPALIVE ) {\r\n \t\t// The token needs to be refreshed, delete every previous request token for the user\r\n \t\tSecurity::deleteToken();\r\n \t\t\r\n \t\t// Create a new token\r\n \t\t$token = Security::generateToken();\r\n \t\t\r\n \t\t// Store the token in the session\r\n \t\t$this->input('session', 'token', $token);\r\n \t\t\r\n \t\t// Set the token creation time to the current time\r\n \t\t$this->input('session', 'token_creation', (string)time());\r\n\t }\r\n\t\t\r\n\t\t// Set the token in the template\r\n\t\t$this->output->setArguments(array(VAR_CSRF_TOKEN => $this->input('session', 'token')));\r\n\t}" ]
[ "0.81229323", "0.8105226", "0.8049665", "0.7947411", "0.7923958", "0.7922367", "0.78851616", "0.78320444", "0.7819995", "0.7723846", "0.76975983", "0.7653622", "0.7641402", "0.7606729", "0.75858647", "0.7577079", "0.75184095", "0.74754775", "0.7471479", "0.7433906", "0.7387769", "0.73646706", "0.735225", "0.7347756", "0.7347756", "0.7275505", "0.7271663", "0.72652245", "0.7201543", "0.7196359", "0.7165947", "0.71070814", "0.7072019", "0.70501333", "0.6969423", "0.6966314", "0.6925049", "0.69249004", "0.69137686", "0.6908513", "0.68770295", "0.6858248", "0.68554705", "0.68229413", "0.6817916", "0.6812991", "0.6807711", "0.6788886", "0.6778403", "0.67318517", "0.6726193", "0.6724538", "0.6719311", "0.6689108", "0.66878045", "0.66317564", "0.6599531", "0.6538496", "0.652031", "0.65051425", "0.6493264", "0.6483816", "0.6481238", "0.6480648", "0.64804083", "0.6479912", "0.6475461", "0.64381385", "0.6436382", "0.64357114", "0.6426189", "0.64237916", "0.6423633", "0.6423316", "0.64206433", "0.64206433", "0.6417734", "0.64088523", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6402701", "0.6395082", "0.6392232", "0.6386295", "0.63825804", "0.6382336", "0.6379759", "0.6377173", "0.63656044" ]
0.0
-1
get the registered error bag
function filter($name = null, $regex = '') { return Route::filter($name, $regex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getErrorBag(): array\n {\n return $this->_error_bag;\n }", "public function getErrors() {\n\t\treturn $this->errorBag;\n\t}", "protected function getErrors()\n {\n return $this->errors ?: $this->errors = app()->make(MessageBag::class);\n }", "public function getErrors()\n {\n return $this->getBag()->toArray();\n }", "public function errors()\n {\n return $this->provider->getMessageBag();\n }", "public static function get()\r\n {\r\n \treturn self::$errors;\r\n }", "public function errors(): MessageBag;", "public function get_error_objects() {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errorBucket;\n }", "public function getErrors()\n {\n return $this->messageBag->all();\n }", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrors();", "protected function sharedValidationErrors()\n {\n if ($errors = session('errors')) {\n return $errors->getBag('default');\n }\n\n return new \\stdClass;\n }", "function get_errors() {\n\t\treturn $this->errors;\n\t}", "public function getError(): array\n {\n return $this->errorMessages;\n }", "function get_errors()\n {\n }", "function getErrors()\n\t{\n\t\treturn [];\n\t}", "function getErrors();", "public function getError()\n {\n $errors = self::$errors;\n self::$errors = array();\n return $errors;\n }", "public function getError()\n {\n if (empty($this->error) != true){\n end($this->error); //Pointer to the end\n $key = key($this->error); //Get the key of last element\n $ret = array( \"code\" => $key, \"description\" => $this->error[$key] );\n reset($this->error);\n }else{\n $ret = array( \"code\" => \"get_error\", \"description\" => \"No are errors to show\" );\n }\n \n return $ret;\n }", "public function getMessageBag();", "public static function getErrors(): array\n {\n return self::$errors;\n }", "final public function getError():array\n {\n return $this->errors;\n }", "public function getErrors(){\r\n return $this->_errors['error'];\r\n }", "function getError()\n\t{\n\t\treturn $this->errors;\n\t}", "function getError()\n\t{\n\t\treturn $this->errors;\n\t}", "public function getError() {}", "public function get_errors()\n {\n return $this->errors;\n }", "public function get_errors()\n {\n return $this->errors;\n }", "public function get_errors()\n {\n return $this->errors;\n }", "public function getErrorQueue() {\n\t\t\treturn apply_filters( 'muut_get_error_queue', $this->errorQueue );\n\t\t}", "public function getErrors(): array;", "public function getErrors(): array;", "public function getErrors(): array;", "public function getDependencyErrors() {}", "public function getDependencyErrors() {}", "public function get_errors(){\n\n\t\treturn $this->errors;\n\n\t}", "public function errors()\n {\n // return new \\ArrayList($this->errorList.values());\n }", "public function getErrors()\n {\n return self::$errors;\n }", "public function getError();", "public function getError();", "public function getError();", "public function get_errors() {\n\t\treturn $this->errors->get_error_messages();\n\t}", "public function get_errors() {\n return $this->errors;\n }", "public function get_errors() {\n return $this->errors;\n }", "public function get_errors() {\n\t\treturn $this->errors;\n\t}", "public function get_error();", "public function get_error();", "public function setErrorBag(array &$error_bag)\n {\n $this->_error_bag = &$error_bag;\n }", "public function getErr() {}", "public function getErrors() : array;", "public function getErrors(): Collection\n {\n return $this->errors;\n }", "public function getAllerrors() {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrorMessages() {}", "protected function getErrors()\n {\n return $this->session->get('errors');\n }", "public function errors()\n {\n return $this->getRules()->getMessageBag()->all();\n }", "public function getErrors()\n {\n return $this->getProperty(OperationInterface::BPMN_PROPERTY_ERRORS, new Collection);\n }", "function getErrors() {\n return $this->errors;\n }", "public function getErrors(){\n return $this->_errors;\n }", "static public function getErrors()\n\t{\n\t\treturn static::$aErrors;\n\t}", "public function getError() {\n\t\t$error = array();\n\t\t$error['message'] = $this->err_message;\n\t\t$error['code'] = $this->err_code;\n\t\treturn $error;\n\t}", "public function getErrors()\n {\n return $this->_getChildrenByName('error');\n }", "public function emptyErrorBag() {\n\t\t$this->errorBag = [];\n\t}", "function getGlobalErrors()\n{\n global $system_errors;\n return $system_errors;\n}", "public function get_errors()\n {\n\n $error_cookie = $_SESSION['errors'];\n $this->errors = json_decode($error_cookie);\n\n return $this->errors;\n\n }", "public function getExceptions();", "public function getErrors() {\n\treturn $this->_errors; \n }", "public function error()\n\t{\n\t\treturn reset($this->errors);\n\t}", "public function error()\n\t{\n\t\treturn [];\n\t}", "public function get_errors() {\n $res = array();\n foreach($this->errors as $error) {\n $res[] = $error->errormsg;\n }\n return $res;\n }", "public function returnErrors() {\n return $this->_errorSet;\n }", "public function getError()\n {\n }", "public function getError()\n {\n if (null == $this->error) {\n $this->error = new MessageContainer();\n }\n return $this->error;\n }", "public function getErrors () : array {\n\t\treturn $this->errors;\n\t}", "public function getErrors()\n {\n return $this->errors; // core.validation.Errors\n }", "function getErrors()\n\t{\n\t\treturn $this->_errors;\n\t}", "public function getErrors():array;", "public static function get_error()\n\t{\n\t\treturn Session::instance()->get('error');\n\t}", "public function getError()\r\n\t\t{\r\n\t\t\treturn $this->_errores;\r\n\t\t}", "public function validationErrors(): MessageBag\n {\n return new MessageBag([\n 'file' => __('profile::profile.upload.not-valid')\n ]);\n }", "public function getErrors()\n {\n return $this->errors;\n }", "public function getErrors()\n {\n return $this->errors; \n }", "public function getMessageBag()\n {\n return $this->messageBag;\n }", "public function getErrors() {\n return $this->errors;\n }", "public function getErrors() : array\n {\n return $this->errors;\n }", "function requestErrors() {\n return $this->errors;\n }", "function getListOfErrors() {\n\t\treturn $this->errorList;\n\t}", "public function getErrors()\n {\n if (array_key_exists(\"errors\", $this->_propDict)) {\n return $this->_propDict[\"errors\"];\n } else {\n return null;\n }\n }", "function registerError($error)\n{\n global $system_errors;\n $system_errors[] = $error;\n}", "public function getErrorResponses();", "public function getErrors()\n {\n return $this->_errors;\n }", "public function getErrors()\n {\n return $this->_errors;\n }" ]
[ "0.78928035", "0.71004206", "0.673847", "0.66217244", "0.65805495", "0.6554067", "0.6527485", "0.6475294", "0.64623696", "0.64165795", "0.63427836", "0.63427836", "0.63427836", "0.63427836", "0.6306349", "0.6303321", "0.6276584", "0.62655234", "0.625274", "0.6211366", "0.62071705", "0.61583185", "0.6144628", "0.6139322", "0.6131356", "0.6083717", "0.6063461", "0.6063461", "0.60566264", "0.602846", "0.602846", "0.602846", "0.60204196", "0.60198694", "0.60198694", "0.60198694", "0.6019231", "0.6019231", "0.6016676", "0.6012155", "0.60111463", "0.60071325", "0.60071325", "0.60071325", "0.6002224", "0.5986347", "0.5986347", "0.5985349", "0.5984383", "0.5984383", "0.59766525", "0.59714013", "0.5961648", "0.5959596", "0.59456784", "0.5944882", "0.5944882", "0.5944882", "0.5944882", "0.5944882", "0.5944882", "0.5944882", "0.5943883", "0.59362936", "0.5912706", "0.5911792", "0.5906702", "0.5905417", "0.5903677", "0.58964425", "0.588926", "0.5876867", "0.5874551", "0.5857005", "0.5854479", "0.5854153", "0.58537287", "0.58459526", "0.58459437", "0.583208", "0.5829205", "0.5826004", "0.58223313", "0.5818735", "0.5817102", "0.5807223", "0.577778", "0.5774447", "0.5770212", "0.5770182", "0.5762276", "0.5761057", "0.57606137", "0.5759071", "0.5756081", "0.57520133", "0.57497746", "0.57390255", "0.57324976", "0.57293713", "0.57293713" ]
0.0
-1
throw an http exception with given datas
function abort($code = 503, $message = '', array $headers = []) { App::abort($code, $message, $headers); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function http(HttpResponseException $ex);", "public static function send_http_error( $data )\n {\n \\HttpResponse::status( 400 );\n \\HttpResponse::setContentType( 'application/json' ); \n \\HttpResponse::setData( $data );\n \\HttpResponse::send();\n }", "private function fail() {\n\t\theader('HTTP/1.1 400 BAD REQUEST');\n\t\tdie('400 BAD REQUEST');\n\t}", "function throw_exception($message,$statusCode = 1004)\n {\n throw new \\think\\exception\\HttpException($statusCode,$message);\n }", "public function throw()\n {\n $response = new JsonResponse($this->getResponse(), $this->code);\n\n die($response->send());\n }", "public static function dataValidationFailed($status, $message, $code){\n\n throw new \\yii\\web\\HttpException($status, $message, $code);\n }", "private function throwFriendlyErrors(\\Exception $e)\n {\n $errors = $e->errors();\n\n $response = response()->json([\n 'message' => 'Invalid data, please re-review the data you sent.',\n 'details' => $errors\n ], 422);\n\n throw new HttpResponseException($response);\n }", "public function testItThrowsException()\n {\n $location = \"00000,us\";\n $response = $this->api->send_request($location); \n }", "public function failed($data, $exception)\n {\n //\n }", "public function failed($data, $exception)\n {\n //\n }", "public static function status400($data=null) {\n\t\tself::response($data,400);\n\t}", "public function error400()\n {\n }", "public function failedAuthorization()\n {\n\n throw new HttpResponseException(response()->json(['message' => 'You are not authorized to edit this Note.'],\n 429));\n\n }", "public function throwError();", "public function test_IndexError(){\n\t\t$this->validateTestException(\n\t\t\t$this->fullURL,\n\t\t\t'GET',\n\t\t\t$this->data,\n\t\t\t'NotImplementedException',\n\t\t\t'index'\n\t\t);\n\t}", "function api_error($code=5000, $data = [], $msg = '')\n{\n if (empty($data)) $data = (object)[];\n if ($msg == '') {\n $msg = config('api_response_code')[$code];\n }\n $json = [\n 'code'=>$code,\n 'data'=>$data,\n 'msg'=>$msg\n ];\n return response()->json($json);\n}", "protected function failure()\n {\n $this->response = $this->response->withStatus(400);\n $this->jsonBody($this->payload->getInput());\n }", "public function throwErrorAction() {\n $message = $this->getRequestParam(\"message\", null);\n if (($error_code = $this->getRequestParam(\"error_code\")) && !empty($error_code)) {\n if (!empty($message))\n $this->respondWithValidationError($error_code, $message);\n else\n $this->respondWithError($error_code);\n }\n\n return;\n }", "private function error($response) {\n\t\tif(property_exists($response, \"error\") AND $response->code != 200) {\n\t\t\tthrow new MystoreAPI_exception(\"Error \".$response->code.\"<br />\".$response->error->message);\n\t\t}\n\t}", "public function testWebSearchExceptionAdultOkInvalid()\n {\n try {\n $this->_yahoo->webSearch('php', ['adult_ok' => 'oops']);\n $this->fail('Expected Zend_Service_Exception not thrown');\n } catch (Zend_Service_Exception $e) {\n $this->assertStringContainsString('error occurred sending request', $e->getMessage());\n }\n }", "function http_throw($code = 404)\n{\n ob_start();\n\n include(__DIR__ . '/../Exceptions/404/404.html');\n $contents = ob_get_clean();\n\n http_response_code($code);\n\n echo $contents;\n}", "function bad_request() {\n\treturn show_template('400');\n}", "public function failedValidation(Validator $validator)\n {\n $data_error = [];\n $error = $validator->errors()->all(); #if validation fail print error messages\n foreach ($error as $key => $errors):\n $data_error['status'] = 400;\n $data_error['message'] = $errors;\n endforeach;\n //write your bussiness logic here otherwise it will give same old JSON response\n throw new HttpResponseException(response()->json($data_error, 400));\n }", "function throw_user_error($error_code, $error_text) {\n http_response_code($error_code);\n echo $error_text;\n exit;\n}", "protected abstract function send_error($ex=null) ;", "public static function throwRequestNotFoundException()\n {\n return Response::json([\n 'message' => 'Your request could not be found try again'\n ], 300);\n }", "public function makeException()\n {\n $this->thrownException = ResponseException::create($this);\n }", "public function onException(Exception $err): Effect|Response;", "Public static function validationError($message, $code){\n\n throw new \\yii\\web\\HttpException(500, $message, $code);\n\n\n }", "public function error($data)\n {\n $data = ['erro'=>$data];\n return $this->coreResponse($data);\n }", "public static function throwError($message) {\n header('HTTP/1.0 404 Not Found');\n\n $this->_sendResponse(200, CJSON::encode(array('DoTransaction' => (array('ErrorMessage' => $message)))));\n }", "protected function error()\n {\n $this->response = $this->response->withStatus(500);\n $this->jsonBody([\n 'input' => $this->payload->getInput(),\n 'error' => $this->payload->getOutput(),\n ]);\n }", "public function Exception(Exception $exception)\n {\n global $Core;\n\n header(\"HTTP/1.1 400 Bad Request\", true, 400);\n $Core->RestAPIResult->showError($this->getExceptionMessage($exception), array());\n }", "Public static function parametersNotValid($message){\n\n throw new \\yii\\web\\HttpException(204, $message, 405);\n\n\n }", "function errore($messaggio) {\n header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);\n die($messaggio);\n}", "abstract protected function echoExceptionWeb($exception);", "public static function throwInputNotFoundException()\n {\n return Response::json([\n 'message' => 'Could not get data from request'\n ], 422);\n\n /**\n * if running tests on call\n */\n if (app()->environment() === 'testing') {\n dd('Could not get data from request');\n }\n }", "public function error(BaseResponse $response);", "function exceptionHandler($e) {\n $msg = array(\"status\" => \"500\", \"message\" => $e->getMessage(), \"file\" => $e->getFile(), \"line\" => $e->getLine());\n $usr_msg = array(\"status\" => \"500\", \"message\" => \"Sorry! Internal server error!\");\n header(\"Access-Control-Allow-Origin: *\"); \n header(\"Content-Type: application/json; charset=UTF-8\"); \n header(\"Access-Control-Allow-Methods: GET, POST\");\n echo json_encode($usr_msg);\n logError($msg);\n\n }", "public static function error($status,$message){\r\n throw new \\Luracast\\Restler\\RestException($status, $message);\r\n }", "public function throwBadRequest()\n {\n throw new Exception\\BadRequestException('Bad request', 1449130902);\n }", "public function getException();", "public function testHttpExceptionPresenter() :void\n {\n $e = new HttpException(500);\n $response = (new HttpExceptionPresenter($e))->response();\n $expected = [[\n 'status' => 500,\n 'title' => 'An unknown error has occurred'\n ]];\n\n $this->assertEquals($expected, $response);\n }", "public static function error400($text = '') {\n header(\"{$_SERVER['SERVER_PROTOCOL']} 400 Bad Request\");\n View::render(static::VIEW_ERROR_HTTP, [\n 'code' => 400,\n 'msg' => $text ? $text : 'Bad request.',\n ], static::LAYOUT_ERROR_HTTP, false, App::requestIsAjax());\n static::end(40);\n }", "function HTTPFailWithCode($code,$message)\n{\n\theader(reasonForCode($code));\n\texit($message);\n}", "private function exceptionWithResponseCode($code, $message) {\n $this->httpResponseCode = $code;\n throw new \\Exception($message);\n }", "public function failAction()\n {\n //====================================================================//\n // Return Dummy Response\n return new JsonResponse(array('result' => 'Ko'), 500);\n }", "private function throwExceptionOnFail($success, $metric)\n {\n if ($success) {\n return;\n }\n\n $msg = 'There was an error processing that request.';\n if ($metric->getErrors()) {\n $msg .= \"\\nDetails...\";\n foreach (Hash::flatten($metric->getErrors()) as $field => $errorMsg) {\n $msg .= \"\\n - $errorMsg ($field)\";\n }\n }\n throw new BadRequestException($msg);\n }", "public function testWebSearchExceptionSimilarOkInvalid()\n {\n try {\n $this->_yahoo->webSearch('php', ['similar_ok' => 'oops']);\n $this->fail('Expected Zend_Service_Exception not thrown');\n } catch (Zend_Service_Exception $e) {\n $this->assertStringContainsString('error occurred sending request', $e->getMessage());\n }\n }", "function api_error($err_code, $err_message, $err_data = null, $id = null) {\n $err = ['code'=>$err_code, 'message'=>$err_message];\n if (!is_null($err_data)) $err['data'] = $err_data;\n return api_return($err, $id, 'error');\n}", "public function testThrowErrorsWhenDataAreInvalid(): void\n {\n $data = [\n \"name\" => \"\",\n \"description\" => \"The Star Wars The Last Jedi Collection 9TWENTY is constructed of a black poly fabric. A Star Wars fighter plane is embroidered on the front panels and the cap features a D-Ring closure.\",\n \"price\" => \"20.50\",\n \"category\" => [\n \"id\" => 1\n ],\n \"images\" => [\n [\n \"id\" => 1\n ]\n ]\n ];\n\n $response = $this->request('POST', '/api/products', $data);\n $json = json_decode($response->getContent(), true);\n\n $this->assertEquals(400, $response->getStatusCode());\n $this->assertEquals('application/problem+json; charset=utf-8', $response->headers->get('Content-Type'));\n\n $this->assertArrayHasKey('violations', $json);\n $this->assertCount(2, $json['violations']);\n\n $this->assertArrayHasKey('propertyPath', $json['violations'][0]);\n $this->assertEquals('name', $json['violations'][0]['propertyPath']);\n\n $this->assertArrayHasKey('propertyPath', $json['violations'][1]);\n $this->assertEquals('tax', $json['violations'][1]['propertyPath']);\n }", "public static function exception_handler($exception) { \n ResponseFactory::send($exception->getMessage()); //Send exception message as response.\n }", "public function error()\n {\n throw new Exception('Something went wrong!');\n }", "public function render($request, Exception $e)\n {\n //dd($e);\n //dd($request->wantsJson());\n //dd($request);\n if ($e instanceof ModelNotFoundException or \n $e instanceof NotFoundHttpException or \n $e instanceof HttpException)\n {\n //dd('entrou no if');\n $statusCode = $e->getStatusCode();\n\n // Verifica se requisição veio via AJAX\n if ($request->wantsJson()){\n switch ($statusCode) \n {\n case 401: return response()->json(['status' => false, 'errors' => ['errors' => [ 'Usuário não está logado' ] ] ], $statusCode);\n case 403: return response()->json(['errors' => ['errors' => ['Falha na autenticação'] ] ], $statusCode);\n case 404: return response()->json(['status' => false, 'errors' => ['errors' => [ 'A página solicitada não foi encontrada' ] ] ], $statusCode);\n //case 404: return redirect()->guest(route('login'));\n }\n \n } else {\n switch ($statusCode) \n {\n case 401: return response()->view('auth.login',[],$statusCode);\n case 403: return response()->view('erros.403', ['titulo' => 'Atenção', 'descricao' => 'Falha na autenticação'],$statusCode);\n case 404: return response()->view('erros.404',[],$statusCode);\n //case 404: return redirect()->guest(route('login'));\n }\n }\n }\n else if( $e instanceof QueryException )\n {\n if( !empty($e->errorInfo[2]) && isset($e->errorInfo[2]) && $e->errorInfo[2] != '' )\n {\n $mensagem[0] = $e->errorInfo[2];\n\n if( \\Config::get('app.debug') )\n {\n $mensagem[1] = $e->getSql();\n }\n }\n else\n {\n $mensagem[0] = $e->getMessage();\n }\n\n // Verifica se requisição veio via AJAX\n if ($request->wantsJson())\n return response()->json(['status' => false, 'errors' => ['errors' => [ 'Erro no comando SQL.' ] ] ], 200);\n else\n return response()->view('erros.query', ['mensagem' => $mensagem], 500);\n }\n\n return parent::render($request, $e);\n }", "protected function failedValidation(Validator $validator)\n {\n throw new HttpResponseException(response()->json(['errors' => $validator->errors()]));\n }", "function errorResponse ($messsage) {\n header('HTTP/1.1 500 Internal Server Error');\n die(json_encode(array('message' => $messsage)));\n }", "public static function error($params = array())\n {\n $response = new static(json_encode($params));\n $response\n ->set_status(400)\n ->header('Content-type', 'application/json');\n return $response;\n }", "function badRequest() {\n header('HTTP/1.0 400 Bad Request');\n }", "public static function throwResourceNotFoundException()\n {\n return Response::json([\n 'message' => \"Your request dosen't contain any resources\"\n ], 404);\n }", "public function displayException($i) {\n if (!headers_sent())\n header('X-Error: By Brid Api');\n $error = array('name' => $i->getMessage(), 'message' => $i->getFile(), 'error' => $i->getMessage(), 'class' => get_class($i));\n if ($i->getCode() != 0) {\n $error['code'] = $i->getCode();\n }\n\n echo json_encode($error);\n }", "function httpError($code, $message = null, $die = true, $only_headers = false) {\n if($message === null) {\n $errors = array(\n 100 => \"HTTP/1.1 100 Continue\",\n 101 => \"HTTP/1.1 101 Switching Protocols\",\n 200 => \"HTTP/1.1 200 OK\",\n 201 => \"HTTP/1.1 201 Created\",\n 202 => \"HTTP/1.1 202 Accepted\",\n 203 => \"HTTP/1.1 203 Non-Authoritative Information\",\n 204 => \"HTTP/1.1 204 No Content\",\n 205 => \"HTTP/1.1 205 Reset Content\",\n 206 => \"HTTP/1.1 206 Partial Content\",\n 300 => \"HTTP/1.1 300 Multiple Choices\",\n 301 => \"HTTP/1.1 301 Moved Permanently\",\n 302 => \"HTTP/1.1 302 Found\",\n 303 => \"HTTP/1.1 303 See Other\",\n 304 => \"HTTP/1.1 304 Not Modified\",\n 305 => \"HTTP/1.1 305 Use Proxy\",\n 307 => \"HTTP/1.1 307 Temporary Redirect\",\n 400 => \"HTTP/1.1 400 Bad Request\",\n 401 => \"HTTP/1.1 401 Unauthorized\",\n 402 => \"HTTP/1.1 402 Payment Required\",\n 403 => \"HTTP/1.1 403 Forbidden\",\n 404 => \"HTTP/1.1 404 Not Found\",\n 405 => \"HTTP/1.1 405 Method Not Allowed\",\n 406 => \"HTTP/1.1 406 Not Acceptable\",\n 407 => \"HTTP/1.1 407 Proxy Authentication Required\",\n 408 => \"HTTP/1.1 408 Request Time-out\",\n 409 => \"HTTP/1.1 409 Conflict\",\n 410 => \"HTTP/1.1 410 Gone\",\n 411 => \"HTTP/1.1 411 Length Required\",\n 412 => \"HTTP/1.1 412 Precondition Failed\",\n 413 => \"HTTP/1.1 413 Request Entity Too Large\",\n 414 => \"HTTP/1.1 414 Request-URI Too Large\",\n 415 => \"HTTP/1.1 415 Unsupported Media Type\",\n 416 => \"HTTP/1.1 416 Requested range not satisfiable\",\n 417 => \"HTTP/1.1 417 Expectation Failed\",\n 500 => \"HTTP/1.1 500 Internal Server Error\",\n 501 => \"HTTP/1.1 501 Not Implemented\",\n 502 => \"HTTP/1.1 502 Bad Gateway\",\n 503 => \"HTTP/1.1 503 Service Unavailable\",\n 504 => \"HTTP/1.1 504 Gateway Time-out\" \n );\n \n $message = array_var($errors, $code);\n if(trim($message) == '') {\n $message = 'Unknown';\n } // if\n } // if\n \n header(\"HTTP/1.1 $code $message\");\n print '<h1>' . clean($message) . '</h1>';\n \n if($die) {\n die();\n } // if\n }", "public static function die400(array $data = array())\n {\n header('HTTP/1.1 400 Bad Request');\n\n self::dieJson($data);\n }", "private function badRequest($msg) {\r\n $this->getHttpResponse()->setCode(400);\r\n $this->sendResponse(new JsonErrorResponse($msg));\r\n }", "private function jsonException($data)\n {\n $meta = $data->meta;\n return $meta->status.' '.$meta->description.' '.$meta->message.' For more info please visit: '.$meta->moreInfo;\n }", "public function throwException($code, $message)\n {\n header(\"content-type: application/json\"); // ; charset=utf-8\n $error_message = json_encode([\n 'error' => [\n 'status' => $code,\n 'message' => $message\n ]\n ]);\n echo $error_message;\n exit();\n }", "protected function failedValidation(Validator $validator)\n {\n throw new HttpResponseException(\n response([\n \"status\" => false, \n \"message\" => \"Error in data sent\", \n \"errors\" => $validator->errors()\n ], 422)); \n }", "protected function failedValidation(Validator $validator)\n {\n $response = [\n 'success' => false,\n 'message' => 'Invalid parameters.',\n ];\n throw new HttpResponseException(response()->json($response, 400));\n }", "static function error( $code, $desc ) {\n\t\t$codes = array();\n\t\t$codes[400] = 'Bad Request';\n\t\t$codes[401] = 'Unauthorized';\n\t\t$codes[403] = 'Forbidden';\n\t\t$codes[404] = 'Not Found';\n\t\t$codes[405] = 'Method Not Allowed';\n\t\t$codes[406] = 'Not Acceptable';\n\t\t$codes[501] = 'Not Implemented';\n\t\t$codes[503] = 'Service unavailable';\n\t\t\n\t\theader('Content-Type: text/html');\n\t\theader( 'HTTP/1.1 '. $code . ' '. @$codes[$code] );\n\t\tdie( $desc );\n\t}", "public static function GenericError() : self{\n\t\treturn new Response('Generic Error', -2, true);\n\t}", "private function _throwJSONException( $e ) {\n\t\treturn new JsonResponse( array('success'=>false, 'errorMessage'=>$e->getMessage(), 'errorCode'=>$e->getCode() ) );\n\t}", "protected function failedValidation(Validator $validator) {\n\n $errors = $validator->errors();\n throw new HttpResponseException(response()->json([\n 'errors' => $errors,\n 'status_code' => 400,\n 'status' => false\n ], 400));\n }", "function admin_error($code = 5000, $data = [], $msg = '')\n{\n if (empty($data)) $data = (object)[];\n if ($msg == '') {\n $msg = config('admin_response_code')[$code];\n }\n $json = [\n 'code'=>$code,\n 'data'=>$data,\n 'msg'=>$msg\n ];\n return response()->json($json);\n}", "public function testWithExpectedException(): void\n {\n $this->get('/tests_apps/throw_exception');\n $this->assertResponseCode(500);\n }", "protected function failedValidation(Validator $validator)\n {\n $messagesV = $validator->getMessageBag()->getMessages();\n $messages = [];\n $index = 0;\n foreach ($messagesV as $item => $value){\n $messages[$index]['title'] = $value[0];\n $messages[$index]['source']['parameter'] = $item;\n $index++;\n }\n throw new HttpResponseException(response()->json(['errors' => $messages], 400));\n }", "public function testWithExpectedExceptionHttpServer(): void\n {\n $this->get('/tests_apps/throw_exception');\n $this->assertResponseCode(500);\n }", "function testInvalidGet() {\n $this->get('/something/def');\n $this->assertEqual(api_response::getInstance()->getCode(), 404);\n $this->assertText('/error/code', '100');\n $this->assertText('/error/msg', 'Bucket not defined: something');\n }", "public function testSendRequestException()\n {\n $accId = '';\n\n $this->zendClientFactoryMock->expects($this->once())\n ->method('create')\n ->willReturn($this->zendClientMock);\n $this->configMock->expects($this->once())\n ->method('getNewRelicAccountId')\n ->willReturn($accId);\n\n $this->expectException(\\Magento\\Framework\\Exception\\LocalizedException::class);\n\n $this->model->sendRequest();\n }", "public function it_cant_create_invalid()\n {\n $this->shouldThrow('\\Aspire\\DIC\\Exception\\NotFoundException')->duringGet('SomeClassThatDoesNotExist');\n }", "public function error($code, $message = '', array $headers = [])\n {\n throw new HttpException($code, $message, null, $headers);\n }", "private function throwException()\n {\n throw new CacheException(\\odbc_errormsg(), (int) \\odbc_error());\n }", "public function testIndexActionError() : void\n {\n $res = $this->controller->indexActionPost();\n $this->assertInternalType(\"array\", $res);\n\n list($json, $status) = $res;\n $this->assertEquals($json[\"message\"], \"Ingen IP address skickades.\");\n $this->assertEquals($status, 400);\n }", "protected function exceptions($exception){\n\t\tthrow $exception;\n\t}", "protected function error (\\HttpException $data = null)\n {\n if (is_null($data)) {\n return new JsonResponse(array('error' => 'Resource not found.'), 404);\n }\n \n return new JsonResponse(array('error' => $data->getMessage()), $data->getStatusCode());\n }", "public function show404() {\n header(\"HTTP/1.0 404 Not Found\");\n throw new Exception('404 Not Found');\n }", "public function testExecuteWithException()\n {\n $this->prepareResponseMock();\n $exception = new \\Exception();\n $this->request->expects($this->once())->method('getParam')->with('email')->willThrowException($exception);\n\n $this->assertInstanceOf(\\Magento\\Framework\\Controller\\Result\\Json::class, $this->addUser->execute());\n }", "public function testErrorMessageBadFormat()\n {\n $errorResponse = json_decode('{\n \"error\": {\n \"code\": \"UNPROCESSABLE_ENTITY\",\n \"message\": {\n \"errors\": [\n \"Bad format\",\n \"Bad format 2\"\n ],\n \"bad_data\": [\n {\n \"first_message\": \"Bad format 3\",\n \"second_message\": \"Bad format 4\",\n \"thrid_message\": \"Bad format 5\"\n }\n ]\n },\n \"errors\": []\n }\n }', true);\n\n\n try {\n Requestor::handleApiError(null, 404, $errorResponse);\n } catch (EasyPostException $error) {\n $this->assertEquals(\n 'Bad format, Bad format 2, Bad format 3, Bad format 4, Bad format 5',\n $error->getMessage()\n );\n }\n }", "public function test_receive_throwsEntityNotFound_ifEntityIsNotFound()\n\t{\n\t\t$this->setExpectedException('Jstewmc\\\\Api\\\\Exception\\\\EntityNotFound');\n\t\t\n\t\t$this->url->getQuery()->setParameter('code', 404);\n\t\t\n\t\t(new Client())\n\t\t\t->send(new Request\\Get((string) $this->url))\n\t\t\t->receive(new Response\\Json());\n\t\t\t\n\t\treturn;\n\t}", "public function check($data, $headers, $handle) {\n // if there is no data and there are no headers it's a total failure,\n // a connection to the host was impossible.\n if (empty($data) && 0 == count($headers)) {\n throw new HttpException(500,'HTTP request failed, '.curl_error($handle));\n }\n }", "public function testErrorIsThrownIfURLIsInvalid()\n {\n self::$importer->get('invalid-google-url', now()->subYear(), now()->addYear());\n }", "public function testパラメータなしは400がかえる()\n {\n $response = $this->json('POST', '/api/users');\n\n $response->assertStatus(400);\n }", "public function getException($type, $error, $error_description = null, array $data = []);", "private function badRequest($args) {\n header('HTTP/1.0 400 Bad Request');\n print_r($args);\n exit;\n }", "function doGET (HttpRequest $request, HttpResponse $response) {\n throw new Exception(\"GET method not supported\");\n }", "public function actionError() {\n if ($error = Yii::app()->errorHandler->error) {\n\t\t\t$this->sendRestResponse(500,array(\n\t\t\t\t'status' => false,\n\t\t\t\t'message' => $error['message'],\n\t\t\t\t'data' => $error,\n\t\t\t));\t\t\t\n }\n\t}", "public function fault($exception = null, $format = 'json', $httpCode = null) {\n\t\t$error = false;\n\t\tif($exception instanceof OAuthException) {\n\t\t\t$error = [\n\t\t\t\t'code' => $exception->getCode(), 'message' => $exception->getMessage()\n\t\t\t];\n\t\t} else if($exception instanceof \\Exception) {\n\t\t\t$error = [\n\t\t\t\t'code' => $exception->getCode(), 'message' => $exception->getMessage()\n\t\t\t];\n\t\t} else {\n\t\t\t$error = [\n\t\t\t\t'code' => BAD_URL, 'message' => static::getError(BAD_URL)\n\t\t\t];\n\t\t}\n\n\t\tswitch($format) {\n\t\t\tcase 'xml':\n\t\t\t\t$errorXml = Response::error($error['code'], $error['message']);\n\t\t\t\treturn $errorXml;\n\n\t\t\tcase 'plain-text':\n\t\t\t\treturn Response::plain($error);\n\n\t\t\tcase 'json':\n\t\t\t\t$errorXml = Response::error($error['code'], $error['message'], false);\n\t\t\t\treturn Zend_Json::fromXml($errorXml);\n\t\t}\n\t}", "public static function throwError($message)\n {\n header('HTTP/1.0 404 Not Found');\n return $message;\n }", "public function testSendError()\n {\n $this->setMockHttpResponse('JsonPurchaseResponseError.txt');\n $response = $this->request->send();\n\n $data = $this->request->getData();\n\n $code = $response->response->getStatusCode();\n $this->assertFalse($response->isSuccessful());\n $this->assertEquals(500, $data['amount']);\n $this->assertEquals(400, $code);\n $this->assertSame('BAD_REQUEST', $response->getCode());\n $this->assertSame(\"This card is not accepted for Test transactions\", $response->getMessage());\n $this->assertNull($response->getTransactionReference());\n $this->assertNull($response->getCardReference());\n }", "protected function throwRedirectException() {}", "function exception_example($postdata, $primary, $xcrud)\n{\n $postdata_prepared = array_keys($postdata->to_array());\n shuffle($postdata_prepared);\n $random_field = array_shift($postdata_prepared);\n // set error message\n $xcrud->set_exception($random_field, 'This is a test error', 'error');\n}", "function exception_example($postdata, $primary, $xcrud) {\n $postdata_prepared = array_keys($postdata->to_array());\n shuffle($postdata_prepared);\n $random_field = array_shift($postdata_prepared);\n // set error message\n $xcrud->set_exception($random_field, 'This is a test error', 'error');\n}", "public function testSendBadDataException()\n {\n $spotCredential = [\n 'credentials' => [\n 'url' => 'notValid',\n 'userName' => 'spotUserName',\n 'password' => 'spotPassword',\n ],\n 'log' => [\n 'applicationId' => 1,\n 'agentId' => 1,\n ],\n ];\n\n $result = $this->spotApiSenderService->send(\n $this->requestData,\n $spotCredential\n );\n $this->assertInstanceOf(\n \"BadMethodCallException\",\n $result,\n \"Test method with bad spotOption data must throw exception\"\n );\n }" ]
[ "0.68838024", "0.671749", "0.6573866", "0.63624644", "0.63155794", "0.63108957", "0.6291802", "0.62610275", "0.6172622", "0.6172622", "0.61451316", "0.60719484", "0.604301", "0.6022391", "0.59747386", "0.5940825", "0.5937676", "0.5933105", "0.5902159", "0.5896398", "0.58920455", "0.5867391", "0.5853862", "0.58377403", "0.5834406", "0.583094", "0.5807006", "0.5796718", "0.577512", "0.5771745", "0.5767879", "0.57652515", "0.5762362", "0.5762083", "0.57480115", "0.57450634", "0.5737367", "0.5731788", "0.57196003", "0.5718946", "0.5715818", "0.57142824", "0.5709279", "0.5701943", "0.5682638", "0.5669336", "0.5666952", "0.566205", "0.5661695", "0.5658984", "0.56560177", "0.56520474", "0.56379366", "0.5636393", "0.5628451", "0.5627553", "0.56060433", "0.56031215", "0.5601371", "0.5595078", "0.5588648", "0.55827373", "0.5561685", "0.55577546", "0.5552512", "0.5547512", "0.5547417", "0.55460775", "0.55406785", "0.55387896", "0.5531192", "0.55311793", "0.55242354", "0.55230534", "0.5522558", "0.5522484", "0.55124277", "0.55091345", "0.5508962", "0.5506025", "0.55015343", "0.5488626", "0.54851145", "0.5479402", "0.54791826", "0.5476891", "0.5472097", "0.54707277", "0.5470597", "0.5469756", "0.5466883", "0.5463239", "0.54608023", "0.5458367", "0.5457467", "0.5450471", "0.5448572", "0.5445399", "0.5441653", "0.54411083", "0.543476" ]
0.0
-1
Works with route collector. this function add a new when collection
function when($uri, $action) { return Route::when($uri, $action); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add( Route $route ): Collection;", "public function configureRoutes(RouteCollection $collection) {\n parent::configureRoutes($collection);\n $collection\n ->remove('create')\n ->add('take','{objectId}/take');\n }", "public function addRoutes($routes);", "public function testAddRouteAsObject()\n {\n $this->collection->add(new Route('name', '/', 'action'));\n $this->collection->compile();\n\n $this->assertCount(1, $this->collection->all());\n }", "public function register_routes( Collection $routes );", "public function addRoutes(RouteCollectionInterface $collection) : RouterInterface;", "static public function addRoutes(sfEvent $event)\n {\n $r = $event->getSubject();\n\n $r->prependRoute('dkp_manager_suggestRaidUsers', new sfRoute('/suggestRaidUsers', array(\n 'module' => 'dkp_manager',\n 'action' => 'suggestRaidUsers'\n )));\n\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "function add_route($route, callable $closure)\n\n {\n// $route = self::APP_PREFIX.$route;\n// die($route);\n $this->routes[$route] = $closure;\n }", "function tribe_events_agenda_add_routes( $wp_rewrite ) {\n\t\t\t// Get the instance of the TribeEvents plugin, and the rewriteSlug that the plugin uses\n\t\t\t$tec = Tribe__Events__Main::instance();\n\t\t\t$tec_rewrite_slug = trailingslashit( $tec->rewriteSlug );\n\n\t\t\t// create new rule for the agenda view\n\t\t\t$newRules = array(\n\t\t\t\t$tec_rewrite_slug . 'agenda/?$' => 'index.php?post_type=' . Tribe__Events__Main::POSTTYPE . '&eventDisplay=agenda',\n\t\t\t);\n\n\t\t\t// Add the new rule to the global rewrite rules array\n\t\t\t$wp_rewrite->rules = $newRules + $wp_rewrite->rules;\n\t\t}", "public function __construct(){\n\n $this->routes = new \\SplObjectStorage();\n\n }", "public function register_routes() {\n\n\t\t\\add_filter( 'do_parse_request', array( $this, 'handle_routing' ) );\n\n\t}", "private function addRoute()\n {\n if (! $this->postType->rewrite) {\n return;\n }\n $postTypeSlug = $this->postType->rewrite['slug'];\n $this->cortexRoutes->addRoute(new QueryRoute(\n \"{$postTypeSlug}/{postName}/{singleChildName}\",\n function (array $matches) use ($postTypeSlug) {\n $queryPost = new QueryPost(\n $this->postType->name,\n $matches['postName']\n );\n if (! $queryPost->postExists()) {\n new TemplateRenderer('404');\n }\n $postSingle = $queryPost->getPost();\n new TemplateRenderer(\n $postTypeSlug,\n $matches['singleChildName'],\n $this->makeDataArray(\n $postSingle->ID,\n $matches['singleChildName']\n ),\n $this->templateRootDirectory\n );\n die();\n }\n ));\n }", "public function testRouterAddByAdd($method)\n {\n $router = new Router();\n\n $router->add(\"about\", function () {\n return \"about\";\n });\n\n $res = $router->handle(\"about\", $method);\n $this->assertEquals(\"about\", $res);\n\n $routes = $router->getAll();\n $this->assertEquals(1, count($routes));\n }", "function\taddRoute($routeData){\n\t\t//$this->routes[] = $route;\n\t\t$this->routes[] = $routeData;\n\t}", "public function onRoomsAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function register_routes() {\n\n\t\t$namespace = $this->namespace;\n\n\t\t$base = $this->rest_base;\n\n\t\tregister_rest_route( $namespace, '/' . $base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t) );\n\t}", "protected function configureRoutes(RouteCollection $collection)\n {\n //$collection->remove('create');\n }", "public function add()\n\t{\n\t\t// Only add the events if we are on that controller\n\t\tif (Router::$controller == 'main')\n\t\t{\n\t\t\tEvent::add('ushahidi_filter.view_pre_render.layout', array($this, 'add_requirements'));\n\t\t\t\n\t\t\tEvent::add('ushahidi_action.header_scripts', array($this, '_main_js'));\n\t\t\tEvent::add('ushahidi_action.map_main_filters', array($this, '_button'));\n\t\t}\n\t}", "static public function addRouteForAdminMenu(sfEvent $event)\n {\n $r = $event->getSubject();\n\n $r->prependRoute('cre8_menu_content', new sfPropel15RouteCollection(array(\n 'name' => 'cre8_menu_content',\n 'model' => 'Cre8MenuContent',\n 'module' => 'cre8MenuAdmin',\n 'prefix_path'\t\t\t => 'menu-content-admin',\n 'with_wildcard_routes' => true,\n 'requirements' => array(),\n )));\n\n }", "public function addRoute (Cmf_Route $route) {\n $this->_routes[$route->getName()] = $route;\n }", "protected function addRoutes()\n {\n $stub = $this->constructStub(base_path(config('l5-api.route_stub')));\n\n $routesFile = app_path(config('l5-api.routes_file'));\n\n // read file\n $lines = file($routesFile);\n $lastLine = trim($lines[count($lines) - 1]);\n\n // modify file\n if (strcmp($lastLine, '});') === 0) {\n $lines[count($lines) - 1] = ' '.$stub;\n $lines[] = \"\\r\\n});\\r\\n\";\n } else {\n $lines[] = \"$stub\\r\\n\";\n }\n\n // save file\n $fp = fopen($routesFile, 'w');\n fwrite($fp, implode('', $lines));\n fclose($fp);\n\n $this->info('Routes added successfully.');\n }", "public function mapVia(string $routePattern, $handler, $method, string $name = null): CollectionInterface\n {\n }", "public function testRouterAddByAddTwoRoutesOneHandler()\n {\n $router = new Router();\n\n $router->add([\"\", \"about\"], function () {\n return \"yes\";\n });\n\n $res = $router->handle(\"\");\n $this->assertEquals(\"yes\", $res);\n\n $last = $router->getLastRoute();\n $this->assertEquals(\"\", $last);\n\n $res = $router->handle(\"about\");\n $this->assertEquals(\"yes\", $res);\n\n $last = $router->getLastRoute();\n $this->assertEquals(\"about\", $last);\n\n $routes = $router->getAll();\n $this->assertEquals(2, count($routes));\n }", "public function add()\n\t{\n\t\tEvent::add('ushahidi_filter.fetch_incidents_set_params', array($this, '_fetch_incidents_set_params'));\n\t\tEvent::add('ushahidi_filter.json_index_features', array($this, '_json_index_features'));\n\n\t\t// Add a Sub-Nav Link\n\t\tEvent::add('ushahidi_action.nav_admin_reports', array($this, '_report_link'));\n\n\t\t// Only add the events if we are on that controller\n\t\tif (Router::$controller == 'reports')\n\t\t{\n\t\t\n\t\t\tEvent::add('ushahidi_action.report_filters_ui', array($this, '_reports_filters'));\n\t\t\tEvent::add('ushahidi_action.report_js_filterReportsAction', array($this, '_reports_filters_js'));\n\n\t\t\n\t\t\tswitch (Router::$method)\n\t\t\t{\n\t\t\t\t// Hook into the Report Add/Edit Form in Admin\n\t\t\t\tcase 'edit':\n\t\t\t\t\t// Hook into the form itself\n\t\t\t\t\tEvent::add('ushahidi_action.report_form_admin', array($this, '_report_form'));\n\t\t\t\t\t// Hook into the report_submit_admin (post_POST) event right before saving\n\t\t\t\t\t// Event::add('ushahidi_action.report_submit_admin', array($this, '_report_validate'));\n\t\t\t\t\t// Hook into the report_edit (post_SAVE) event\n\t\t\t\t\tEvent::add('ushahidi_action.report_edit', array($this, '_report_form_submit'));\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Hook into the Report view (front end)\n\t\t\t\tcase 'view':\n\t\t\t\t\tplugin::add_stylesheet('actionable/css/actionable');\n\t\t\t\t\tEvent::add('ushahidi_action.report_meta', array($this, '_report_view'));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telseif (Router::$controller == 'feed')\n\t\t{\n\t\t\t// Add Actionable Tag to RSS Feed\n\t\t\tEvent::add('ushahidi_action.feed_rss_item', array($this, '_feed_rss'));\n\t\t}\n\t\telseif (Router::$controller == 'main')\n\t\t{\t\n\t\t\tplugin::add_stylesheet('actionable/css/actionable_filter');\n\t\t\tEvent::add('ushahidi_action.map_main_filters', array($this, '_map_main_filters'));\n\t\t}\n\t\telseif (Router::$controller == 'json' OR Router::$controller == 'bigmap_json')\n\t\t{\t\t\t\n\t\t\t// Never cluster actionable json\n\t\t\tif (Router::$method == 'cluster' AND $this->_check_media_type())\n\t\t\t{\n/* \t\t\t\tRouter::$method = 'index'; */\n\t\t\t}\n\t\t}\n\t}", "function add_route($route, $function, $method='GET') {\n array_push($this->routers, Array(\n 'expression' => $route,\n 'function' => $function,\n 'method' => $method\n ));\n }", "public function put(string $routePattern, $handler, string $name = null): CollectionInterface\n {\n }", "public function addRoutes()\n {\n //Get the routes template content\n $content = \\File::get($this->package_path('Templates/routes.php'));\n //Append to the routes.php file\n $this->addToFile('routes.php', 'routes', \"\\n\\n\" . $content);\n }", "public function routeStartup()\n {\n //...\n }", "public function map(string $routePattern, $handler, string $name = null): CollectionInterface\n {\n }", "public function addCollection(MethodCollection $collection)\n {\n // would not place the new route at the end of the merged array\n foreach ($collection->all() as $name => $route) {\n unset($this->methods[$name]);\n $this->methods[$name] = $route;\n }\n\n $this->resources = array_merge($this->resources, $collection->getResources());\n }", "public function addRoutes($data){\n\t\t$result = $this->db->insert('events', $data);\t// insert data into `users` table\t\n\t\treturn $this->db->insert_id();\n\t}", "function add_listing_routes()\n {\n $this->add_route('GET', '/routes', function(){\n print \"<h1>Routes</h1>\";\n foreach($this->routes as $method => $routes) {\n print \"<h3>\".$method.\"</h3>\";\n print \"<ul>\";\n foreach ($routes as $route) {\n print \"<li>\".$route->path.\"</li>\";\n }\n print \"</ul>\";\n }\n });\n }", "public function hookDefineRoutes($args)\n {\n if (is_admin_theme() && !get_option('clean_url_use_admin')) {\n return;\n }\n\n $router = $args['router'];\n\n $mainPath = get_option('clean_url_main_path');\n $collectionGeneric = get_option('clean_url_collection_generic');\n $itemGeneric = get_option('clean_url_item_generic');\n $fileGeneric = get_option('clean_url_file_generic');\n\n $allowedForItems = unserialize(get_option('clean_url_item_alloweds'));\n $allowedForFiles = unserialize(get_option('clean_url_file_alloweds'));\n\n // Note: order of routes is important: Zend checks from the last one\n // (most specific) to the first one (most generic).\n\n // Get all collections identifiers with one query.\n $collectionsIdentifiers = get_view()->getRecordTypeIdentifiers('Collection', false);\n\n if (!empty($collectionsIdentifiers)) {\n // Use one regex for all collections. Default is case insensitve.\n $collectionsRegex = array_map('preg_quote', $collectionsIdentifiers);\n // To avoid a bug with identifiers that contain a \"/\", that is not\n // escaped with preg_quote().\n $collectionsRegex = '(' . str_replace('/', '\\/', implode('|', $collectionsRegex)) . ')';\n\n // Add a collection route.\n $route = $mainPath . $collectionGeneric;\n $router->addRoute('cleanUrl_collections', new Zend_Controller_Router_Route(\n $route . ':record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'collection-show',\n ),\n array(\n 'record_identifier' => $collectionsRegex,\n )));\n\n // Add a collection route for files.\n if (in_array('collection', $allowedForFiles)) {\n $router->addRoute('cleanUrl_collections_file', new Zend_Controller_Router_Route(\n $route . ':collection_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-collection-file',\n ),\n array(\n 'collection_identifier' => $collectionsRegex,\n )));\n }\n\n // Add a collection / item route for files.\n if (in_array('collection_item', $allowedForFiles)) {\n $router->addRoute('cleanUrl_collections_item_file', new Zend_Controller_Router_Route(\n $route . ':collection_identifier/:item_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-collection-item-file',\n ),\n array(\n 'collection_identifier' => $collectionsRegex,\n )));\n }\n\n // Add a collection route for items.\n if (in_array('collection', $allowedForItems)) {\n $router->addRoute('cleanUrl_collections_item', new Zend_Controller_Router_Route(\n $route . ':collection_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-collection-item',\n ),\n array(\n 'collection_identifier' => $collectionsRegex,\n )));\n }\n }\n\n // Add a generic route for files.\n if (in_array('generic', $allowedForFiles)) {\n $route = $mainPath . $fileGeneric;\n $router->addRoute('cleanUrl_generic_file', new Zend_Controller_Router_Route(\n $route . ':record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-file',\n 'collection_id' => NULL,\n )));\n }\n\n // Add a generic / item route for files.\n if (in_array('generic_item', $allowedForFiles)) {\n $route = $mainPath . $itemGeneric;\n $router->addRoute('cleanUrl_generic_item_file', new Zend_Controller_Router_Route(\n $route . ':item_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-item-file',\n 'collection_id' => NULL,\n )));\n }\n\n // Add a generic route for items.\n if (in_array('generic', $allowedForItems)) {\n $route = $mainPath . trim($itemGeneric, '/');\n $router->addRoute('cleanUrl_generic_items_browse', new Zend_Controller_Router_Route(\n $route,\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'items-browse',\n )));\n $router->addRoute('cleanUrl_generic_item', new Zend_Controller_Router_Route(\n $route . '/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-item',\n 'collection_id' => NULL,\n )));\n }\n }", "public function add()\n\t{\n\t\t// Add Sidebar Box\n\t\tEvent::add('ushahidi_action.main_sidebar', array($this, 'county_sidebar'));\n\n\t\t// Only add the events if we are on that controller\n\t\tif (Router::$controller == 'main')\n\t\t{\n\t\t\t// Add County/Constituency/Polling Station Layers\n\t\t\tEvent::add('ushahidi_action.header_scripts', array($this, 'main_js'));\n\t\t}\n\n\t\tif (Router::$controller == 'reports' AND Router::$method == 'edit')\n\t\t{\n\t\t\tEvent::add('ushahidi_action.header_scripts', array($this, 'const_js'));\t\n\t\t}\n\t\t\n\t\tif (stripos(Router::$current_uri, \"admin/reports/download\") !== false)\n\t\t{\n\t\t\tEvent::add('ushahidi_filter.report_download_csv_header', array($this, 'csv_header'));\n\t\t\tEvent::add('ushahidi_filter.report_download_csv_incident', array($this, 'csv_incident'));\n\t\t\tEvent::add('ushahidi_action.reports_download_form_data', array($this, 'reports_download_form_data'));\n\t\t}\n\n\t\tplugin::add_stylesheet('iebc/views/css/iebc');\n\n\t\tEvent::add('ushahidi_action.report_form_admin_location', array($this, 'const_select'));\n\n\t\t// Add Constituency Select Parameters\n\t\tEvent::add('ushahidi_filter.fetch_incidents_set_params', array($this, 'filter'));\t\n\n\t\t// Add Sidebar Box\n\t\tEvent::add('ushahidi_action.main_sidebar', array($this, 'county_sidebar'));\n\t}", "function createRoute(){\n\t\t//This is to prevent entering a low cost route first, get it validated and then update\n\t\t//the route to a high cost one.\n\t\t\n\t\t$query = \"insert into ast_rt_extensions (context, exten, priority, app, appdata,last_checked) \n\t\t\t\t\tvalues ('$this->context', \n\t\t\t\t\t\t\t'$this->exten', \n\t\t\t\t\t\t\t$this->priority, \n\t\t\t\t\t\t\t'$this->app', \n\t\t\t\t\t\t\t'\".mysql_real_escape_string($this->appdata).\"',\n\t\t\t\t\t\t\t'2011-09-19 23:07:27')\";\n\t\t$result = mysql_query($query);\n\t\tif(mysql_error()!=\"\"){\n\t\t\tdie(\"ERROR in createRoute: \".mysql_errno().\"<br>Description: \".mysql_error());\n\t\t}\n\t\tif($result){\n\t\t\treturn mysql_insert_id();\n\t\t}else{\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t}", "private static function registerRoute($route) {\n global $Routes;\n $Routes[] = $route;\n }", "public function postEventadd();", "public function setRoutes() {\n $this->api->addRoute(\"/^\\/comments\\/([a-z]+)\\/(\\d+)\\/?$/\", 'getComments', $this, 'GET', \\Auth::READ); // Get list with all comments\n $this->api->addRoute(\"/^\\/comments\\/(\\d+)\\/?$/\", 'getCommentsByTime', $this, 'GET', \\Auth::READ); // Get 50 comments after a given timestamp\n $this->api->addRoute(\"/^\\/comments\\/(\\d+)\\/(\\d+)\\/?$/\", 'getCommentsByTime', $this, 'GET', \\Auth::READ); // Get 50 comments after a given timestamp with offset\n $this->api->addRoute(\"/^\\/comment\\/([a-z]+)\\/(\\d+)\\/?$/\", 'createComment', $this, 'POST', \\Auth::EXECUTE); // Create a new comment\n $this->api->addRoute(\"/^\\/comment\\/(\\d+)\\/?$/\", 'updateCommentById', $this, 'PUT', \\Auth::READ); // Updates the given comment\n $this->api->addRoute(\"/^\\/comment\\/(\\d+)\\/?$/\", 'deleteCommentById', $this, 'DELETE', \\Auth::READ); // Removes the given comment\n $this->api->addRoute(\"/^\\/comment\\/(\\d+)\\/parents\\/?$/\", 'getCommentParentsById', $this, 'GET', \\Auth::READ); // Gets a list containing the parent id path to the given comment\n }", "public function __construct(Collection $routes)\n {\n $this->routes = $routes;\n }", "public function addRoutes(): void\n {\n $router = $this->config['router'] ?? Router::class;\n $router::$DELIMITER = $this->delimiter;\n foreach (static::$routes as [$url, $func, $method]) {\n $router::add($url, [$this, $func], $method);\n }\n }", "protected function add() {\n\t}", "public function testAddCallableConvertsToRoute()\n {\n $routes = new RouteCollection();\n\n $callable = function () {\n };\n\n // Add our data\n $routes->add($callable);\n\n $this->assertNotSame($callable, current($routes->all()));\n $this->assertTrue(current($routes->all()) instanceof Route);\n }", "public function collect(Array $route) {\n array_push($this->collection, $route);\n }", "function create_initial_rest_routes()\n {\n }", "public function declare_routes(){\n\n $this->routes = \\Chocolatine\\get_configuration( 'routes' );\n $view_manager = \\Chocolatine\\get_manager('view');\n\n /**\n * Declare all route\n */\n foreach ( $this->routes as $key => $current_route) {\n\n $this->router->map(['GET', 'POST'], $current_route['route'] ,function ($request, $response, $args) {\n\n $router = \\Chocolatine\\get_service( 'Router' );\n return $router->controller( $request, $response, $args );\n\n });\n\n }\n\n }", "function routes_install()\r\n{\r\n\tregister_hook('init_1', 'addon/routes/routes.php', 'routes_init_1');\r\n\tregister_hook('post_local', 'addon/routes/routes.php', 'routes_post_local_end_hook');\r\n\tregister_hook('profile_tabs', 'addon/routes/routes.php', 'routes_profile_tabs_hook');\r\n}", "public function register_routes() {\n register_rest_route(\n $this->namespace, '/' . $this->base, array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'get_announcements' ),\n 'args' => array_merge(\n $this->get_collection_params(), array(\n 'status' => array(\n 'type' => 'string',\n 'description' => __( 'Announcement status', 'dokan' ),\n 'required' => false,\n ),\n )\n ),\n 'permission_callback' => array( $this, 'get_announcement_permissions_check' ),\n ),\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array( $this, 'create_announcement' ),\n 'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),\n 'permission_callback' => array( $this, 'create_announcement_permissions_check' ),\n ),\n )\n );\n\n register_rest_route(\n $this->namespace, '/' . $this->base . '/(?P<id>[\\d]+)/', array(\n 'args' => array(\n 'id' => array(\n 'description' => __( 'Unique identifier for the object.', 'dokan' ),\n 'type' => 'integer',\n ),\n ),\n\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'get_announcement' ),\n 'permission_callback' => array( $this, 'get_announcement_permissions_check' ),\n ),\n\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'update_announcement' ),\n 'permission_callback' => array( $this, 'get_announcement_permissions_check' ),\n ),\n\n array(\n 'methods' => WP_REST_Server::DELETABLE,\n 'callback' => array( $this, 'delete_announcement' ),\n 'permission_callback' => array( $this, 'get_announcement_permissions_check' ),\n ),\n\n )\n );\n\n register_rest_route(\n $this->namespace, '/' . $this->base . '/(?P<id>[\\d]+)/restore', array(\n 'args' => array(\n 'id' => array(\n 'description' => __( 'Unique identifier for the object.', 'dokan' ),\n 'type' => 'integer',\n ),\n ),\n\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'restore_announcement' ),\n 'permission_callback' => array( $this, 'restore_announcement_permissions_check' ),\n ),\n )\n );\n\n register_rest_route(\n $this->namespace, '/' . $this->base . '/batch', array(\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'batch_items' ),\n 'permission_callback' => array( $this, 'batch_items_permissions_check' ),\n 'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),\n ),\n )\n );\n }", "private function setRoutes() : void\n {\n $this->routes = $this->routeProvider->getRoutes();\n $this->syRouteCollection = new RouteCollection();\n foreach ($this->routes as $route) {\n $syRoute = new SymfonyRoute(\n $route->getPath(),\n $route->getParamsDefaults(),\n $route->getParamsRequirements(),\n [],\n '',\n [],\n $route->getMethods()\n );\n $this->syRouteCollection->add($route->getName(), $syRoute);\n }\n }", "public function __construct(RouteCollection $routeCollection){\n\t\t$this->routeCollection = $routeCollection;\n\t}", "public function addResources(RouteCollection $i18nRouteCollection);", "public function register_routes() {\n\t\t$version = '1';\n\t\t$namespace = 'askmedesk/v' . $version;\n register_rest_route( $namespace, '/tipi-richiesta', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => [$this, 'get_tipi_richiesta'],\n 'permission_callback' => [$this, 'askmedesk_permission_check']\n\t\t));\n\t\tregister_rest_route($namespace, '/creazione-richiesta', array(\n\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t'callback' => [$this, 'crea_richiesta'],\n\t\t\t'permission_callback' => [$this, 'askmedesk_permission_check'],\n\t\t\t'args' => $this->get_endpoint_args_for_item_schema( false )\n\t\t));\n\t}", "public function boot()\n {\n Route::resourceVerbs(['create' => 'add']);\n }", "public function addRoute($route, RouteDocument $routeDocument);", "function __construct()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}", "private static function registerRoute($route){\r\n global $Routes;\r\n $Routes[] = BASEDIR.$route;\r\n }", "function afterroute() {\r\n\r\n }", "public function add()\n\t{\n\t\tEvent::add('ushahidi_filter.map_base_layers', array($this, '_add_layer'));\n\t\tif (Router::$controller != 'settings')\n\t\t{\n\t\t\tEvent::add('ushahidi_filter.map_layers_js', array($this, '_add_map_layers_js'));\n\t\t}\n\t}", "public function addRoute(string $uri, \\Closure $fn) : void\n {\n $this->routes[$uri] = $fn;\n }", "public function post(string $routePattern, $handler, string $name = null): CollectionInterface\n {\n }", "public function onTickettypesAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "function afterroute() {\n\t}", "public function hookDefineRoutes($args) {\n\t\t$args['router']->addConfig(new Zend_Config_Ini(dirname(__FILE__) . '/routes.ini', 'routes'));\n\t}", "function register_routes(){\n \tregister_rest_route( parent::get_api_base(), $this->controller . 'get' , array(\n \t\t'methods' => WP_REST_Server::READABLE,\n \t\t'callback' => array($this,'run_cron'),\n\n \t\t//'permission_callback' => array( $this, 'get_item_permissions_check' ),\n \t));\n\t}", "abstract public function addRoute($url, $ctrl, $mth);", "protected function attach(Route $route)\n {\n if ($this->routeExists($route->getPath(), $route->getMethod()) === true) {\n throw new RouteExistsException(\"The route '\".$route->getPath().\" already exists in route collection\");\n }\n\n $this->collection[] = $route;\n }", "public function addRoute($pattern, $handler)\n {\n $this->routes->append($pattern, $handler);\n }", "public function create()\n\t{\n\t\t// handled by backbone routes\n\t}", "public function register_routes()\n {\n\n $namespace = 'api/v1';\n $base = 'categories';\n\n register_rest_route($namespace, '/' . $base, array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array($this, 'create_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n\n register_rest_route($namespace, '/' . $base . '/(?P<id>\\d+)', array(\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array($this, 'update_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n }" ]
[ "0.60678804", "0.5951952", "0.55835485", "0.5565826", "0.5545252", "0.55266935", "0.5517881", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.54823977", "0.5482027", "0.5460009", "0.54522216", "0.54520434", "0.5414349", "0.5388317", "0.5356536", "0.5324813", "0.53116", "0.5294262", "0.52900517", "0.52715325", "0.5241801", "0.52094704", "0.520018", "0.5193297", "0.5191085", "0.51867324", "0.5182517", "0.51761824", "0.5170265", "0.5152957", "0.51504695", "0.51416034", "0.5129118", "0.512632", "0.51261926", "0.5111522", "0.5111195", "0.51030946", "0.5099983", "0.50913095", "0.5090104", "0.5086657", "0.50860965", "0.50852513", "0.50850075", "0.5075108", "0.5073087", "0.5071749", "0.50391173", "0.50385785", "0.50276387", "0.50186276", "0.5017987", "0.50043684", "0.49996516", "0.49867514", "0.49809825", "0.49774507", "0.4955817", "0.49536046", "0.49492067", "0.49463743", "0.49440718", "0.49435627", "0.49427035", "0.49395114", "0.4928003", "0.4914732", "0.48996705", "0.48798257" ]
0.0
-1
add a new group collection to router
function group($name, $action, Closure $callback) { return Route::group($name, $action, $callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateGroup()\n {\n $this->collection->get('name', '/path', 'action');\n\n $this->collection->group('blog.', '/blog', function($collection) {\n $collection->get('name', '/path', 'action');\n });\n\n\n $routes = $this->collection->all();\n\n $this->assertCount(2, $routes);\n\n $this->assertArrayHasKey('0', $routes);\n $this->assertArrayHasKey('1', $routes);\n\n $this->assertEquals('name', $routes[0]->getName());\n $this->assertEquals('/path', $routes[0]->getSourceRoute());\n\n $this->assertEquals('blog.name', $routes[1]->getName());\n $this->assertEquals('/blog/path', $routes[1]->getSourceRoute());\n }", "public function add()\n {\n $group = $this->Groups->newEntity();\n if ($this->request->is('post') && !empty($this->request->data)) {\n $this->Groups->patchEntity($group, $this->request->data);\n if ($this->Groups->save($group)) {\n $this->Flash->success(__d('wasabi_core', 'The group <strong>{0}</strong> has been created.', $this->request->data['name']));\n $this->redirect(['action' => 'index']);\n return;\n } else {\n $this->Flash->error($this->formErrorMessage);\n }\n }\n $this->set('group', $group);\n }", "public function addGroup($group) {}", "function add() {\n if(!$this->request->is('restful')) {\n // We can't just saveAll because Cake will create rows in the database for all\n // non-member non-owners, which is silly. Create a version without those\n // entries (and properly structured).\n \n // Set page title\n $this->set('title_for_layout', _txt('op.add-a', array(_txt('ct.co_group_members.1'))));\n\n // We may get here via co_groups, in which case co_group_id is static, or\n // via co_people, in which case co_person_id is static\n \n $a = array('CoGroupMember' => array());\n\n foreach($this->request->data['CoGroupMember'] as $g)\n {\n // Must be a member or an owner to get a row created\n \n if(is_array($g)\n && ((isset($g['member']) && $g['member'])\n || (isset($g['owner']) && $g['owner'])))\n {\n $a['CoGroupMember'][] = array(\n 'co_group_id' => (!empty($g['co_group_id'])\n ? $g['co_group_id']\n : $this->request->data['CoGroupMember']['co_group_id']),\n 'co_person_id' => (!empty($g['co_person_id'])\n ? $g['co_person_id']\n : $this->request->data['CoGroupMember']['co_person_id']),\n 'member' => $g['member'],\n 'owner' => $g['owner']\n );\n }\n }\n \n if(count($a['CoGroupMember']) > 0) {\n if($this->CoGroupMember->saveAll($a['CoGroupMember']))\n $this->Flash->set(_txt('rs.added'), array('key' => 'success'));\n else\n $this->Flash->set($this->fieldsErrorToString($this->CoGroupMember->invalidFields()), array('key' => 'error'));\n } else {\n $this->Flash->set(_txt('er.grm.none'), array('key' => 'information'));\n }\n \n $this->performRedirect();\n }\n else\n parent::add();\n }", "public function addGroup(){\n \treturn view('group.add-group');\n }", "public function addAction() {\n list(, $groups) = Admin_Service_Group::getAllGroup();\n $this->assign('groups', $groups);\n $this->assign(\"meunOn\", \"sys_user\");\n }", "function add() {\n $this->set('groups', $this->Group->find('all'));\n if (!empty($this->data)) {\n if ($this->Group->save($this->data)) {\n $this->Session->setFlash('The group has been saved.');\n } else {\n $this->Session->setFlash('Failed saving the group.');\n }\n }\n }", "public function addRoutes(RouteCollectionInterface $collection) : RouterInterface;", "public function admin_add(){\n \n $this->set(\"title_for_layout\",\"Create a Satellite Group\");\n \n // Load all existing satellites\n $this->set('satellites', $this->Satellite->find('all'));\n }", "public function addGroup(string $group): void;", "public function add()\n {\n if ($this->request->is('post')) {\n $this->Group->create();\n if ($this->Group->save($this->request->data)) {\n $this->Flash->success(__('The group has been created'));\n\n // redirect to page index\n return $this->redirect(array('action' => 'index'));\n }\n $this->Flash->error(\n __('The group could not be saved. Please, try again.')\n );\n }\n }", "public function addAction() {\n\t\tlist(, $groups) = Resource_Service_Pgroup::getAllPgroup();\n\t\t$this->assign('groups', $groups);\n\t\t$this->assign('ntype', $this->ntype);\n\t\t$this->assign('btype', $this->btype);\n\t}", "public function addGroup($name);", "public function addGroup(Group $group);", "public function register_routes() {\n\n\t\t\t$collection_params = $this->get_collection_params();\n\t\t\t$schema = $this->get_item_schema();\n\n\t\t\t$get_item_args = array(\n\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t);\n\n\t\t\tregister_rest_route(\n\t\t\t\t$this->namespace,\n\t\t\t\t'/' . $this->rest_base . '/(?P<id>[\\d]+)/' . $this->rest_sub_base,\n\t\t\t\tarray(\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t\t'description' => esc_html__( 'User ID', 'learndash' ),\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'get_user_groups' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'get_user_groups_permissions_check' ),\n\t\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'update_user_groups' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'update_user_groups_permissions_check' ),\n\t\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t\t'group_ids' => array(\n\t\t\t\t\t\t\t\t'description' => esc_html__( 'Group IDs to add to User.', 'learndash' ),\n\t\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'delete_user_groups' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'delete_user_groups_permissions_check' ),\n\t\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t\t'group_ids' => array(\n\t\t\t\t\t\t\t\t'description' => esc_html__( 'Group IDs to remove from User.', 'learndash' ),\n\t\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t\t\t),\n\t\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'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t\t)\n\t\t\t);\n\t\t}", "public function addAction()\n {\n $form = $this->groupForm;\n $group = new Group();\n /** @var Request $request */\n $request = $this->getRequest();\n\n $form->bind($group);\n\n if ($request->isPost()) {\n $form->setData($request->getPost());\n\n if ($form->isValid()) {\n//\t\t\t\t$group->exchangeArray($form->getData());\n\n try {\n $storageData = $form->getData(FormInterface::VALUES_AS_ARRAY);\n $group->exchangeArray($storageData['group']);\n $idGroup = $this->groupTable->save($group);\n\n $this->flashMessenger()->addSuccessMessage('saved_group');\n\n return $this->redirectTo('edit', $idGroup);\n } catch (\\Exception $e) {\n $this->flashMessenger()->addErrorMessage($e->getMessage());\n }\n } else {\n $this->flashMessenger->addErrorMessage('form_invalid');\n }\n }\n\n $form->setAttribute('action', $this->makeUrl('group', 'add'));\n\n return $this->getAjaxView(array(\n 'customform' => $form,\n 'lockLists' => array(),\n 'title' => 'group_add',\n ), 'libadmin/group/edit');\n }", "public function addGroup() {\n\t\tif ($this->request -> isPost()) {\n\t\t\t$this->UserGroup->set($this->data);\n\t\t\tif ($this->UserGroup->addValidate()) {\n\t\t\t\t$this->UserGroup->save($this->request->data,false);\n\t\t\t\t$this->Session->setFlash(__('The group is successfully added'));\n\t\t\t\t$this->redirect('/addGroup');\n\t\t\t}\n\t\t}\n\t}", "function addGroup(&$args, &$request) {\n\t\t// Calling editMasthead with an empty row id will add\n\t\t// a new masthead.\n\t\t$this->editGroup($args, $request);\n\t}", "function addGroupHandler() {\n global $inputs;\n\n $lastId = insert('group',[\n 'admin_id' => getLogin()['uid'],\n 'group_name' => $inputs['name'],\n 'description' => $inputs['desc'],\n ]);\n\n formatOutput(true, 'add success');\n}", "public function add_group_page()\n {\n\n $this->authorize('create', Group::class);\n\n return view('pages.add_group');\n }", "function addGroup($groupname){\r\n\t\t$file=fopen($this->fHtgroup,\"a\");\r\n\t\tfclose($file);\r\n\t}", "function addGroup($groupname){\n $file=fopen($this->fHtgroup,\"a\");\n fclose($file);\n }", "function addGroup($groupname){\n $file=fopen($this->fHtgroup,\"a\");\n fclose($file);\n }", "function eio_grp_add($grp, $req)\n{\n}", "public function addGroupView()\n {\n return view('groups.add_edit')\n ->with('formAction', route(Constants::ROUTES_GROUPS_STORE))\n ->with('btnText', 'Add')\n ->with('pageTitle', config('app.name') . ' | Group');\n }", "public function createCollection($name) {}", "public function add()\n {\n // cria entidade de grupo\n $group = $this->Groups->newEntity();\n $id = uniqid();\n //se requisição for post\n if ($this->request->is('post')) {\n //popula entidade de grupo com os dados do form\n $group = $this->Groups->patchEntity($group, $this->request->getData());\n //se salvar retorna sucesso\n if ($this->Groups->save($group,['associated' => ['UsersGroup']])) {\n\n //Cria userGroup com o usuario que tá criando o grupo e role 2 = criador\n $userGroupData = ['user_id'=>$this->user['id'],'group_id'=>$group->id,'role'=>2,'invite_status'=>1];\n $userGroup = $this->Groups->UsersGroup->newEntity($userGroupData);\n $this->Groups->UsersGroup->save($userGroup);\n $this->Flash->success(__(\"O grupo $group[name] foi criado com sucesso \"));\n\n return $this->redirect(['action' => 'add']);\n }\n $this->Flash->error(__('Não foi possivel criar o grupo pois erros ocorreram:'),['params'=>['errors'=>$group->getErrors()]]);\n }\n //configuração de variáveis para view\n $this->set(compact('group','id'));\n $this->set('user',$this->user);\n $this->set('invites',$this->invites);\n $this->set('eventNotifications',$this->eventNotifications);\n $this->set('sortNotifications',$this->sortNotifications);\n $this->set('messageNotifications',$this->messageNotifications);\n $this->set('_serialize', ['group']);\n }", "public function add( Route $route ): Collection;", "public function add(string $group)\n {\n $this->groups[] = $group;\n }", "public function create()\n {\n return view('AdminPanel.Collection.AddCollection');\n }", "function new_groups()\n {\n \n }", "public function addCollection($collection, $url_prefix = null)\n {\n foreach ( $collection as $link ) {\n $link->prefix = $url_prefix;\n }\n\n $this->collections[] = $collection;\n }", "public function actionAdd()\n {\n if (Yii::$app->getRequest()->Post('gid') && Yii::$app->getRequest()->Post('iid')) {\n $landingPageId = (int)Yii::$app->getRequest()->Post('gid');\n $groupingId = (int)Yii::$app->getRequest()->Post('iid');\n $model = LandingPageGrouping::find()->andWhere(['landing_page_id' => $landingPageId])->\n andWhere(['grouping_id' => $groupingId])->one();\n if (!$model) {\n $model = new LandingPageGrouping();\n $model->landing_page_id = $landingPageId;\n $model->grouping_id = $groupingId;\n if ($model->validate()) {\n $model->save();\n }\n }\n\n $groupings = Grouping::find()->onLandingPage($landingPageId)->active()->\n asArray()->all();\n } else {\n $groupings = false;\n }\n \n \\Yii::$app->response->format = 'json';\n return $groupings;\n }", "function add_group() {\n $this->acl->validate_update();\n\n $where = array(\n 'user_id' => $this->input->post('user_id'),\n 'group_id' => $this->input->post('group_id')\n );\n // Insert or update, to minimize redundancy\n list($flag, $msg) = $this->m_general->insert_update('users_group', $this->input->post(), $where);\n\n return JSONRES($flag, $msg);\n }", "public function addGroup(Request $request)\n {\n // Create new group\n $group = new Group($request->all());\n\n // Assign group owner to current user\n $group[Constants::FLD_GROUPS_OWNER_ID] = Auth::user()[Constants::FLD_USERS_ID];\n\n if ($group->save()) {\n\n // Assign admins\n $admins = explode(\",\", $request->get('admins'));\n $admins = User::whereIn('username', $admins)->get(); //It's a Collection but a Model is needed\n foreach ($admins as $admin) {\n if ($admin[Constants::FLD_USERS_ID] != Auth::user()[Constants::FLD_USERS_ID])\n $group->admins()->save($admin);\n }\n\n } else { // return error message\n \\Session::flash(\"messages\", [\"Sorry, Group was not saved. Please retry later\"]);\n return redirect(route(Constants::ROUTES_GROUPS_INDEX));\n }\n\n return redirect(route(Constants::ROUTES_GROUPS_DISPLAY, $group[Constants::FLD_GROUPS_ID]));\n }", "public function register_routes( Collection $routes );", "public function createGroup(\n NewGroupRequest $request,\n GroupFollowRepository $groupFollowRep,\n FeaturesRepo $featuresRep,\n GroupAdminRepository $groupAdminRep,\n MemberListRepository $memberListRep\n )\n {\n $user = $request->user();\n $data = $request->all();\n\n $group_data = [\n 'name' => preg_replace('/[^a-z0-9]/', '', $data['name']),\n 'title' => $data['title'],\n 'owner' => $user->id,\n ];\n\n if (!empty($data['cover'])) {\n $group_data['cover'] = $data['cover'];\n }\n\n if (!empty($data['logo'])) {\n $group_data['logo'] = $data['logo'];\n }\n\n if (!empty($data['description'])) {\n $group_data['description'] = $data['description'];\n }\n\n if (!empty($data['no_recommend']) && $data['no_recommend'] ) {\n $group_data['no_recommend'] = 1;\n }\n\n if(in_array($group_data['name'], Constants::reserved_names)){\n return $this->_transformer->fail(40019, 'invalid group name');\n }\n\n $group = Group::where('name', $group_data['name'])->first();\n if($group){\n return $this->_transformer->fail('40002', 'This URL is not available. Please choose another one.');\n }\n\n $title_taken = Group::where('title', $group_data['title'])->first();\n if($title_taken){\n return $this->_transformer->fail('40003', 'Group name is taken.');\n }\n\n try {\n\n DB::beginTransaction();\n\n $group = Group::create($group_data);\n $response_category = array();\n\n if (isset($data['categories'])) {\n $categories = json_decode($data['categories'], true);\n\n foreach ($categories as $key => $category) {\n # code...\n $created_category = Category::create([\n 'name' => trim($category['name']),\n 'group_id' => $group->id,\n 'category_id' => $key + 1,\n// 'parent_id' => '-1',\n ]);\n $response_category[] = $created_category;\n }\n }\n\n $groupFollowRep->followGroup($user->id, $group->id);\n\n //auto open subscribe and share extension\n $featuresRep->switchFeature(Constants::SUBSCRIBE_FEATURE, $group->id, Constants::FEATURE_STATUS);\n $featuresRep->switchFeature(Constants::SHARE_FEATURE, $group->id, Constants::FEATURE_STATUS);\n $featuresRep->switchFeature(Constants::ATTACHMENTS_FEATURE, $group->id, Constants::FEATURE_STATUS);\n $featuresRep->switchFeature(Constants::MODERATOR_FEATURE, $group->id, Constants::FEATURE_STATUS);\n $featuresRep->switchFeature(Constants::GROUP_PRIVACY_FEATURE, $group->id, Constants::FEATURE_STATUS);\n $groupAdminRep->addGroupOwner($user->id, $group->id);\n $memberListRep->addAdminLevelSetting($group->id);\n DB::commit();\n\n return $this->_transformer->success(['group' => $group, 'categories' => $response_category]);\n } catch (\\Exception $e) {\n DB::rollBack();\n// return $this->_transformer->fail(512, $e->getMessage());\n return $this->_transformer->fail(512, 'Server error please try again later');\n }\n }", "public function index()\n {\n return new GroupCollection(Group::all());\n }", "public function creategroupAction()\n\t{\n\n\t\t$this->saveAction('UserGroup');\n\t}", "protected function getRouting_Loader_CollectionService()\n {\n $this->services['routing.loader.collection'] = $instance = new \\phpbb\\di\\service_collection($this);\n\n $instance->add('routing.loader.yaml');\n\n return $instance;\n }", "public function addAction(){\n $this->title = 'Add a new user group.';\n \n $form = new GroupForm();\n $groupModel = new Group();\n \n if ($this->getRequest()->isPost()) {\n if($form->isValid($this->getRequest()->getPost())) {\n $groupModel->save($form->getValues());\n $this->_helper->FlashMessenger(\n array(\n 'msg-success' => sprintf('The group %s was successfully added.', $form->getValue('name')),\n )\n );\n \n $this->_redirect('/groups/');\n }\n }\n \n $this->view->form = $form;\n }", "public function addAction(){\n return view('admin::service-group.add', [\n\n 'TITLE' =>'Thêm nhóm dich vụ',\n\n ]);\n }", "public function postGroup()\n {\n $group = $this->em->newEntity( 'friends\\model\\Group' );\n $loadable = $this->role->applyLoadable( $group );\n $loadable->loadData();\n if( $loadable->validate() )\n {\n $active = $this->role->applyActive( $group );\n $active->save();\n $jump = $this->view->get( 'appUrl' ) . 'group';\n header( 'Location: ' . $jump );\n exit;\n }\n return $this->getGroup();\n }", "public function setCollection()\n {\n $cl = $this->nameCollection;\n $this->collection = self::$database->$cl;\n }", "public function addGroup(\\Models\\Group $group) {\n $this->groups[] = $group;\n $group->addFile($this);\n }", "public function admin_create(){\n \n if ($this->request->is('post')) {\n // Make sure a group with this name doesn't exist\n $name_check = $this->Group->find('first', array(\n 'conditions' => array('Group.name' => $_POST['group_name'])\n ));\n \n if ($name_check){\n // Group all ready exists\n $this->Session->setFlash('A group with that name all ready exists. Group names must be unique.', 'default', array('class' => 'alert alert-error'));\n $this->redirect(array('controller' => 'group', 'action' => 'add'));\n } else {\n // Group doesn't exist, try to create it\n $satellite_ids = array();\n \n // Loop through and add all of the satellite IDs\n foreach($_POST['satellites'] as $satellite_id){\n array_push($satellite_ids, $satellite_id);\n }\n \n // Assemble query\n $show_on_home = (isset($_POST['show_on_home']))?'1':'0';\n $default_on_home = (isset($_POST['default_on_home']))?'1':'0';\n $new_group['Group'] = array(\n 'name' => $_POST['group_name'],\n 'description' => $_POST['group_description'],\n 'show_on_home' => $show_on_home,\n 'default_on_home' => $default_on_home,\n 'created_on' => date('Y-m-d H:i:s', time()),\n 'updated_on' =>date ('Y-m-d H:i:s', time())\n );\n $new_group['Satellite'] = array('Satellite' => $satellite_ids);\n \n $save_group = $this->Group->save($new_group);\n \n if ($save_group){\n $this->Session->setFlash('The group has been added successfully.', 'default', array('class' => 'alert alert-success'));\n CakeLog::write('admin', '[success] New group \\''.$_POST['group_name'].'\\' added.');\n } else {\n $this->Session->setFlash('An error occured while adding that group. Please try again.', 'default', array('class' => 'alert alert-error'));\n CakeLog::write('admin', '[error] Error adding group \\''.$_POST['group_name'].'\\' added.');\n }\n \n $this->redirect(array('controller' => 'group', 'action' => 'index'));\n }\n } else {\n // Redirect them to the add form\n $this->redirect(array('controller' => 'group', 'action' => 'add'));\n }\n }", "function add_group(array $data = array())\n\t{\n\t\treturn get_instance()->kbcore->groups->create($data);\n\t}", "public function addGroup()\n {\n\n if (requestMethod() == 'POST') {\n $controllers = $this->input->post('cont_permission');\n $methods = $this->input->post('method_permission');\n $permissions = [];\n\n // set full permission controller\n\n if ($controllers) {\n\n foreach ($controllers as $controller) {\n $permissions[] = $controller;\n }\n\n }\n\n // set permission method\n\n if ($methods) {\n\n foreach ($methods as $cont => $method) {\n\n if (!$controllers or !in_array($cont, $controllers)) {\n $permissions[] = $method;\n }\n\n }\n\n }\n\n $data = [\n 'name' => $this->input->post('name'),\n 'desc' => $this->input->post('desc'),\n 'permissions' => serialize($permissions),\n 'created_time' => time(),\n 'last_update' => time(),\n ];\n\n $res = $this->admin_model->addGroup($data);\n\n if ($res) {\n $this->session->set_flashdata('success', lang('success'));\n $this->session->set_flashdata('alertUrl', base_url() . 'cms/admin/addGroup');\n $this->session->set_flashdata('alertText', lang('add_new_one'));\n redirect('/cms/admin');\n } else {\n $this->session->set_flashdata('error', lang('failed'));\n redirect('/cms/addGroup');\n }\n\n }\n\n $data['controllers'] = $this->auth->listController();\n\n self::__loadHeader();\n self::__loadNavbar('admin');\n $this->body = $this->load->view('admin/add_group_view', $data, true);\n self::__loadView();\n\n }", "public function add_group($group_name) {\n $this->page_fields[]=array('sub_heading'=>$group_name,'fields'=>array());\n }", "public function getGroupAdd(){\n return view('Newsletter.Views.administrator.group-add');\n }", "function addToGroup($group)\n {\n $this->_api->doRequest(\"PUT\", \"{$group->getBaseApiPath()}/contacts/{$this->id}\"); \n $this->_group_ids_set[$group->id] = true; \n }", "public function postAddComponentGroup()\n {\n try {\n $group = execute(new CreateComponentGroupCommand(\n Binput::get('name'),\n Binput::get('order', 0),\n Binput::get('collapsed'),\n Binput::get('visible')\n ));\n } catch (ValidationException $e) {\n return cachet_redirect('dashboard.components.groups.create')\n ->withInput(Binput::all())\n ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.components.groups.add.failure')))\n ->withErrors($e->getMessageBag());\n }\n\n return cachet_redirect('dashboard.components.groups')\n ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.components.groups.add.success')));\n }", "public function make($groupName, array $options = [], array $items = []): self\n {\n if (! \\array_key_exists($groupName, $this->routes)) {\n $this->routes[$groupName] = new Collection($items);\n } else {\n throw new RuntimeException(\"Route Group with key: `$groupName` already exist.\");\n }\n\n $this->options[$groupName] = $options;\n\n return $this;\n }", "public function addAction() {\n\t\t$form = new Default_Form_UserGroup ();\n\t\t$userGroup = new Default_Model_UserGroup ();\n\t\t$userGroupMapper = new Default_Model_Mapper_UserGroup ();\n\t\t$this->_save ( $form, self::$ADD_MODE );\n\t\tunset($form->getElement('modules')->required);\n\t\t$this->view->form = $form;\n\t\t$this->render ( \"add-edit\" );\n\t}", "public function create_group() {\r\n $this->layout = '';\r\n\r\n $this->displayGroupType();\r\n\r\n $this->loadModel('GetRegisteredGroupData');\r\n $group_info = $this->GetRegisteredGroupData->find('all', array(\r\n 'order' => array('GetRegisteredGroupData.group_name' => 'asc')));\r\n\r\n $this->set('groupInfo', $group_info);\r\n }", "function _addLayoutGroup($parentLayGrp, $custLayGrp, $ovServer)\n{\n\t// layout group ($parentLayGrp) on the OV server specified ($ovServer). \n\t//\n\t// Inputs:\n\t//\t$parentLayGrp - parent group. null if assigned to root of tree.\n\t//\t$custLayGrp - custom's layout group name.\n\t//\t$ovServer - OV server to add group.\n\t// Output: none\n\t//\n _log(\"addLayoutGroup: Starting.\",\"info\");\n _log(\"addLayoutGroup: adding group $parentLayGrp/$custLayGrp on $ovServer\",\"info\");\n global $opcdir, $output, $opclaygrp_cmd, $gRoshTimeOut;\n\n if ($parentLayGrp == '')\n {\n\t\t$group = $custLayGrp;\n\t}\n\telse\n\t{\n\t\t$group = $parentLayGrp . '/' . $custLayGrp;\n\t}\n\t$cmd = \"/opsw/bin/rosh -W $gRoshTimeOut -n $ovServer -l root '$opclaygrp_cmd \";\n\t$cmd .= \"-add_lay_group lay_group=$group '\";\n \n _log(\"addLayoutGroup: cmd: $cmd\",\"debug\");\n _execCmdWithRetry($cmd);\n _log(\"output is $output\",\"debug\");\n\n _parseOutputForError($output_array,'ERROR','addLayoutGroup');\n _log(\"addLayoutGroup: Exiting.\",\"info\");\n}", "public function postGroupToEvent() {\n\t\t$selected_groups = Input::get('group');\n\t\t$selected_event = Input::get('event');\n\t\t$event \t\t\t = Myevent::find($selected_event);\n\n\t\tif(isset($selected_groups)) {\n\t\t\tforeach($selected_groups as $group_id) {\n\t\t\t\t$group = Group::find($group_id);\n\n\t\t\t\tforeach($event->groups as $node) {\n\t\t\t\t\tif($node->id == $group->id) {\n\t\t\t\t\t\treturn Redirect::to('/')\n\t\t\t\t\t\t\t\t->with('error', $node->name .' is already in '. $event->name . ' event!');\n\t\t\t\t\t} \n\t\t\t\t}\n\n\t\t\t\tforeach($group->subgroups as $subgroup) {\n\t\t\t\t\t$subgroup->events()->attach($event->id);\n\n\t\t\t\t\tforeach($subgroup->users as $user) {\n\t\t\t\t\t\t$user->events()->attach(array($event->id => array('subgroup_id' => $subgroup->id, 'status' => 2)));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$group->events()->attach($event->id);\n\t\t\t}\n\t\t} else {\n\t\t\treturn Redirect::to('/')\n\t\t\t\t\t->with('error', 'No groups were checked!');\n\t\t}\n\n\t\treturn Redirect::to('/');\n\t}", "function system_add_group($paramv)\n{\n}", "public function createGroup() {\n\t\t$groupName = Input::get('addGrp');\n\t\ttry{\n\t\t\tProjectHandler::createGroup($groupName);\n\t\t\tProjectHandler::grantUser(Auth::user(), $groupName, Roles::PROJECT_ADMIN);\n\t\t\treturn Redirect::back()\n\t\t\t\t->with('flashSuccess', 'Group <b>'.$groupName.'</b> succesfully created!');\t\t\t\n\t\t} catch(\\Cartalyst\\Sentry\\Groups\\GroupExistsException $e) {\n\t\t\treturn Redirect::back()\n\t\t\t->with('flashError', 'Group <b>'.$groupName.'</b> already exists!');\n\t\t}\n\t}", "public function addusergroupAction(){\t\t\n\t\t$request = $this->getRequest();\t\t\n\t\t$group_id= (int) $this->params('group_id');\n\t\t$identity = null; \n\t\t$auth = new AuthenticationService();\t\t\t \n\t\t\tif ($auth->hasIdentity()) {\n \t// Identity exists; get it\n \t\t$identity = $auth->getIdentity();\t\t\t\t\n\t\t\t\t#check the identity against the DB\n\t\t\t\t$userData = $this->getUserTable()->getUser($identity->user_id);\t\t\t\t\n\t\t\t\tif(isset($userData->user_id) && !empty($userData->user_id) && isset($group_id) && !empty($group_id)) {\t\t\t\t\n\t\t\t\t\t#get Group Info\n\t\t\t\t\t$groupData = $this->getGroupTable()->getGroup($group_id);\n\t\t\t\t\tif(isset($groupData->group_id) && !empty($groupData->group_id) && isset($groupData->group_parent_group_id) && trim($groupData->group_parent_group_id)==\"0\"){\n\t\t\t\t\t\t#this will conform group exist and it is a Galaxy. Not Sub Group\n\t\t\t\t\t\t$groupAlreadyRegisterInfo =$this->getUserGroupTable()->getUserGroup($userData->user_id, $groupData->group_id);\n\t\t\t \t\t\tif(isset($groupAlreadyRegisterInfo->user_group_id) && !empty($groupAlreadyRegisterInfo->user_group_id)){\n\t\t\t\t\t\t\t//this means user is already register. Do nothing\n\t\t\t\t\t\t\t$arr = array('error' => \"yes\", 'status' => \"You are already registered for this Galaxy\");\n\t\t\t\t\t\t\techo json_encode($arr);\t\t\t\t\t\t\t \n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t //this means user is not register. Proced adding.\n\t\t\t\t\t\t\t $userGroupData = array();\n\t\t\t\t\t\t\t $userGroupData['user_group_user_id'] = $userData->user_id;\n\t\t\t\t\t\t\t $userGroupData['user_group_group_id'] = $groupData->group_id;\n\t\t\t\t\t\t\t #create object of User class\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t $userGroupData['user_group_added_ip_address'] = user::getUserIp();\n\t\t\t\t\t\t\t $userGroupData['user_group_status'] = \"1\";\n\t\t\t\t\t\t\t $userGroupData['user_group_is_owner'] = \"0\";\n\t\t\t\t\t\t\t #lets Save the User\n\t\t\t\t\t\t\t$userGroup = new UserGroup();\n\t\t\t\t\t\t\t$userGroup->exchangeArray($userGroupData);\n\t\t\t\t\t\t\t$insertedUserGroupId =\"\";\t#this will hold the latest inserted id value\n\t\t\t\t\t\t\t$insertedUserGroupId = $this->getUserGroupTable()->saveUserGroup($userGroup); \t\n\t\t\t\t\t\t\tif(isset($insertedUserGroupId) && !empty($insertedUserGroupId)){\n\t\t\t\t\t\t\t\t$arr = array('error' => \"no\", 'status' => \"Galaxy added successfully\");\n\t\t\t\t\t\t\t\techo json_encode($arr);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$arr = array('error' => \"yes\", 'status' => \"An error is occured while saving Galaxy.Please try again\");\n\t\t\t\t\t\t\t\techo json_encode($arr);\n\t\t\t\t\t\t\t}\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t} else {//if(isset($userData->user_id) && !empty($userData->user_id) && isset($group_id) && !empty($group_id))\t\t\t\t\n\t\t\t\t\t\t$arr = array('error' => \"yes\", 'status' => \"Invalid Access. Galaxy does not exist\");\n\t\t\t\t\t\techo json_encode($arr);\n\t\t\t\t\t}\n\t\t\t\t} else { //if(isset($userData->user_id) && !empty($userData->user_id) && isset($group_id) && !empty($group_id))\n\t\t\t\t\t$arr = array('error' => \"yes\", 'status' => \"Invalid Access. You need to login\");\n\t\t\t\t\techo json_encode($arr);\n\t\t\t\t}\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$arr = array('error' => \"yes\", 'status' => \"Invalid Access. You need to login\");\n\t\t\t\techo json_encode($arr);\n\t\t\t}\n\t\t\t\n\t\t \n\t\t exit;\n\t\t$viewModel = new ViewModel();\n \t$viewModel->setTerminal($request->isXmlHttpRequest());\n \treturn $viewModel;\n\t}", "public function map()\n {\n $this->adminGroup(function () {\n $this->mapAdminRoutes();\n });\n }", "function addGroup($groupid) {\n $groups = $this->getGroups();\n if (!is_array($groups)) {\n $groups = array();\n }\n array_push($groups, $groupid);\n $this->setGroups($groups);\n }", "public function index()\n {\n if(Gate::denies('index', Group::class)) {\n return response()->json(['message' => 'У Вас недостаточно прав на просмотр списка рабочих групп!'], 422);\n }\n \n //return GroupResource::collection(Group::with('processes')->get());\n return new GroupCollection(Group::with('processes')->get());\n }", "public function createGroup(){\n ///Create Domain\n $NameGroup=$_POST['newgroup'];\n $Type=$_POST['Type-group'];\n\n DB::table('w59_group')->insert(\n ['id' => NULL, 'nombre' => $NameGroup, 'type' => $Type]\n );\n return back()->with('info','You added new items, follow next step!');\n\n }", "function addgroup($data)\r\n {\r\n $mysqli = $this->conn;\r\n\r\n if (empty($table))\r\n $table = $this->table;\r\n\r\n /* Prepared statement, stage 1: prepare */\r\n if (!($stmt = $mysqli->prepare(\"INSERT INTO LakeHostGroup (lakeHostGroupName, notes) VALUES (?,?)\"))) {\r\n echo \"Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\r\n }\r\n\r\n /* Prepared statement, stage 2: bind and execute */\r\n if (!($stmt->bind_param(\"ss\", $data['lakeHostGroupName'], $data['notes']))) {\r\n echo \"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\r\n }\r\n\r\n if (!$stmt->execute()) {\r\n echo \"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\r\n }\r\n }", "protected function executeGroupRoutes()\n {\n /*\n * Set multiple group routes\n */\n $this->router->group('/movies', function ($route)\n {\n $route->get('/', function (){\n echo \"Movies Overview\";\n });\n\n $route->get('english/{:id}', function ($route, $id) {\n echo \"Movie $id\";\n });\n\n $route->where('{:id}', '(\\d+)')->get('spanish/{:id}', function ($route, $id) {\n echo \"Movie with custom where clause $id\";\n });\n });\n\n return $this;\n }", "public function attachGroups($groups);", "public function addCollection(MethodCollection $collection)\n {\n // would not place the new route at the end of the merged array\n foreach ($collection->all() as $name => $route) {\n unset($this->methods[$name]);\n $this->methods[$name] = $route;\n }\n\n $this->resources = array_merge($this->resources, $collection->getResources());\n }", "function createGroup($args) {\n\t\t$this->editGroup($args);\n\t}", "private function createResourceGroups()\n {\n foreach ($this->api->getServices() as $service) {\n $this->resourceGroups[] = new ResourceGroup($service);\n }\n }", "public function group(): Collection;", "public function mount(Group $group) {\n\n\t\t$groupRoutes = $group->getRoutes();\n\n\t\tif(!count($groupRoutes))\n\t\t\tthrow new Exception('The group of routes does not contain any routes.');\n\n\t\t$beforeMatch = $group->getBeforeMatch();\n\n\t\tif(!is_null($beforeMatch)) {\n\n\t\t\tforeach($groupRoutes as $route) {\n\n\t\t\t\t$route->beforeMatch($beforeMatch);\n\t\t\t}\n\t\t}\n\n\t\t$hostname = $group->getHostName();\n\n\t\tif(!is_null($hostname)) {\n\n\t\t\tforeach($groupRoutes as $route)\n\t\t\t\t$route->setHostName($hostname);\n\t\t}\n\n\t\t$routes = $this->_routes;\n\n\t\tif(is_array($routes))\n\t\t\t$this->_routes = array_merge($routes, $groupRoutes);\n\t\telse\n\t\t\t$this->_routes = $groupRoutes;\n\n\t\treturn $this;\n\t}", "final public function addItemGroupSupervisor() {\n if (!empty($this->target_object)) {\n foreach ($this->target_object as $val) {\n if ($val->fields['groups_id'] > 0) {\n $this->addForGroup(1, $val->fields['groups_id']);\n }\n }\n }\n }", "public function registerMediaCollections()\n {\n $this->addMediaCollection('image')->singleFile();\n }", "function initGroups() {\n $groups = array(0 => array('alias' => 'members',\n 'model' => 'Group',\n 'foreign_key' => 1),\n 1 => array('alias' => 'moderators',\n 'model' => 'Group',\n 'foreign_key' => 2),\n 2 => array('alias' => 'administrators',\n 'model' => 'Group',\n 'foreign_key' => 3));\n\n foreach ($groups as $data) {\n $this->Acl->Aro->create();\n $this->Acl->Aro->save($data);\n }\n }", "public function createGroupAction() {\n\t\t$this->group->id_parent = isset($this->data['id_parent']) ? $this->data['id_parent'] : null;\n\t\t$this->group->group_name = $this->data['group_name'];\n\t\t$this->group->description = $this->data['description'];\n\t\treturn $this->group->save();\n\t}", "public function addGroup($attributes) {\n return $this->get('add_group', $attributes);\n }", "protected function getRouting_ResourcesLocator_CollectionService()\n {\n $this->services['routing.resources_locator.collection'] = $instance = new \\phpbb\\di\\service_collection($this);\n\n $instance->add('routing.resources_locator.default');\n\n return $instance;\n }", "public function configureRoutes(RouteCollection $collection) {\n parent::configureRoutes($collection);\n $collection\n ->remove('create')\n ->add('take','{objectId}/take');\n }", "function system_addto_group($paramv)\n{\n}", "public function addMultipleCategoriesToGroup();", "public function registerMediaCollections() {\n $this->addMediaCollection('image')->singleFile();\n }", "public function setCollectionKey($group, $key)\n\t{\n\t\t$this->group_keys[$group] = (array) $key;\n\t}", "public function store(GroupRequest $request)\n\t{\n\t\t$group = new Group;\n\n\t\t$group->name = $request->name;\n\t\t$group->about = $request->about;\n\t\t$group->tag = $request->tag;\n\t\t$group->creator = Auth::user()->getUsername();\n\n\t\t$group->save();\n\t\t\n\t\t// Add the creator as a member of the group.\n\t\t$group->users()->attach(Auth::user()->getId());\n\n\t\t// Redirect\n\t\tSession::flash('message', 'Group Created!');\n\t\treturn redirect(route('groups.show', [$group->id]));\n\t}", "function addGroup($group)\n {\n return PEAR::raiseError(_(\"Unsupported\"));\n }", "private function createCollection()\n {\n try\n {\n $request = $_POST;\n\n global $cbcollection;\n\n if(!userid())\n throw_error_msg(lang(\"you_not_logged_in\")); \n else \n $uid = userid();\n\n //check if video id provided\n if( !isset($request['collection_name']) || $request['collection_name']==\"\" )\n throw_error_msg(\"Collection Name not provided\");\n\n if( !isset($request['collection_description']) || $request['collection_description']==\"\" )\n throw_error_msg(\"Collection Description not provided\");\n\n if( !isset($request['collection_tags']) || $request['collection_tags']==\"\" )\n $request['tags'] = 'sample_tag';\n\n if( !isset($request['category']) || $request['category']==\"\" ) {\n throw_error_msg(\"Collection category not provided\");\n } else {\n $request['category'] = array($request['category']);\n }\n\n if( !isset($request['type']) || $request['type']==\"\" )\n throw_error_msg(\"Collection type not provided\");\n\n if( !isset($request['broadcast']) || $request['broadcast']==\"\" )\n $request['broadcast'] = 'public';\n\n if( !isset($request['allow_comments']) || $request['allow_comments']==\"\" )\n $request['allow_comments'] = 'yes';\n\n if( !isset($request['public_upload']) || $request['public_upload']==\"\" )\n $request['public_upload'] = 'no';\n\n $toclean = array('collection_name','collection_description');\n foreach ($toclean as $key => $item) {\n $request[$item] = mysql_clean($request[$item]);\n }\n\n $status = $cbcollection->create_collection($request);\n # pex($status,true);\n if( $status )\n {\n $newdata = $cbcollection->get_collection($status);\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"Collection has been created successfully :P \", \"data\" => $newdata);\n $this->response($this->json($data));\n }\n else\n {\n throw_error_msg(\"Something went wrong trying to create collection\"); \n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "function group($pattern, $callable)\n {\n $old = server('router.pattern.group');\n $pattern = str_ireplace(array_keys($GLOBALS['$horus.patterns']), array_values($GLOBALS['$horus.patterns']), $pattern);\n\n server('router.pattern.group', call(scope('$horus.slashes'), rtrim($old, '/\\\\').'/'.ltrim($pattern, '/\\\\')));\n call($callable);\n server('router.pattern.group', $old);\n }", "public function addGroup($ids) {\n if (sizeof(\\Hashids::decode($ids)) == 1) {\n $groups = \\App\\Group::all();\n $vehicle = \\App\\Vehicle::find(\\Hashids::decode($ids)[0]);\n return view('vehicle.view-add-group', array('group' => $groups, 'vehicle' => $vehicle));\n }\n //dd(\\Hashids::decode($ids)[1]);\n $check = \\App\\Vehicle::find(\\Hashids::decode($ids)[1]);\n if ($check->group_id != null) {\n return redirect('/vehicle/view-vehicles')\n ->with('global', '<div class=\"alert alert-warning\">Vehicle already belongs to a group!.</div>');\n }\n\n $type = \\App\\Group::find(\\Hashids::decode($ids)[0]);\n //dd($type->id);\n $add = \\DB::table('vehicles')\n ->where('id', \\Hashids::decode($ids)[1])\n ->where('group_id', null)\n ->update(array(\n 'group_id' => $type->id,\n 'type_id' => intval($type->id),\n 'user_id' => \\Auth::user()->id\n )\n );\n if ($add) {\n return redirect('/vehicle/view-vehicles')\n ->with('global', '<div class=\"alert alert-success\">Vehicle successfully added to the circle</div>');\n } else {\n return redirect('/vehicle/view-vehicles')\n ->with('global', '<div class=\"alert alert-warning\">Vehicle could not be added to the group, please contact admin.</div>');\n }\n }", "public function store()\n\t{\n\t\t// get the user's id and the group name\n\t\t$userid = Auth::user() -> id;\n\t\t$input = Input::json();\n\t\t$groupname = $input -> get('groupname');\n\n\t\t// create the group\n\t\t$group = Group::create(array(\n\t\t\t'user_id' => $userid,\n\t\t\t'groupname' => $groupname\n\t\t));\n\n\t\t// add the creator to the group\n\t\t$group -> addUser($userid);\n\n\t\t// log the request\n\t\tLog::info('Group created', array(\n\t\t\t'userid' => $userid,\n\t\t \t'groupname' => $groupname\n\t\t));\n\t}", "protected function createCollection()\n {\n return $this->_setUpNewNode(\n new Collection()\n );\n }", "public function add_customer_group($data){\n\t\t\n\t\t\t$this->db->insert('customer_group',$data);\n\t\t\tredirect('Customer/Customer_group');\n\t\t\n\t}", "public function createViaRequest()\n {\n return groups()->createGroupViaRequest();\n }", "public function createAction()\n\t{\n\t\n\t\tif(\\Input::server('REQUEST_METHOD') == 'POST')\n\t\t{\n\t\t\t$rules = array(\n\t\t\t\t'group' => 'required|unique:groups,group',\n\t\t\t);\n\t\t\t$input = \\Input::all();\n\t\t\t$validator = \\Validator::make($input, $rules);\n\n\t\t\tif( $validator->passes() )\n\t\t\t{\n\t\t\t\t$group = new \\Group;\n\t\t\t\t$group->group = $input['group'];\n\n\t\t\t\tif($group->save())\n\t\t\t\t{\n\t\t\t\t\treturn \\Redirect::to('admin/members/groups')\n\t\t\t\t\t\t->with('success_msg', 'Successfully saved');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \\Redirect::to('admin/members/group/create')\n\t\t\t\t\t->withInput()\n\t\t\t\t\t->with('errors', $validator->getMessageBag()->toArray());\n\t\t\t}\n\t\t}\n\n\t\treturn \\View::make('user::group.create');\n\t\t\n\t}", "public function map(Router $router, string $groupName): void\n {\n if (\\array_key_exists($groupName, $this->routes)) {\n $router->group($this->getOptions($groupName),\n fn() => collect($this->get($groupName))->each(\n fn($class) => $this->classRouteRegistrar($router, $class)\n )\n );\n }\n }", "public function create_group()\r\n\t{\r\n\t\t// Load template\r\n\t\tinclude(BLUPATH_TEMPLATES .'/site/modules/create_group.php');\r\n\t}", "function createGroup($_name,$_owner) {\n $group = R::dispense('groups');\n $group->name = $_name;\n $group->owner = $_owner;\n $id = R::store($group);\n \n $groupMembers = R::dispense('groupmembers');\n $groupMembers->member_id = $_SESSION['user_id'];\n $groupMembers->group_id = $id;\n R::store($groupMembers);\n \n return $id;\n}", "public function addOrUpdateCollection($id = null);", "public function actionAddGroup()\n {\n echo \"Create an user group ...\\n\";\n $name = trim($this->prompt('Group name (max length 32 varchar):'));\n $desc = trim($this->prompt('Group description (max length 255 varchar):'));\n if ($name && $this->confirm(\"Are your sure to create an user group?\")) {\n if (DIRECTORY_SEPARATOR === '\\\\') {\n $name = iconv('GBK','UTF-8//IGNORE', $name);\n $desc = iconv('GBK','UTF-8//IGNORE', $desc);\n }\n $model = Yii::$app->menuManager->addGroup($name, $desc);\n if ($model->hasErrors()) {\n echo join(',', $model->getFirstErrors()) . \"\\n\";\n return self::EXIT_CODE_ERROR;\n }\n echo \"Success.\\n\";\n return self::EXIT_CODE_NORMAL;\n }\n echo \"Canceled!\\n\";\n return self::EXIT_CODE_NORMAL;\n }", "public function offers_group_post()\n {\n $this->verify_request(); \n $data = array(\n 'group_name' => $this->input->post('group_name'),\n 'group_status' => $this->input->post('group_status')\n );\n $result = $this->Offer_model->insert_new_offer_group($data);\n $status = parent::HTTP_OK;\n $this->response(['offer group created successfully.'], $status);\n }", "public function store( GroupRequest $request ) {\n\t\t$data = Group::create( $request->all() );\n\t\treturn $this->redirect( 'STORE', $data );\n\t}", "public function run(): void\n {\n $groups = factory(Group::class, 20)->create();\n $group = $groups->first();\n $user = User::query()->inRandomOrder()->first();\n $server = Server::query()->inRandomOrder()->first();\n\n /** @var \\App\\Models\\Group $group */\n $group->users()->attach($user);\n $group->servers()->attach($server);\n }" ]
[ "0.6859102", "0.6658393", "0.65349716", "0.6495271", "0.64398456", "0.636195", "0.6345462", "0.62960064", "0.62688154", "0.6229365", "0.6227446", "0.6221714", "0.61965877", "0.6137509", "0.6042298", "0.6038201", "0.6001782", "0.5995303", "0.5981521", "0.59621376", "0.59602463", "0.5929572", "0.5929572", "0.59277534", "0.5918203", "0.58300066", "0.5822423", "0.57877904", "0.57635367", "0.5753704", "0.574891", "0.5731198", "0.5719198", "0.5717323", "0.57124025", "0.5690003", "0.5684927", "0.5680314", "0.56781244", "0.56719905", "0.5669599", "0.5654839", "0.56511605", "0.56442195", "0.5640058", "0.5634325", "0.5627661", "0.56067073", "0.5603792", "0.56012297", "0.55752075", "0.55595016", "0.55548406", "0.55511767", "0.5529676", "0.5526483", "0.5516182", "0.5511941", "0.5511636", "0.54732186", "0.5458441", "0.54348373", "0.5433817", "0.54324794", "0.5411449", "0.540766", "0.5404786", "0.5397025", "0.5391762", "0.53911316", "0.5384351", "0.5381313", "0.5370476", "0.5369142", "0.5368274", "0.5362808", "0.5353937", "0.53532624", "0.5341229", "0.5340502", "0.5333572", "0.5329037", "0.53189725", "0.5314562", "0.5311881", "0.53038317", "0.53030443", "0.53025305", "0.5293038", "0.5290331", "0.5287438", "0.52787435", "0.5272617", "0.52626246", "0.52596426", "0.5259137", "0.5258259", "0.5251134", "0.5246249", "0.5241235", "0.5234807" ]
0.0
-1
Gets the value of an environment variable. Supports boolean, empty and null.
function env($key, $default = null) { $value = getenv($key); if ($value === false) { return value($default); } switch (strtolower($value)) { case 'true': case '(true)': return true; case 'false': case '(false)': return false; case 'empty': case '(empty)': return ''; case 'null': case '(null)': return; } if (Str::startsWith($value, '"') && Str::endsWith($value, '"')) { return substr($value, 1, -1); } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false) {\n return value($default);\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return;\n }\n\n if (strlen($value) > 1 && Str::startsWith($value, '\"') && Str::endsWith($value, '\"')) {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "function env($key, $default = null)\n{\n $value = getenv($key);\n if ($value === false) {\n return value($default);\n }\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return null;\n }\n if (($valueLength = strlen($value)) > 1 && $value[0] === '\"' && $value[$valueLength - 1] === '\"') {\n return substr($value, 1, -1);\n }\n return $value;\n}", "function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false) {\n return value($default);\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n\n case 'false':\n case '(false)':\n return false;\n\n case 'empty':\n case '(empty)':\n return '';\n\n case 'null':\n case '(null)':\n return;\n }\n\n if (Str::startsWith($value, '\"') && Str::endsWith($value, '\"')) {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false) {\n return value($default);\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return;\n }\n\n if (strlen($value) > 1 && startsWith($value, '\"') && endsWith($value, '\"')) {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false) {\n return value($default);\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return;\n }\n if (strlen($value) > 1 && Str::startsWith($value, '\"') && Str::endsWith($value, '\"')) {\n return substr($value, 1, -1);\n }\n return $value;\n }", "function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false && isset($_ENV[$key])) {\n $value = $_ENV[$key];\n }\n\n if ($value === false) {\n return $default;\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return null;\n }\n\n $strLen = strlen($value);\n\n if ($strLen > 1 && $value[0] === '\"' && $value[$strLen - 1] === '\"') {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "function env($key, $default = null)\n {\n $value = getenv($key);\n if ($value === false) return value($default);\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return null;\n }\n\n if (Str::startsWith($value, '\"') && Str::endsWith($value, '\"')) {\n return substr($value, 1, -1);\n }\n return $value;\n }", "function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false) {\n return value($default);\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n\n case 'false':\n case '(false)':\n return false;\n\n case 'empty':\n case '(empty)':\n return '';\n\n case 'null':\n case '(null)':\n return;\n }\n\n if ($value[0] === '\"' && $value[count($value) - 1] === '\"') {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "function env($key, $default = null)\n\t{\n\t\t$value = getenv($key);\n\t\t\n\t\tif ($value === false && array_key_exists($key, $_ENV)) $value = $_ENV[$key];\n\t\tif ($value === false) return value($default);\n\n\t\tswitch (strtolower($value))\n\t\t{\n\t\t\tcase 'true':\n\t\t\tcase '(true)':\n\t\t\t\treturn true;\n\n\t\t\tcase 'false':\n\t\t\tcase '(false)':\n\t\t\t\treturn false;\n\n\t\t\tcase 'empty':\n\t\t\tcase '(empty)':\n\t\t\t\treturn '';\n\n\t\t\tcase 'null':\n\t\t\tcase '(null)':\n\t\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (Str::startsWith($value, '\"') && Str::endsWith($value, '\"'))\n\t\t{\n\t\t\treturn substr($value, 1, -1);\n\t\t}\n\n\t\treturn $value;\n\t}", "public function get($key, $default = '')\n {\n if (!is_null($this->_env)) {\n $env = ($this->has($key)) ? getenv($key) : var_export($default, true);\n\n switch ($env) {\n case 'true':\n return true;\n case 'false':\n return false;\n default:\n return $env;\n }\n }\n\n return var_export($default, true);\n }", "function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false) {\n return $default;\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return;\n }\n\n if (substr($value, 0, 1) === '\"' && substr($value, strlen($value), -1) === '\"') {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "function envvalue($name, $default)\n{\n $value = getenv($name);\n return $value == false ? $default : $value;\n}", "public function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false) {\n return $this->value($default);\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return null;\n }\n\n if (($valueLength = strlen($value)) > 1 && $value[0] === '\"' && $value[$valueLength - 1] === '\"') {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "function env( string $key, $default = '' ) { // phpcs:ignore NeutronStandard.Functions.TypeHint.NoArgumentType, NeutronStandard.Functions.TypeHint.NoReturnType, Universal.NamingConventions.NoReservedKeywordParameterNames.defaultFound\n\t$value = $_ENV[ $key ] ?? $default;\n\n\t// Return bool value for 'true' or 'false'.\n\tswitch ( $value ) {\n\t\tcase 'true':\n\t\t\treturn true;\n\t\tcase 'false':\n\t\t\treturn false;\n\t}\n\n\treturn $value;\n}", "function bool_val(string $key, bool $default = null): ?bool\n{\n $val = env($key, $default);\n\n if ($val === null) {\n return $default;\n }\n\n if ($val === 'false') {\n return false;\n }\n\n if ($val === '[]') {\n return false;\n }\n\n if ($val === '{}') {\n return false;\n }\n\n return boolval($val);\n}", "function environment($key = null, $default = null)\n {\n /** @var \\Phanda\\Environment\\Repository $environment */\n $environment = phanda('environment');\n\n if (is_null($key)) {\n return $environment;\n }\n\n if (is_array($key)) {\n $environment->set($key);\n return null;\n }\n\n $value = $environment->get($key, $default);\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return null;\n }\n\n if (($valueLength = strlen($value)) > 1 && $value[0] === '\"' && $value[$valueLength - 1] === '\"') {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "function env(string $key, $default = null)\n {\n switch (true) {\n case isset($_SERVER[$key]):\n $value = $_SERVER[$key];\n break;\n case isset($_ENV[$key]):\n $value = $_ENV[$key];\n break;\n case (function_exists('apache_getenv') && apache_getenv($key) !== false):\n $value = apache_getenv($key);\n break;\n default:\n $value = getenv($key);\n break;\n }\n if ($value === false) {\n return $default;\n }\n return value($value);\n }", "function getEnvVar(string $name, string $fallback = null, array $valid_values = null) {\n $value = getenv($name);\n $required = $fallback === null;\n\n if ($value === false && $required) {\n print(\"⚠️ Required environment variable '$name' is not set!\" . PHP_EOL);\n exit(1);\n }\n\n if (!$value && $fallback !== null) {\n $value = $fallback;\n print(\"ℹ️ Environment variable '$name' is not set, using fallback '$fallback'\" . PHP_EOL);\n }\n\n if ($valid_values != null && !in_array($value, $valid_values)) {\n print(\"⚠️ Environment variable '$name' has invalid value\");\n exit(1);\n }\n\n return $value;\n}", "public static function getEnv($name,$default = null) {\n\t if(isset($_ENV[$name])) {\n $value = trim($_ENV[$name]);\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n\t return true;\n\t case 'false':\n\t case '(false)':\n\t return false;\n\t case 'empty':\n\t case '(empty)':\n\t return '';\n\t case 'null':\n\t case '(null)':\n\t return;\n\t }\n\n\t if (Str::startsWith($value, '\"') && Str::endsWith($value, '\"')) {\n\t $value = substr($value, 1, -1);\n\t }\n\n\t return $value;\n\t }\n\t return $default;\n\t}", "function env(string $name, mixed $default = null, bool $server = true): mixed\n{\n return System::envGet($name, $default, $server);\n}", "function getEnvValue($name)\n{\n return $_ENV[$name] ?? getenv($name);\n}", "public static function env($key,$raw=false)\n\t{\n\t\tif(!empty($_ENV[$key]))\n\t\t\t$value = $_ENV[$key];\n\t\telse\n\t\t\t$value = @getenv($key);\n\t\treturn ($raw) ? $value : self::clear_value($value);\n\t}", "private static function getEnvVariable($name)\n {\n if (array_key_exists($name, $_SERVER)) {\n return $_SERVER[$name];\n }\n\n if (array_key_exists($name, $_ENV)) {\n return $_ENV[$name];\n }\n\n $value = getenv($name);\n\n return $value === false ? null : $value;\n }", "public function get($key, $default = null)\n {\n $value = getenv($key);\n if ($value === false) {\n return $default instanceof Closure ? $default() : $default;\n }\n\n return $value;\n }", "public function getVar($name, $default = \"variable is not set\"): string\n {\n\n if (getenv($name) != false) {\n return getenv($name);\n } else {\n return $default;\n }\n\n }", "public static function getEnvVariable($key) \n {\n // TODO - Check for other methods of getting env variables\n return getenv($key);\n }", "function env_get( $variable ){\n\t\t// not this function!\n\t\t$data = file_get_contents( 'env/env.json' );\n\t\t$json = json_decode( $data, true );\n\t\treturn $json[ $variable ];\n\t}", "public function env($key, $default = false)\n {\n if (isset($_ENV[$key])) {\n return $_ENV[$key];\n }\n return $default;\n }", "public static function getEnvironmentVariable($key, $default)\n\t{\n\t\tif (false !== ($val = getenv('env.' . $key))) {\n\t\t\treturn $val;\n\t\t}\n\n\t\tif (false !== ($val = getenv($key))) {\n\t\t\treturn $val;\n\t\t}\n\n\t\t// none defined\n\t\treturn $default;\n\t}", "public static function get($key)\n {\n if (!empty($key)) {\n if (strpos($key, 'server.') === 0) {\n $varName = substr($key, 7);\n return isset($_SERVER[$varName]) ? $_SERVER[$varName] : '';\n } elseif (strpos($key, 'env.') === 0) {\n $varName = substr($key, 4);\n $value = getenv($varName);\n return ($value !== false) ? $value : '';\n } else {\n return isset(self::$map[$key]) ? self::$map[$key] : '';\n }\n }\n return '';\n }", "protected static function variable($variable)\n {\n $ret = null;\n\n if (defined($variable)) {\n $value = constant($variable);\n } else {\n $value = getenv($variable);\n }\n\n $value = trim($value);\n\n if (strlen($value) > 0) {\n $ret = $value;\n }\n\n return $ret;\n }", "function get_http_env(): ?string\n {\n if ( ! \\defined( 'HTTP_ENV_CONFIG' ) ) {\n return null;\n }\n\n return strtoupper( HTTP_ENV_CONFIG );\n }", "function env($key, $default = NULL)\n\t{\n\t\treturn Env::get($key, $default);\n\t}", "public static function get()\n\t{\n\t\t// then return content of APPLICATION_ENV\n\t\t// else return \"development\"\n\t\treturn (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : \"development\");\n\t}", "function env( string $name, $default = null, bool $strtolower = false )\n {\n if ( ! isset( $_ENV[ $name ] ) ) {\n return $default;\n }\n\n if ( is_int_val( $_ENV[ $name ] ) ) {\n return (int) $_ENV[ $name ];\n }\n\n if ( \\in_array( $_ENV[ $name ], [ 'True', 'true', 'TRUE' ], true ) ) {\n return true;\n }\n if ( \\in_array( $_ENV[ $name ], [ 'False', 'false', 'FALSE' ], true ) ) {\n return false;\n }\n if ( \\in_array( $_ENV[ $name ], [ 'Null', 'null', 'NULL' ], true ) ) {\n return '';\n }\n\n if ( $strtolower ) {\n return strtolower( $_ENV[ $name ] );\n }\n\n return $_ENV[ $name ];\n }", "function env(?string $key = null, $default = null)\n{\n return array_get($_SERVER, $key, $default);\n}", "function env(string $key, $default = null)\n{\n return Env::get($key, $default);\n}", "function get_environment(): string {\n return getenv('APP_ENV') ?\n getenv('APP_ENV') : 'default';\n}", "function env($key, $default = '')\n {\n static $variables;\n\n //TODO: Changes flag in env to reload its value.\n\n if ($variables === null) {\n $variables = Dotenv::createImmutable(base_directory());\n $variables->safeLoad();\n }\n\n return (!empty(getenv($key)) && getenv($key) != '') ? getenv($key) : $default;\n }", "function env($key = null)\n{\n if (!isset($GLOBALS['configs']))\n $GLOBALS['configs'] = json_decode(file_get_contents($GLOBALS['config_path'] . DIRECTORY_SEPARATOR . 'env.json'));\n\n if (!is_null($key) && isset($GLOBALS['configs']->$key))\n return $GLOBALS['configs']->$key;\n elseif (is_null($key) && isset($GLOBALS['configs']))\n return $GLOBALS['configs'];\n else\n Throw new \\Atom\\Environment\\EnvironmentException(\"Environment variable \" . $key . \" not found.\");\n}", "function env($key, $default = null)\n {\n if(isset($_ENV[$key]))\n return $_ENV[$key];\n\n return $default;\n }", "function _parseBooleanEnv($s) {\n return strtoupper(getenv($s)) == 'TRUE';\n}", "function Get($var='') {\n\t\tif ($var == '') return false;\n\t\tif (!isset($this->_ExternalVars[$var])) return false;\n\t\treturn $this->_ExternalVars[$var];\n\t}", "public function getEnvironmentVariable($name)\n\t{\n\t\tswitch (true) {\n\t\t\tcase array_key_exists($name, $_ENV):\n\t\t\t\treturn $_ENV[$name];\n\t\t\tcase array_key_exists($name, $_SERVER):\n\t\t\t\treturn $_SERVER[$name];\n\t\t\tdefault:\n\t\t\t\t$environment = getenv($name);\n\t\t\t\treturn (!$environment) ? null : $environment;\n\t\t}\n\t}", "public static function environment( $value = null ) {\n\t\treturn self::set_or_get( __FUNCTION__, $value );\n\t}", "function env($key) {\n\n\t\tif ($key == 'HTTPS') {\n\t\t\tif (isset($_SERVER) && !empty($_SERVER)) {\n\t\t\t\treturn (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on');\n\t\t\t} else {\n\t\t\t\treturn (strpos(env('SCRIPT_URI'), 'https://') === 0);\n\t\t\t}\n\t\t}\n\n\t\tif ($key == 'SCRIPT_NAME') {\n\t\t\tif (env('CGI_MODE')) {\n\t\t\t\t$key = 'SCRIPT_URL';\n\t\t\t}\n\t\t}\n\n\t\t$val = null;\n\t\tif (isset($_SERVER[$key])) {\n\t\t\t$val = $_SERVER[$key];\n\t\t} elseif (isset($_ENV[$key])) {\n\t\t\t$val = $_ENV[$key];\n\t\t} elseif (getenv($key) !== false) {\n\t\t\t$val = getenv($key);\n\t\t}\n\n\t\tif ($key == 'REMOTE_ADDR' && $val == env('SERVER_ADDR')) {\n\t\t\t$addr = env('HTTP_PC_REMOTE_ADDR');\n\t\t\tif ($addr != null) {\n\t\t\t\t$val = $addr;\n\t\t\t}\n\t\t}\n\n\t\tif ($val !== null) {\n\t\t\treturn $val;\n\t\t}\n\n\t\tswitch ($key) {\n\t\t\tcase 'DOCUMENT_ROOT':\n\t\t\t\t$offset = 0;\n\t\t\t\tif (!strpos(env('SCRIPT_NAME'), '.php')) {\n\t\t\t\t\t$offset = 4;\n\t\t\t\t}\n\t\t\t\treturn substr(env('SCRIPT_FILENAME'), 0, strlen(env('SCRIPT_FILENAME')) - (strlen(env('SCRIPT_NAME')) + $offset));\n\t\t\tbreak;\n\t\t\tcase 'PHP_SELF':\n\t\t\t\treturn r(env('DOCUMENT_ROOT'), '', env('SCRIPT_FILENAME'));\n\t\t\tbreak;\n\t\t\tcase 'CGI_MODE':\n\t\t\t\treturn (substr(php_sapi_name(), 0, 3) == 'cgi');\n\t\t\tbreak;\n\t\t}\n\t\treturn null;\n\t}", "public function getEnv():string\n {\n return $this->env;\n }", "private static function getEnvironmentForVariables($var=array(),$environment=null)\r\n {\r\n //environment variable specified by the variable is checked in the defined file\r\n //and the value is returned accordingly.\r\n return $environment[$var[0]] ?? $var[1];\r\n }", "function getValue( $val, $default ) {\n\n $result = trim( $val );\n\n if ( is_bool( $val ) ) {\n\n if ( !isset( $val ) ) {\n\n $result = $default;\n\n } else {\n\n $result = $val;\n\n }\n\n } else {\n\n if ( strlen( $result ) <= 0 ) {\n\n $result = $default;\n\n }\n\n }\n\n return $result;\n\n }", "public function getSettingValue()\n {\n if (array_key_exists(\"settingValue\", $this->_propDict)) {\n return $this->_propDict[\"settingValue\"];\n } else {\n return null;\n }\n }", "public function env($val)\n\t{\n\t\treturn env($val);\n\t}", "function env($envString, $defaultVariable = \"\") {\n\tif (! getenv($envString)) {\n\t\treturn $defaultVariable;\n\t}\n\treturn getenv($envString);\n}", "function boolval($var) {\r\n if (is_bool($var)) { return $var; }\r\n switch ($var) {\r\n case 'true': return true;\r\n case 'false': return false;\r\n default: throw new InvalidArgumentException('Cannot parse value '.$var);\r\n }\r\n}", "public static function get(string $name)\n {\n if (!array_key_exists($name, self::$data)) {\n throw new InvalidEnvironmentVarException(\n sprintf('No %s value found in environment config', $name)\n );\n }\n return self::$data[$name];\n }", "function env($str){\n\treturn (getenv($str))?:$_SERVER[$str]; // generate library path:\n}", "function env(string $key = null, mixed $or = null)\n{\n return Env::env($key, $or);\n}", "public function get($name)\n {\n v::PhpLabel()->check($name);\n\n $loader = new Loader($this->dotEnvPath());\n\n // If the environment variable is already set, don't try to use Dotenv\n // as an exception will be thrown if a .env file cannot be found.\n $value = $loader->getEnvironmentVariable($name);\n if (!isset($value)) {\n try {\n // Attempt to load environment variables from .env if we didn't\n // already have what we were looking for in memory.\n $dotenv = new Dotenv($this->dotEnvPath());\n $dotenv->load();\n\n // Try once more to find what we're looking for before giving\n // up. It is not possible to test this on infrastructure with\n // .env missing and it is not possible to test the above\n // exception where it is set. We have to ignore this for code\n // coverage reports.\n // @codeCoverageIgnoreStart\n $value = $loader->getEnvironmentVariable($name);\n if (!isset($value)) {\n throw new \\Exception(self::MISSING_ENV_EXCEPTION_MESSAGE . $name);\n }\n // Code coverage requires this return.\n return $value;\n // @codeCoverageIgnoreEnd\n } catch (\\Exception $e) {\n // Provide a more useful message than the Dotenv default.\n throw new \\Exception(self::MISSING_ENV_EXCEPTION_MESSAGE . $name);\n }\n }\n\n return $value;\n }", "public function getValue($key = NULL) {\n return isset($this->config[$key]) ? $this->config[$key] : NULL;\n }", "public static function envVarKey($var = null)\n {\n // Value not set. Return the .htaccess environment var\n if (is_null($var)) {\n return self::$htaccess_env;\n }\n\n // Value set. If it is not empty, set it. Otherwise, skip it\n if (!empty($var)) {\n self::$htaccess_env = $var;\n }\n\n return self::$htaccess_env;\n }", "public function get($name = null)\n {\n return array_key_exists($name, $this->vars) ? $this->vars[$name] : false;\n }", "function GetVar($name, $default_value = false) {\r\n if (!isset($_GET)) {\r\n return false;\r\n }\r\n if (isset($_GET[$name])) {\r\n if (!get_magic_quotes_gpc()) {\r\n return InjectSlashes($_GET[$name]);\r\n }\r\n return $_GET[$name];\r\n }\r\n return $default_value;\r\n}", "public static function get(string $key, $default = null)\n {\n return Option::fromValue(static::getVars()->get($key))\n ->map(function ($value) {\n switch (mb_strtolower($value)) {\n case 'false':\n return false;\n case 'true':\n return true;\n case 'null':\n return null;\n }\n\n return $value;\n })\n ->getOrCall(function () use ($default) {\n return $default;\n });\n }", "public function getEnv($name);", "public function get( string $key, $default = null ) {\n if ( $this->variables === null ) {\n $this->variables = $this->readEnv();\n }\n\n if ( !isset( $this->variables[$key] ) ) {\n return $default;\n }\n\n return $this->variables[$key];\n }", "function getenv_docker($env, $default) {\n if ($fileEnv = getenv($env . '_FILE')) {\n return rtrim(file_get_contents($fileEnv), \"\\r\\n\");\n }\n else if (($val = getenv($env)) !== false) {\n return $val;\n }\n else {\n return $default;\n }\n}", "public function get($key = NULL)\n {\n if (!$key) return;\n $val = $this->_settings[$key];\n\n return isset($val) ? $val : NULL;\n }", "function apache_getenv($variable, $walk_to_top = false)\n{\n}", "function env($key, $default = null)\n {\n if (class_exists(IlluminateEnv::class)) {\n return IlluminateEnv::get($key, $default);\n }\n\n return Env::get($key, $default);\n }", "public function testEnvVar() {\n putenv('LING_ENV=dev');\n $this->assertSame(env('env.LING_ENV'), 'dev');\n }", "function int_val(string $key, int $default = null): ?int\n{\n $val = env($key, $default);\n\n if (is_numeric($val)) {\n return intval($val);\n }\n\n return $default;\n}", "protected function getEnvironmentVariable($key)\n {\n return GeneralUtility::getIndpEnv($key);\n }", "function menv($key, $default = null)\n {\n $value = env($key);\n if(!is_null($value)){\n return $value;\n }elseif (isset($_ENV[$key])) {\n $value = $_ENV[$key];\n } elseif (isset($_SERVER[$key])) {\n $value = $_SERVER[$key];\n }\n return is_null($value) ? value($default) : $value;\n }", "protected function getCurrentEnv() {\n if (empty($this->env)) {\n $this->env = shell_exec('echo -n $'.self::ENV_VARIABLE_NAME);\n }\n return $this->env;\n }", "public function getEnv($variable)\n\t{\n\t\tif (!isset($this->_env[$variable])) {\n\t\t\tloadClass('Logger')->error('Docker environment variable not found: '.$variable);\n\t\t\treturn null;\n\t\t}\n\t\treturn $this->_env[$variable];\n\t}", "public function has($key)\n {\n if (!is_null($this->_env)) {\n return getenv($key) ? true : false;\n }\n\n return false;\n }", "function env($key)\n {\n if(!is_string($key)) {\n throw new \\InvalidArgumentException(\"Please provide string argument.\");\n }\n\n $json = file_get_contents('env.json');\n $data = (array) json_decode($json);\n\n if(!array_key_exists($key, $data)) {\n throw new \\ErrorException(\"The given key not match with any.\");\n }\n\n return $data[$key];\n }", "public function getDataWithTypeGetenv() {}", "function my_getenv($key)\n {\n\t $return = array();\n\t \n\t if ( is_array( $_SERVER ) AND count( $_SERVER ) )\n\t {\n\t\t if( isset( $_SERVER[$key] ) )\n\t\t {\n\t\t\t $return = $_SERVER[$key];\n\t\t }\n\t }\n\t \n\t if ( ! $return )\n\t {\n\t\t $return = getenv($key);\n\t }\n\t \n\t return $return;\n }", "private static function detect_env()\n {\n if (!defined('POPOPENFW_IS_CLI')) {\n $env = (php_sapi_name() == 'cli') ? (true) : (false);\n define('POPOPENFW_IS_CLI', $env);\n }\n return POPOPENFW_IS_CLI;\n }", "private static function detect_env()\n {\n if (!defined('POPOPENFW_IS_CLI')) {\n $env = (php_sapi_name() == 'cli') ? (true) : (false);\n define('POPOPENFW_IS_CLI', $env);\n }\n return POPOPENFW_IS_CLI;\n }", "private function getTransferEnvValue($value, bool $isArray)\n {\n if ($value === null) {\n return null;\n }\n\n if ($isArray == false) {\n return $value;\n }\n\n if (empty($value)) {\n $value = [];\n } else {\n $value = explode(\",\", $value);\n }\n\n return $value;\n }", "function gocardless_env($key = '')\n {\n $config = config('gocardless');\n $env = config('gocardless.environment');\n if (empty($env) && empty($config['environments'][$env])) {\n return null;\n }\n if (empty($key) && ! empty($config['environments'][$env])) {\n return $config['environments'][$env];\n }\n if (array_key_exists($env, $config['environments'])) {\n return $config['environments'][$env][$key];\n }\n return null;\n }", "public static function readEnv($key)\n {\n return self::$environment[$key];\n }", "function config($key, $default = null)\n {\n $output = $default;\n\n $cmd = '$output = $_ENV[\\''. str_replace('.', '\\'][\\'', $key). '\\'];';\n\n eval($cmd);\n\n return $output;\n }", "function env() {\n if (defined('WP_ENV')) {\n return WP_ENV;\n } else {\n define('WP_ENV', getenv('WP_ENV') ?? 'production');\n }\n return WP_ENV;\n}", "public function getEnv()\n {\n return $this->env;\n }", "public function getEnv()\n {\n return $this->env;\n }", "public function get_env()\n {\n return $this->env;\n }", "function env($name)\n{\n return Env::get($name);\n}", "public function getEnv($key = null, $default = null)\n {\n if (null === $key) {\n return $_ENV;\n }\n\n return (isset($_ENV[$key])) ? $_ENV[$key] : $default;\n }", "public function getValue($key, $default = '') {\n\t\treturn $this->config->getValue($key, $default);\n\t}", "private function parseEnvironmentParams($value)\n {\n // env.variable is an environment variable\n $env = explode('.', $value);\n if ('env' === $env[0]) {\n $envParam = getenv($env[1]);\n if (false === $envParam) {\n throw new InvalidArgumentException(\"Environment variable '$env[1]' is not defined.\");\n }\n\n return $envParam;\n }\n\n return null;\n }", "public static function getEnv(string $name)\n {\n if (array_key_exists($name, $_SERVER)) {\n return (string) $_SERVER[$name];\n }\n if (array_key_exists($name, $_ENV)) {\n return (string) $_ENV[$name];\n }\n\n return getenv($name);\n }", "protected function get_environment()\n\t{\n\t\treturn $this->environment ?: PHPBB_ENVIRONMENT;\n\t}", "public function getEnvironmentKey(string $key)\n {\n return self::$defaultEnv[$key] ?? null;\n }", "public function get(string $key, mixed $default = null): mixed\n {\n return $this->variables[$key] ?? $default;\n }", "public function getEnv()\n {\n return self::$environment;\n }", "public function getEnvironment() {\n\n return trim($this->environment);\n }", "function getEnvironment(){ return $_ENV['CURRENT_ENVIRONMENT']; }", "public function getEnvironment();" ]
[ "0.73584306", "0.7350863", "0.73503494", "0.7341796", "0.73397934", "0.73324037", "0.73305756", "0.7320075", "0.7305387", "0.7292094", "0.7255595", "0.70721316", "0.70536894", "0.7020108", "0.68737966", "0.6759906", "0.6669979", "0.6668818", "0.6656916", "0.6641413", "0.6614459", "0.6444627", "0.63719565", "0.6339226", "0.6252824", "0.61810833", "0.61412144", "0.60923594", "0.6086808", "0.6081968", "0.6047325", "0.60268056", "0.60150796", "0.6009993", "0.59905225", "0.5927569", "0.59087473", "0.5866584", "0.586025", "0.5841362", "0.5817976", "0.5795787", "0.5779365", "0.57718825", "0.57218874", "0.5710348", "0.5691843", "0.5657884", "0.56510127", "0.56304693", "0.5569232", "0.5566339", "0.5559177", "0.5559032", "0.5525818", "0.5524777", "0.5521831", "0.549763", "0.5480201", "0.54718405", "0.5463248", "0.5443876", "0.54141176", "0.5410858", "0.5409238", "0.5405768", "0.5402162", "0.5390617", "0.53760123", "0.537227", "0.5369329", "0.5351952", "0.534333", "0.5321479", "0.53068244", "0.5301288", "0.5285516", "0.52821666", "0.5271248", "0.5271248", "0.5263051", "0.5252763", "0.52439517", "0.52351594", "0.52320695", "0.5228517", "0.5228517", "0.5222178", "0.520333", "0.5190106", "0.51762795", "0.5176255", "0.5168599", "0.5166442", "0.51600784", "0.5155821", "0.51516", "0.51471084", "0.5142512", "0.51391125" ]
0.73069066
8
Retrieve scope values for form, compatible with form dropdown options
public function getScopeSelectOptions($empty = false, $all = false) { if (!$this->_options) { $options = []; if ($empty) { $options[] = [ 'label' => __('-- Please Select --'), 'value' => '', ]; } if ($all) { $options[] = [ 'label' => __('Default Config'), 'value' => self::SCOPE_DEFAULT . self::SCOPE_DELIMITER . '0', 'style' => 'color:#1EB5F0;', ]; } $nonEscapableNbspChar = html_entity_decode('&#160;', ENT_NOQUOTES, 'UTF-8'); $storeModel = $this->_systemStore; /* @var $storeModel Store */ foreach ($storeModel->getWebsiteCollection() as $website) { $websiteShow = false; foreach ($storeModel->getGroupCollection() as $group) { if ($group->getWebsiteId() != $website->getId()) { continue; } $groupShow = false; foreach ($storeModel->getStoreCollection() as $store) { if ($store->getGroupId() != $group->getId()) { continue; } if (!$websiteShow) { $options[] = [ 'label' => $website->getName(), 'value' => self::SCOPE_WEBSITES . self::SCOPE_DELIMITER . $website->getId(), ]; $websiteShow = true; } if (!$groupShow) { $groupShow = true; $values = []; } $values[] = [ 'label' => str_repeat($nonEscapableNbspChar, 4) . $store->getName(), 'value' => self::SCOPE_STORES . self::SCOPE_DELIMITER . $store->getId(), ]; } //end: foreach store if ($groupShow) { $options[] = [ 'label' => str_repeat($nonEscapableNbspChar, 4) . $group->getName(), 'value' => $values, ]; } } //end: foreach group } //end: foreach website $this->_options = $options; } return $this->_options; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormValues()\n {\n return $this->form->getValues();\n }", "private function getSelectFormValues()\n {\n $program_id = User::getLoggedInUser()->getCurrentProgram()->id;\n $selection_by = $this->_getParam('selection_by');\n $all_students = true;\n\n if ($selection_by == \"by-requirements\") {\n $default_filters = array('graduationStatus' => array(1), 'show_instructors' => 1);\n\n // format sub-filters for the students\n $filters = [];\n\n if ($this->_getParam('graduationMonth')) {\n $filters['graduationMonth'] = $this->_getParam('graduationMonth');\n }\n if ($this->_getParam('graduationYear')) {\n $filters['graduationYear'] = $this->_getParam('graduationYear');\n }\n if ($this->_getParam('certs')) {\n $filters['certificationLevels'] = $this->_getParam('certs');\n }\n if ($this->_getParam('status')) {\n $filters['graduationStatus'] = $this->_getParam('status');\n }\n if ($this->_getParam('groups')) {\n $filters['section'] = $this->_getParam('groups');\n }\n $filters['show_instructors'] = $this->_getParam('show_instructors');\n\n // if the filters are different than our standard set\n if ($filters != $default_filters) {\n $all_students = false;\n } else {\n $all_students = true;\n }\n\n if ($this->_getParam('all_students')) {\n $all_students = true;\n $filters = $default_filters;\n }\n $userContextIds = $this->getRoleDataIds($filters, $this->getParam('show_instructors'));\n $requirement_ids = array_unique($this->_getParam('requirement_ids'));\n } else {\n $userContextIds = $this->getParam('userContextIds');\n $requirement_ids = $this->requirementRepository->getRequirements($program_id, true, true, true, true);\n }\n\n $selectFormValues = [\n \"selection-by\" => $selection_by,\n \"userContextIds\" => $userContextIds,\n \"requirementIds\" => $requirement_ids,\n \"people_sub_filters\" => $filters,\n \"all_students\" => $all_students\n ];\n\n return $selectFormValues;\n }", "public function toOptionArray()\n {\n $scopes = $this->scopeResolverPool->get($this->scope)->getScopes();\n $array = [];\n foreach ($scopes as $scope) {\n $array[] = ['value' => $scope->getId(), 'label' => $scope->getName()];\n }\n return $array;\n }", "public function getFormValues() {\n return $this->values[HVAL_FORMPARAM];\n }", "public function getValuesForForm()\n {\n $collection = $this->getCollection();\n $options = [];\n if ($collection->getSize() > 0) {\n foreach ($collection as $role) {\n $options[] = ['value' => $role->getId(), 'label' => $role->getData('display_name')];\n }\n }\n return $options;\n }", "function pnFormGetValues()\n {\n $result = array();\n\n $this->pnFormGetValues_rec($this->pnFormPlugins, $result);\n\n return $result;\n }", "public function getValue()\n\t{\n\t\t$data = array();\n\t\tforeach($this->_collection as $subform)\n\t\t{\n\t\t\tforeach($subform->_collection as $name => $item)\n\t\t\t{\n\t\t\t\t$data[$name] = $item->getValue();\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "function getValidationScope();", "public function getFormInput()\n {\n $values = $this->getFormValues();\n\n return $values->all();\n }", "public static function get_parameters() {\n return array(\n array(\n 'name' => 'termlist_id',\n 'caption' => 'Term List',\n 'description' => 'The term list being edited.',\n 'type' => 'select',\n 'table' => 'termlist',\n 'captionField' => 'title',\n 'valueField' => 'id',\n 'siteSpecific'=>true,\n 'group' => 'Terms',\n 'required'=>true\n ),\n array(\n 'name' => 'language_id',\n 'caption' => 'Language',\n 'description' => 'The language that terms are created in.',\n 'type' => 'select',\n 'table' => 'language',\n 'captionField' => 'language',\n 'valueField' => 'id',\n 'siteSpecific'=>true,\n 'group' => 'Terms',\n 'required'=>true\n )\n );\n }", "function options_form() {\n return array(\n );\n }", "public function getForm();", "public function getFormOptions($orderBy);", "public function getFormOptions()\n {\n return $this->form->getOptions();\n }", "public function getFormValues()\n {\n return array(\n 'title' => $this->issue['subject'],\n 'reference' => $this->issue['id'],\n 'date_started' => $this->issue['start_date'],\n 'description' => $this->issue['description']\n );\n }", "public function valiteForm();", "public function getFormParameters()\n {\n return $this->form_parameters;\n }", "public function retrieveFormFields()\n {\n return $this->start()->uri(\"/api/form/field\")\n ->get()\n ->go();\n }", "public function getFormValues()\n {\n $validator = App::make(SubmitForm::class);\n return $validator->getSubmissions();\n }", "public static function getSelect()\n {\n return Hash::combine(self::getConstants(), '{s}.value', '{s}.name');\n }", "public function getValidFormChoiceTypeValues(): array\n {\n return [\n 'qualified' => [\n 'qualified', TRUE, FALSE, \n ], \n 'unqualified' => [\n 'unqualified', FALSE, TRUE, \n ], \n ];\n }", "protected function getConfigFormValues()\n {\n $formValues = array(\n 'WI_SPENT_AMOUNT' => Configuration::get('WI_SPENT_AMOUNT', ''),\n 'WI_SPENT_COUPON' => Configuration::get('WI_SPENT_COUPON', ''),\n 'WI_SPENT_ENABLED' => Configuration::get('WI_SPENT_ENABLED', ''),\n 'WI_SPENT_DAYS' => Configuration::get('WI_SPENT_DAYS', ''),\n );\n return $formValues;\n }", "protected function getConfigFormValues()\n {\n $formValues = array(\n 'WI_WEATHER_ENABLED' => Configuration::get('WI_WEATHER_ENABLED', ''),\n 'WI_WEATHER_PROVIDER' => Configuration::get('WI_WEATHER_PROVIDER', ''),\n 'WI_WEATHER_KEY' => Configuration::get('WI_WEATHER_KEY', ''),\n 'WI_WEATHER_CITY' => Configuration::get('WI_WEATHER_CITY', ''),\n );\n return $formValues;\n }", "public function GetFormPostedValues() {\n\t\t$req_fields=array(\"description\",\"date_open\",\"date_closed\");\n\n\t\tfor ($i=0;$i<count($req_fields);$i++) {\n\n\t\t\t//echo $_POST['application_id'];\n\t\t\tif (ISSET($_POST[$req_fields[$i]]) && !EMPTY($_POST[$req_fields[$i]])) {\n\t\t\t\t$this->SetVariable($req_fields[$i],EscapeData($_POST[$req_fields[$i]]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//echo \"<br>\".$this->req_fields[$i].\"<br>\";\n\t\t\t\t$this->$req_fields[$i]=\"\";\n\t\t\t}\n\t\t}\n\t}", "public function form() {\n\t\treturn array();\n\t}", "function getOptionValues() {\t\t\n\t\t$optionvaluesquery = \"SELECT lv.lookuptypevalue as optiontext, lv.lookuptypevalue as optionvalue FROM lookuptype AS l , \n\t\tlookuptypevalue AS lv WHERE l.id = lv.lookuptypeid AND l.name ='\".$this->getName().\"' ORDER BY optiontext \";\n\t\treturn getOptionValuesFromDatabaseQuery($optionvaluesquery);\n\t}", "public function fetchFormOptions($type)\n {\n $settings = $this->types[$type];\n\n /* @var $model Model */\n $model = app()->make($settings['model']);\n\n // Now we've got an instance of the query builder we can interact\n // with it via it's api to do things such as...\n $query = $model->newQuery();\n\n // Such as attach model scopes! for filtering/restricting results.\n if (isset($settings['scopes']) && is_array($settings['scopes'])) {\n $query->scopes($settings['scopes']);\n }\n\n $results = $query->get()->transform(function ($item) use ($settings) {\n return [\n 'value' => data_get($item, $settings['value']),\n 'label' => data_get($item, $settings['label']),\n ];\n })->sortBy('label')->values();\n\n if (data_get($settings, 'allow_none')) {\n $results->prepend([\n 'value' => data_get($settings, 'none_value', ''),\n 'label' => data_get($settings, 'none_label', 'None'),\n ]);\n }\n\n // Return all the entries once they've been transformed into a sensible format.\n return $results;\n }", "public function provideDependencyFieldValuesFilterFieldsDefinition(AbstractCrudForm $form): array;", "public function transactionFormGetFormParms ();", "protected function getConfigFormValues()\n {\n return array(\n 'MF_TITLE' => Configuration::get('MF_TITLE', 'Our Favourite Brands'),\n 'MF_DESCRIPTION' => Configuration::get('MF_DESCRIPTION', 'Browse our favourite brands'),\n 'MF_MAN_NUMBER' => Configuration::get('MF_MAN_NUMBER', 0),\n 'MF_PER_ROW_DESKTOP' => Configuration::get('MF_PER_ROW_DESKTOP', 0),\n 'MF_PER_ROW_TABLET' => Configuration::get('MF_PER_ROW_TABLET', 0),\n 'MF_PER_ROW_MOBILE' => Configuration::get('MF_PER_ROW_MOBILE', 0),\n 'MF_MAN_ORDER' => Configuration::get('MF_MAN_ORDER', 'name_asc'),\n 'MF_SHOW_MAN_NAME' => Configuration::get('MF_SHOW_MAN_NAME', 0),\n );\n }", "public function select_values_for_form( EntryValueSelect $entry_value_select );", "public function get_form() : ?array\n {\n $form_filtro = array();\n \n $form_filtro['estado'] = $this->estado;\n $form_filtro['cidade'] = $this->cidade;\n $form_filtro['ordem_preco'] = $this->ordem_preco;\n $form_filtro['ordem_data'] = $this->ordem_data;\n $form_filtro['estado_uso'] = $this->estado_uso;\n $form_filtro['preferencia_entrega'] = $this->preferencia_entrega;\n $form_filtro['status_peca'] = $this->status_peca;\n \n return $form_filtro;\n }", "public function getSelectDataFields();", "private function filterOptions(){\n $request = new Request();\n\n $key = $request->query->get('key') ? $this->global_helper_service->cleanDataInput($request->query->get('key')) : '';\n $date_range = $request->query->get('date_range') ? $request->query->get('date_range') : '';\n\n $array_filters = array();\n\n $array_filters['key'] = array(\n 'type' => 'input',\n 'title' => 'Search',\n 'default_value' => $key\n );\n\n $array_filters['date_range'] = array(\n 'type' => 'date_picker',\n 'title' => 'Date Range',\n 'options' => '',\n 'default_value' => $date_range\n );\n\n return $this->admincp_service->handleElementFormFilter($array_filters);\n }", "abstract protected function getFormTypeParams();", "public static function getForm();", "function get_name_select_list()\n\t{\n\t\treturn $this->get_name_select_edit();\n\t}", "public function listScopes()\n {\n $query = 'SELECT ' . $this->_db->distinct('pref_scope') . ' FROM '\n . $this->_params['table'];\n try {\n return $this->_db->selectValues($query);\n } catch (Horde_Db_Exception $e) {\n throw new Horde_Prefs_Exception($e);\n }\n }", "public function getForm(): array\n {\n return $this->form;\n }", "protected function getConfigFormValues()\n {\n return array(\n 'ORDERREF_LENGTH' => Configuration::get('ORDERREF_LENGTH'),\n 'ORDERREF_MODE' => Configuration::get('ORDERREF_MODE'),\n );\n }", "public function getForms()\n {\n return ['' => 'None']+$this->select('id', 'title')->orderBy('title', 'asc')->pluck('title', 'id')->toArray();\n }", "public function populateForm() {}", "protected function getConfigFormValuesSearchLayer()\n {\n $fields = [];\n $fields['DF_INSTALLATION_ID'] = Configuration::get('DF_INSTALLATION_ID');\n $fields['DF_SHOW_LAYER'] = Configuration::get('DF_SHOW_LAYER', null, null, null, true);\n $fields['DF_SHOW_LAYER_MOBILE'] = Configuration::get('DF_SHOW_LAYER_MOBILE', null, null, null, true);\n\n return $fields;\n }", "public function brandForm(){\n $table = \"brands\";\n $cresults = $this->getAllrecords($table);\n foreach($cresults as $brand){\n echo('<option value=\"'.$brand[\"brand_id\"].'\">'.$brand[\"brand_name\"].'</option>');\n }\n\n\n }", "public function getInput()\n {\n $result = array();\n\n $table = new Application_Model_DbOptions();\n $options = array();\n\t\t$options['optRegion'] = $table->getRegion();\n\n // elements\n\t\t$result['src_region_code'] = array(\n 'type' => 'select',\n 'name' => 'src_region_code',\n 'value' => '',\n 'options' => $options['optRegion'],\n 'ext' => 'onChange=\\'$(\"#src_ba\").val(\"\");\\'', //src_afd\n\t\t\t'style' => 'width:200px;background-color: #e6ffc8;'\n );\n\t\t\n\t\t$options['optMatStage'] = $table->getMaturityStage();\n\t\t$result['src_matstage_code'] = array(\n 'type' => 'select',\n 'name' => 'src_matstage_code',\n 'value' => '',\n 'options' => $options['optMatStage'],\n 'ext' => '',\n\t\t\t'style' => 'width:200px;'\n );\n\n return $result;\n }", "function optionValues( )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $return_array = array();\n $this->dbInit();\n \n $this->Database->array_query( $res_array, \"SELECT ID FROM eZTrade_OrderOptionValue\n WHERE\n OrderItemID='$this->ID'\n \" );\n\n foreach ( $res_array as $item )\n {\n $return_array[] = new eZOrderOptionValue( $item[\"ID\"] );\n }\n \n return $return_array; \n }", "public function getSubmittedValue();", "public function getSubmittedValue();", "function ting_ting_collection_context_settings_form($conf) {\n $form = array();\n return $form;\n}", "function getOptionValuesFromQuery() {\t\t\n\t\t# get the query to execute\n\t\t$conn = Doctrine_Manager::connection(); \n\t\t$query = $conn->fetchRow(\"SELECT querystring FROM lookupquery WHERE name = '\".$this->getName().\"'\");\n\t\t# debugMessage($query); \n\t\tif (isEmptyString($query['querystring'])) {\n\t\t\treturn array(); \n\t\t} else {\n\t\t\treturn getOptionValuesFromDatabaseQuery($query['querystring']);\n\t\t}\n\t}", "abstract function getForm();", "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('finder_dropdown_');\n $values = [];\n foreach($this->_model->getDropdowns() as $dropdown) {\n $prefix = 'dropdown_'.$dropdown->getId();\n\n $fieldset = $form->addFieldset($prefix, ['legend' => __('Dropdown #%1',$dropdown->getPos()+1)]);\n $fieldset->addField(\n $prefix . '_name',\n 'text',\n ['name'=>$prefix . '_name', 'label' => __('Name'), 'title' => __('Name'), 'required' => true]\n );\n $values[$prefix . '_name'] = $dropdown->getName();\n $fieldset->addField(\n $prefix . '_sort',\n 'select',\n [\n 'name'=>$prefix . '_sort', 'label' => __('Sort'), 'title' => __('Sort'), 'required' => true,\n 'values' => [\n ['value' => \\Amasty\\Finder\\Helper\\Data::SORT_STRING_ASC, 'label' => __('alphabetically, asc')],\n ['value' => \\Amasty\\Finder\\Helper\\Data::SORT_STRING_DESC, 'label' => __('alphabetically, desc')],\n ['value' => \\Amasty\\Finder\\Helper\\Data::SORT_NUM_ASC, 'label' => __('numerically, asc')],\n ['value' => \\Amasty\\Finder\\Helper\\Data::SORT_NUM_DESC, 'label' => __('numerically, desc')],\n ]\n ]\n );\n $values[$prefix . '_sort'] = $dropdown->getSort();\n\n $fieldset->addField(\n $prefix . '_range',\n 'select',\n [\n 'name'=>$prefix . '_range', 'label' => __('Range'), 'title' => __('Range'), 'required' => true,\n 'values' => [\n ['value' => 0, 'label' => __('No')],\n ['value' => 1, 'label' => __('Yes')],\n ]\n ]\n );\n $values[$prefix . '_range'] = $dropdown->getRange();\n }\n $form->setValues($values);\n $this->setForm($form);\n return parent::_prepareForm();\n }", "public function fields()\n {\n $statuses = \\App\\Status::all()->pluck('name','id');\n return [\n Select::make('Status','id')->options($statuses)\n ];\n }", "protected function getFiltersForm(){\n $table = ORM::getTable('word');\n $name = $table->getField('name');\n $value = $table->getField('value');\n\n $pseudo = new OrmTable('pseudo_languages');\n $pseudo->addField($name);\n $pseudo->addField($value);\n $form = UI::getFormForTable($pseudo, array(), UI::LAYOUT_BLOCK);\n $form['id'] = 'word_filters';\n $form['fields']['value']['tag'] = UI::TAG_INPUT;\n unset($form['fields']['value']['title']);\n unset($form['fields']['name']['title']);\n $form['fields']['name']['attributes']['onblur'] ='Word.filterTerms()';\n $form['fields']['name']['attributes']['placeholder'] = Word::get('admin','word_name_filter');\n $form['fields']['value']['attributes']['onblur'] = 'Word.filterTerms()';\n $form['fields']['value']['attributes']['placeholder'] = Word::get('admin','word_value_filter');\n return $form;\n }", "public function getFormdata() {\n $formdata = array();\n\n foreach($this->elements as $element) {\n $key = $element['object']->getName();\n $value = $element['object']->getSubmittedValue();\n\n $formdata[$key] = $value;\n }\n\n return $formdata;\n }", "protected function getConfigFormValues()\n {\n return array(\n 'MYETICKETS_CGV' => Configuration::get('MYETICKETS_CGV', '[email protected]'),\n 'MYETICKETS_PERIOD' => Configuration::get('MYETICKETS_PERIOD', null),\n );\n }", "function getFormValues($selectList = false)\n\t{\n\t\tif (!$this->formSubmitted())\n\t\t\treturn false;\n\t\t\t\n\t\t$returnList = array();\n\t\tforeach ($this->elementList as $element)\n\t\t{\n\t\t\t// Don't return custom types\n\t\t\tif ($element->type == 'custom') {\n\t\t\t\tcontinue;\n\t\t\t}\t\t\t\t\n\t\t\t\n\t\t\tif ($selectList && is_array($selectList))\n\t\t\t{\n\t\t\t\t// Only add if in the list of specified elements.\n\t\t\t\tif (in_array($element->name, $selectList)) {\t\t\t\n\t\t\t\t\t$returnList[$element->name] = $element->value;\n\t\t\t\t}\n\t\t\t} \n\t\t\t// Add anyway, no list to choose from.\n\t\t\telse {\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$returnList[$element->name] = $element->value;\n\t\t\t}\n\t\t\t\n\t\t} // end of foreach\n\t\t\n\t\treturn $returnList;\n\t}", "protected function getForm() {\n /*$action = '/v2/oauth/authorize/process';*/\n \t$action = $this->view->url(array('module' => 'oauth',\n\t\t\t\t\t'controller' => 'authorize',\n\t\t\t\t\t'action' => 'process'), 'Oauth_module_route');\n\t\t\t\t\t\n //create a new OAuth Approve Form\n $form = new Oauth_Form_ApproveForm(array(\n 'action' => $action /*'/v2/oauth/authorize/process'*/,\n 'method' => 'post',\n ));\n\n //retrieve our bloody scopes\n $scope = explode(\" \", $this->getRequest()->getParam(SCOPE));\n $scopes = array();\n foreach ($scope as $s) {\n $scopes[] = $this->_helper->ModelLoader->LoadScope($s);\n }\n\n //retrieve the client\n $client_id = $this->getRequest()->getParam(CLIENT_ID);\n $client = $this->_helper->ModelLoader->LoadClient($client_id);\n\n return $form->buildDisclaimer($scopes, $client)\n ->injectRequestValues($this->getRequest()->getParams());\n }", "public function selectEntitiesCallback(array &$form, FormStateInterface $form_state) {\n return $form[$this->fieldDefinition->getName()];\n }", "public function getForSelect()\n {\n return $this->all()->lists('full_name', 'id')->all();\n }", "public function _get_picker_dropdown_choices() {\n\t\t$this->load_data();\n\t\t$result = array();\n\t\tforeach ( $this->data as $unique_key => $item ) {\n\t\t\t$result[ $unique_key ] = $item['label'];\n\t\t}\n\n\t\treturn $result;\n\t}", "function value_form(&$form, &$form_state) {\n $form['value']['column'] = array(\n '#type' => 'textfield',\n '#title' => t('Property column'),\n '#default_value' => $this->value['column'],\n '#description' => t('Name of the database column to use in the comparison.'),\n );\n\n // We know which properties are available, so we can show a select box.\n if (isset($this->definition['available_properties'])) {\n $form['value']['column']['#type'] = 'select';\n $form['value']['column']['#options'] = array_combine($this->definition['available_properties'], $this->definition['available_properties']);\n }\n\n $form['value']['value'] = array(\n '#type' => 'textfield',\n '#title' => t('Value'),\n '#size' => 30,\n '#default_value' => $this->value['value'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(1))),\n );\n $form['value']['min'] = array(\n '#type' => 'textfield',\n '#title' => t('Min'),\n '#size' => 30,\n '#default_value' => $this->value['min'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(2))),\n );\n $form['value']['max'] = array(\n '#type' => 'textfield',\n '#title' => t('And max'),\n '#size' => 30,\n '#default_value' => $this->value['max'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(2))),\n );\n }", "public function toOptionArray()\n {\n return Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true);\n }", "public function listForms();", "public function getSelectForm(){\n \treturn View::make('Checklist.SelectForm',array(\n \t\t'MainMenu' => View::make('Menu.MainMenu',array(\n \t\t\t'MoreMenu' => Util::getMenu()\n \t\t)),\n \t\t'Areas' => Util::getSelectAreas(),\n \t\t'Tiendas' => Util::getSelectTiendas()\n \t));\n }", "public function getBindValues();", "function getDropDown() ;", "public function getFormOptions($websiteId);", "protected function getSelectFields()\n {\n return $this->getSettingsValue('select');\n }", "public function getLevelValues()\n\t{\n\t\t$values = array();\n\n\t\t$data = $this->node_object->getLevelData((int) $_GET[\"level_id\"]);\n\t\t$values[\"title\"] = $data[\"title\"];\n\t\t$values[\"description\"] = $data[\"description\"];\n\t\t$this->form->setValuesByArray($values);\n\t}", "protected function getConfigFormValues()\n {\n return array(\n 'APISFACT_PRESTASHOP_TOKEN' => Configuration::get('APISFACT_PRESTASHOP_TOKEN', true),\n 'APISFACT_PRESTASHOP_SERIEF' => Configuration::get('APISFACT_PRESTASHOP_SERIEF', true),\n 'APISFACT_PRESTASHOP_NUMEROF' => Configuration::get('APISFACT_PRESTASHOP_NUMEROF', true),\n 'APISFACT_PRESTASHOP_SERIEB' => Configuration::get('APISFACT_PRESTASHOP_SERIEB', true),\n 'APISFACT_PRESTASHOP_NUMEROB' => Configuration::get('APISFACT_PRESTASHOP_NUMEROB', true)\n );\n }", "public function getFormElementOptions();", "function getFormParams() {\n\t\treturn $this->_formParams;\n\t}", "public function transactionFormGetAttributes ();", "public function prepareForm()\n {\n // Searching for the data to populate the Form\n\n // Adding default value to the list\n\n // Setting the lists in $data array\n $data = [\n ];\n\n //dd($data);\n\n return $data;\n }", "public function get_data()\n {\n return $this->form_data;\n }", "public function getChoices()\n {\n $choices = $this->getOption('choices');\n\n if ($choices instanceof sfCallable)\n {\n $choices = $choices->call();\n }\n\n return $choices;\n }", "public function getDropDown() {}", "public function getDropDown() {}", "public function values(): array\n\t{\n\t\treturn $this->fields()->values()->all();\n\t}", "protected function form()\n {\n return [];\n }", "protected function form()\n {\n return [];\n }", "public function getInput()\n {\n $result = array();\n\n $table = new Application_Model_DbOptions();\n $options = array();\n\t\t$options['optRegion'] = $table->getRegion();\n\n // elements\n\t\t$result['src_region_code'] = array(\n 'type' => 'select',\n 'name' => 'src_region_code',\n 'value' => '',\n 'options' => $options['optRegion'],\n 'ext' => 'onChange=\\'$(\"#src_ba\").val(\"\");\\'', //src_afd\n\t\t\t'style' => 'width:200px;background-color: #e6ffc8;'\n );\n\n return $result;\n }", "public static function form_fields(){\n\n \treturn [\n [\n \t'id'=> 'description',\n \t'name'=> 'description', \n \t'desc'=> 'Description', \n \t'val'=>\tnull, \n \t'type'=> 'text',\n \t'maxlength'=> 255,\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'rate',\n \t'name'=> 'rate', \n \t'desc'=> 'Discount Rate', \n \t'val'=>\tnull, \n \t'type'=> 'number',\n \t'min'=> 0,\n \t'max'=> 100,\n \t'step'=> '0.01',\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'stat',\n \t'name'=> 'stat', \n \t'desc'=> 'isActive', \n \t'val'=>1, \n \t'type'=> 'checkbox',\n ],\n ];\n\n }", "public function getForm()\n {\n RETURN $this->strategy->getForm();\n }", "function acf_get_select_input($attrs = array())\n{\n}", "public function getChoices();", "public function getActiveValues() {\n\t\tif ( !is_null( $this->aActiveValues ) ) {\n\t\t\treturn $this->aActiveValues;\n\t\t} else {\n\t\t\t$this->getValueFromRequest();\n\t\t\treturn $this->aActiveValues;\n\t\t}\n\t}", "public function get_values(){ return $this->values; }", "public function getContactValues()\n\t{\n\n\t\t$settings = $this->setup->getClient()->getAllSettings();\n\n\t\t$values = $settings;\n\n\t\t$values[\"inst_name\"] = ($this->setup->getClient()->getName())\n\t\t\t? $this->setup->getClient()->getName()\n\t\t\t: $this->setup->getClient()->getId();\n\t\t$values[\"inst_info\"] = $this->setup->getClient()->getDescription();\n\n\t\t$this->form->setValuesByArray($values);\n\t}", "public function getEditComplianceFormAction()\n {\n $this->session->select_form_values = $selectFormValues = $this->getSelectFormValues();\n\n if (!$selectFormValues['userContextIds']) {\n $this->_helper->json(\"No user roles\");\n return;\n }\n\n if (!$selectFormValues['requirementIds']) {\n $this->_helper->json(\"No requirements\");\n return;\n }\n\n $form = new Scheduler_Form_EditComplianceStatus($this->requirementRepository, $selectFormValues);\n $this->_helper->json($form->__toString());\n }", "public function getInput()\n {\n $result = array();\n $table = new Application_Model_DbOptions();\n $options = array();\n $options['optRegion'] = $table->getRegion();\n\n // elements\n $result['src_region_code'] = array(\n 'type' => 'select',\n 'name' => 'src_region_code',\n 'value' => '',\n 'options' => $options['optRegion'],\n 'ext' => 'onChange=\\'$(\"#src_ba\").val(\"\");\\'', //src_afd\n 'style' => 'width:200px;background-color: #e6ffc8;'\n );\n\n return $result;\n }", "public function getAttributeValue(Request $request){\n $AttributeValue = $this->CustomProperties->getAttributeValue($request->idAttribute);\n ?>\n\n <option value=\"\">----------</option>\n <?php foreach($AttributeValue as $value){ ?>\n <option value=\"<?php echo $value->id; ?>\"><?php echo $value->value; ?></option>\n <?php } ?>\n\n <?php\n }", "public function retrieveValuesFromSession()\n\t{\n\t\tif (isset($_SESSION['stored_forms'][$this->name.$this->target_type]))\n\t\t\treturn $_SESSION['stored_forms'][$this->name.$this->target_type];\n\t\telse\n\t\t\treturn array();\n\t}", "public function form(){\n\t\treturn $this->form;\n\t}", "abstract protected function getForm();", "public function filterOptionsAction(){\n $em = $this->getDoctrine()->getManager();\n\n $entities = $this->getUser()->getBooks();\n\n $deleteForms = [];\n foreach ($entities as $entity) {\n $deleteForms[$entity->getId()] = $this->createDeleteForm($entity->getId())->createView();\n }\n\n return array(\n 'entities' => $entities,\n 'deleteForms' => $deleteForms,\n );\n }", "function chargeForm($form,$label,$titre){\n\n \t\t$liste = $this->getAll();\n \t\t$array[0] = \"\";\n \t\tfor ($i = 0; $i < count($liste); $i++)\n \t{\n \t\t$j = $liste[$i]->role_id;\n \t\t$array[$j] = $liste[$i]->role_name;\n \t\t//echo 'array['.$j.'] = '.$array[$j].'<br>';\n \t}\n \t\t$s = & $form->createElement('select',$label,$titre);\n \t\t$s->loadArray($array);\n \t\treturn $s;\n \t}", "protected function getConfigFormValues()\n {\n $config_form_values = array(\n 'PROFITMARGIN_EQUIVALENCE_SURCHARGE_ENABLED' => Configuration::get('PROFITMARGIN_EQUIVALENCE_SURCHARGE_ENABLED', false),\n 'PROFITMARGIN_DEFAULT_SHIPPING_COST' => Configuration::get('PROFITMARGIN_DEFAULT_SHIPPING_COST', null),\n 'PROFITMARGIN_SHIPPING_COST_TAX' => Configuration::get('PROFITMARGIN_SHIPPING_COST_TAX', 0),\n );\n\n foreach ($this->getAvailableTaxes() as $tax) {\n $config_form_values[\"PROFITMARGIN_EQUIVALENCE_SURCHARGE_{$tax['id_tax']}\"] = Configuration::get(\"PROFITMARGIN_EQUIVALENCE_SURCHARGE_{$tax['id_tax']}\", 0);\n }\n\n foreach ($this->getAvailablePaymentModules() as $payment_module) {\n $config_form_values[\"PROFITMARGIN_PAYMENT_FEE_BASE_{$payment_module['id_module']}\"] = Configuration::get(\"PROFITMARGIN_PAYMENT_FEE_BASE_{$payment_module['id_module']}\", 0);\n $config_form_values[\"PROFITMARGIN_PAYMENT_FEE_PERCENTAGE_{$payment_module['id_module']}\"] = Configuration::get(\"PROFITMARGIN_PAYMENT_FEE_PERCENTAGE_{$payment_module['id_module']}\", 0);\n }\n \n return $config_form_values;\n }", "public static function getFormVars(GWF_Form $form)\n\t{\n\t\t$back = array();\n\t\tforeach ($form->getFormData() as $key => $d)\n\t\t{\n\t\t\tswitch ($d[0])\n\t\t\t{\n\t\t\t\tcase GWF_Form::HIDDEN:\n\t\t\t\tcase GWF_Form::SUBMIT:\n\t\t\t\tcase GWF_Form::SUBMITS:\n\t\t\t\tcase GWF_Form::SUBMIT_IMG:\n\t\t\t\tcase GWF_Form::SUBMIT_IMGS:\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$back[$key] = $form->getVar($key, '');\n\t\t\t}\n\t\t}\n\t\treturn $back;\n\t}" ]
[ "0.6459313", "0.63188183", "0.62420714", "0.62084776", "0.6062908", "0.60003024", "0.59367627", "0.5931068", "0.5906787", "0.585394", "0.58473307", "0.58300245", "0.5745401", "0.57208085", "0.5718462", "0.5707472", "0.5702158", "0.5675933", "0.5631872", "0.5630961", "0.559417", "0.55897546", "0.5566488", "0.5540238", "0.5534054", "0.5528328", "0.5528318", "0.5520262", "0.55178744", "0.550243", "0.54736", "0.54610765", "0.54557896", "0.54488516", "0.5446644", "0.54370934", "0.5435295", "0.54058754", "0.54056245", "0.53909445", "0.5379415", "0.5364943", "0.5363917", "0.5352118", "0.5326022", "0.53210026", "0.5317058", "0.5317058", "0.53039426", "0.52966726", "0.52946585", "0.52945256", "0.52841365", "0.5276846", "0.5274944", "0.5270061", "0.5266408", "0.52627766", "0.5256227", "0.52543813", "0.5238369", "0.52345407", "0.523295", "0.5231272", "0.5230661", "0.52303237", "0.5222412", "0.5220528", "0.5219428", "0.5216307", "0.52131045", "0.52063406", "0.52042496", "0.5202638", "0.51987725", "0.5194841", "0.51918757", "0.5181864", "0.5181864", "0.5174855", "0.51669526", "0.51669526", "0.51663566", "0.51654196", "0.51642853", "0.516366", "0.51453424", "0.5145137", "0.5143065", "0.5141827", "0.5137612", "0.5137479", "0.5132386", "0.5130161", "0.51228225", "0.5121947", "0.512007", "0.51163614", "0.51156336", "0.5115513" ]
0.54367906
36
echo "$request>email.$request>password "; die;
public function sign(Request $request) { if(Auth::attempt($request->only('username','password'))){ $akun = DB::table('users')->where('username', $request->username)->first(); if($akun->role =='admin'){ return redirect('/home')->with('status'," Anda Berhasil Login | SELAMAT DATANG {{auth::users()->name}} "); } else if($akun->role =='user'){ return redirect('/dashboard')->with('status','Anda Berhasil Login | SELAMAT DATANG'); // }elseif ($akun->role =='Dosen') { // Auth::guard('dosen')->LoginUsingId($akun->id); // return redirect('/berandadosen')->with('sukses','Anda Berhasil Login'); // }elseif ($akun->role =='Asisten Laboratorium') { // Auth::guard('aslab')->LoginUsingId($akun->id); // return redirect('/berandaaslab')->with('sukses','Anda Berhasil Login'); // }elseif ($akun->role =='Asisten Praktikum') { // Auth::guard('asprak')->LoginUsingId($akun->id); // return redirect('/berandasprak')->with('sukses','Anda Berhasil Login'); // }elseif ($akun->role =='Praktikan') { // Auth::guard('praktikan')->LoginUsingId($akun->id); // return redirect('/berandapraktikan')->with('sukses','Anda Berhasil Login'); } } return redirect('/login')->with('status',' Email & Password Salah :( | <b>Coba Lagi</b>'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function login_obscure()\n {\n return '<strong>Whoops</strong>: Your username or password are incorrect, please try again.';\n }", "function getRequestPassword()\n {\n return $this->_props['RequestPassword'];\n }", "function displayForm($email, $accessToken) {\n echo <<<END\n<form method=\"POST\" action=\"oauth2.php\">\n <h1>Please enter your e-mail address: </h1>\n <input type=\"text\" name=\"email\" value=\"$email\"/>\n <p>\n <h1>Please enter your access token: </h1>\n <input type=\"text\" name=\"access_token\" value=\"$accessToken\"/>\n <input type=\"submit\"/>\n</form>\n<hr>\nEND;\n}", "public function executePasswordrecovering(HTTPRequest $request)\n {\n $login = $request->postData('login');\n $email = $request->postData('email');\n\n $author = $this->managers->getManagerOf('Authors')->getUnique($login); \n if(is_null($author) || $author->email() != $email)\n {\n $message = \"Le login ou l'email est incorrect\";\n }\n else\n {\n $message = \"Un email contenant votre mot de passe vous a été envoyé\";\n // envoi du mail\n mail($author['email'], 'Récupération du mot de passe', $author->email());\n $this->page->addVar('message', $message);\n }\n }", "function test_authourization_fun( $vars ){\r\n\r\n if (isset($_GET['user']) && $_GET['user']){\r\n $_SERVER[\"PHP_AUTH_USER\"] = $_GET['user'];\r\n }else{\r\n $_SERVER[\"PHP_AUTH_USER\"] = 'NOUSER';\r\n }\r\n if (isset($_GET['pw']) && $_GET['pw']){\r\n $_SERVER[\"PHP_AUTH_PW\"] = $_GET['pw'];\r\n }else{\r\n $_SERVER[\"PHP_AUTH_PW\"] = 'ERRORPASSWORD';\r\n }\r\n}", "function content() {\n echo \"\n <form action='http://{$_SERVER['SERVER_NAME']}/mailmaid/account/register' method='post'>\n <input name='token' type='hidden' value='{$this->params['registerToken']}'>\n <label for='username'>Username</label>\n <input name='username' placeholder='Username' id='username' type='text' required>\n <label for='password'>Password</label>\n <input name='password' placeholder='Password' id='password' type='password' required>\n <label for='role'>Role</label>\n <select name='role' id='role'>\n <option value='1'>Admin</option>\n <option value='2'>Agent</option>\n </select>\n <input type='submit' value='Add Account'>\n </form>\n \";\n }", "function dump_request() {\n\t\t$data = array($_REQUEST, $_SERVER, $_COOKIE, $_POST, $_GET);\n\t\t$fp = fopen('vrecohack.log', 'a');\n\t\tfwrite($fp, \"===START===\\n\");\n\t\tforeach ($data as $item) {\n\t\t\t$line = serialize($item) . \"\\n\";\n\t\t\t// print_r($line);\n\t\t\tfwrite($fp, $line);\n\t\t}\n\t\tfwrite($fp, \"===END===\\n\");\n\t\tfclose($fp);\n\t}", "private function getRequestUserName() {\n\t\t//RETURN REQUEST VARIABLE: USERNAME\n if(!empty($_POST[self::$userName])){\n\t\t\treturn $_POST[self::$userName];\n\t\t}\n else{\n return \"\";\n }\n\t}", "function login(){\r\n\techo '<form action=\"demo_form.php\" method=\"post\">';\r\n\techo '<p>Username (email):';\r\n\techo '<input type=\"text\" name=\"email\"><br>';\r\n\techo '<p>Password:';\r\n\techo '<input type=\"password\" name=\"password\"><br>';\r\n\techo '<input type=\"submit\" value=\"Submit\">';\r\n\techo '</form>';\r\n\r\n\t\r\n}", "function print_login_form($error) {\n\techo '\n <form method=\"post\" action=\"index.php\">\n <label>\n \tUsername: \n \t<input name=\"username\" type=\"text\">\n </label>\n <label>\n \tPassword: \n \t<input name=\"password\" type=\"password\">\n </label>\n <input type=\"submit\" name=\"action\" value=\"Login\"> \n '.$error.'\n </form>\n ';\n}", "function send_security_info($subject,$debug_message) {\n\tob_start();\n\techo \"<pre>\";\n\techo \"$debug_message<br>\";\n\techo \"user_ip: \".get_ip().\"<br>\";\n\techo \"user_hostname: \".gethostbyaddr($_SERVER['REMOTE_ADDR']).\"<br>\";\n\techo \"server: \".gethostname().\"<br><br>\";\n\techo \"<u>_POST</u><br>\".print_r($_POST,true).\"<br><br>\";\n\techo \"<u>_GET</u><br>\".print_r($_GET,true).\"<br><br>\";\n\techo \"<u>_REQUEST</u><br>\".print_r($_REQUEST,true).\"<br><br>\";\n\t//echo \"<u>_HTTP_REQUEST</u><br>\".print_r($_HTTP_REQUEST,true).\"<br><br>\";\n\techo \"<u>_SERVER</u><br>\".print_r($_SERVER,true).\"<br><br>\";\n\techo \"<u>_SESSION</u><br>\".print_r($_SESSION,true).\"<br><br>\";\n\techo \"<u>_FILES</u><br>\".print_r($_FILES,true).\"<br><br>\";\n\techo \"<u>apache_request_headers</u><br>\".print_r(apache_request_headers(),true).\"<br><br>\";\n\techo \"<u>getallheaders</u><br>\".print_r(getallheaders(),true).\"<br><br>\";\n\techo \"</pre>\";\n\t$debug_message=ob_get_contents();\t\t// Set mail content\n\tob_get_clean();\n\n\tsend_email('[email protected]','[email protected]','','',$subject,$debug_message);\n}", "function show_form($email,$pass1,$pass2) {\r\n echo '<form action=\"addadmin.php\" method=\"POST\">' ;\r\n echo '<p>Add Email: <input type=\"text\" name=\"email\" value=\"' . $email . '\"> </p> ' ;\r\n echo '<p>With Password: <input type=\"password\" name=\"pass1\" value=\"' . $pass1 . '\"></p>' ;\r\n echo '<p>Repeat Password: <input type=\"password\" name=\"pass2\" value=\"' . $pass2 . '\"></p>' ; \r\n echo '<p><input type=\"submit\"></p>' ;\r\n echo '</form>' ;\r\n}", "public function __tostring(){\n\t\treturn $this->_base.\" - \".$this->_password.\" - \".$this->_server.\" - \".$this->_usuario;\n\t}", "function temp_pass(){\n\treturn 'password199';\n}", "function forgotUNPWForm(){\n\n\tsession_start();\n\n\techo \"<h1>Please fill in the following information:</h1>\n\t\t<form action=\\\"cms_forgotUsernamePasswordSubmit.php\\\" method=\\\"post\\\">\n\t\tEmail: <input name=\\\"email\\\" type=\\\"text\\\" value=\\\"\\\"><br>\n\t\tSecurity Question: What month, day, and year were you born?<br>\n\t\tMonth: <input name=\\\"month\\\" type=\\\"text\\\" value=\\\"\\\"><br>\n\t\tDay: <input name=\\\"day\\\" type=\\\"text\\\" value=\\\"\\\"><br>\n\t\tYear: Month: <input name=\\\"year\\\" type=\\\"text\\\" value=\\\"\\\"><br>\n\t\t<input name=\\\"create\\\" type=\\\"submit\\\" value=\\\"Submit\\\"></input>\n\t\t</form>\";\n\n}", "function display_recoverpass()\n{\n\tglobal $tpl;\n\n\thttp_headers();\n\n\t$tpl->display('recoverpass.tpl');\n\n}", "public function postRegister(Request $request){\n //Retrieve the name input field\n $name = $request->input('name');\n \n //Retrieve the username input field\n $username = $request->username;\n echo '<br>';\n \n //Retrieve the password input field\n $password = $request->password;\n \n\n $password1 = $request->password1;\n\t\n if ( $password == $password1)\n\t{\n\t\techo \"<h4>Hello &nbsp;\" .$name. \"</h4>\";\n\t\techo \"<br/>\";\n\t\techo \"Your user name is: \" .$username;\n\t\techo \"<br/>\";\n\t\techo \"Password match and set Successfully.\";\n\t}\n\telse\n\t{\n\techo \"password missmatch . Try again..\"; \n\t}\n}", "function login() {\n\t\tob_start();\n?>\n\t\t\t<div style=\"width:600px;\">\n\t\t\t\t<h1>hypha superuser login</h1>\n\t\t\t\tPlease log in with the superuser account. In case you forgot the password you'll have to look it up in the file 'hypha.php' on your server.\n\t\t\t</div>\n\t\t\t<table class=\"section\">\n\t\t\t\t<tr><th style=\"text-align:right; white-space:nowrap;\">username:</th><td><input id=\"username\" name=\"username\" type=\"text\" /></td></tr>\n\t\t\t\t<tr><th style=\"text-align:right; white-space:nowrap;\">password:</th><td><input name=\"password\" type=\"password\" /></td></tr>\n\t\t\t\t<tr><td colspan=\"2\" style=\"text-align:right;\"><input type=\"submit\" name=\"command\" value=\"login\" /></td></tr>\n\t\t\t</table>\n<?php\n\t\treturn ob_get_clean();\n\t}", "function getForgotPassCredentials($email, $que, $ans){\r\n\t\t$email = mysql_real_escape_string($email);\r\n\t\t\r\n\t\t$que = mysql_real_escape_string($que);\r\n\t\t$ans = mysql_real_escape_string($ans);\r\n\t\t$q = \"SELECT password FROM users WHERE `email`='\".$email.\"' AND `que`='\".$que.\"' AND `ans`='\".$ans.\"' \" ;\r\n\t\t$pword = (mysql_query($q, $this->connection));\r\n\t\t\r\n\t\tif(mysql_num_rows($pword) == 1)\r\n\t\t\t{\r\n\t\t\t$subject=\"Password Recovery\";\r\n\t\t\t$pword = mysql_fetch_array ($pword);\r\n\t\t\t$message=\"Your password is: \".$pword['password'];\r\n\t\t\t$from = \"[email protected]\"; \r\n\t\t\t$headers = \"MIME-Version: 1.0\\r\\n\"; \r\n\t\t\t$headers .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\"; \r\n\t\t\t$headers .= \"From: $from\\r\\n\"; \r\n\t\t\t\r\n\t\t\tmail($email, $subject, $message, $headers); \r\n\t\t\t\r\n\t\t\tRedirect('forgotPass.php?e=1');\r\n\t\t\t}\r\n\t\telse {\r\n\t\tRedirect('forgotPass.php?e=0');\r\n\t\t}\r\n\t\t\r\n\t \r\n\t}", "function getPassword(){\n\n}", "public function teste($email){\n list($usuario, $dominio) = explode('@', $email);\n echo(($dominio));\n die('opa');\n }", "public function forgot_pwd()\r\n {\r\n //provided the correct combination of user name and email address\r\n\r\n $username = htmlspecialchars($_POST['username']);\r\n $email = htmlspecialchars($_POST['email']);\r\n\r\n require_once 'database/profile.php';\r\n require_once 'database/session.php';\r\n\r\n $usernameId = getUserId($username);\r\n if (!$usernameId) {\r\n return \"Username does not exist.\";\r\n }\r\n\r\n $userInfo = getProfile($usernameId);\r\n if ($userInfo[\"email\"] != $email) {\r\n return \"Email doesn't match the one we have on file.\";\r\n }\r\n\r\n $password = getPassword($userId);\r\n return $this->send_forgotten_pwd($username, $password, $email);\r\n \r\n }", "function get_password($usrid){\r\n\t\r\n}", "function acapi_get_creds() {\n $user = acapi_get_option('email');\n $pass = acapi_get_option('key');\n if (empty($user) || empty($pass)) {\n return drush_set_error('ACAPI_CREDS_MISSING', dt('Email and api key required; specify --email/--key or run drush ac-api-login'));\n }\n return \"$user:$pass\";\n}", "function whatIsHappening() {\n echo '<h2>$_GET</h2>';\n var_dump($_GET);\n echo '<h2>$_POST</h2>';\n echo('<pre>');\n var_dump($_POST);\n echo('</pre>');\n echo '<h2>$_COOKIE</h2>';\n var_dump($_COOKIE);\n echo '<h2>$_SESSION</h2>';\n var_dump($_SESSION);\n echo '<br>';\n}", "function whatIsHappening() {\n echo '<h2>$_GET</h2>';\n var_dump($_GET);\n echo '<h2>$_POST</h2>';\n echo('<pre>');\n var_dump($_POST);\n echo('</pre>');\n echo '<h2>$_COOKIE</h2>';\n var_dump($_COOKIE);\n echo '<h2>$_SESSION</h2>';\n var_dump($_SESSION);\n}", "public function action_basic() {\n\tif (Input::server(\"PHP_AUTH_USER\", null) == null) {\n\t $response = new Response();\n\t $response->set_header('WWW-Authenticate', 'Basic realm=\"Authenticate for eventual.org\"');\n\t return $response;\n\t} else {\n\t $response = Response::forge(\"You are authenticated as \" . Input::server(\"PHP_AUTH_USER\"));\n\t return $response;\n\t}\n }", "function auth()\n{\n $return = urlencode($_SERVER['REQUEST_URI']);\n\n if (isset($_POST['username']) && isset($_POST['passwd'])) {\n if (!verify_password($_POST['username'], $_POST['passwd'])) {\n header ('Location: https://doc.php.net/login.php?return='.$return);\n exit;\n }\n } else {\n header ('Location: https://doc.php.net/login.php?return='.$return);\n exit;\n }\n}", "public function validate_password($request){\r\n $password = htmlentities($request);\r\n if(preg_match('/^[a-zA-Z]+[a-zA-Z0-9._]+$/', $password) and strlen($password) >= 6)\r\n {\r\n $output = \"[<span style='color: green'><i class='fa fa-check'></i> Password is Secure </span>]\"; \r\n if(isset($_SESSION[\"dontregisterpassword\"])):\r\n unset($_SESSION[\"dontregisterpassword\"]);\r\n endif;\r\n $_SESSION[\"ptocheck\"] = $password;\r\n }\r\n else{\r\n $output = \"[<span style='color: red'><i class='fa fa-times'></i> Password Not Secure! </span>]\";\r\n $_SESSION[\"dontregisterpassword\"] = 1;\r\n }\r\n return $output;\r\n }", "private function genLogin()\n {\n ob_start(); ?>\n <form name=\"login\" action=\"./\" method=\"post\">\n <fieldset class=\"uk-fieldset\">\n <legend class=\"uk-legend\">[[legend]]</legend>\n <div class=\"uk-margin\">\n <div class=\"uk-margin-small-bottom\">\n <div class=\"uk-inline\">\n <span class=\"uk-form-icon\" uk-icon=\"icon: user\"></span>\n <input class=\"uk-input\" type=\"text\" name=\"username\" value=\"[[value_username]]\"\n placeholder=\"[[placaholder_username]]\">\n </div>\n </div>\n <div class=\"uk-margin-small-bottom\">\n <div class=\"uk-inline\">\n <span class=\"uk-form-icon\" uk-icon=\"icon: lock\"></span>\n <input class=\"uk-input\" type=\"password\" name=\"password\" placeholder=\"[[placaholder_password]]\">\n </div>\n </div>\n <div class=\"uk-margin-bottom\">\n <input type=\"hidden\" name=\"action\" value=\"login\">\n <button class=\"uk-button uk-button-default\">[[submit_text]]</button>\n </div>\n </div>\n <p>[[register_text]] <span uk-icon=\"icon: link\"></span>\n <a href=\"../registration/\">[[register_link]]</a></p>\n </fieldset>\n </form>\n <?php return ob_get_clean();\n }", "function dame1(){\n\tif(isset($_POST[\"enviando\"])){\n\t\t$usuario = $_POST[\"nombre_usuario\"];\n\t\t$password = $_POST[\"pass_usuario\"];\n\n\t\tif ($usuario==\"jeyson\"&& $password==\"1234\") {\n\t\t\techo \"<p class='validado'> Bienvenido </p>\";\n\n\t\t} else {\n\t\t\techo \"<p class='no_validado'> Usuario y/o password incorrecta </p>\";\n\t\t}\n\t\t\n\n\t}\n}", "public function getmd5Action(){\n $request = $this->getRequest();\n echo md5($request->getParam(\"password\"));\n }", "function display_forgot_form()\r\n{\r\n?>\r\n <br>\r\n <form action=\"forgot_passwd.php\" method=post>\r\n <table width=250 cellpadding=2 cellspacing=0 bgcolor=#cccccc>\r\n <tr><td>Escribe tu nombre de usuario</td>\r\n <td><input type=text name=username size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td colspan=2 align=center><input type=submit value=\"Change password\">\r\n </td></tr>\r\n </table>\r\n <br>\r\n<?\r\n}", "function loginFunction($username = null, $status = null, &$auth = null)\n{\n echo \"<form method=\\\"post\\\" action=\\\".\".$_SERVER[\"PHP_SELF\"].\"\\\">\";\n echo \"用户名:<input type=\\\"text\\\" name=\\\"username\\\"></br>\";\n echo \"密码:<input type=\\\"password\\\" name=\\\"password\\\"></br>\";\n echo \"<input type=\\\"submit\\\" value=\\\"提交\\\">\";\n echo \"</form>\";\n echo \"当前用户名:test 密码:test\";\n}", "private function emailAtLogin() {}", "function login() { \n$a_log =\"<html><head><title>\".judul.\"</title></head>\";\n$a_log.=\"<font color=red>achan</font>@<font color=blue>\".$_SERVER['HTTP_HOST'].\"</font>:<font color=green>\".getcwd().\"</font> $ sudo su\";\n$a_log.=\"<form method='POST'><label for='pass'>[<font color=purple>sudo</font>]<font color=orange> password for achan</font>:</label><input type='password' name='pass' style='border:0;width:600px;'></form>\";\n$a_log.=\"</body></html>\"; \nif(empty($_GET['login'])==\"achan\"){\n\techo '<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p>The requested URL '.$_SERVER['REQUEST_URI'].' was not found on this server.</p>\n<hr>\n<address>'.$_SERVER['SERVER_SOFTWARE'].' Server at '.$_SERVER['HTTP_HOST'].' Port 80</address>\n</body></html>\n';\n}else{\n\techo $a_log;\n}\n exit; \n}", "function start($email, $password)\n {\n global $standard_headers;\n\n $standard_headers = array('Host: www.tadpoles.com', 'content-type: application/x-www-form-urlencoded; charset=utf-8', 'accept: */*', 'x-titanium-id: c5a5bca5-43c7-4b8f-b82a-fe1de0e4793c', 'x-requested-with: XMLHttpRequest', 'accept-language: en-us', 'user-agent: Appcelerator Titanium/7.1.1 (iPhone/12.2; iOS; en_US;), Appcelerator Titanium/7.1.1 (iPhone/12.2; iOS; en_US;) (gzip)');\n\n login($email, $password);\n admit();\n }", "function SentVerificationEmail($email,$username,$password){\n \t$to = $email;\n\t$subject = 'DoggieCare Forget Password';\n\t$message = 'Username ='.$username.' || Password='.$password;\n\t$headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\nmail($to, $subject, $message, $headers);\n \n }", "public function post_forgotpassword() {\n try {\n $i = Input::post();\n\n $auth = new \\Craftpip\\OAuth\\Auth();\n $users = $auth->getByUsernameEmail($i['email']);\n if (!$users) {\n throw new \\Craftpip\\Exception('Email/Username not registered with us.');\n }\n\n $mail = new \\Craftpip\\Mail($users['id']);\n $mail->template_forgotpassword();\n $mail->send();\n\n $response = array(\n 'status' => true,\n 'message' => 'asdsa',\n );\n } catch (Exception $e) {\n $e = new \\Craftpip\\Exception($e->getMessage(), $e->getCode());\n $response = array(\n 'status' => false,\n 'reason' => $e->getMessage(),\n );\n }\n\n echo json_encode($response);\n }", "private function promptBasic() {\n $this->debugPrint('Prompting user (BASIC)...');\n\n\n header(\"WWW-Authenticate: Basic realm=\\\"{$this->realm}\\\"\");\n header('HTTP/1.0 401 Unauthorized');\n\n /* This is sent if the user cancels */\n if ($this->redirect_on_failure) {\n echo <<<EOF\n <html>\n <meta http-equiv=\"refresh\" content=\"0; url={$this->redirect_on_failure_url}?error=1\" />\n <body><h2>{$this->fail_text}</h2></body>\n </html>\nEOF;\n } else {\n echo \"<html><body><h2>{$this->fail_text}</h2></body></html>\";\n }\n exit();\n }", "private function getAuthenticatedUser(){\n\t\t\n\t\tprint_r($this->Request\t);\n\n\t}", "function rest_get_authenticated_app_password()\n {\n }", "function wp_login_obscure()\n{\n\treturn '<strong>Error</strong>: wrong username or password';\n}", "public static function printLogin (){\n\t?>\n\t\n\t\t\t\t<!-- Login Credentials -->\n\t\t\t\t<h3>Google Account Login</h3>\n\t\t\t\t<table class='form-table'>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t\t<th scope=\"row\"><label for='gdocs_user'>Username</label></th>\n\t\t\t\t\t\t\t<td><input id='gdocs_user' type=\"text\" size=\"40\" name=\"gdocs_user\" value=\"<?php echo get_option ('gdocs_user'); ?>\" /><br/><span class='description'><strong>For Google Apps users, append your username with </strong><code>@yourdomain.com</code></span></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t\t<th scope=\"row\"><label for='gdocs_pwd'>Password</label></th>\n\t\t\t\t\t\t\t<td><input id='gdocs_pwd' type=\"password\" size=\"40\" name=\"gdocs_pwd\" value=\"<?php echo get_option ('gdocs_pwd'); ?>\" /></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\n\t<?php\n\t}", "public function get_pass() \n {\n return $this->pass;\n }", "public function get_user_passwd($email) \n\t{\n\t\treturn $this->vpopmail_readline(sprintf(\"G %s\", $email));\n\t}", "function show_request()\n\t{\n\t\tprint_r($this->http_request);\n\t}", "function auth() {\n header('WWW-Authenticate: Basic realm=\"Citations\"');\n header('HTTP/1.0 401 Unauthorized');\n print 'authorisation required';\n exit;\n }", "function authGet() { }", "public function PrintAuthInfo() \n {\n if($this->IsAuthenticated())\n echo \"Du är inloggad som: <b>\" . $this->GetAcronym() . \"</b> (\" . $this->GetName() . \")\";\n else\n echo \"Du är <b>UTLOGGAD</b>.\";\n }", "function display_forgot_form()\r\n{\r\n?>\r\n <br>\r\n <form action=\"forgot_passwd.php\" method=post>\r\n <table width=250 cellpadding=2 cellspacing=0 bgcolor=#cccccc>\r\n <tr><td>Enter your username</td>\r\n <td><input type=text name=username size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td colspan=2 align=center><input type=submit value=\"Change password\">\r\n </td></tr>\r\n </table>\r\n <br>\r\n<?\r\n}", "protected function sendAuthRequest() : void\n {\n $message = \"PASSWORD \" . $this->id . \" \" . $this->password;\n $this->sendRequest($message);\n }", "function request($email){\n\t\t$requestEmail = trim($email);\n\t\t$requestEmail = strtolower($requestEmail);\n\t\t$emailHash = md5($requestEmail);\n\n\t\t$this->requestUrl = sprintf($this->queryUrl, $emailHash);\n\t\t$this->queryResults = file_get_contents($this->requestUrl);\n\n\t}", "public function access() {\n \tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\n \t\t$user = Auth::login($_POST['email'], $_POST['pw']);\n \t\tif($user) {\n \t\t\tApp::redirect('dashboard');\n \t\t}\n\t\t\tSession::set('_old_input', $_POST);\n\t\t\tSession::set('_errors', ['login' => \"Email y/o password incorrectos.\"]);\n\t\t\tApp::redirect('login');\n\n \t}\n\n }", "function check_login() {\n //j'appelle la fonction pour se connecter à la database\n include(\"M/db_connect.php\");\n \n //je récupere ce qui est du formulaire et normalisation du form\n $email = htmlspecialchars($_GET['email']);\n $password = htmlspecialchars($_GET['password']);\n \n // la requete pour la database \n $req = $db->prepare(\"SELECT * FROM account WHERE email LIKE :email AND psw LIKE :psw\");\n $req->execute(array(\"email\"=>$email, \"psw\"=>$password));\n\n return $req;\n }", "public function get_auth_string()\n {\n }", "function lost_pw_form_fields() {\n\n\tob_start(); ?>\n\t\t<form id=\"lost_pw_form\" class=\"form\" action=\"\">\n\t\t\t<fieldset>\n\t\t\t\t<p>\n\t\t\t\t\t<label for=\"custom_lost_password\">Enter your <span>Email</span></label>\n\t\t\t\t\t<input name=\"custom_lost_password\" id=\"custom_lost_password\" class=\"required\" type=\"email\" aria-required=\"true\" aria-label=\"Email\"/>\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t\t\t\t<input id=\"lost_pw_submit\" type=\"submit\" value=\"SUBMIT\"/>\n\t\t\t\t</p>\n\t\t\t</fieldset>\n\t\t</form>\n\t<?php\n\treturn ob_get_clean();\n}", "function wppb_userdata_add_password( $userdata, $global_request ){\r\n\tif ( isset( $global_request['passw1'] ) && ( trim( $global_request['passw1'] ) != '' ) )\r\n\t\t$userdata['user_pass'] = trim( $global_request['passw1'] );\r\n\t\r\n\treturn $userdata;\r\n}", "function messageTask($fullName, $id, $language, $validEmail){\n echo \"Hello World, this is $fullName with HNGi7 ID $id and email $validEmail using $language for stage 2 task\" ;\n\n //echoing the text\n\n //Hello World, this is Elisha Simeon Ukpong Udoh with HNGi7 ID HNG-01827 and email [email protected] using python for stage 2 task\n\n }", "function req_auth($realm = 'Secret Realm') {\n\theader('WWW-Authenticate: Basic realm=\"'.$realm.'\"');\n\theader('HTTP/1.1 401 Unauthorized');\n\tprint '<h1>Error 401: Authorization Required</h1>';\n\texit;\n}", "function helloWorld($jeff) {\n global $reply;\n global $userinput;\n $replyy = \"{$jeff} memes {$userinput}\";\n return $replyy;\n}", "function pr_data($field, $data)\n\t{\n\t\tif( $field==\"usr_pw\" OR $field==\"usr_resp\" )\n\t\t{\n\t\t\t$len = strlen($_SESSION['users'][$data]);\n\n\t\t\tfor( $i = 0; $i < $len; ++$i )\n\t\t\t\techo \"*\";\n\t\t}\n\t\telse\n\t\t\techo $_SESSION['users'][$data];\n\t}", "public function getPassword(): string;", "public function test_login4()\n {\n $this->visit('login')\n ->type('[email protected]', 'email')\n ->type('12345678','password')\n ->press('Login')\n ->see('These credentials do not match our records.');\n }", "public function getAuthAsString();", "function constructAuthString($email, $accessToken) {\n return base64_encode(\"user=$email\\1auth=Bearer $accessToken\\1\\1\");\n}", "public function dologon($request, $response, $args)\n {\n\n\n $req[\"name\"] = $request->getAttribute('name');\n $req[\"password\"] = $request->getAttribute('password');\n $session = new \\RKA\\Session();\n\n $euser = $request->getAttribute('eid');\n if ($euser) $req[\"eid\"] = $euser;\n $users = main::getUsers();\n $noauth[\"auth\"] = \"no\";\n $res = $users->checkAuth($req[\"name\"], $req[\"password\"], $euser);\n if ($res) {\n main::setUserId($res[\"id\"]);\n echo(json_encode($res));\n } else echo(json_encode($noauth));\n }", "function obtain_password() {\n $this -> load -> helper('send_email');\n $user = $this -> basic -> get_where('users', array('user_email' => $this -> input -> post('email'))) -> row();\n $this -> load -> library('form_validation');\n $this -> form_validation -> set_error_delimiters('<p>', '</p>');\n $this -> form_validation -> set_rules('email', t('email'), \"required|trim|valid_email\");\n if ($this -> form_validation -> run()) {\n if ($user != null) {\n $msg = \"<h1>Recuperación de Contraseña</h1> Sent : \" . date('m-d-Y') . \"<br/><br/>\";\n $msg .= \"Remitente: Cenline\" . \"<br/><br/><br/>\";\n $msg .= \"<i>Usted ha solicitado el servicio de recuperación de contraseña de \n Cenline Site. Sus datos de acceso son: </i> <br/> \n Email: \" . $user -> user_email . \"<br/> Contraseña: \" . $user -> user_password . \" \\</a>\";\n\n $contact_send = array('to' => $user -> user_email, 'subject' => 'Recuperación de Contraseña', 'message' => $msg);\n\n send_email($contact_send);\n } else {\n $response['html'] = t('The email user does not exist');\n $response['error'] = 1;\n echo json_encode($response);\n }\n } else {\n $response['html'] = validation_errors();\n $response['error'] = 1;\n echo json_encode($response);\n }\n }", "function autho($pass_input, $email, $db)\n{\n\n$pass_input = $_POST['Password'];\n$email = $_POST['Email'];\n\n$req_get = $db->prepare(\"SELECT password FROM users WHERE email = ?\");\n$req_get->execute(array($_POST[\"Email\"]));\n$password = $req_get->fetch();\n\n$verify = password_verify($pass_input, $password['password']);\necho \"<br>\";\necho \"<br>\";\necho \"<br>\";\n\nif ($verify)\n{\n\theader('Location: index.php');\n\t$req_get = $db->prepare(\"SELECT name FROM users WHERE email = ?\");\n\t$req_get->execute(array($_POST[\"Email\"]));\n\t$name = $req_get->fetch();\n\t//var_dump($name);\n\n\t$_SESSION['name'] = $name['name'];\n\tunset($_SESSION['error']);\n}\n\nelse \n{\n\t\t$_SESSION['error'] = \"invalid email or password\";\n\t\theader('Location: login.php');\n\t\n}\n\n\n\n\n\n\n}", "public function getrequest()\n {\n $request = User::getrequest();\n return result::repsonse(true,$request);\n }", "public function password(){\n $_error = \"enter the password\";\n\t\treturn $_error;\n\t}", "function printUserInput($userInput)\n{\n\techo \"Ihr Vorname lautet: \" . $userInput['firstName'] . \"<br>\";\n\techo \"Ihr Nachname lautet: \" . $userInput['lastName'] . \"<br>\";\n\techo \"Ihr Username lautet: \" . $userInput['userName'] . \"<br>\";\n\techo \"Ihre Email lautet: \" . $userInput['email'] . \"<br>\";\n\techo \"Ihr Passwort lautet: Hm, hoffentlich haben Sie es sich gemerkt <br>\";\n\techo \"Ihr liebstes Reiseziel ist: \" . $userInput['travelDestination']. \"<br>\";\n\techo \"Sie haben folgendes Haustier angegeben: \" . $userInput['pet'] . \"<br>\";\n\tif(!empty ($userInput['isStupid'])) echo \"Sie finden diese Fragen ganz schön doof! <br>\";\n\telse echo \"Sie finden diese Fragen offensichtlich ganz normal <br> \";\t\t\n\techo \"Sie haben sich registriert am \" . $userInput['dateOfRegistration'] . \" um \" . $userInput['timeOfRegistration'] . \"<br>\";\n\techo \"Ihre Registrierung ist 30 Tage gültig, also bis zum \" . $userInput['dateRegistrationExpires'] . \n\t\" um \" . $userInput['timeRegistrationExpires'] . \"<br>\";\n}", "function get_info() {\n\n\n\n echo $this->username;\n echo $this->password;\n\n\n if ( ! $this->username || ! $this->password) {\n // CODE TO RELOAD SIGN-IN PAGE WITH 'ERROR' MESSAGE\n }\n\n else {\n echo $this->username;\n echo $this->password;\n\n $this->setup_page();\n\n // $this->connect_to_database();\n }\n }", "function login() {\n $params = $this->objService->get_request_params();\n $isSuccess = $this->objQuery->count('user','email= ? AND password = ?', array($params->email,$params->password));\n echo $isSuccess;\n }", "public function actionIndex()\n\t{\n\t\t$this->email = $_POST['email'];\n\t\t$this->pwd = $_POST['pwd'];\n\t\t$this->authenticate();\n\t}", "public function restPassword(){\n\t}", "function http_require_auth() {\n\theader('WWW-Authenticate: Basic realm=\"HTTP Authentication System\"');\n\theader('HTTP/1.0 401 Unauthorized');\n\techo \"You must enter a valid login ID and password to access this resource\\n\";\n\texit;\n}", "public function UserAuthentication()\n\t{\n\t\t$this->layout = false;\n\n\t\t$username = String::Sanitize(strtolower(Html::Request(\"username\")));\n\t\t$password = String::Sanitize(Html::Request(\"password\"));\n\n\t\tif($username == \"[email protected]\" && $password == \"teste\") {\n\t\t\t$status = \"ok\";\n\t\t}\n\t\telse {\n\t\t\t$status =\"wrong_password\";\n\t\t}\n\n\t\t// Returning array\n\t\t$value = array(\"status\" => $status, \"username_received\" => $username, \"password_received\" => $password);\n\n\t\techo json_encode($value);\n\t}", "public function AdminLogin(){\n if($this->get_request_method()!= \"POST\"){\n $this->response('',406);\n }\n $username = $_POST['email'];\n $password = $_POST['password'];\n $format = $_POST['format'];\n $db_access = $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n if(!empty($username) && !empty($password)){\n $res->admin_login($username, $password, $conn);\n $this->dbClose();\n }\n else{\t\n $this->dbClose();\n $error = array('status' => \"0\", \"msg\" => \"Fill Both Fields !!\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }", "public static function getRequest(){\n return \\Illuminate\\Auth\\Guard::getRequest();\n }", "function protectForm() {\n\t\techo \"<input type=\\\"hidden\\\" name=\\\"spack_token\\\" value=\\\"\".$this->token.\"\\\" />\";\n\t}", "function forgotPassword($emailTO) {\n global $user, $pass;\n\n return $params = array(\n 'api_user' => $user,\n 'api_key' => $pass,\n 'to' => $emailTO,\n 'subject' => 'E-Mart: Reset password',\n 'html' => \"<html>\n <head></head>\n <body>\n <p>You have been outbid by another bidder.\n Please click on the link below to bid agiain:<br>\n <span><a href=\\\"www.e-mart.azurewebsites.net\\\">URL</a></span>\n </p>\n </body>\n </html>\",\n 'text' => 'testing body',\n 'from' => '[email protected]'\n );\n}", "function auth_ntou($str, $email, $password)\n{\n\n if ($str == \"ntou\") {\n //ntou(libraries)\n $data_arr = array();\n $data_arr[\"username\"] = $email;\n $data_arr[\"password\"] = $password;\n $data_arr[\"ok\"] = \"登入\";\n\n $response = http($target = \"https://140.121.40.253/user/user_login_auth.jsp?\", $ref = \"\", $method = \"POST\", $data_arr, EXCL_HEAD);\n\n if ($response[\"ERROR\"]==\"\") {\n http_get(\"https://140.121.40.253/user/user_login_auth.jsp?\", $ref = \"\");\n http_get(\"https://140.121.40.253/user/_allowuser.jsp?\", $ref = \"\");\n $web_page = http_get(\"http://google.com.tw\", $ref = \"\");\n $web_page = $web_page[\"FILE\"];\n\n if (stristr($web_page, \"Authentication Required for Wireless Access\")) {\n echo \"auth_fail\";\n } else {\n echo \"auth_success\";\n }\n } else {\n echo \"It's auth or you are not in this wireless access point.\";\n }\n } else {\n //TANetRoaming,ntou-guest\n }\n}", "public function getAuthString()\n {\n }", "function authenticate(array $credentials)\n {\n die(\"aaaaaaaaaaaa\");\n }", "function the_post_password()\n {\n }", "public function vxLoginCheck() {\n\t\t$rt = array();\n\t\t\n\t\t$rt['target'] = 'welcome';\n\t\t$rt['return'] = '';\n\t\t\n\t\t$rt['errors'] = 0;\n\t\t\n\t\t$rt['usr_value'] = '';\n\t\t$rt['usr_email_value'] = '';\n\t\t/* usr_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t999 => unspecific */\n\t\t$rt['usr_error'] = 0;\n\t\t$rt['usr_error_msg'] = array(1 => '你忘记填写名字了');\n\t\t\n\t\t$rt['usr_password_value'] = '';\n\t\t/* usr_password_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => mismatch\n\t\t999 => unspecific */\n\t\t$rt['usr_password_error'] = 0;\n\t\t$rt['usr_password_error_msg'] = array(1 => '你忘记填写密码了', 2 => '名字或者密码有错误');\n\n\t\tif (isset($_POST['return'])) {\n\t\t\t$rt['return'] = trim($_POST['return']);\n\t\t}\n\t\t\n\t\tif (isset($_POST['usr'])) {\n\t\t\t$rt['usr_value'] = strtolower(make_single_safe($_POST['usr']));\n\t\t\tif (strlen($rt['usr_value']) == 0) {\n\t\t\t\t$rt['usr_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif ($rt['errors'] > 0) {\n\t\t\t$rt['target'] = 'error';\n\t\t\treturn $rt;\n\t\t}\n\t\t\n\t\tif (isset($_POST['usr_password'])) {\n\t\t\t$rt['usr_password_value'] = make_single_safe($_POST['usr_password']);\n\t\t\tif (strlen($rt['usr_password_value']) == 0) {\n\t\t\t\t$rt['usr_password_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_password_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif ($rt['errors'] > 0) {\n\t\t\t$rt['target'] = 'error';\n\t\t\treturn $rt;\n\t\t}\n\t\t\n\t\t$sql = \"SELECT usr_id FROM babel_user WHERE usr_email = '\" . $rt['usr_value'] . \"' AND usr_password = '\" . sha1($rt['usr_password_value']) . \"'\";\n\t\t$rs = mysql_query($sql, $this->db);\n\t\tif (mysql_num_rows($rs) == 1) {\n\t\t\t$rt['usr_email_value'] = $rt['usr_value'];\n\t\t\t$rt['target'] = 'ok';\n\t\t} else {\n\t\t\t$sql = \"SELECT usr_id, usr_email FROM babel_user WHERE usr_nick = '\" . $rt['usr_value'] . \"' AND usr_password = '\" . sha1($rt['usr_password_value']) . \"'\";\n\t\t\t$rs = mysql_query($sql, $this->db);\n\t\t\tif (mysql_num_rows($rs) == 1) {\n\t\t\t\t$O = mysql_fetch_object($rs);\n\t\t\t\t$rt['usr_email_value'] = $O->usr_email;\n\t\t\t\t$rt['target'] = 'ok';\n\t\t\t} else {\n\t\t\t\t$rt['target'] = 'error';\n\t\t\t\t$rt['usr_password_error'] = 2;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t}\n\t\tmysql_free_result($rs);\n\t\t\n\t\treturn $rt;\n\t}", "public function test_login7()\n {\n $this->visit('login')\n ->type('', 'email')\n ->type('','password')\n ->press('Login')\n ->see('The password field is required.' &&'The password field is required.');\n }", "public function readPassword($prompt);", "function checkEmail($errorString) {\n if(strlen($_POST[\"email\"]) > 64) { // (1)\n return $errorString.\"Email může být dlouhý maximálně <b>64</b> znaků.<br>\";\n }\n return $errorString;\n}", "function LoGinUser($username, $password){\n $request = array();\n\n $request['type'] = 'login';\n $request['username'] = $username;\n $request['password'] = $password;\n\n $reply = DataB($request); //calling function from testRabbitMQClient.php \n\n if($reply == 1){\n $_SESIION['username'] = $username;\n if(!empty($_GET['usernmae'])){\n echo $_REQUEST['username'];\n } else { \n echo \"SOmething not right\";\n }\n return $reply;\n\n}\n}", "static function password_forgot() {\n parent::password_forgot();\n view_var('user', globals('user'));\n }", "function getRequestUserName() {\n\n\t\treturn $this->loginModel->getUsernameInSession();\n=======\n\t//CREATE GET-FUNCTIONS TO FETCH REQUEST VARIABLES\n\tprivate function getRequestUserName()\n\t{\n\t\t/*if(isset($_POST[self::$name]))\n\t\t{\n\t\t\treturn ($_POST[self::$name]);\n\t\t}\n\t\treturn \"\";*/\n\n\t\treturn $this->cookieStorage->load(self::$cookieName);\n>>>>>>> origin/master\n\t}\n\t\n}", "public function test_login8()\n {\n $this->visit('login')\n ->type('[email protected]', 'email')\n ->type('1','password')\n ->press('Login')\n ->see('These credentials do not match our records.');\n }", "function authGet()\n{\n global $PHP_SELF, $QUERY_STRING;\n\n print_header(0, 0, 0, 0, \"\");\n\n echo \"<p>\".get_vocab(\"norights\").\"</p>\\n\";\n\n $TargetURL = basename($PHP_SELF);\n if (isset($QUERY_STRING))\n {\n $TargetURL = $TargetURL . \"?\" . $QUERY_STRING;\n }\n printLoginForm($TargetURL);\n\n exit();\n}", "function displayPasswordNotSetNotice()\n{\n?>\n <div class=\"warning\">\n <h3>Almost there...</h3>\n <p>Before using this demo, you must set an application password\n to protect your account. You will also need to set your\n Google Apps credentials in order to communicate with the Google\n Apps servers.</p>\n <p>To continue, open this file in a text editor and fill\n out the information in the configuration section.</p>\n </div>\n<?php\n}", "function echo_back($user_input){\n\n return \"This is soap server: you typed <b>\".$user_input.\"</b>.\";\n}", "private function url_params()\n {\n return \"?user={$this->login}&password={$this->password}&answer=json\";\n }", "private function makeRequestString(string $domain): string\n {\n return $domain . \"\\r\\n\";\n }", "public function getPassword() {}", "function login_form() { \n\t$output = <<<END\n\t<h1>Stuff</h1>\n\t<form name=\"login-form\" class=\"login-form\" action=\"sf-login.php\" method=\"post\">\n\t\t<fieldset>\n\t\t\t<legend>Secure Login</legend>\n\t\t\t<div class=\"login-field above-below15 above30 clear\">\n\t\t\t\t<label for=\"user\" class=\"placeholder active\">Username</label>\n\t\t\t\t<input type=\"text\" name=\"user\" id=\"user\" tabindex=\"1\" class=\"av-text\" value=\"\">\n\t\t\t</div>\n\t\t\t<div class=\"login-field above-below15\">\n\t\t\t\t<label for=\"pass\" class=\"placeholder \">Password</label>\n\t\t\t\t<input type=\"password\" name=\"pass\" id=\"pass\" tabindex=\"2\" class=\"av-password\" value=\"\">\n\t\t\t</div>\n\t\t\t<input type=\"submit\" value=\"sign in\" class=\"button float-left no-transform\" tabindex=\"3\">\n\t\t\t<label for=\"stay-signed-in\">stay signed in</label>\n\t\t\t<input type=\"checkbox\" title=\"Select to stay signed in 7 days\" name=\"stay-signed-in\" id=\"stay-signed-in\" value=\"1\" tabindex=\"9\">\\n\nEND;\n\tforeach( $_GET as $k => $v ) {\n\t\t$output .= \"\\t\\t\\t\" . '<input type=\"hidden\" name=\"' . $k . '\" value=\"' . $v . '\" />' . \"\\n\";\n\t}\n\t$output .= \"\\t\\t</fieldset>\\n\\t</form>\\n\\t\";\n\t$output .= '<p class=\"back\">';\n\t$output .= '<a href=\"' . HOME . '\">&larr; Home</a></p>';\n\treturn $output;\n}" ]
[ "0.571755", "0.54884374", "0.54863274", "0.54440665", "0.5377205", "0.528191", "0.52682495", "0.52571726", "0.5238768", "0.5223813", "0.5194928", "0.5174715", "0.51661646", "0.51638794", "0.51378536", "0.51078206", "0.510197", "0.5094736", "0.5092531", "0.50918686", "0.5084022", "0.5083851", "0.50829905", "0.5082214", "0.50748277", "0.5055557", "0.5040035", "0.50374275", "0.5027986", "0.5025788", "0.50199777", "0.5000069", "0.49916252", "0.4979846", "0.49711296", "0.49608955", "0.4958791", "0.49570346", "0.49477386", "0.49474177", "0.49385095", "0.49259183", "0.49236965", "0.49117446", "0.48970994", "0.48970667", "0.48846778", "0.48845798", "0.4879963", "0.48797107", "0.48794475", "0.4878446", "0.48776084", "0.48773044", "0.48632446", "0.4863099", "0.48613405", "0.48570898", "0.4850235", "0.48396194", "0.48395455", "0.48354343", "0.48349494", "0.4831975", "0.48283744", "0.48274368", "0.48211262", "0.48210686", "0.4817949", "0.48179156", "0.48148698", "0.48045522", "0.4800085", "0.47972384", "0.47907498", "0.4789403", "0.4788724", "0.47833264", "0.4775981", "0.47704038", "0.47700083", "0.47662556", "0.4764769", "0.4763681", "0.47626773", "0.47597364", "0.47595802", "0.47595334", "0.47568983", "0.47545186", "0.47530305", "0.47504506", "0.47496486", "0.4749", "0.47487986", "0.47464216", "0.47462317", "0.47443327", "0.47375154", "0.4725313", "0.47238776" ]
0.0
-1
Display a listing of the resource.
public function index() { if(!request()->ajax()) { return view('posts.index'); } return resolve(PostIndexService::class)->handle(request()->all()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('posts.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(PostStoreRequest $request) { $post = $this->storeService ->handle($request->validated(), auth()->user()); return response([ 'redirectUrl' => route('posts.show', $post->slug) ], 201); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
You should only call this if you already have an element in the iterator, so we just patch it through.
public function key() { return $this->iterator->key(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rewind()\n {\n $this->iteratorIndex = 0;\n reset($this->elements);\n }", "private function lazyAppend()\n {\n if (!parent::valid() and $this->iterators->valid()) {\n $this->append($this->iterators->current());\n $this->iterators->next();\n }\n }", "public function testShift()\n {\n $element = $this->collection->shift();\n\n $this->assertCount(2, $this->collection);\n $this->assertFalse($this->collection->contains(1));\n $this->assertEquals(1, $element);\n }", "protected function updateCache() : void\r\n {\r\n $queue = array_keys(array_diff_key($this->buffer, $this->loaded));\r\n\r\n while (!empty($queue)) {\r\n $batch = array_splice($queue, 0, $this->options['batch_size']);\r\n\r\n $loaded = call_user_func($this->batchFunction, $batch);\r\n\r\n if (!is_iterable($loaded)) {\r\n throw new UnexpectedValueException('Batch function must return an array or iterable, ' . gettype($loaded) . ' found.');\r\n }\r\n\r\n foreach ($loaded as $index => $entity) {\r\n $key = call_user_func($this->cacheKeyFunction, $entity, $index);\r\n\r\n $this->loaded[$key] = $entity;\r\n }\r\n }\r\n\r\n $this->buffer = [];\r\n }", "public function pulled(): Iterator;", "public function testIteratorDoesNotChangeNumberOfEntries()\n {\n $iterator = $this->createIterator(array(1, 2, 3));\n\n $this->assertCount(3, $iterator);\n }", "protected function reset()\n {\n $this->iterator->rewind();\n }", "public function rewind()\n {\n if ($this->atStart)\n return;\n \n throw new Splunk_UnsupportedOperationException(\n 'Cannot rewind after reading past the first element.');\n }", "public function rewind()\r\n\t{\r\n\t\t$this->i = 0;\r\n\t\tif(count($this->elements))\r\n\t\t{\r\n\t\t\treturn $this->elements[$this->i];\r\n\t\t}\r\n\t}", "public function rewind() {\n reset($this->elements);\n }", "public function testEach()\n {\n $success = $this->collection->each(function($value, $key) {\n $this->assertTrue($this->collection->keyExists($key));\n $this->assertEquals($value, $this->collection->get($key));\n\n $this->collection->set($key, $value * 2);\n });\n\n $this->assertTrue($success);\n $this->assertAttributeEquals([2,4,6], 'elements', $this->collection);\n }", "public function next()\n {\n do {\n $this->iterated->attach($this->current());\n parent::next();\n } while ($this->valid() && (!$this->passes($this->current()) || $this->iterated->contains($this->current())));\n }", "protected function stopVirtualElement()\n {\n if (! $this->element or $this->reader->nodeType !== XMLReader::ELEMENT) {\n return;\n }\n\n if ($parent = $this->findVirtualElementById($this->element->get('@parent'))) {\n $key = $this->getPluralized($this->element->get('@element'));\n\n if (! $parent->has($key)) {\n $parent->put($key, new Collection);\n }\n\n if ($parent->get($key) instanceof Collection) {\n $parent->get($key)->push($this->element);\n }\n } else {\n $this->elements->push($this->element);\n }\n\n $this->element->forget(['@id', '@parent', '@element']);\n }", "public function rewind()\n\t{\n\t\t// not supported\n\t\tif ($this->foreach_count) {\n\t\t\tthrow new ORMException('You cannot use the same result set in multiple foreach.');\n\t\t}\n\n\t\t$this->current = $this->runFetch();\n\n\t\t$this->foreach_count++;\n\t}", "public function rewind() {\n if ($this->started) {\n // When you first foreach() an iterator the rewind() method gets called\n // so we have to work the first time.\n throw new Exception(\n pht('Stream iterators can not be rewound!'));\n }\n\n $this->started = true;\n $this->naturalKey = -1;\n $this->next();\n }", "public function rewind() {\n reset($this->elements);\n $this->pointer = 0;\n }", "public function rewind()\n {\n $this->iterator_data = $this->getData();\n }", "public function next() {\n $this->elementsObtained++;\n $lastElement = $this->current();\n try {\n // DEBUG: Comment In\n //if ($this->elementsObtained > 5 && $this->first)\n // throw new MongoDB\\Driver\\Exception\\RuntimeException(\"cursor id exception simulation\");\n // DEBUG: Comment In\n // We just try to get the next element\n $this->iterator->next();\n } catch (MongoDB\\Driver\\Exception\\RuntimeException $e) {\n if (strpos($e->getMessage(), \"cursor id\") !== FALSE) {\n // cursor id not found exception, let's mitigate\n $options = array();\n // no skip; we already skipped everything in the first iterator\n // limit if we have a limit; we adjust it with the elements obtained\n if ($this->originalLimit !== NULL)\n $options[\"limit\"] = $this->originalLimit - $this->elementsObtained;\n // sort we keep\n if ($this->originalSort !== NULL)\n $options[\"sort\"] = $this->originalSort;\n // Adjust the query so we start after the last obtained element\n $query = $this->queryAfterElement($this->query, $lastElement, $this->originalSort);\n // DEBUG: Comment In\n //var_dump($query);\n // DEBUG: Comment In\n $this->iterator = new IteratorIterator($this->collection->find($query, $options));\n $this->iterator->rewind();\n // We don't call next on the new iterator because it already \"has\" the first element\n // not first anymore\n $this->first = FALSE;\n } else {\n // something else; let's throw this right back at the caller\n throw $e;\n }\n }\n }", "function reset() {\n\n\t\treturn $this->iterator->reset();\n\n\t}", "function rewind()\n\t{\n\t\treturn $this->iterator->rewind();\n\t}", "private function storeNext ()\n {\n if ( !isset($this->iterator) ) {\n return FALSE;\n }\n\n else if ( $this->iterator->valid() ) {\n $this->cache[ $this->internalOffset ] = array(\n $this->iterator->key(),\n $this->iterator->current()\n );\n return TRUE;\n }\n\n // Once the internal iterator is invalid, we no longer need it\n else {\n unset( $this->iterator );\n return FALSE;\n }\n }", "public function next() {\n $row = $this->current();\n\n if ($this->name == '') {\n $this->name = $row['Name'];\n }\n while (($this->name == $row['Name'] || in_array($row['Name'], $this->importedProduct)) && !$this->eof()) {\n parent::next();\n $row = $this->current();\n }\n $this->name = $row['Name'];\n $this->importedProduct[] = $row['Name'];\n }", "public function next()\n {\n next($this->iterator_data);\n }", "public function next()\n {\n ++$this->iterator;\n }", "protected function resetNestedElementCalls() {}", "public function iterator();", "public function next(): void\n {\n $this->position++;\n if (null === $this->generator || !$this->generator->valid()) {\n return;\n }\n\n if (contains_key($this->entries, $this->position + 1)) {\n return;\n }\n\n $this->progress();\n $this->saved = false;\n if ($this->generator) {\n $this->generator->next();\n }\n\n $this->progress();\n }", "public function rewind(){\n return reset($this->items);\n }", "public function rewind(){\n return reset($this->items);\n }", "abstract protected function helperGetOrAdd(ElementInterface $element);", "public function testBurnCollectionItem()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function getIterator() {}", "public function getIterator() {}", "public function next() {\n next($this->elements);\n $this->pointer++;\n }", "public function next()\n {\n $this->iteratorIndex++;\n return next($this->elements);\n }", "function rewind (){ $this->key = -1; }", "function current()\n\t{\n\t\tthrow new Exception('Accessing the value of an EmptyIterator');\n\t}", "public function rewind()\n {\n $this->skipNextIteration = false;\n reset($this->data);\n }", "public function rewind()\n {\n $this->skipNextIteration = false;\n reset($this->data);\n }", "public function rewind()\n {\n $this->current = ldap_first_entry($this->handle, $this->result);\n }", "public function rewind()\n {\n return $this->iterator->rewind();\n }", "public function rewind()\n {\n $this->iteratorPosition = 0;\n }", "public function testRewind() {\n\t\t$this->backend->expects($this->once())\n\t\t\t->method('getUsers')\n\t\t\t->with(\n\t\t\t\t$this->equalTo(''),\t\t\t\t\t// all users\n\t\t\t\t$this->equalTo(UsersIterator::LIMIT),\t// limit 500\n\t\t\t\t$this->equalTo(0)\t\t\t\t\t\t// at the beginning\n\t\t\t)\n\t\t\t->willReturn(['user0']);\n\t\t$this->iterator->rewind();\n\t\t$this->assertTrue($this->iterator->valid());\n\t\t$this->assertEquals('user0', $this->iterator->current());\n\t\t$this->assertEquals(0, $this->iterator->key());\n\t}", "protected function getItemsWithChanges(): iterable\n {\n /** @var IdentifiableCollectionItem $item */\n foreach ($this->getItems() as $item) {\n if (isset($this->removed[$item->identity()])) {\n continue;\n }\n \n yield $item;\n }\n \n foreach ($this->added as $item) {\n $identity = $item->identity();\n if (isset($this->removed[$identity]) || isset($this->items[$identity])) {\n continue;\n }\n \n yield $item;\n }\n }", "public function next()\n {\n if ($this->isvalid) {\n $this->rewindable = false;\n $ret = librdf_iterator_next($this->iterator);\n if ($ret) {\n $this->isvalid = false;\n } else {\n $this->key++;\n }\n }\n }", "public function offsetSet($key, $element)\n {\n $this->elements[$key] = $element;\n $this->iteratorCount = count($this->elements);\n }", "public function testEachWithEarlyReturn()\n {\n $success = $this->collection->each(function($key, $value) {\n return $key === 1;\n });\n\n $this->assertFalse($success);\n }", "public function rewind() {\n $this->initialize();\n $this->nextElem();\n }", "public function rewind()\n {\n reset($this->_items);\n }", "public function iterateAllElements()\n {\n return $this->getIterator();\n }", "public function rewind()\n {\n $this->_current = clone $this->_startDate;\n }", "public function next ()\n {\n if ( isset($this->iterator) && $this->offset == $this->internalOffset ) {\n $this->internalOffset++;\n $this->iterator->next();\n $this->storeNext();\n }\n\n $this->offset++;\n }", "public function next() {\n ++$this->iteratorPosition;\n }", "protected function ensureElement() {\n if (!isset($this->element)) {\n $this->element = self::$maxElement++;\n }\n }", "function print_entry($iterator){\n print($iterator->current());\n return true;\n}", "function getIterator()\n {\n return new \\ArrayIterator($this->items);\n }", "public function next(): void\n {\n if ($this->_skipNextIteration) {\n $this->_skipNextIteration = false;\n return;\n }\n next($this->_data);\n $this->_index++;\n }", "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n }", "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n }", "public function optimizeIteration( ) {\n\t\tif ( ( ( self::ALTERNATE === $this->mType )\n\t\t && ( 1 === count( $this->mChildNodes ) )\n\t\t )\n\t\t || ( ( self::SEQUENCE === $this->mType )\n\t\t\t && ( 1 === count( $this->mChildNodes ) )\n\t\t\t )\n\t\t ){\n\t\t\t$son = $this->mChildNodes[0];\n\t\t\t\n\t\t\t$this->mType \t\t\t= $son->mType;\n\t\t\t$this->mToken \t\t\t= $son->mToken;\n\t\t\t$this->mChildNodes \t\t= $son->mChildNodes;\n\t\t\t$this->mLookAheadSet \t= $son->mLookAheadSet;\n\t\t\t$this->mASTSymbol \t= $son->mASTSymbol;\n\t\t\t$this->mEnclosingRule \t= $son->mEnclosingRule;\n\n\t\t\tforeach( $this->mChildNodes as $key => $value ) {\n\t\t\t\t$value->mParentNode = $this;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\tif ( ( ( self::ALTERNATE === $this->mType )\n\t\t && ( 0 < count( $this->mChildNodes ) ) \n\t\t && ( self::ALTERNATE === $this->mChildNodes[0]->mType ) \n\t\t && ( 0 < count( $this->mChildNodes[0]->mChildNodes ) ) \n\t\t )\n\t\t ){\n\t\t\t\n\t\t\t$son = $this->mChildNodes[0]->mChildNodes[0];\n\t\t\t$this->appendChild( $son );\n\t\t\t\n\t\t\t$son->mParentNode = $this;\n\n\t\t\tarray_shift( $this->mChildNodes[0]->mChildNodes );\n\t\t\t\n\t\t}\n\n\n\n\t\tforeach( $this->mChildNodes as $key => $value ) {\n\t\t\t$value->optimizeIteration();\n\t\t}\n\t\t\n\t}", "public function needsIncrementOffset();", "public function rewind() {\n if($this->items!==false)\n reset($this->items);\n }", "public function getIterator(): Iterator {}", "public function getIterator()\n {\n throw new NotImplementedException(\"This resource does not support iteration\");\n }", "public function next()\n {\n $this->iteratorPosition++;\n }", "public function rewind() \n {\n $this->pointer = 0;\n if (isset($this->list[$this->pointer])) {\n $this->list[$this->pointer]->rewind();\n }\n }", "public function next()\n {\n return next($this->_elements);\n }", "public function getIterator()\n {\n return $this->getItemsWithChanges();\n }", "public function rewind() {\n do {\n $this->collections[$this->_current]->rewind(); \n } while ($this->_current-- > 0);\n }", "public function getIterator()\n {\n }", "protected function _refine() {\n\n\t}", "public function testIterGroup()\n {\n $reader = new \\ArrayIterator($this->numRandom);\n $reader = new Core\\SortReader($reader, 'num', 'mod');\n $this->assertEquals($this->modSorted, iterator_to_array($reader));\n return;\n }", "function rewind(){ \r\n\t $this->valid = (FALSE !== reset($this->array)); \r\n\t }", "public function next(): void {\n next($this->items);\n }", "public function rewind()\n {\n $this->key = 0;\n }", "public function rewind()\n {\n $this->key = 0;\n }", "public function all(): \\Iterator;", "public function rewind()\n {\n $this->_skipNextIteration = false;\n reset($this->_data);\n $this->_index = 0; \n }", "public function testResolveIteratorFailureNonIteratorTest()\n {\n $data = [uniqid('key') => uniqid('val')];\n $testCb = $this->createCallable(function ($it) { return $it instanceof Countable; });\n $iterator = $this->createCountableNonIterator($data);\n\n $subject = $this->createInstance();\n $_subject = $this->reflect($subject);\n\n $this->setExpectedException('OutOfRangeException');\n $result = $_subject->_resolveIterator($iterator, $testCb);\n }", "function getInnerIterator()\n\t{\n\t\treturn $this->iterator;\n\t}", "abstract public function getIterator();", "public function testIter()\n {\n $reader = new \\ArrayIterator($this->allRandom);\n $reader = new Core\\SortReader($reader, 'num');\n $this->assertEquals($this->numSorted, iterator_to_array($reader));\n return;\n }", "#[\\ReturnTypeWillChange]\n public function next()\n {\n return next($this->_items);\n }", "public function testIteratorWorksWithTraversable()\n {\n $originalDataSet = array(\n array(1, 2, 3),\n array(5, 4, 9)\n );\n $iterator = $this->createIterator(new \\IteratorIterator(new \\ArrayIterator($originalDataSet)));\n\n $data = iterator_to_array($iterator);\n $this->assertEquals($originalDataSet, $data);\n }", "public function rewind() {\n $this->_key = 0;\n }", "public function testUnshift()\n {\n $this->collection->unshift(0);\n\n $this->assertCount(4, $this->collection);\n $this->assertTrue($this->collection->contains(0));\n $this->assertEquals(0, $this->collection->get(0));\n }", "function rewind($model){\n if (isset($model->sub) && $model->sub){\n if (($i=$model->_get(\"iterator\")) instanceof \\SimpleXMLIterator){\n return array($i, $i);\n } else if ($xml = $model->_get(\"xml\")){\n $p = $xml->{$model->enclosure};\n /*\n * Process the p to:\n * 1) new object, sorted according to sort rules,\n * 2) leave only results that match\n */\n $p->rewind();\n $processed_xml = $this->processXML($p, $model);\n list($limit,$offset) = $model->_get(\"limit\");\n $this->counter = 0;\n if ($offset > count($processed_xml)){\n return false;\n }\n if ($offset > 0){\n while ($this->counter < $offset){\n $this->counter++;\n next($processed_xml);\n }\n }\n $model->_set(\"count\", count($processed_xml)); // should count properly I suppose\n $current = current($processed_xml);\n return array($processed_xml, $current[\"_iterator\"]);\n }\n /* parent should be loaded */\n throw $this->exception(\"Trying to iterate submodel, when parent is not loaded!\");\n } else {\n $xml = $model->_get(\"xml\");\n /* not sub, top. search */\n $list = array();\n /* add all relevant fields */\n foreach ($model->getActualFields() as $field){\n if ($retrieve = $model->elements[$field]->setterGetter(\"retrieve\")){\n $type = $retrieve;\n } else {\n $type = \"yes\";\n }\n if ($xpath = $model->elements[$field]->setterGetter(\"xpath\")){\n $field = $xpath;\n }\n $list[$field] = $type;\n }\n $query = $this->buildQuery($model);\n $order = $this->buildOrder($model);\n list ($limit, $offset) = $model->_get(\"limit\");\n $limit = ($limit!==null)?$limit:10;\n $offset = $offset?:0;\n ob_start();\n $xml = $this->buildXML($d=$this->simple->search($query, $offset, $limit, $list, $order, \"DOC_TYPE_XMLIterator\"));\n $this->verbose = ob_get_contents();\n ob_end_clean();\n $model->_set(\"xml\", $xml);\n $model->_set(\"count\", $this->simple->response->getParam(\"hits\"));\n $xml->rewind();\n return array($xml, $xml->current());\n }\n }", "function next(){ \r\n\t $this->valid = (FALSE !== next($this->array)); \r\n\t }", "public function rewind() {\r\n reset($this->itemList);\r\n }", "public function getIterator()\n {\n return new \\ArrayIterator($this);\n }", "public function testBufferIterations()\n {\n $resultSet = $this->getMockForAbstractClass(AbstractResultSet::class);\n $resultSet->initialize(new ArrayIterator([\n ['id' => 1, 'name' => 'one'],\n ['id' => 2, 'name' => 'two'],\n ['id' => 3, 'name' => 'three'],\n ]));\n $resultSet->buffer();\n\n $data = $resultSet->current();\n self::assertEquals(1, $data['id']);\n $resultSet->next();\n $data = $resultSet->current();\n self::assertEquals(2, $data['id']);\n\n $resultSet->rewind();\n $data = $resultSet->current();\n self::assertEquals(1, $data['id']);\n $resultSet->next();\n $data = $resultSet->current();\n self::assertEquals(2, $data['id']);\n $resultSet->next();\n $data = $resultSet->current();\n self::assertEquals(3, $data['id']);\n }", "public function next(): void\n {\n next($this->array);\n }", "public function getIterator() { return new mfp_iterator($this->list); }", "public function rewind() {\n\t\treset($this->_value);\n\t}", "function getIterator() {\r\n\t\treturn new \\ArrayIterator($this->data);\r\n\t}", "function changeOrder() {\n $this->iteratorH = array_reverse($this->iteratorH);\n }", "function getiterator() {\n\t\treturn new \\ArrayIterator($this->cast());\n\t}", "public function rewind()\n {\n $this->current = 0;\n }", "public function rewind(): void\n {\n reset($this->_items);\n }", "public function testOrderedQueueIterator_foreach() {\n\t\t\t// add objects...\n\t\t\t$this->oq[] = new stdClass; $this->oq[] = new stdClass;\n\t\t\t$this->oq[] = new stdClass; $this->oq[] = new stdClass;\n\n\t\t\t// assertions\n\t\t\tforeach($this->oq as $key => $object) $this->assertSame($this->oq[$key], $object);\n\t\t}", "public function testGetCollectionItem()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }" ]
[ "0.56791574", "0.5660254", "0.5655548", "0.56313014", "0.557116", "0.54617417", "0.5457116", "0.5447414", "0.5408333", "0.5408069", "0.53935176", "0.5364577", "0.5348864", "0.53291285", "0.5284291", "0.5227483", "0.51924926", "0.5177519", "0.5148371", "0.51374483", "0.5122076", "0.51046497", "0.5103", "0.5090852", "0.50618756", "0.50592625", "0.50520647", "0.50502366", "0.50502366", "0.5042535", "0.503582", "0.50339574", "0.50339574", "0.5029181", "0.5016789", "0.5016347", "0.50059813", "0.50025165", "0.50025165", "0.5000551", "0.49997628", "0.499653", "0.49812806", "0.49780446", "0.4972664", "0.49642637", "0.496196", "0.4959006", "0.4940665", "0.49381495", "0.4937608", "0.4933645", "0.49284652", "0.49194917", "0.49144393", "0.49094948", "0.4909232", "0.49032116", "0.49032116", "0.489912", "0.48938975", "0.48922428", "0.48889893", "0.48701563", "0.4868094", "0.48658058", "0.4865325", "0.4860882", "0.48604965", "0.4853927", "0.4849252", "0.48445752", "0.48395398", "0.4837333", "0.48369327", "0.48369327", "0.48355418", "0.48336154", "0.48309833", "0.48157516", "0.4798445", "0.47928715", "0.4783435", "0.47821015", "0.4776809", "0.4773898", "0.47726792", "0.47719067", "0.4768804", "0.47616363", "0.47615582", "0.47551998", "0.47550446", "0.47543445", "0.4746789", "0.47460842", "0.47409445", "0.47398457", "0.47363305", "0.4734797", "0.47347558" ]
0.0
-1
You should only call this if you already have an element in the iterator, so we just patch it through.
public function current() { return $this->iterator->current(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rewind()\n {\n $this->iteratorIndex = 0;\n reset($this->elements);\n }", "private function lazyAppend()\n {\n if (!parent::valid() and $this->iterators->valid()) {\n $this->append($this->iterators->current());\n $this->iterators->next();\n }\n }", "public function testShift()\n {\n $element = $this->collection->shift();\n\n $this->assertCount(2, $this->collection);\n $this->assertFalse($this->collection->contains(1));\n $this->assertEquals(1, $element);\n }", "protected function updateCache() : void\r\n {\r\n $queue = array_keys(array_diff_key($this->buffer, $this->loaded));\r\n\r\n while (!empty($queue)) {\r\n $batch = array_splice($queue, 0, $this->options['batch_size']);\r\n\r\n $loaded = call_user_func($this->batchFunction, $batch);\r\n\r\n if (!is_iterable($loaded)) {\r\n throw new UnexpectedValueException('Batch function must return an array or iterable, ' . gettype($loaded) . ' found.');\r\n }\r\n\r\n foreach ($loaded as $index => $entity) {\r\n $key = call_user_func($this->cacheKeyFunction, $entity, $index);\r\n\r\n $this->loaded[$key] = $entity;\r\n }\r\n }\r\n\r\n $this->buffer = [];\r\n }", "public function pulled(): Iterator;", "public function testIteratorDoesNotChangeNumberOfEntries()\n {\n $iterator = $this->createIterator(array(1, 2, 3));\n\n $this->assertCount(3, $iterator);\n }", "protected function reset()\n {\n $this->iterator->rewind();\n }", "public function rewind()\n {\n if ($this->atStart)\n return;\n \n throw new Splunk_UnsupportedOperationException(\n 'Cannot rewind after reading past the first element.');\n }", "public function rewind()\r\n\t{\r\n\t\t$this->i = 0;\r\n\t\tif(count($this->elements))\r\n\t\t{\r\n\t\t\treturn $this->elements[$this->i];\r\n\t\t}\r\n\t}", "public function rewind() {\n reset($this->elements);\n }", "public function testEach()\n {\n $success = $this->collection->each(function($value, $key) {\n $this->assertTrue($this->collection->keyExists($key));\n $this->assertEquals($value, $this->collection->get($key));\n\n $this->collection->set($key, $value * 2);\n });\n\n $this->assertTrue($success);\n $this->assertAttributeEquals([2,4,6], 'elements', $this->collection);\n }", "public function next()\n {\n do {\n $this->iterated->attach($this->current());\n parent::next();\n } while ($this->valid() && (!$this->passes($this->current()) || $this->iterated->contains($this->current())));\n }", "protected function stopVirtualElement()\n {\n if (! $this->element or $this->reader->nodeType !== XMLReader::ELEMENT) {\n return;\n }\n\n if ($parent = $this->findVirtualElementById($this->element->get('@parent'))) {\n $key = $this->getPluralized($this->element->get('@element'));\n\n if (! $parent->has($key)) {\n $parent->put($key, new Collection);\n }\n\n if ($parent->get($key) instanceof Collection) {\n $parent->get($key)->push($this->element);\n }\n } else {\n $this->elements->push($this->element);\n }\n\n $this->element->forget(['@id', '@parent', '@element']);\n }", "public function rewind()\n\t{\n\t\t// not supported\n\t\tif ($this->foreach_count) {\n\t\t\tthrow new ORMException('You cannot use the same result set in multiple foreach.');\n\t\t}\n\n\t\t$this->current = $this->runFetch();\n\n\t\t$this->foreach_count++;\n\t}", "public function rewind() {\n if ($this->started) {\n // When you first foreach() an iterator the rewind() method gets called\n // so we have to work the first time.\n throw new Exception(\n pht('Stream iterators can not be rewound!'));\n }\n\n $this->started = true;\n $this->naturalKey = -1;\n $this->next();\n }", "public function rewind() {\n reset($this->elements);\n $this->pointer = 0;\n }", "public function rewind()\n {\n $this->iterator_data = $this->getData();\n }", "public function next() {\n $this->elementsObtained++;\n $lastElement = $this->current();\n try {\n // DEBUG: Comment In\n //if ($this->elementsObtained > 5 && $this->first)\n // throw new MongoDB\\Driver\\Exception\\RuntimeException(\"cursor id exception simulation\");\n // DEBUG: Comment In\n // We just try to get the next element\n $this->iterator->next();\n } catch (MongoDB\\Driver\\Exception\\RuntimeException $e) {\n if (strpos($e->getMessage(), \"cursor id\") !== FALSE) {\n // cursor id not found exception, let's mitigate\n $options = array();\n // no skip; we already skipped everything in the first iterator\n // limit if we have a limit; we adjust it with the elements obtained\n if ($this->originalLimit !== NULL)\n $options[\"limit\"] = $this->originalLimit - $this->elementsObtained;\n // sort we keep\n if ($this->originalSort !== NULL)\n $options[\"sort\"] = $this->originalSort;\n // Adjust the query so we start after the last obtained element\n $query = $this->queryAfterElement($this->query, $lastElement, $this->originalSort);\n // DEBUG: Comment In\n //var_dump($query);\n // DEBUG: Comment In\n $this->iterator = new IteratorIterator($this->collection->find($query, $options));\n $this->iterator->rewind();\n // We don't call next on the new iterator because it already \"has\" the first element\n // not first anymore\n $this->first = FALSE;\n } else {\n // something else; let's throw this right back at the caller\n throw $e;\n }\n }\n }", "function reset() {\n\n\t\treturn $this->iterator->reset();\n\n\t}", "function rewind()\n\t{\n\t\treturn $this->iterator->rewind();\n\t}", "private function storeNext ()\n {\n if ( !isset($this->iterator) ) {\n return FALSE;\n }\n\n else if ( $this->iterator->valid() ) {\n $this->cache[ $this->internalOffset ] = array(\n $this->iterator->key(),\n $this->iterator->current()\n );\n return TRUE;\n }\n\n // Once the internal iterator is invalid, we no longer need it\n else {\n unset( $this->iterator );\n return FALSE;\n }\n }", "public function next() {\n $row = $this->current();\n\n if ($this->name == '') {\n $this->name = $row['Name'];\n }\n while (($this->name == $row['Name'] || in_array($row['Name'], $this->importedProduct)) && !$this->eof()) {\n parent::next();\n $row = $this->current();\n }\n $this->name = $row['Name'];\n $this->importedProduct[] = $row['Name'];\n }", "public function next()\n {\n next($this->iterator_data);\n }", "public function next()\n {\n ++$this->iterator;\n }", "protected function resetNestedElementCalls() {}", "public function iterator();", "public function next(): void\n {\n $this->position++;\n if (null === $this->generator || !$this->generator->valid()) {\n return;\n }\n\n if (contains_key($this->entries, $this->position + 1)) {\n return;\n }\n\n $this->progress();\n $this->saved = false;\n if ($this->generator) {\n $this->generator->next();\n }\n\n $this->progress();\n }", "public function rewind(){\n return reset($this->items);\n }", "public function rewind(){\n return reset($this->items);\n }", "abstract protected function helperGetOrAdd(ElementInterface $element);", "public function testBurnCollectionItem()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function getIterator() {}", "public function getIterator() {}", "public function next() {\n next($this->elements);\n $this->pointer++;\n }", "public function next()\n {\n $this->iteratorIndex++;\n return next($this->elements);\n }", "function rewind (){ $this->key = -1; }", "function current()\n\t{\n\t\tthrow new Exception('Accessing the value of an EmptyIterator');\n\t}", "public function rewind()\n {\n $this->skipNextIteration = false;\n reset($this->data);\n }", "public function rewind()\n {\n $this->skipNextIteration = false;\n reset($this->data);\n }", "public function rewind()\n {\n $this->current = ldap_first_entry($this->handle, $this->result);\n }", "public function rewind()\n {\n return $this->iterator->rewind();\n }", "public function rewind()\n {\n $this->iteratorPosition = 0;\n }", "public function testRewind() {\n\t\t$this->backend->expects($this->once())\n\t\t\t->method('getUsers')\n\t\t\t->with(\n\t\t\t\t$this->equalTo(''),\t\t\t\t\t// all users\n\t\t\t\t$this->equalTo(UsersIterator::LIMIT),\t// limit 500\n\t\t\t\t$this->equalTo(0)\t\t\t\t\t\t// at the beginning\n\t\t\t)\n\t\t\t->willReturn(['user0']);\n\t\t$this->iterator->rewind();\n\t\t$this->assertTrue($this->iterator->valid());\n\t\t$this->assertEquals('user0', $this->iterator->current());\n\t\t$this->assertEquals(0, $this->iterator->key());\n\t}", "protected function getItemsWithChanges(): iterable\n {\n /** @var IdentifiableCollectionItem $item */\n foreach ($this->getItems() as $item) {\n if (isset($this->removed[$item->identity()])) {\n continue;\n }\n \n yield $item;\n }\n \n foreach ($this->added as $item) {\n $identity = $item->identity();\n if (isset($this->removed[$identity]) || isset($this->items[$identity])) {\n continue;\n }\n \n yield $item;\n }\n }", "public function next()\n {\n if ($this->isvalid) {\n $this->rewindable = false;\n $ret = librdf_iterator_next($this->iterator);\n if ($ret) {\n $this->isvalid = false;\n } else {\n $this->key++;\n }\n }\n }", "public function offsetSet($key, $element)\n {\n $this->elements[$key] = $element;\n $this->iteratorCount = count($this->elements);\n }", "public function testEachWithEarlyReturn()\n {\n $success = $this->collection->each(function($key, $value) {\n return $key === 1;\n });\n\n $this->assertFalse($success);\n }", "public function rewind() {\n $this->initialize();\n $this->nextElem();\n }", "public function rewind()\n {\n reset($this->_items);\n }", "public function iterateAllElements()\n {\n return $this->getIterator();\n }", "public function rewind()\n {\n $this->_current = clone $this->_startDate;\n }", "public function next ()\n {\n if ( isset($this->iterator) && $this->offset == $this->internalOffset ) {\n $this->internalOffset++;\n $this->iterator->next();\n $this->storeNext();\n }\n\n $this->offset++;\n }", "public function next() {\n ++$this->iteratorPosition;\n }", "protected function ensureElement() {\n if (!isset($this->element)) {\n $this->element = self::$maxElement++;\n }\n }", "function print_entry($iterator){\n print($iterator->current());\n return true;\n}", "function getIterator()\n {\n return new \\ArrayIterator($this->items);\n }", "public function next(): void\n {\n if ($this->_skipNextIteration) {\n $this->_skipNextIteration = false;\n return;\n }\n next($this->_data);\n $this->_index++;\n }", "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n }", "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n }", "public function optimizeIteration( ) {\n\t\tif ( ( ( self::ALTERNATE === $this->mType )\n\t\t && ( 1 === count( $this->mChildNodes ) )\n\t\t )\n\t\t || ( ( self::SEQUENCE === $this->mType )\n\t\t\t && ( 1 === count( $this->mChildNodes ) )\n\t\t\t )\n\t\t ){\n\t\t\t$son = $this->mChildNodes[0];\n\t\t\t\n\t\t\t$this->mType \t\t\t= $son->mType;\n\t\t\t$this->mToken \t\t\t= $son->mToken;\n\t\t\t$this->mChildNodes \t\t= $son->mChildNodes;\n\t\t\t$this->mLookAheadSet \t= $son->mLookAheadSet;\n\t\t\t$this->mASTSymbol \t= $son->mASTSymbol;\n\t\t\t$this->mEnclosingRule \t= $son->mEnclosingRule;\n\n\t\t\tforeach( $this->mChildNodes as $key => $value ) {\n\t\t\t\t$value->mParentNode = $this;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\tif ( ( ( self::ALTERNATE === $this->mType )\n\t\t && ( 0 < count( $this->mChildNodes ) ) \n\t\t && ( self::ALTERNATE === $this->mChildNodes[0]->mType ) \n\t\t && ( 0 < count( $this->mChildNodes[0]->mChildNodes ) ) \n\t\t )\n\t\t ){\n\t\t\t\n\t\t\t$son = $this->mChildNodes[0]->mChildNodes[0];\n\t\t\t$this->appendChild( $son );\n\t\t\t\n\t\t\t$son->mParentNode = $this;\n\n\t\t\tarray_shift( $this->mChildNodes[0]->mChildNodes );\n\t\t\t\n\t\t}\n\n\n\n\t\tforeach( $this->mChildNodes as $key => $value ) {\n\t\t\t$value->optimizeIteration();\n\t\t}\n\t\t\n\t}", "public function needsIncrementOffset();", "public function rewind() {\n if($this->items!==false)\n reset($this->items);\n }", "public function getIterator(): Iterator {}", "public function getIterator()\n {\n throw new NotImplementedException(\"This resource does not support iteration\");\n }", "public function next()\n {\n $this->iteratorPosition++;\n }", "public function rewind() \n {\n $this->pointer = 0;\n if (isset($this->list[$this->pointer])) {\n $this->list[$this->pointer]->rewind();\n }\n }", "public function next()\n {\n return next($this->_elements);\n }", "public function getIterator()\n {\n return $this->getItemsWithChanges();\n }", "public function rewind() {\n do {\n $this->collections[$this->_current]->rewind(); \n } while ($this->_current-- > 0);\n }", "public function getIterator()\n {\n }", "protected function _refine() {\n\n\t}", "public function testIterGroup()\n {\n $reader = new \\ArrayIterator($this->numRandom);\n $reader = new Core\\SortReader($reader, 'num', 'mod');\n $this->assertEquals($this->modSorted, iterator_to_array($reader));\n return;\n }", "function rewind(){ \r\n\t $this->valid = (FALSE !== reset($this->array)); \r\n\t }", "public function next(): void {\n next($this->items);\n }", "public function rewind()\n {\n $this->key = 0;\n }", "public function rewind()\n {\n $this->key = 0;\n }", "public function all(): \\Iterator;", "public function rewind()\n {\n $this->_skipNextIteration = false;\n reset($this->_data);\n $this->_index = 0; \n }", "public function testResolveIteratorFailureNonIteratorTest()\n {\n $data = [uniqid('key') => uniqid('val')];\n $testCb = $this->createCallable(function ($it) { return $it instanceof Countable; });\n $iterator = $this->createCountableNonIterator($data);\n\n $subject = $this->createInstance();\n $_subject = $this->reflect($subject);\n\n $this->setExpectedException('OutOfRangeException');\n $result = $_subject->_resolveIterator($iterator, $testCb);\n }", "function getInnerIterator()\n\t{\n\t\treturn $this->iterator;\n\t}", "abstract public function getIterator();", "public function testIter()\n {\n $reader = new \\ArrayIterator($this->allRandom);\n $reader = new Core\\SortReader($reader, 'num');\n $this->assertEquals($this->numSorted, iterator_to_array($reader));\n return;\n }", "#[\\ReturnTypeWillChange]\n public function next()\n {\n return next($this->_items);\n }", "public function testIteratorWorksWithTraversable()\n {\n $originalDataSet = array(\n array(1, 2, 3),\n array(5, 4, 9)\n );\n $iterator = $this->createIterator(new \\IteratorIterator(new \\ArrayIterator($originalDataSet)));\n\n $data = iterator_to_array($iterator);\n $this->assertEquals($originalDataSet, $data);\n }", "public function rewind() {\n $this->_key = 0;\n }", "public function testUnshift()\n {\n $this->collection->unshift(0);\n\n $this->assertCount(4, $this->collection);\n $this->assertTrue($this->collection->contains(0));\n $this->assertEquals(0, $this->collection->get(0));\n }", "function rewind($model){\n if (isset($model->sub) && $model->sub){\n if (($i=$model->_get(\"iterator\")) instanceof \\SimpleXMLIterator){\n return array($i, $i);\n } else if ($xml = $model->_get(\"xml\")){\n $p = $xml->{$model->enclosure};\n /*\n * Process the p to:\n * 1) new object, sorted according to sort rules,\n * 2) leave only results that match\n */\n $p->rewind();\n $processed_xml = $this->processXML($p, $model);\n list($limit,$offset) = $model->_get(\"limit\");\n $this->counter = 0;\n if ($offset > count($processed_xml)){\n return false;\n }\n if ($offset > 0){\n while ($this->counter < $offset){\n $this->counter++;\n next($processed_xml);\n }\n }\n $model->_set(\"count\", count($processed_xml)); // should count properly I suppose\n $current = current($processed_xml);\n return array($processed_xml, $current[\"_iterator\"]);\n }\n /* parent should be loaded */\n throw $this->exception(\"Trying to iterate submodel, when parent is not loaded!\");\n } else {\n $xml = $model->_get(\"xml\");\n /* not sub, top. search */\n $list = array();\n /* add all relevant fields */\n foreach ($model->getActualFields() as $field){\n if ($retrieve = $model->elements[$field]->setterGetter(\"retrieve\")){\n $type = $retrieve;\n } else {\n $type = \"yes\";\n }\n if ($xpath = $model->elements[$field]->setterGetter(\"xpath\")){\n $field = $xpath;\n }\n $list[$field] = $type;\n }\n $query = $this->buildQuery($model);\n $order = $this->buildOrder($model);\n list ($limit, $offset) = $model->_get(\"limit\");\n $limit = ($limit!==null)?$limit:10;\n $offset = $offset?:0;\n ob_start();\n $xml = $this->buildXML($d=$this->simple->search($query, $offset, $limit, $list, $order, \"DOC_TYPE_XMLIterator\"));\n $this->verbose = ob_get_contents();\n ob_end_clean();\n $model->_set(\"xml\", $xml);\n $model->_set(\"count\", $this->simple->response->getParam(\"hits\"));\n $xml->rewind();\n return array($xml, $xml->current());\n }\n }", "function next(){ \r\n\t $this->valid = (FALSE !== next($this->array)); \r\n\t }", "public function rewind() {\r\n reset($this->itemList);\r\n }", "public function getIterator()\n {\n return new \\ArrayIterator($this);\n }", "public function testBufferIterations()\n {\n $resultSet = $this->getMockForAbstractClass(AbstractResultSet::class);\n $resultSet->initialize(new ArrayIterator([\n ['id' => 1, 'name' => 'one'],\n ['id' => 2, 'name' => 'two'],\n ['id' => 3, 'name' => 'three'],\n ]));\n $resultSet->buffer();\n\n $data = $resultSet->current();\n self::assertEquals(1, $data['id']);\n $resultSet->next();\n $data = $resultSet->current();\n self::assertEquals(2, $data['id']);\n\n $resultSet->rewind();\n $data = $resultSet->current();\n self::assertEquals(1, $data['id']);\n $resultSet->next();\n $data = $resultSet->current();\n self::assertEquals(2, $data['id']);\n $resultSet->next();\n $data = $resultSet->current();\n self::assertEquals(3, $data['id']);\n }", "public function getIterator() { return new mfp_iterator($this->list); }", "public function next(): void\n {\n next($this->array);\n }", "public function rewind() {\n\t\treset($this->_value);\n\t}", "function changeOrder() {\n $this->iteratorH = array_reverse($this->iteratorH);\n }", "function getIterator() {\r\n\t\treturn new \\ArrayIterator($this->data);\r\n\t}", "function getiterator() {\n\t\treturn new \\ArrayIterator($this->cast());\n\t}", "public function rewind()\n {\n $this->current = 0;\n }", "public function rewind(): void\n {\n reset($this->_items);\n }", "public function testOrderedQueueIterator_foreach() {\n\t\t\t// add objects...\n\t\t\t$this->oq[] = new stdClass; $this->oq[] = new stdClass;\n\t\t\t$this->oq[] = new stdClass; $this->oq[] = new stdClass;\n\n\t\t\t// assertions\n\t\t\tforeach($this->oq as $key => $object) $this->assertSame($this->oq[$key], $object);\n\t\t}", "public function testGetCollectionItem()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }" ]
[ "0.56790227", "0.56590396", "0.5655071", "0.56322384", "0.55715626", "0.54614717", "0.5456969", "0.5447641", "0.54082644", "0.54076433", "0.53936195", "0.5364188", "0.53485453", "0.5329203", "0.528491", "0.52272505", "0.5191785", "0.517702", "0.5148206", "0.51368463", "0.51211965", "0.51046926", "0.5102746", "0.50903744", "0.5061682", "0.505907", "0.5052122", "0.50507027", "0.50507027", "0.5041389", "0.50355595", "0.5033369", "0.5033369", "0.5029084", "0.50170326", "0.50154096", "0.5004838", "0.50024945", "0.50024945", "0.49997956", "0.4999511", "0.49962476", "0.49807203", "0.49795187", "0.4972635", "0.49641874", "0.49622938", "0.49582586", "0.4941207", "0.49381763", "0.4937045", "0.49333963", "0.49282447", "0.49174187", "0.4914168", "0.49098292", "0.49093753", "0.49029505", "0.49029505", "0.48996463", "0.489367", "0.48927346", "0.48884857", "0.4869275", "0.48676926", "0.48661736", "0.4865328", "0.48613662", "0.48603475", "0.48531365", "0.48484793", "0.4844652", "0.48385575", "0.48382962", "0.48363557", "0.48363557", "0.48355424", "0.48334044", "0.4830654", "0.4815152", "0.479766", "0.4793065", "0.47850198", "0.47825822", "0.4776207", "0.47738037", "0.47731036", "0.47712177", "0.47693574", "0.47613123", "0.47603685", "0.47555414", "0.47552007", "0.4753316", "0.47463587", "0.4746137", "0.47403947", "0.47392747", "0.47370994", "0.47353545", "0.47341" ]
0.0
-1
We assume that sort is NOT empty and contains a uniqueness index.
private function queryAfterElement($baseQuery, $lastElement, $sort) { $ors = []; $equals = []; $keys = array_keys($sort); while (count($keys) > 0) { $key = array_shift($keys); $direction = $sort[$key]; $directionalConstraint = array(); $directionalConstraint[$key] = array(); $directionalConstraint[$key][$direction > 0 ? '$gt' : '$lt'] = $lastElement[$key]; $ors[] = array_merge($equals, $directionalConstraint); $equals[$key] = $lastElement[$key]; } if ($baseQuery === NULL) $baseQuery = array(); $query = $baseQuery; if (isset($query['$or'])) { if (!isset($query['$and'])) $query['$and'] = array(); $query['$and'][] = array('$or' => $query['$or']); unset($query['$or']); $query['$and'][] = array('$or' => $ors); } else $query['$or'] = $ors; //var_dump($query); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function unique($sortFlags = null);", "abstract public function prepareSort();", "public function hasSort() {\n return $this->_has(3);\n }", "public function getSortIndex();", "public function isUnique();", "public function sortArraysByKeyCheckIfSortingIsCorrectDataProvider() {}", "function findUniqueandSort(array $ar){\r\n $a=array_unique($ar);\r\n sort($a);\r\n return $a;\r\n\r\n}", "private function sort(): void\n {\n if (!$this->dirtyIndex) {\n return;\n }\n\n $newIndex = [];\n $index = 0;\n\n foreach ($this->pages as $hash => $page) {\n $order = $page->getOrder();\n\n if (null === $order) {\n $newIndex[$hash] = $index;\n ++$index;\n } else {\n $newIndex[$hash] = $order;\n }\n }\n\n asort($newIndex);\n\n $this->index = $newIndex;\n $this->dirtyIndex = false;\n }", "public function hasSorting()\n {\n return ($this->sortBy !== '');\n }", "function MyMod_Sort_Items($sort=\"\",$reverse=\"\")\n {\n if ($sort==\"\") { $sort=$this->MyMod_Sort_Get(); }\n if ($reverse==\"\") { $reverse=$this->MyMod_Sort_Reverse_Get($reverse); }\n\n if (!is_array($sort))\n {\n $sort=preg_split('/\\s*,\\s*/',$sort);\n }\n\n array_push($sort,\"ID\"); //ID makes sort fields unique!\n\n $hashes=array();\n foreach ($this->ItemHashes as $n => $hash)\n {\n $value=\"\";\n foreach ($sort as $iid => $key)\n {\n if (!isset($this->ItemData[ $key ]))\n {\n if (!empty($hash[ $key ]))\n {\n $value.=\" \".$hash[ $key ]; \n }\n continue;\n }\n\n $rvalue=\"\";\n if (!empty($hash[ $key ])) { $rvalue=$hash[ $key ]; }\n\n if (isset($this->ItemData[ $key ][ \"SqlObject\" ]))\n {\n $object=$this->ItemData[ $key ][ \"SqlObject\" ];\n $rvalue=$this->ApplicationObj->$object->MyMod_Item_Name_Get($rvalue);\n }\n\n if (\n $key==\"ID\"\n ||\n (\n isset($this->ItemData[ $key ][ \"NumericalSort\" ])\n &&\n $this->ItemData[ $key ][ \"NumericalSort\" ]==TRUE\n )\n )\n {\n if (\n isset($this->ItemData[ $key ][ \"SortReverse\" ])\n &&\n $this->ItemData[ $key ][ \"SortReverse\" ]==TRUE\n )\n {\n $rvalue=sprintf(\"%06d\",1000000-$hash[ $key ]);\n }\n else\n {\n $rvalue=sprintf(\"%06d\",$hash[ $key ]);\n }\n }\n elseif (isset($this->ItemData[ $key ][ \"SqlTable\" ]))\n {\n $rvalue=$this->GetEnumValue($key,$hash);\n }\n elseif ($this->ItemData[ $key ][ \"Sql\" ]==\"INT\")\n {\n $rvalue=sprintf(\"%06d\",$rvalue);\n }\n elseif (!empty($this->ItemData[ $key ][ \"DerivedFilter\" ]))\n {\n $rvalue=$this->FilterHash($this->ItemData[ $key ][ \"DerivedFilter\" ],$hash);\n }\n elseif (!empty($this->ItemData[ $key ][ \"DerivedNamer\" ]))\n {\n $rvalue=$hash[ $this->ItemData[ $key ][ \"DerivedNamer\" ] ];\n }\n elseif (!empty($this->ItemData[ $key ][ \"SortAsDate\" ]))\n {\n $rvalue=$this->Date2Sort($hash[ $key ]);\n }\n\n if ($rvalue!=\"\") { $value.=\" \".$rvalue; }\n }\n\n $value=preg_replace('/^\\s*/',\"\",$value);\n $value=preg_replace('/\\s*$/',\"\",$value);\n\n $value=$this->Text2Sort($value);\n $value=$this->Html2Sort($value);\n\n //Make sure two items do not have same sort key\n while (isset($hashes[ $value ]))\n {\n $value.=\"a\";\n }\n\n $value=strtolower($value);\n $hashes[ $value ]=$hash;\n }\n\n $this->ItemHashes=array();\n\n $keys=array_keys($hashes);\n sort($keys);\n if ($reverse) { $keys=array_reverse($keys); }\n\n foreach ($keys as $rkey)\n {\n array_push($this->ItemHashes,$hashes[ $rkey ]);\n }\n\n //return $this->ItemHashes;\n }", "public function asort() {}", "static function includeSorting()\n {\n return false;\n }", "public function fixSortOrder($uuid, $sort_order){\n\t\t$nex_sort_order = $sort_order +1;\n\t\treturn mysqli_query ( $this->adapter, \"UPDATE `$this->table` SET sort_order='{$nex_sort_order}' WHERE uuid != '{$uuid}' AND sort_order='{$sort_order}'\" );\n\t}", "static function ensureUniqueIndex($collection, $keys, $options = array()) {\r\n\t\t$options['unique'] = true;\r\n\t\treturn self::ensureIndex($collection, $keys, $options);\r\n\t}", "public function unique();", "public function unique();", "public function indexUnique( $table, $index ) {\n\t\t$indexInfo = $this->indexInfo( $table, $index );\n\n\t\tif ( !$indexInfo ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn !$indexInfo[0]->Non_unique;\n\t}", "public function hasSort()\n {\n return isset($this->customSort);\n }", "function MyMod_Sort_Add($sort)\n {\n if (!is_array($sort)) { $sort=array($sort); }\n\n foreach ($sort as $rsort)\n {\n if (!preg_grep('/'.$rsort.'/',$this->Sort))\n {\n array_unshift($this->Sort,$rsort);\n }\n }\n }", "public function ClearSort()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n // Only the root can do this.\n if (null == $this->_my_root) {\n $this->sort_array = null;\n }\n }", "function init_sort(){\r\n\t\t$out='';\r\n\r\n\t\tif($this->sort===true or $this->sort==''){\r\n\t\t\tfor($i=0; $i<count($this->data[0]); $i++){\r\n\t\t\t\t$out.=($out ? '_' : '').'t';\r\n\t\t\t}\r\n\t\t\t$this->sort=$out;\r\n\t\t}\r\n\t}", "public function HasSorts(): bool\n {\n return $this->SortLinks()->count() > 1;\n }", "public function sort();", "function getSort() {\n return 999;\n }", "public function beforeUpdate()\n {\n if($this->ignoreChecks)\n return true;\n\n $total = RoleManager::for($this->group->code)->countRoles();\n\n if(!(($this->sort_order <= $total) && ($this->sort_order > 0)))\n {\n return false;\n }\n }", "public function testSortingOrder3()\n {\n $this->sortingOrderGeneration(false);\n }", "public function unique_order(){\n\t\t\t\n\t\t\t$where = array(\n\t\t\t\t'reference' => $this->input->post('reference'),\n\t\t\t\t'order_description' => $this->input->post('order_description'),\n\t\t\t\t'total_price' => $this->input->post('total_price'),\n\t\t\t\t'num_of_items' => $this->input->post('num_of_items'),\n\t\t\t\t'customer_email' => $this->input->post('customer_email'),\n\t\t\t);\n\t\t\t\n\t\t\tif (!$this->Orders->is_unique($where))\n\t\t\t{\n\t\t\t\t$this->form_validation->set_message('unique_order', 'You already have this order on record!');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}", "private function newSortVectorForUnowned() {\n return array(\n 0,\n );\n }", "public function ensure_unique_index($collection, $keys) {\n $name_parts = array();\n foreach ($keys as $k => $v) {\n $name_parts[] = $k;\n $name_parts[] = $v;\n }\n $name = implode('_', $name_parts);\n $col = $this->db>selectCollection('system.indexes');\n return $col->save(array('ns' => $this->db_name . \".$collection\",\n 'key' => $keys,\n 'name' => $name,\n 'unique' => true));\n }", "public function hasEscort(){\r\n return $this->_has(1);\r\n }", "protected function _needSort($elt)\n {\n return (($elt['a'] & self::ELT_NEED_SORT) && (count($this->_parent[$elt['v']]) > 1));\n }", "abstract protected function setUpComparator();", "public function asort()\n {\n }", "public function testCompareOnlySelectedIndexesFromDupeCheck()\n {\n //create a bean, values, populate and save\n $focus = loadBean('Contacts');\n $focus->first_name = 'first '.date(\"YmdHis\");\n $focus->last_name = 'last '.date(\"YmdHis\");\n $focus->assigned_user_id = '1';\n $focus->save();\n\n\n //create the importDuplicateCheck object and get the list of duplicateCheckIndexes\n $idc = new ImportDuplicateCheck($focus);\n\n //we are going to test agains the first name, last name, full name, and assigned to indexes\n //to prove that only selected indexes are being used.\n\n //lets do a straight dupe check with the same bean on first name, should return true\n $this->assertTrue($idc->isADuplicateRecord(array('idx_cont_last_first::first_name')),'simulated check against first name index (idx_cont_last_first::first_name) failed (returned false instead of true).');\n\n //now lets test on full name index should also return true\n $this->assertTrue($idc->isADuplicateRecord(array('full_name::full_name')),'first simulated check against full name index (full_name::full_name) failed (returned false instead of true). This check means BOTH first AND last name must match.');\n\n //now lets remove the first name and redo the check, should return false\n $focus->first_name = '';\n $idc = new ImportDuplicateCheck($focus);\n $this->assertFalse($idc->isADuplicateRecord(array('idx_cont_last_first::first_name')),'simulated check against first name index (idx_cont_last_first::first_name) failed (returned true instead of false). This is wrong because we removed the first name so there should be no match.');\n\n //lets retest on full name index should return false now as first AND last do not match the original\n $this->assertFalse($idc->isADuplicateRecord(array('full_name::full_name')),'second simulated check against full name index (full_name::full_name) failed (returned true instead of false). This check means BOTH first AND last name must match and is wrong because we removed the first name so there should be no match.');\n\n //now lets rename the contact and test on assigned user, should return true\n $focus->first_name = 'first '.date(\"YmdHis\");\n $focus->last_name = 'last '.date(\"YmdHis\");\n $idc = new ImportDuplicateCheck($focus);\n $this->assertTrue($idc->isADuplicateRecord(array('idx_del_id_user::assigned_user_id')),'simulated check against assigned user index (idx_del_id_user::assigned_user_id) failed (returned false instead of true). This is wrong because we have not changed this field and it should remain a duplicate');\n\n //we're done, lets delete the focus bean now\n $focus->mark_deleted($focus->id);\n\n }", "static function ensureUniqueIndex($collection, $keys) {\n global $mongo;\n $name_parts = array();\n foreach ($keys as $k => $v) {\n $name_parts[] = $k;\n $name_parts[] = $v;\n }\n $name = implode('_', $name_parts);\n $col = $mongo->selectCollection(MONGODB_NAME, 'system.indexes');\n $col->save(array('ns' => MONGODB_NAME . \".$collection\",\n 'key' => $keys,\n 'name' => $name,\n 'unique' => true));\n }", "public function clearSort() {\n $this->sort = '';\n return $this;\n }", "function getSort(){ return 301; }", "public final function manualSort(){\r\n\t\t$itemid=$this->itemid;\r\n\t\t$position=$this->sortarray;\r\n\t\t$newarray=array();\r\n\t\t$max=-1;\r\n\t\tforeach($this->sorteddata as $pmid){\r\n\t\t\t$i=$itemid[$pmid];\r\n\t\t\tif (!isset($position[$i])) continue;\r\n\t\t\t$newarray[$position[$i]]=$pmid;\r\n\t\t\tif ($max<$position[$i]) $max=$position[$i];\r\n\t\t}\r\n\t\tforeach($this->sorteddata as $pmid){\r\n\t\t\t$i=$itemid[$pmid];\r\n\t\t\tif (!isset($position[$i])) $newarray[++$max]=$pmid;\r\n\t\t}\r\n\t\t$this->sorteddata=$newarray;\r\n\t}", "public function getSortValue() {}", "function getSort(){\n return 999;\n }", "function getSort(){\n return 999;\n }", "function not_unique($data=null)\n\t{\n\t\tif (!is_array($data))\n\t\t{\n\t\t\t$data = $this->data;\n\t\t}\n\t\t$n = 1;\n\t\t$uni_keys = $this->db_uni_cols;\n\t\t// add the primary key, only if it's NOT an auto id\n\t\tif (!$this->autoinc_id)\n\t\t{\n\t\t\t$uni_keys[] = $this->db_key_cols;\n\t\t}\n\t\tforeach($uni_keys as $db_col => $col)\n\t\t{\n\t\t\tif (is_array($col))\n\t\t\t{\n\t\t\t\t$query = array();\n\t\t\t\tforeach($col as $db_c => $c)\n\t\t\t\t{\n\t\t\t\t\t$query[$db_c] = $data[$c];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$query = array($db_col => $data[$col]);\n\t\t\t}\n\t\t\tforeach($this->db->select($this->table_name,$this->db_key_cols,$query,__LINE__,__FILE__,false,'',$this->app) as $other)\n\t\t\t{\n\t\t\t\tforeach($this->db_key_cols as $key_col)\n\t\t\t\t{\n\t\t\t\t\tif ($data[$key_col] != $other[$key_col])\n\t\t\t\t\t{\n\t\t\t\t\t\tif ((int) $this->debug >= 4)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"<p>not_unique in \".array2string($col).\" as for '$key_col': '${data[$key_col]}' != '${other[$key_col]}'</p>\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn $n;\t// different entry => $n not unique\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t++$n;\n\t\t}\n\t\treturn 0;\n\t}", "static function save_all_sort_nums() {\r\n\r\n // Get all websites\r\n $wses = MJKVIAPI::archival_websites();\r\n $wses = MJKVIAPI::sort_websites($wses, $desc=false);\r\n \r\n // Number them\r\n $i = 0;\r\n foreach($wses as $ws) {\r\n $ws_pid = $ws->pid;\r\n \r\n // Add/update the meta key\r\n if (!add_post_meta($ws_pid, self::sort_key(), $i, $unique=true)) { \r\n update_post_meta($ws_pid, self::sort_key(), $i);\r\n }\r\n \r\n $i++;\r\n }\r\n }", "public function mergeUnique() {}", "public function testSort()\n {\n $this->collection->sort(function($a, $b) {\n if ($a === $b) {\n return 0;\n }\n\n return $a > $b ? -1 : 1;\n });\n\n $this->assertAttributeEquals([3,2,1], 'elements', $this->collection);\n }", "public function hasOrdering()\n\t\t{\n\t\t\treturn count($this->order) > 0;\t\t\t\n\t\t}", "public function beforeDelete()\n {\n if($this->group_id == 0)\n return true;\n\n $total = RoleManager::for($this->group->code)->countRoles();\n $myOrder = $this->sort_order;\n\n if($myOrder === $total)\n return true;\n\n $roles = RoleManager::for($this->group->code)->getSortedGroupRoles();\n\n $difference = $total - $myOrder;\n\n for($i = 0; $i < $difference; $i++)\n {\n $role = $roles[$total - $i];\n $role->sort_order = $total - $i - 1;\n $role->save();\n }\n\n }", "public function natsort()\n {\n }", "function custom_sort($sorted_by) {\r\n if (!sizeof($sorted_by->rules))\r\n $sorted_by->add(\"menuOrder\", \"ASC\");\r\n}", "function checkForDuplicateUnique(){\n $_ufields_arr = explode(\",\", $this->listSettings->GetItem(\"MAIN\", \"UNIQUE_FIELDS\"));\n $check_fields = true;\n for ($i = 0; $i < sizeof($_ufields_arr); $i ++) {\n list ($_field[$i], $_value[$i]) = explode(\"=\", $_ufields_arr[$i]);\n if (strlen($_value[$i])) {\n $check_fields = false;\n $_query_arr[$_field[$i]] = $_value[$i];\n if ($this->_data[$_field[$i]] == $_value[$i]) {\n $check_fields = true;\n }\n }\n else {\n $_query_arr[$_field[$i]] = $this->_data[$_field[$i]];\n }\n }\n if ($check_fields) {\n $_data = $this->Storage->GetByFields($_query_arr, null);\n }\n else {\n $_data = array();\n }\n if (! empty($_data)) {\n if (($this->item_id != $_data[$this->key_field])) {\n if ($this->Kernel->Errors->HasItem($this->library_ID, \"RECORD_EXISTS\")) {\n $_error_section = $this->library_ID;\n }\n else {\n $_error_section = \"GlobalErrors\";\n }\n $this->validator->SetCustomError($_ufields_arr, \"RECORD_EXISTS\", $_error_section);\n }\n }\n }", "protected function _getSortType() {}", "protected function _getSortType() {}", "protected static function setValidSortTypes()\r\n {\r\n }", "public function cleanDuplicates( );", "protected function sortDataArray() {}", "public function setSortIndex($sortIndex);", "public function sort()\n {\n $a = $this->toArray();\n $success = sort($a);\n if ($success) {\n $this->clear();\n $this->putAll($a);\n return true;\n }\n return false;\n }", "public function checkSortQuery($field, $sort='asc')\n\t\t\t{\n\t\t\t\t$this->sql_sort = $this->fields_arr['orderby_field'].' '.$this->fields_arr['orderby'];\n\t\t\t}", "abstract protected function _getSortType();", "public function testSortedIndex() {\n\t\t$array = array(10, 20, 30, 40, 50);\n\t\t$value = 35;\n\t\t$result = _::sortedIndex($array, $value);\n\t\t$this->assertEquals(3, $result);\n\n\t\t// test with array of objects\n\t\t$guys = array(\n\t\t\t(object)array('name' => 'Tom', 'age' => 20),\n\t\t\t(object)array('name' => 'Dick', 'age' => 30)\n\t\t);\n\t\t$guy = (object)array('name' => 'Harry', 'age' => 10);\n\t\t$result = _::sortedIndex($guys, $guy, 'age');\n\t\t$this->assertEquals(0, $result);\n\t}", "public function valid(){\n return $this->index < count($this->ids);\n }", "#[@test]\n public function uniqueKeyNotSet() {\n $this->assertEquals('false', \n $this->xpath->query('string(/document/table/index[2]/@unique)'));\n }", "public function isSortById()\n {\n return ($this->getSortBy() == 'id') ? true : false;\n }", "private function sort(): void\n {\n if (!$this->sorted) {\n uasort($this->items, function (AcceptHeaderItem $a, AcceptHeaderItem $b) {\n $qA = $a->getQuality();\n $qB = $b->getQuality();\n\n if ($qA === $qB) {\n return $a->getIndex() > $b->getIndex() ? 1 : -1;\n }\n\n return $qA > $qB ? -1 : 1;\n });\n\n $this->sorted = true;\n }\n }", "public function reSortOrder($uuid, $sort_order){\n\t\treturn mysqli_query ( $this->adapter, \"UPDATE `$this->table` SET sort_order='{$sort_order}' WHERE uuid='{$uuid}'\" );\n\t}", "public function arrayMergeKeepsIndexesAfterMerge() {}", "function getSort(){\n return 100;\n }", "public function isSortable() {\n\t\treturn $this->sortKey != null;\n\t}", "public function isSortable() {\n\t\treturn $this->sortKey != null;\n\t}", "private function checkOrderByValue()\n {\n // Only these values are valid\n $columns = [\"id\", \"title\", \"year\", \"image\"];\n $orderBy = $this->app->request->getGet(\"orderby\") ?: \"id\";\n\n if (!in_array($orderBy, $columns)) {\n $orderBy = \"id\";\n }\n return $orderBy;\n }", "final public function valid(): bool\n {\n $this->sort();\n\n return false !== current($this->index) && null !== current($this->index);\n }", "public function rsort()\n {\n $a = $this->toArray();\n $success = rsort($a);\n if ($success) {\n $this->clear();\n $this->putAll($a);\n return true;\n }\n return false;\n }", "private function get_sort_type($sort): int\n\t{\n\t\tif ($sort == -1 || $sort === FALSE || strtolower($sort) == 'desc')\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t}", "function getSort(){\n\treturn 281;\n}", "function cksort(&$array)\n{\n return uksort($array, \"cmp\");\n}", "function rest_validate_array_contains_unique_items($input_array)\n {\n }", "public function csvPolicyIsUnique($input){\n\t\treturn empty($this->tokens[$input]) || $this->tokens[$input] <= 1;\n\t}", "public function checkSortQuery($field, $sort='asc')\n\t\t\t{\n\t\t\t\tif(!($this->sql_sort))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->sql_sort = ' '.$field . ' ' . $sort;\n\t\t\t\t\t}\n\t\t\t}", "public function setSort($x) { $this->sort = $x; }", "public static function ensureIndexes() {\n\t\t$export_queue = new self();\n\t\t$export_queue->getCollection()->ensureIndex(array('lead._id' => 1), array('background' => true));\n\t\t$export_queue->getCollection()->ensureIndex(array('export._id' => 1), array('background' => true));\n\t\t$export_queue->getCollection()->ensureIndex(array('split._id' => 1), array('background' => true));\n\t\treturn true;\n\t}", "function cmpByOrderIndexAsc($a, $b)\n{\n if ($a['order_index'] == $b['order_index']) {\n return 0;\n }\n return($a['order_index'] < $b['order_index']) ? -1 : 1;\n}", "public function testUniq() {\n\t\t$array = array(1, 2, 3, 4, 5, 4, 3, 2);\n\t\t$result = _::uniq($array);\n\t\t$this->assertInternalType('array', $result);\n\t\t$this->assertCount(5, $result);\n\t\t$this->assertEquals(1, $result[0]);\n\t\t$this->assertEquals(2, $result[1]);\n\t\t$this->assertEquals(3, $result[2]);\n\t\t$this->assertEquals(4, $result[3]);\n\t\t$this->assertEquals(5, $result[4]);\n\t}", "public function allowedSorts()\n {\n return [];\n }", "public function testExcludeIndexesFromDupeCheck()\n {\n //create the bean to test on\n $focus = loadBean('Contacts');\n\n //create the importDuplicateCheck object and get the list of duplicateCheckIndexes\n $idc = new ImportDuplicateCheck($focus);\n\n //get the list of importable indexes\n $indexes = $import_indexes = $focus->getIndices();\n\n\n //grab any custom indexes if they exist\n if($focus->hasCustomFields()){\n $custmIndexes = $focus->db->helper->get_indices($focus->table_name.'_cstm');\n $indexes = array_merge($custmIndexes,$indexes);\n }\n\n //get list indexes to be displayed\n $dupe_check_indexes = $idc->getDuplicateCheckIndexedFiles();\n\n //Make sure that the indexes used for dupe checking honors the exclusion array. At a minimum, all beans will have\n //their id and teamset indexes excluded.\n $this->assertTrue(count($indexes) > count($dupe_check_indexes), 'Indexes specified for exclusion are not getting excluded from getDuplicateCheckIndexedFiles()');\n }", "public function shouldSortWhenCreating(): bool\n {\n return isset($this->sortable['sort_when_creating'])\n ? $this->sortable['sort_when_creating']\n : true;\n }", "private function client_side_sort($sort, $reverse, $filter='ALL') {\n\n\t\t// Check if the imap_sort_on_date flag is set. Usually this can be set when \n\t\t// the mailserver is a Microsoft Exchange server that \n\t\t// does NOT support Server Side Sort\n\t\t\n\t\tif (!\\GO::config()->imap_sort_on_date) {\n\t\t\t\\GO::debug(\"imap::Config::imap_sort_on_date(false)\");\n\t\t\tif ($sort == 'DATE' || $sort == 'R_DATE') {\n\t\t\t\t$sort = 'ARRIVAL';\n\t\t\t}\n\t\t} else {\n\t\t\t\\GO::debug(\"imap::Config::imap_sort_on_date(true)\");\n\t\t}\n\n\t\t\\GO::debug(\"imap::client_side_sort($sort, $reverse, $filter)\");\n\n\t\t$uid_string='1:*';\n\t\tif(!empty($filter) && $filter !='ALL'){\n\t\t\t$uids = $this->search($filter);\n\t\t\tif(!count($uids)){\n\t\t\t\treturn array();\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$uid_string=implode(',', $uids);\n\t\t\t}\n\t\t}\n\n\t\t$this->clean($sort, 'keyword');\n\t\t$command1 = 'UID FETCH '.$uid_string.' ';\n\t\tswitch ($sort) {\n//\t\tDoesn't work on some servers. Use internal date for these.\n//\t\tEnabled because we have added GO::config()->imap_sort_on_date functionality\n\t\t\tcase 'DATE':\n\t\t\tcase 'R_DATE':\n\t\t\t\t$command2 = \"BODY.PEEK[HEADER.FIELDS (DATE)]\";\n\t\t\t\t$key = \"BODY[HEADER.FIELDS\";\n\t\t\t\tbreak;\n\t\t\tcase 'SIZE':\n//\t\tEND\t\t\t\t\n\t\t\t\t\n\t\t\tcase 'R_SIZE':\n\t\t\t\t$command2 = \"RFC822.SIZE\";\n\t\t\t\t$key = \"RFC822.SIZE\";\n\t\t\t\tbreak;\n\t\t\tcase 'ARRIVAL':\n\t\t\t\t$command2 = \"INTERNALDATE\";\n\t\t\t\t$key = \"INTERNALDATE\";\n\t\t\t\tbreak;\n\t\t\tcase 'R_ARRIVAL':\n\t\t\t\t$command2 = \"INTERNALDATE\";\n\t\t\t\t$key = \"INTERNALDATE\";\n\t\t\t\tbreak;\n\t\t\tcase 'FROM':\n\t\t\tcase 'R_FROM':\n\t\t\t\t$command2 = \"BODY.PEEK[HEADER.FIELDS (FROM)]\";\n\t\t\t\t$key = \"BODY[HEADER.FIELDS\";\n\t\t\t\tbreak;\n\t\t\tcase 'SUBJECT':\n\t\t\tcase 'R_SUBJECT':\n\t\t\t\t$command2 = \"BODY.PEEK[HEADER.FIELDS (SUBJECT)]\";\n\t\t\t\t$key = \"BODY[HEADER.FIELDS\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$command2 = \"INTERNALDATE\";\n\t\t\t\t$key = \"INTERNALDATE\";\n\t\t\t\tbreak;\n\t\t}\n\t\t$command = $command1.'('.$command2.\")\\r\\n\";\n\n\t\t$this->send_command($command);\n\t\t$res = $this->get_response(false, true);\n\t\t$status = $this->check_response($res, true);\n\t\t$uids = array();\n\t\t$sort_keys = array();\n\t\tforeach ($res as $vals) {\n\t\t\tif (!isset($vals[0]) || $vals[0] != '*') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$uid = 0;\n\t\t\t$sort_key = 0;\n\t\t\t$body = false;\n\t\t\tforeach ($vals as $i => $v) {\n\t\t\t\tif ($body) {\n\t\t\t\t\tif ($v == ']' && isset($vals[$i + 1])) {\n\t\t\t\t\t\tif ($command2 == \"BODY.PEEK[HEADER.FIELDS (DATE)]\") {\n\t\t\t\t\t\t\t$sort_key = strtotime(trim(substr($vals[$i + 1], 5)));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$sort_key = $vals[$i + 1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$body = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (strtoupper($v) == 'UID') {\n\t\t\t\t\tif (isset($vals[($i + 1)])) {\n\t\t\t\t\t\t$uid = $vals[$i + 1];\n\t\t\t\t\t\t$uids[] = $uid;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($key == strtoupper($v)) {\n\t\t\t\t\tif (substr($key, 0, 4) == 'BODY') {\n\t\t\t\t\t\t$body = 1;\n\t\t\t\t\t}\n\t\t\t\t\telseif (isset($vals[($i + 1)])) {\n\t\t\t\t\t\tif ($key == \"INTERNALDATE\") {\n\t\t\t\t\t\t\t$sort_key = strtotime($vals[$i + 1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$sort_key = $vals[$i + 1];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($sort_key && $uid) {\n\t\t\t\t$sort_keys[$uid] = $sort_key;\n\t\t\t}\n\t\t}\n\n\t\tif (count($sort_keys) != count($uids)) {\n\t\t\t//echo 'BUG: Client side sort array mismatch';\n\t\t\t//exit;\n\t\t}\n\t\tunset($res);\n\t\tnatcasesort($sort_keys);\n\t\t$uids = array_keys($sort_keys);\n\t\tif ($reverse) {\n\t\t\t$uids = array_reverse($uids);\n\t\t}\n\t\treturn $status ? $uids : false;\n\t}", "public function testAsort()\n {\n $this->collection->asort(function($a, $b) {\n if ($a === $b) {\n return 0;\n }\n\n return $a > $b ? -1 : 1;\n });\n\n $this->assertAttributeEquals([2 => 3, 1 => 2, 0 => 1], 'elements', $this->collection);\n }", "public function getSortIndex() : int\n {\n return $this->sortIndex;\n }", "function getSort(){\n return 301;\n }", "function add_clean_index($table, $index)\n {\n }", "public function isValueMustBeUnique(): bool;", "public function testSortAssocArrayException() {\n ArrayUtils::sortAssociativeArray(\n array('test' => 1),\n 'test',\n 99,\n true\n );\n }", "public function sortAction()\n {\n $this->getResponse()->addHeader('Content-type', 'text/plain');\n $this->getResponse()->sendHeaders();\n\n $sql_set = \"SET @sort := 0, @context := ''\";\n\n $sql_context = 'UPDATE `%1$s` SET\n`sort`=(@sort := IF(@context != `%3$s`, 0, @sort +1)),\n`%3$s` = (@context := `%3$s`)\nORDER BY `%3$s`,`sort`,`%2$s`';\n\n $sql_single = 'UPDATE `%1$s` SET\n`sort`=(@sort := @sort +1)\nORDER BY `sort`,`%2$s`';\n\n $tables = array(\n 'shop_plugin' => 'shopPluginModel',\n 'shop_product_skus' => 'shopProductSkusModel',\n 'shop_type' => 'shopTypeModel',\n 'shop_type_features' => 'shopTypeFeaturesModel',\n 'shop_feature_values_dimension' => 'shopFeatureValuesDimensionModel',\n 'shop_feature_values_double' => 'shopFeatureValuesDoubleModel',\n 'shop_feature_values_text' => 'shopFeatureValuesTextModel',\n 'shop_feature_values_varchar' => 'shopFeatureValuesVarcharModel',\n 'shop_feature_values_color' => 'shopFeatureValuesColorModel',\n 'shop_importexport' => 'shopImportexportModel',\n );\n\n $counter = 0;\n\n $trace = waRequest::request('trace');\n\n foreach ($tables as $table => $table_model) {\n if (class_exists($table_model)) {\n $model = new $table_model();\n /**\n * @var $model shopSortableModel\n */\n print sprintf(\"#%d\\tRepair sort field at `%s` table:\\n\", ++$counter, $table);\n try {\n $id = $model->getTableId();\n if (is_array($id)) {\n $id = implode('`, `', $id);\n }\n if ($context = $model->getTableContext()) {\n $sql = sprintf($sql_context, $model->getTableName(), $id, $context);\n } else {\n $sql = sprintf($sql_single, $model->getTableName(), $id);\n }\n if ($trace) {\n print \"{$sql_set};\\n{$sql};\\n\";\n }\n $model->exec($sql_set);\n $model->exec($sql);\n print \"OK\";\n } catch (waDbException $e) {\n print \"ERROR:\".$e->getMessage();\n }\n print \"\\n\\n\";\n }\n }\n if (empty($model)) {\n $model = new waModel();\n }\n\n $tables = array(\n 'shop_product_images' => 'product_id',\n 'shop_product_pages' => 'product_id',\n 'shop_service_variants' => 'service_id',\n //'shop_set_products' => 'set_id',\n //'shop_tax_zip_codes' => 'tax_id',\n );\n foreach ($tables as $table => $context) {\n $sqls = array();\n $sqls[] = \"SET @sort := 0, @context := ''\";\n $sqls[] = \"UPDATE `{$table}` SET\n`sort`=(@sort := IF(@context != `{$context}`, 0, @sort +1)),\n`{$context}` = (@context := `{$context}`)\nORDER BY `{$context}`,`sort`,`id`\";\n\n print sprintf(\"#%d\\tRepair sort field at `%s` table:\\n\", ++$counter, $table);\n while ($sql = array_shift($sqls)) {\n try {\n if ($trace) {\n print \"{$sql};\\n\";\n }\n $model->exec($sql);\n } catch (waDbException $e) {\n print \"ERROR:\".$e->getMessage().\"\\n\\n\";\n break;\n }\n }\n if (!$sqls) {\n print \"OK\\n\\n\";\n }\n }\n\n $tables = array(\n 'shop_currency' => 'code',\n 'shop_service' => 'id',\n 'shop_set' => 'id',\n 'shop_stock' => 'id',\n\n );\n foreach ($tables as $table => $id) {\n $sqls = array();\n $sqls[] = \"SET @sort := 0\";\n $sqls[] = \"UPDATE `{$table}` SET\n`sort`=(@sort := @sort +1)\nORDER BY `sort`,`{$id}`\";\n\n print sprintf(\"#%d\\tRepair sort field at `%s` table:\\n\", ++$counter, $table);\n while ($sql = array_shift($sqls)) {\n try {\n if ($trace) {\n print \"{$sql};\\n\";\n }\n $model->exec($sql);\n } catch (waDbException $e) {\n print \"ERROR:\".$e->getMessage().\"\\n\\n\";\n break;\n }\n }\n if (!$sqls) {\n print \"OK\\n\\n\";\n }\n }\n }", "public static function onAjaxNewwallet_Sort() {\n\t\tjimport('joomla.application.module.helper'); //подключаем хелпер для модуля\n\n\t\t$prod_pr_id = $_POST['prod_pr_id'];\n\t\t$sort_value = $_POST['sort_value'];\n\n\t\t$product_id = substr($prod_pr_id, 3);\n\n\t\t$object = new stdClass();\n\n\t\t$object->product_id = $product_id;\n\t\t$object->product_ordering = $sort_value;\n\n\t\t// Обновить значение в таблицы товаров\n\t\t$result = JFactory::getDbo()->updateObject('#__jshopping_products_to_categories', $object, 'product_id');\n\n\t\tif ($result) {\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\n\t}", "public function sortStrategy();", "public function testUniqueContextAddsFieldsToTheIndex()\n {\n $type = (new Type('applications'))->addField((new UrlField('homepage_url', null, true))->unique('application_id', 'shard_id'));\n\n $this->assertArrayHasKey('homepage_url', $type->getIndexes());\n\n $name_index = $type->getIndexes()['homepage_url'];\n\n $this->assertInstanceOf(IndexInterface::class, $name_index);\n\n $this->assertEquals('homepage_url', $name_index->getName());\n $this->assertEquals(['homepage_url', 'application_id', 'shard_id'], $name_index->getFields());\n }", "public static function getDefaultSorting()\n {\n\n }", "public function testUniqueIndex() {\n\n $this->expectException(EntityStorageException::class);\n\n /** @var \\Drupal\\commerce_giftcard\\Entity\\GiftcardInterface $giftcard */\n $giftcard = Giftcard::create(\n [\n 'type' => 'example',\n 'code' => 'ABC',\n 'balance' => new Price(50, 'USD'),\n ]\n );\n $giftcard->save();\n /** @var \\Drupal\\commerce_giftcard\\Entity\\GiftcardInterface $giftcard */\n $giftcard = Giftcard::create(\n [\n 'type' => 'example',\n 'code' => 'ABC',\n 'balance' => new Price(50, 'USD'),\n ]\n );\n $giftcard->save();\n }", "public function shouldSortWhenCreating(): string\n {\n return $this->sortable['sort_when_creating'] ?? config('laravel-sortable.sort_when_creating', 'end');\n }", "public function testUrlFieldAddsUniqueIndexWhenRequested()\n {\n $type = (new Type('writers'))->addField((new UrlField('homepage_url', null, true))->unique());\n\n $this->assertArrayHasKey('homepage_url', $type->getIndexes());\n\n $url_index = $type->getIndexes()['homepage_url'];\n\n $this->assertInstanceOf(IndexInterface::class, $url_index);\n $this->assertEquals(IndexInterface::UNIQUE, $url_index->getIndexType());\n }", "private function hasLocalUniqueIndex(): bool\n {\n if ($this->hasLocalUniqueIndex !== null) {\n return $this->hasLocalUniqueIndex;\n }\n foreach ($this->getForeignKey()->getLocalTable()->getIndexes() as $index) {\n if (\n $index->isUnique()\n && count($index->getUnquotedColumns()) === count($this->getForeignKey()->getUnquotedLocalColumns())\n && !array_diff($index->getUnquotedColumns(), $this->getForeignKey()->getUnquotedLocalColumns()) // Check for permuted columns too\n ) {\n $this->hasLocalUniqueIndex = true;\n return true;\n }\n }\n $this->hasLocalUniqueIndex = false;\n return false;\n }" ]
[ "0.67440104", "0.5855169", "0.5811032", "0.56944007", "0.5690678", "0.5668176", "0.55067295", "0.54869694", "0.54760885", "0.5397672", "0.5365833", "0.5363977", "0.5350865", "0.5275425", "0.5272461", "0.5272461", "0.5262264", "0.52622247", "0.52534", "0.5224273", "0.52133876", "0.5183521", "0.5164519", "0.5159376", "0.51526326", "0.5147741", "0.51022816", "0.50900596", "0.509", "0.5085874", "0.5057646", "0.5041565", "0.50118345", "0.5001445", "0.4982803", "0.49737877", "0.4949738", "0.49404955", "0.493642", "0.49355072", "0.49355072", "0.49205795", "0.4911925", "0.4910255", "0.4889572", "0.48849207", "0.4884264", "0.48744163", "0.48712265", "0.4868827", "0.48593432", "0.48593432", "0.48581392", "0.48411903", "0.48393077", "0.48392406", "0.48277995", "0.48203656", "0.48161876", "0.4806619", "0.47973073", "0.47948796", "0.47945482", "0.47864142", "0.47830027", "0.47782376", "0.47737187", "0.47694337", "0.47694337", "0.47660524", "0.47610286", "0.47537622", "0.47519574", "0.47493088", "0.47465476", "0.4731011", "0.4726475", "0.47256804", "0.47188154", "0.47158158", "0.47094852", "0.4707312", "0.4705054", "0.47011048", "0.46961078", "0.46915302", "0.46797526", "0.46664226", "0.46645787", "0.4660675", "0.465869", "0.46486616", "0.4640965", "0.46382195", "0.46332324", "0.46315098", "0.46206644", "0.4619714", "0.46113276", "0.4610614", "0.4595166" ]
0.0
-1
This should only be called if valid, so we can assume there is a current element.
public function next() { $this->elementsObtained++; $lastElement = $this->current(); try { // DEBUG: Comment In //if ($this->elementsObtained > 5 && $this->first) // throw new MongoDB\Driver\Exception\RuntimeException("cursor id exception simulation"); // DEBUG: Comment In // We just try to get the next element $this->iterator->next(); } catch (MongoDB\Driver\Exception\RuntimeException $e) { if (strpos($e->getMessage(), "cursor id") !== FALSE) { // cursor id not found exception, let's mitigate $options = array(); // no skip; we already skipped everything in the first iterator // limit if we have a limit; we adjust it with the elements obtained if ($this->originalLimit !== NULL) $options["limit"] = $this->originalLimit - $this->elementsObtained; // sort we keep if ($this->originalSort !== NULL) $options["sort"] = $this->originalSort; // Adjust the query so we start after the last obtained element $query = $this->queryAfterElement($this->query, $lastElement, $this->originalSort); // DEBUG: Comment In //var_dump($query); // DEBUG: Comment In $this->iterator = new IteratorIterator($this->collection->find($query, $options)); $this->iterator->rewind(); // We don't call next on the new iterator because it already "has" the first element // not first anymore $this->first = FALSE; } else { // something else; let's throw this right back at the caller throw $e; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function currentElement()\n {\n return $this->current ? $this->current->parentNode : NULL;\n }", "public function current() {\n return $this->currentElem;\n }", "public function valid()\n {\n return ($this->currentElement !== NULL);\n }", "public function hasCurElementId(){\n return $this->_has(1);\n }", "public function valid()\n {\n if (isset($this->elements[$this->position]))\n {\n return true;\n }\n\n return false;\n }", "public function valid()\n {\n return !is_null($this->current());\n }", "public function valid()\n {\n return (! is_null($this->current()));\n }", "public function current()\n {\n return $this->currentElement;\n }", "public function valid()\n {\n if (is_null($this->current)) {\n return false;\n }\n\n return true;\n }", "protected function ensureElement() {\n if (!isset($this->element)) {\n $this->element = self::$maxElement++;\n }\n }", "public function current()\n {\n return current($this->_elements);\n }", "public function valid() {\n return !is_null($this->currentIndex);\n }", "public function current()\n {\n return current($this->elements);\n }", "function _reparseAfterCurrentBlock () {\r\n // this should definitely not happen!\r\n if (($stack_count = count ($this->_stack)) < 2) {\r\n return false;\r\n }\r\n $topelem =& $this->_stack[$stack_count-1];\r\n \r\n $node_parent =& $topelem->_parent;\r\n // remove the child from the tree\r\n $res = $node_parent->removeChild ($topelem, false);\r\n if (!$res) {\r\n return false;\r\n }\r\n $res = $this->_popNode ();\r\n if (!$res) {\r\n return false;\r\n }\r\n \r\n // now try to get the position of the object\r\n if ($topelem->occurredAt < 0) {\r\n return false;\r\n }\r\n // HACK: could it be necessary to set a different status\r\n // if yes, how should this be achieved? Another member of\r\n // StringParser_Node?\r\n $this->_setStatus (0);\r\n $res = $this->_appendText ($this->_text{$topelem->occurredAt});\r\n if (!$res) {\r\n return false;\r\n }\r\n \r\n $this->_cpos = $topelem->occurredAt + 1;\r\n $this->_recentlyReparsed = true;\r\n \r\n return true;\r\n }", "public function current()\n {\n\n $element = parent::current();\n $this->originalElement = $element;\n $mapped_element = array();\n $tldMapping = tc_cleverreach_tldmapping::getInstance();\n\n if ($element->newsid != null) {\n $mapped_element = $this->mapElementsIfNewsId($element);\n } else {\n $mapped_element['active'] = \"0\";\n $mapped_element['email'] = $element->oxuser__oxusername;\n $mapped_element['activated'] = time();\n $mapped_element['salutation'] = $element->oxuser__oxsal;\n $mapped_element['firstname'] = $element->oxuser__oxfname;\n $mapped_element['lastname'] = $element->oxuser__oxlname;\n }\n $mapped_element['registered'] = strtotime($element->oxuser__oxcreate);\n $mapped_element['company'] = $element->oxuser__oxcompany;\n $mapped_element['street'] = $element->oxuser__oxstreet . ' ' . $element->oxuser__oxstreetnr;\n $mapped_element['city'] = $element->oxuser__oxcity;\n $mapped_element['zip'] = $element->oxuser__oxzip;\n\n if ($element->oxuser__oxbirthdate != '0000-00-00') {\n $mapped_element['birthday'] = $element->oxuser__oxbirthdate;\n } else {\n $mapped_element['birthday'] = null;\n }\n\n $mapped_element['shop'] = $element->oxuser__oxshopid;\n\n if (\n $element->oxuser__oxcountryid !== '' &&\n $element->oxuser__oxcountryid !== null &&\n $element->oxuser__oxcountryid !== 'NULL'\n ) {\n $mapped_element['country'] = $element->oxcountry__oxtitle;\n $mapped_element['language'] = $tldMapping->getLanguageByISO2($element->oxcountry__oxisoalpha2);\n }\n\n if ($element->oxcountry__oxtitle == '') {\n // Staat und Sprache\n $mapped_element['country'] = $tldMapping->getCountryByEMail($mapped_element['email']);\n $mapped_element['language'] = $tldMapping->getLanguageByEMail($mapped_element['email']);\n }\n\n $productName =\n trim($element->oxorderarticles__oxtitle . \" \" . $element->oxorderarticles__oxselvariant);\n\n $mapped_element['order_id'] = $element->oxorder__oxordernr;\n $mapped_element['purchase_date'] = $this->createTimestamp($element->oxorder__oxorderdate);\n $mapped_element['source'] = $element->oxshops__oxname;\n $mapped_element['amount'] = $element->oxorderarticles__oxamount;\n $mapped_element['product_id'] = $element->oxorderarticles__oxartnum;\n $mapped_element['product'] = $productName;\n $mapped_element['price'] = $element->oxorderarticles__oxprice;\n\n return $mapped_element;\n }", "abstract protected function current();", "public function valid()\n\t{\n\t\treturn !($this->current === null || $this->current === false);\n\t}", "public function current() {\n $element = current($this->elements);\n return $element;\n }", "public function valid() \n {\n return ($this->current() !== false);\n }", "public function valid()\n\t{\n\t\treturn isset($this->_elementNames[$this->__position]);\n\t}", "public function valid()\n {\n return ($this->current() !== null) ? true : false;\n }", "public function current()\n\t{\n\t\t$name = $this->_elementNames[$this->__position];\n\t\treturn $this->get($name);\n\t}", "public function current() {\n $element = current($this->elements);\n\n return $element;\n }", "public function valid()\n\t\t{\n\t\t\treturn $this->current() !== false;\n\t\t}", "public function hasCurrent()\n {\n return $this->current !== null;\n }", "public function valid() {\n\t\treturn ($this->current() !== false);\n\t}", "public function valid()\r\n\t{\r\n\t\treturn isset($this->elements[$this->i]);\r\n\t}", "function current()\n\t{\n\t\tthrow new Exception('Accessing the value of an EmptyIterator');\n\t}", "function current(){}", "function current(){}", "function current(){}", "function current(){}", "function current(){}", "public function valid()\n {\n return ($this->current() != false);\n }", "public function current()\n {\n return $this->elements[$this->position];\n }", "public function valid(): bool\n {\n return $this->current() !== false;\n }", "public function valid()\n {\n // current() should return false. Needs to be tested.\n return (bool) $this->current();\n }", "public function valid()\n {\n return ($this->current() !== false);\n }", "public function valid() {\n $key = key($this->elements);\n\n $element = ($key !== NULL && $key !== FALSE);\n\n return $element;\n }", "private function checkCurrent() {\n\t\tif ($this->currentObjectWriter==null)\n\t\t\tthrow new AjapWriterException(\"Wrong State\");\n\t}", "public function current()\r\n\t{\r\n\t\treturn $this->elements[$this->i];\r\n\t}", "public function valid()\n {\n return (bool) $this->current();\n }", "public function valid()\n {\n return (bool) $this->current();\n }", "private function prepareCurrentItem()\n {\n $item = $this->registry->registry('current_item');\n $product = $this->registry->registry('current_product');\n\n if ($item && $product) {\n return;\n }\n\n try {\n $parentBlock = $this->getParentBlock();\n $layout = $this->getLayout();\n if ($layout) {\n $additionalProductInfoBlock = $layout->getBlock('additional.product.info');\n } else {\n $additionalProductInfoBlock = null;\n }\n\n if ($parentBlock) {\n $item = $parentBlock->getItem();\n } elseif ($additionalProductInfoBlock) {\n /** @var \\Magento\\Quote\\Model\\Quote\\Item $item */\n $item = $additionalProductInfoBlock->getItem();\n }\n\n if ($item) {\n $this->registry->unregister('current_item');\n $this->registry->register('current_item', $item);\n $this->registry->unregister('current_product');\n $this->registry->register('current_product', $item->getProduct());\n }\n } catch (LocalizedException $exception) {\n $this->_logger->error($exception->getLogMessage());\n }\n }", "function current() {\n return $this->iterators->valid() ?\n $this->getInnerIterator()->current() : NULL;\n }", "public function valid(): bool\n {\n return ($this->current() !== false);\n }", "public function current() {}", "public function current() {}", "public function current() {}", "public function current() {}", "public function current() {}", "public function current() {}", "public function current() {}", "public function current() {}", "public function current() {}", "public function element()\n {\n if (BacktrackLexer::NAME === $this->LA(1) && BacktrackLexer::EQUALS === $this->LA(2)) {\n $this->match(BacktrackLexer::NAME);\n $this->match(BacktrackLexer::EQUALS);\n $this->match(BacktrackLexer::NAME);\n }\n elseif (BacktrackLexer::NAME === $this->LA(1)) {\n $this->match(BacktrackLexer::NAME);\n }\n elseif (BacktrackLexer::LBRACK === $this->LA(1)) {\n $this->elementsList();\n }\n else {\n throw new NoViableAltException(\"Expecting element, found \" . $this->input->getTokenName($this->LT(1)->type));\n }\n }", "abstract public function isCurrent();", "protected function controlActiveElements() {}", "public function nextElement();", "public function nextElement();", "public function current();", "public function current();", "public function current();", "public function current();", "public function current();", "public function valid()\n {\n return ($this->position < $this->getDomList()->length);\n }", "public function completeNode() {\n $this->current = $this->current->parent();\n }", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function current()\n\t{\n\t\treturn parent::current();\n\t}", "public function valid() {\r\n \tif ($this->__pageItems > 0) {\r\n \t\tif ($this->key() + 1 > $this->pageEnd()) {\r\n \t\t\treturn FALSE;\r\n \t\t} else {\r\n \t\t\treturn $this->current() !== FALSE;\r\n \t\t}\r\n \t} else {\r\n \t\treturn $this->current() !== FALSE;\r\n \t}\r\n }", "public function current()\n {\n if (($this->isvalid) and (!librdf_iterator_end($this->iterator))) {\n // the pointer returned is overwritten when the iterator is\n // advanced or closed, so make a copy of the node\n $ret = librdf_iterator_get_object($this->iterator);\n if ($ret) {\n return LibRDF_Node::makeNode(librdf_new_node_from_node($ret));\n } else {\n throw new LibRDF_Error(\"Unable to get current node\");\n }\n } else {\n return NULL;\n }\n }", "protected function stopVirtualElement()\n {\n if (! $this->element or $this->reader->nodeType !== XMLReader::ELEMENT) {\n return;\n }\n\n if ($parent = $this->findVirtualElementById($this->element->get('@parent'))) {\n $key = $this->getPluralized($this->element->get('@element'));\n\n if (! $parent->has($key)) {\n $parent->put($key, new Collection);\n }\n\n if ($parent->get($key) instanceof Collection) {\n $parent->get($key)->push($this->element);\n }\n } else {\n $this->elements->push($this->element);\n }\n\n $this->element->forget(['@id', '@parent', '@element']);\n }", "public function valid()\n {\n return (\n !is_null($this->current) &&\n $this->dataStore->has($this->current[$this->dataStore->getIdentifier()])\n );\n }", "public function valid()\n {\n return isset($this->collection->getItems()[$this->position]);\n }", "function valid() {\r\n return isset($this->_data[$this->_position]);\r\n }", "public function checkElementsInDom() {\n\tforeach ($this->_elArray as $key => $el) {\n\t\tif(is_null($el->node->parentNode)) {\n\t\t\tunset($this->_elArray[$key]);\n\t\t}\n\t}\n\n\t$this->_elArray = array_values($this->_elArray);\n}", "public function _current();", "public function current() {\n\t\t$cur = parent::current();\n\t\t$res = false;\n\t\tif ( $cur !== false ) {\n\t\t\treturn RelatedChangeWatcher::newFromRow( $cur );\n\t\t}\n\t\treturn $res;\n\t}", "public function valid()\n {\n return isset($this->list[$this->position]);\n }", "public function current()\n {\n return parent::current();\n }", "public function current()\n {\n return parent::current();\n }" ]
[ "0.6778425", "0.6259352", "0.6253849", "0.62427837", "0.62004304", "0.6198294", "0.6146866", "0.61361384", "0.6069787", "0.6066588", "0.6064123", "0.60242957", "0.6023218", "0.5955001", "0.5954559", "0.59478784", "0.59338117", "0.59203774", "0.5907677", "0.5905347", "0.5899075", "0.58572555", "0.5854387", "0.58533", "0.5839604", "0.58225614", "0.58088344", "0.57986766", "0.579375", "0.579375", "0.579375", "0.579375", "0.579375", "0.57894325", "0.57881564", "0.57767886", "0.57504505", "0.5738592", "0.57365423", "0.5674548", "0.5664289", "0.56059545", "0.5603288", "0.55817705", "0.557317", "0.55711156", "0.5564952", "0.5564466", "0.5564466", "0.5564466", "0.5564466", "0.5564466", "0.5564466", "0.5564466", "0.5564466", "0.5556035", "0.5523224", "0.5521667", "0.5506805", "0.5506805", "0.54805744", "0.54805744", "0.54805744", "0.54805744", "0.54805744", "0.54729563", "0.545243", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5427034", "0.5411737", "0.5409946", "0.5407848", "0.5406304", "0.5399371", "0.5398131", "0.5389944", "0.5384505", "0.5361393", "0.5345782", "0.5345445", "0.5345445" ]
0.0
-1
Calculates count of characters in string.
public static function length($string) { if (function_exists('mb_strlen')) { return mb_strlen($string, static::getEncoding()); } if (function_exists('iconv_strlen')) { return iconv_strlen($string, static::getEncoding()); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function countChars($string)\n {\n // Get the length for the string we need.\n if (function_exists('mb_strlen')) {\n return mb_strlen($string, 'utf-8');\n }\n\n if (function_exists('iconv_strlen')) {\n return iconv_strlen($string, 'utf-8');\n }\n\n $count = count_chars($string);\n\n // 0x80 = 0x7F - 0 + 1 (one added to get inclusive range)\n // 0x33 = 0xF4 - 0x2C + 1 (one added to get inclusive range)\n return array_sum(array_slice($count, 0, 0x80)) + array_sum(array_slice($count, 0xC2, 0x33));\n }", "public function characterCount($text)\n {\n return Text::characterCount($text);\n }", "public function getCharactersCount()\n {\n return count($this->characters);\n }", "function returnCharacterCount(string $character, string $string): int\n {\n $counter = 0;\n\n for ($i = 0; $i < strlen($string); $i++) {\n if ($character == $string[$i]) {\n $counter++;\n }\n }\n return $counter;\n }", "public function spaceCharCount($str) {\n\t\treturn $this->len($str) - $this->nonSpaceCharCount($str);\n\t}", "public function getCharLength();", "public static function count($string)\n {\n return mb_strlen($string, '8bit');\n }", "public function nonSpaceCharCount($str) {\n\t\t$str = preg_replace('/\\s/u', '', $str);\n\t\treturn $this->len($str);\n\t}", "public function strlen($string) {\n\t\treturn grapheme_strlen($string);\n\t}", "#[\\ReturnTypeWillChange]\n public function count() {\n return mb_strlen($this->string);\n }", "public function getNumChars()\n {\n return count($this->getChrArray());\n }", "private function countDigits($string)\r\n {\r\n return strlen($string);\r\n }", "function mb_count_chars($input) {\r\n\t\t$l = mb_strlen($input);\r\n\t\t$unique = array();\r\n\t\tfor($i = 0; $i < $l; $i++) {\r\n\t\t\t$char = mb_substr($input, $i, 1);\r\n\t\t\tif(!array_key_exists($char, $unique))\r\n\t\t\t\t$unique[$char] = 0;\r\n\t\t\t$unique[$char]++;\r\n\t\t}\r\n\t\treturn $unique;\r\n\t}", "function countLengthNewlinesOneCharacter($string)\n {\n $countNewlines = preg_match_all('/\\n/', $string);\n $countCharacters = preg_match_all('/[\\S\\s]/', str_replace([\"\\n\", \"\\r\\n\", \"\\r\"],\"\",$string));\n return $countNewlines + $countCharacters;\n }", "public function strlen($string) {\r\n return iconv_strlen($string, $this->charset);\r\n }", "public static function NumberOfValidCharacters()\n {\n return strlen(self::$charSet);\n }", "public static function len( $str = '' ) {\n\t\tif ( empty( $str ) ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t$vals = array();\n\n\t\treturn preg_match_all( '/./u', $str, $vals );\n\t}", "function StringWordCount ($input, &$count)\n {\n\t $count = str_word_count($input);\n\t return $count;\n }", "private function len($str) {\n\t\treturn mb_strlen($str, $this->encoding);\n\t}", "function length( $string )\n\t\t{\n\t\t\treturn strlen( $string );\n\t\t}", "public static function length($string)\n\t{\n\t\tif (function_exists(\"mb_strlen\"))\n\t\t\treturn mb_strlen($string, self::ENCODING);\n\t\telse\n\t\t\treturn strlen($string);\n\t}", "public static function strlen($string, $encoding = 'UTF-8') {}", "public static function strlen($text) {\n return mb_strlen($text);\n }", "public static function length($s)\n\t{\n\t\treturn function_exists('mb_strlen') ? mb_strlen($s, 'UTF-8') : strlen(utf8_decode($s));\n\t}", "public static function countCharacters($value, $enc = '')\n {\n if ($enc === '' && self::getIsMbstringEnabled())\n $enc = mb_internal_encoding();\n \n if (self::getIsMbstringEnabled())\n return mb_strlen($value, $enc);\n \n if (self::getIsIconvEnabled())\n return iconv_strlen($value, $enc);\n \n return strlen($value);\n }", "function count_x($string) {\n if (empty($string)) {\n return 0;\n }\n $index = 0;\n return _count_x($string, $index);\n}", "public function strlen($str)\n {\n return iconv_strlen($str, $this->getEncoding());\n }", "public static function len($str)\n {\n return strlen($str);\n }", "function countUniqChars($s)\n{\n return count(array_unique(str_split($s)));\n}", "public function strlen($str)\n {\n return strlen($str);\n }", "function safe_strlen( $str, $encoding = false ) {\n\t// Allow for selective testings - \"1\" bit set tests grapheme_strlen(), \"2\" preg_match_all( '/\\X/u' ), \"4\" mb_strlen(), \"other\" strlen().\n\t$test_safe_strlen = getenv( 'PHP_CLI_TOOLS_TEST_SAFE_STRLEN' );\n\n\t// Assume UTF-8 if no encoding given - `grapheme_strlen()` will return null if given non-UTF-8 string.\n\tif ( ( ! $encoding || 'UTF-8' === $encoding ) && can_use_icu() && null !== ( $length = grapheme_strlen( $str ) ) ) {\n\t\tif ( ! $test_safe_strlen || ( $test_safe_strlen & 1 ) ) {\n\t\t\treturn $length;\n\t\t}\n\t}\n\t// Assume UTF-8 if no encoding given - `preg_match_all()` will return false if given non-UTF-8 string.\n\tif ( ( ! $encoding || 'UTF-8' === $encoding ) && can_use_pcre_x() && false !== ( $length = preg_match_all( '/\\X/u', $str, $dummy /*needed for PHP 5.3*/ ) ) ) {\n\t\tif ( ! $test_safe_strlen || ( $test_safe_strlen & 2 ) ) {\n\t\t\treturn $length;\n\t\t}\n\t}\n\t// Legacy encodings and old PHPs will reach here.\n\tif ( function_exists( 'mb_strlen' ) && ( $encoding || function_exists( 'mb_detect_encoding' ) ) ) {\n\t\tif ( ! $encoding ) {\n\t\t\t$encoding = mb_detect_encoding( $str, null, true /*strict*/ );\n\t\t}\n\t\t$length = $encoding ? mb_strlen( $str, $encoding ) : mb_strlen( $str ); // mbstring funcs can fail if given `$encoding` arg that evals to false.\n\t\tif ( 'UTF-8' === $encoding ) {\n\t\t\t// Subtract combining characters.\n\t\t\t$length -= preg_match_all( get_unicode_regexs( 'm' ), $str, $dummy /*needed for PHP 5.3*/ );\n\t\t}\n\t\tif ( ! $test_safe_strlen || ( $test_safe_strlen & 4 ) ) {\n\t\t\treturn $length;\n\t\t}\n\t}\n\treturn strlen( $str );\n}", "function countUniqChars($str)\n{\n if (strlen($str) === 0) {\n return 0;\n }\n $result = 0;\n $arrChar = [];\n $chars = str_split(mb_strtolower($str));\n foreach ($chars as $index => $char) {\n if (!in_array($chars[$index], $arrChar)) {\n $arrChar[$index] = $chars[$index];\n }\n } return count($arrChar);\n}", "function length(string $string): int\n{\n $length = grapheme_strlen($string);\n\n Psl\\invariant(null !== $length, 'unable to convert $string to UTF-16');\n Psl\\invariant(false !== $length, 'unable to split $string into graphemes');\n\n return $length;\n}", "public function length()\n {\n return UTF8::strlen($this->str, $this->encoding);\n }", "protected function substr_count($haystack, $needle) // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n {\n if ($this->encoding !== 'ASCII') {\n return \\mb_substr_count($haystack, $needle);\n }\n\n return \\substr_count($haystack, $needle);\n }", "function countAllCharacters() {\n $conn = databaseConn();\n\n $query = $conn->prepare(\"SELECT COUNT(*) FROM characters\");\n $query->execute();\n $rowsCount = $query->fetch();\n // $resultCount = $rowsCount[0];\n\n return $rowsCount[0];\n }", "private function str2charCountArray($str) {\n\t\treturn array_count_values($this->str2charArray($str));\n\t}", "function acf_strlen($str)\n{\n}", "function count_symbols($string){\r\n\t//Regex \\w is any non-letter, non-number: too broad\r\n\t//Better to list the ones that count\r\n\t//Escape regex symbols to gety their literal value\r\n\t$regex = '/['. preg_quote('!@#$%^&*-_+=?') . ']/';\r\n\treturn preg_match_all($regex, $string);\r\n}", "static public function getStringLength( $sString ) {\n return function_exists( 'mb_strlen' )\n ? mb_strlen( $sString )\n : strlen( $sString );\n }", "function countUniqChars($text)\n{\n $chars = str_split($text);\n $count = 0;\n $uniqChars = [];\n foreach ($chars as $char) {\n if (in_array($char, $uniqChars)) {\n continue;\n }\n $uniqChars[] = $char;\n $count++;\n }\n\n return $count;\n}", "static function length(string $s, string $encoding = null): int {\n if ($encoding) {\n return mb_strlen($s, $encoding);\n }\n\n return mb_strlen($s);\n }", "function length(string $string): int\n{\n $length = grapheme_strlen($string);\n\n if (null === $length || false === $length) {\n throw new Exception\\InvalidArgumentException('$string is node made of grapheme clusters.');\n }\n\n return $length;\n}", "public function count($substring = null) {\n if ($substring === null) {\n return mb_strlen($this->rawString, $this->charset);\n }\n else {\n return mb_substr_count($this->rawString, $substring, $this->charset);\n }\n }", "public function getGlyphsWidth($chars, $encoding = 'UTF-16BE') {}", "public function getGlyphsWidth($chars, $encoding = 'UTF-16BE') {}", "function strlen($str, $encoding = 'UTF-8') {\n if (function_exists('mb_strlen'))\n return mb_strlen($str, $encoding);\n else\n return strlen($str);\n}", "function strlenMBString( $str )\n {\n // NOTE:\n // Uses the mbstring function directly instead of going trough the class\n return mb_strlen( $str, $this->InputCharsetCode );\n }", "function str_utf8_mix_word_count($str = \"\"){\n\t$utf8_chinese_pattern=\"/[\\x{4e00}-\\x{9fff}\\x{f900}-\\x{faff}]/u\";\n\t$utf8_symbol_pattern=\"/[\\x{ff00}-\\x{ffef}\\x{2000}-\\x{206F}]/u\";\n $str = preg_replace($utf8_symbol_pattern, \"\", $str);\n return str_utf8_chinese_word_count($str) + strlen(preg_replace($utf8_chinese_pattern, \"\", $str));\n}", "function countHoles ($MyStr) {\n\n $letters = array (\n 'A' => 1,\n 'B' => 2,\n 'D' => 1,\n 'G' => 0\n );\n $count = 0;\n $count2 =0;\n $count3 =0;\n $characters = str_split ($MyStr, 1);\n\n foreach( $characters as $thisChar) {\n if ($letters[$thisChar] > 0){\n $count += $letters[$thisChar];\n }\n\n\n // Alternative short form for the if statement\n // $charVal is assigned the value found at the index or 0\n // depending if the key at the index matches the character\n // we are currently looking at.\n // Then we just add the value returned by the comparison\n // $charVal = $letters[$thisChar] || 0;\n // $count += $charVal;\n\n\n $charVal = $letters[$thisChar];\n if ($charVal)\n $count2 += $charVal;\n\n // To shorten this even more we could have said\n $charVal = $letters[$thisChar] || 0;\n $count3 += $charVal;\n }\n echo \"<br /> If statement counted \" . $count . \" holes.\";\n echo \"<br /> Short statement counted \". $count2 . \" holes.\";\n echo \"<br /> Ultra short form counted \". $count3 . \" holes\";\n return ($count);\n}", "function wordCount(string $string)\n{\n $wordCont = explode(' ', trim($string));\n return count($wordCont);\n}", "public static function wordCount($string) {\n $words = static::getWords($string);\n return count($words);\n }", "public function MBGetStringLength($s)\n {\n if ('Type0' == $this->CurrentFont['type']) {\n $len = 0;\n $nbbytes = strlen($s);\n for ($i = 0; $i < $nbbytes; ++$i) {\n if (ord($s[$i]) < 128) {\n ++$len;\n } else {\n ++$len;\n ++$i;\n }\n }\n\n return $len;\n }\n\n return strlen($s);\n }", "protected function getStringNumBytes($string)\n {\n $d = 0;\n $strlen_var = strlen($string);\n for ($c = 0; $c < $strlen_var; ++$c) {\n\n $ord_var_c = ord($string{$d});\n\n switch (true) {\n case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):\n $d++;\n break;\n case (($ord_var_c & 0xE0) == 0xC0):\n $d+=2;\n break;\n case (($ord_var_c & 0xF0) == 0xE0):\n $d+=3;\n break;\n case (($ord_var_c & 0xF8) == 0xF0):\n $d+=4;\n break;\n case (($ord_var_c & 0xFC) == 0xF8):\n $d+=5;\n break;\n case (($ord_var_c & 0xFE) == 0xFC):\n $d+=6;\n break;\n default:\n $d++;\n }\n }\n\n return $d;\n }", "public function getGlyphsWidth($chars, $encoding = 'UTF-16BE');", "function utf8_strlen(string $str): int\n{\n return \\strlen(\\utf8_decode($str));\n}", "function countWords($string)\n{\n\t$array = [];\n\t$array = explode(' ', $string);\n\t$sum = count($array);\n\treturn $sum;\n}", "function count_vowels($string){\r\n $kata = strtolower($string);\r\n $pecah = str_split($kata); \r\n $count=0;\r\n for ($i=0;$i<sizeof($pecah);$i++){\r\n if ($pecah[$i]== \"a\" || $pecah[$i]== \"i\" || $pecah[$i]== \"u\" || $pecah[$i]== \"e\"|| $pecah[$i] == \"o\"){\r\n $count++;\r\n }\r\n }\r\n \r\n echo $count;\r\n }", "function sumOfNumbersDividedByNumberOfLetters($string) {\n\t$characters = str_split($string);\n\t// var_dump($characters);\n\t$letters = [];\n\t$numbers = [];\n\n\tforeach ($characters as $char) {\n\t\tif (ctype_alpha($char)) {\n\t\t\tarray_push($letters, $char);\n\t\t} elseif (ctype_digit($char)) {\n\t\t\t$numbers[] += $char;\n\t\t}\n\t}\n\treturn round(array_sum($numbers) / count($letters));\n}", "function MBGetStringLength($s){\r\n if($this->CurrentFont['type']=='Type0')\r\n {\r\n $len = 0;\r\n $nbbytes = strlen($s);\r\n for ($i = 0; $i < $nbbytes; $i++)\r\n {\r\n if (ord($s[$i])<128)\r\n $len++;\r\n else\r\n {\r\n $len++;\r\n $i++;\r\n }\r\n }\r\n return $len;\r\n }\r\n else\r\n return strlen($s);\r\n }", "function MBGetStringLength($s)\n\t{\n\t\tif($this->CurrentFont['type']=='Type0')\n\t\t{\n\t\t\t$len = 0;\n\t\t\t$nbbytes = strlen($s);\n\t\t\tfor ($i = 0; $i < $nbbytes; $i++)\n\t\t\t{\n\t\t\t\tif (ord($s[$i])<128)\n\t\t\t\t\t$len++;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$len++;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $len;\n\t\t}\n\t\telse\n\t\t\treturn strlen($s);\n\t}", "function charCounter($c, array $grid): int {\n $total = 0;\n $h = count($grid);\n $w = count($grid[array_keys($grid)[0]]);\n $y0 = min(array_keys($grid));\n $x0 = min(array_keys($grid[array_keys($grid)[0]]));\n for ($y = $y0; $y < $y0 + $h; $y++) {\n for ($x = $x0; $x < $x0 + $w; $x++) {\n if ($grid[$y][$x] === $c) {\n $total++;\n }\n }\n }\n return $total;\n }", "public static function strlen_in_byte(string $str): int\n {\n if ($str === '') {\n return 0;\n }\n\n if (self::$SUPPORT['mbstring_func_overload'] === true) {\n // \"mb_\" is available if overload is used, so use it ...\n return \\mb_strlen($str, 'CP850'); // 8-BIT\n }\n\n return \\strlen($str);\n }", "function MBGetStringLength($s)\n\n {\n\n if($this->CurrentFont['type']=='Type0')\n\n {\n\n $len = 0;\n\n $nbbytes = strlen($s);\n\n for ($i = 0; $i < $nbbytes; $i++)\n\n {\n\n if (ord($s[$i])<128)\n\n $len++;\n\n else\n\n {\n\n $len++;\n\n $i++;\n\n }\n\n }\n\n return $len;\n\n }\n\n else\n\n return strlen($s);\n\n }", "function MBGetStringLength($s)\n\n {\n\n if($this->CurrentFont['type']=='Type0')\n\n {\n\n $len = 0;\n\n $nbbytes = strlen($s);\n\n for ($i = 0; $i < $nbbytes; $i++)\n\n {\n\n if (ord($s[$i])<128)\n\n $len++;\n\n else\n\n {\n\n $len++;\n\n $i++;\n\n }\n\n }\n\n return $len;\n\n }\n\n else\n\n return strlen($s);\n\n }", "function GetStringWidth($s)\n\t\t{\n\t\t\t$s=(string)$s;\n\t\t\t$cw=&$this->CurrentFont['cw'];\n\t\t\t$w=0;\n\t\t\t$l=strlen($s);\n\t\t\tfor($i=0;$i<$l;$i++) $w+=$cw[$s{$i}];\n\t\t\treturn $w*$this->FontSize/1000;\n\t\t}", "function repeatedString($s, $n)\n{\n\n $a = 0;\n $aTotal = 0;\n $contador = floor($n/strlen($s));\n $resto = $n%strlen($s);\n\n for($i=0 ; $i <strlen($s) ; $i++) if($s[$i] == \"a\" ) $a++;\n\n $aTotal = $contador*$a;\n\n for( $i = 0 ; $i < $resto ; $i++) if($s[$i] == \"a\") $aTotal++;\n\n return $aTotal;\n}", "function MBGetStringLength($s)\n {\n if($this->CurrentFont['type']=='Type0')\n {\n $len = 0;\n $nbbytes = strlen($s);\n for ($i = 0; $i < $nbbytes; $i++)\n {\n if (ord($s[$i])<128)\n $len++;\n else\n {\n $len++;\n $i++;\n }\n }\n return $len;\n }\n else\n return strlen($s);\n }", "function MBGetStringLength($s)\n {\n if($this->CurrentFont['type']=='Type0')\n {\n $len = 0;\n $nbbytes = strlen($s);\n for ($i = 0; $i < $nbbytes; $i++)\n {\n if (ord($s[$i])<128)\n $len++;\n else\n {\n $len++;\n $i++;\n }\n }\n return $len;\n }\n else\n return strlen($s);\n }", "function MBGetStringLength($s)\n {\n if($this->CurrentFont['type']=='Type0')\n {\n $len = 0;\n $nbbytes = strlen($s);\n for ($i = 0; $i < $nbbytes; $i++)\n {\n if (ord($s[$i])<128)\n $len++;\n else\n {\n $len++;\n $i++;\n }\n }\n return $len;\n }\n else\n return strlen($s);\n }", "function MBGetStringLength($s)\n {\n if($this->CurrentFont['type']=='Type0')\n {\n $len = 0;\n $nbbytes = strlen($s);\n for ($i = 0; $i < $nbbytes; $i++)\n {\n if (ord($s[$i])<128)\n $len++;\n else\n {\n $len++;\n $i++;\n }\n }\n return $len;\n }\n else\n return strlen($s);\n }", "public function getTextLength();", "public static function taggedStrLen($str)\n {\n return mb_strlen(preg_replace('/\n<[^>]*>/u', '', $str));\n }", "public function strlen($date)\n {\n echo \"<h3><u> length of a string of $date </h2></u>\";\n $a=strlen($date);\n echo $a;\n echo \"<hr>\";\n }", "public function countPossibilities()\n {\n $count = 0;\n foreach($this->dictionary as $charGroup) {\n if($count === 0) {\n $count = count($charGroup);\n } else {\n $count = $count * count($charGroup);\n }\n }\n return $count;\n }", "public static function strlen($str) {\n return preg_match_all('/[\\x01-\\x7F]|[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF][\\x80-\\xBF]/', $str, $arr);\n }", "public function getRealLength($string)\n\t{\n\t\treturn strlen(preg_replace('@\\[([a-zA-Z0-9-_=]+)\\].+\\[/\\1\\]|\\[(\\/?[a-zA-Z0-9-_=]+)\\]@i', '', strip_tags($string)));\n\t}", "public function getLength()\n {\n if (function_exists('mb_strlen')) {\n return mb_strlen($this->text, 'UTF-8');\n }\n\n // @codeCoverageIgnoreStart\n return preg_match_all(\"/[\\\\\\\\x00-\\\\\\\\xBF]|[\\\\\\\\xC0-\\\\\\\\xFF][\\\\\\\\x80-\\\\\\\\xBF]*/\", $this->text);\n // @codeCoverageIgnoreEnd\n }", "protected function getCharSetCount($strWord)\n\t{\n\t\t$charSetCount = 0;\n\t\t\n\t\t/* alpha character set */\n\t\tif (preg_match('/([a-zA-Z]+)/', $strWord))\n\t\t\t$charSetCount++;\n\n\t\t/* numeric character set */\n\t\tif (preg_match('/([0-9]+)/', $strWord))\n\t\t\t$charSetCount++;\n\t\t\t\n\t\t/* allowed symbols set */\n\t\t$symbols = '';\n\t\t\n\t\tforeach($this->allowedSymbols as $value)\n\t\t\t$symbols .= $value;\n\t\t\t\n\t\tif (preg_match('/(['.$symbols.']+)/', $strWord))\n\t\t\t$charSetCount++;\n\t\t\t\n\t\treturn $charSetCount;\n\n\t}", "public function getLength($input)\r\n {\r\n if (is_scalar($input)) {\r\n if ($this->countByChars) {\r\n return mb_strlen($input, $this->charset);\r\n } else {\r\n return strlen($input);\r\n }\r\n } elseif (is_array($input) || $input instanceof \\Countable) {\r\n return count($input);\r\n } else {\r\n return false;\r\n }\r\n }", "public static function byteLength($string)\n {\n return mb_strlen($string, '8bit');\n }", "function tep_word_count($string, $needle) {\n\t$temp_array = split($needle, $string);\n\treturn sizeof($temp_array);\n}", "public static function substr_count($haystack, $needle) {\n return substr_count($haystack, $needle);\n }", "public function calculate_number_of_equal_first_characters(){\n $counter = 0;\n for ($key=0; $key<strlen($this->initial_word); $key++) {\n if($this->initial_word[$key] == $this->final_word[$key]){\n $counter += 1;\n }else{\n $this->number_of_equal_first_characters = $counter;\n return;\n }\n }\n $this->number_of_equal_first_characters = $counter;\n }", "function GetSJISStringWidth($s)\r\n {\r\n $l=0;\r\n $cw=&$this->CurrentFont['cw'];\r\n $nb=strlen($s);\r\n $i=0;\r\n while($i<$nb)\r\n {\r\n $o=ord($s{$i});\r\n if($o<128)\r\n {\r\n //ASCII\r\n $l+=$cw[$s{$i}];\r\n $i++;\r\n }\r\n elseif($o>=161 and $o<=223)\r\n {\r\n //Half-width katakana\r\n $l+=500;\r\n $i++;\r\n }\r\n else\r\n {\r\n //Full-width character\r\n $l+=1000;\r\n $i+=2;\r\n }\r\n }\r\n return $l*$this->FontSize/1000;\r\n }", "function countUniqChars($text)\n{\n $unique = [];\n foreach (array_diff(str_split($text), [null]) as $char) {\n if (!in_array($char, $unique)) {\n $unique[] = $char;\n }\n }\n return count($unique);\n}", "static function SmartLen($str)\n\t{\n\t\treturn strlen($str) + substr_count($str, \"\\t\") * 3; // 4-space tab\n\t}", "public static function substr_count_simple(\n string $str,\n string $substring,\n bool $case_sensitive = true,\n string $encoding = 'UTF-8'\n ): int {\n if ($str === '' || $substring === '') {\n return 0;\n }\n\n if ($encoding === 'UTF-8') {\n if ($case_sensitive) {\n return (int) \\mb_substr_count($str, $substring);\n }\n\n return (int) \\mb_substr_count(\n \\mb_strtoupper($str),\n \\mb_strtoupper($substring)\n );\n }\n\n $encoding = self::normalize_encoding($encoding, 'UTF-8');\n\n if ($case_sensitive) {\n return (int) \\mb_substr_count($str, $substring, $encoding);\n }\n\n return (int) \\mb_substr_count(\n self::strtocasefold($str, true, false, $encoding, null, false),\n self::strtocasefold($substring, true, false, $encoding, null, false),\n $encoding\n );\n }", "function _strlen($binary_string) {\r\n if (function_exists('mb_strlen')) {\r\n return mb_strlen($binary_string, '8bit');\r\n }\r\n return strlen($binary_string);\r\n }", "public function count(): int\n {\n return count($this->delimiters);\n }", "private function countLength() {\n\n $this->_length = strlen($this->_value);\n }", "public function getNumGlyphs() {}", "public function getNumGlyphs() {}", "function pun_strlen($str)\r\n{\r\n\treturn strlen(preg_replace('/&#([0-9]+);/', '!', $str));\r\n}", "public function str_word_count_utf8($str)\n {\n return count(preg_split('~[^\\p{L}\\p{N}\\']+~u', $str));\n }", "public static function stringLength($value)\n {\n return mb_strlen($value);\n }", "function getOcurrencesLetters($book) {\n $count = array();\n $strlen = strlen($book); // O(1)\n for ($i = 0; $i <= $strlen; $i++) {\n $char = substr($book, $i, 1);\n if ($char) {\n if (!isset($count[$char])) {\n $count[$char] = 0;\n }\n $count[$char] += 1;\n }\n }\n return $count;\n}", "function realStringLength($str) {\n return mb_strlen($str, \"UTF-8\");\n}", "function txt_mb_strlen( $t )\n\t{\n\t\treturn strlen( preg_replace(\"/&#([0-9]+);/\", \"-\", $this->txt_stripslashes( $t ) ) );\n }", "public function count() {\n\t\treturn $this->length();\n\t}" ]
[ "0.77118397", "0.7366129", "0.7349283", "0.7327655", "0.7169423", "0.7118719", "0.71045756", "0.70663476", "0.70502204", "0.7037784", "0.7028235", "0.6968039", "0.6925982", "0.68644637", "0.6788817", "0.67493945", "0.6704958", "0.6658022", "0.6592667", "0.6591739", "0.65839803", "0.6510708", "0.6456103", "0.64401203", "0.6432192", "0.64255226", "0.6414583", "0.63659996", "0.6340181", "0.62419015", "0.62227887", "0.6222304", "0.6204346", "0.61878574", "0.6176247", "0.615555", "0.61504275", "0.6141158", "0.6118595", "0.60928786", "0.6064854", "0.60583144", "0.60393", "0.6035788", "0.6009231", "0.6009183", "0.59911346", "0.59906936", "0.5987754", "0.59864515", "0.59427994", "0.5935619", "0.5933307", "0.59287345", "0.5927145", "0.5921624", "0.59108955", "0.58987606", "0.5878508", "0.5875501", "0.5871014", "0.5861278", "0.58165324", "0.5813478", "0.5813478", "0.58058506", "0.5801739", "0.57923704", "0.57923704", "0.57923704", "0.57923704", "0.5742562", "0.5739784", "0.5713926", "0.57110226", "0.56989896", "0.56868094", "0.5680114", "0.56684965", "0.56668323", "0.5666395", "0.5664863", "0.56621104", "0.56613135", "0.5645787", "0.5642833", "0.56338966", "0.5622051", "0.55955535", "0.5587741", "0.55730855", "0.55411977", "0.55411977", "0.5536053", "0.55319095", "0.5523415", "0.55114925", "0.55107933", "0.5509101", "0.5503417" ]
0.59988064
46
Returns encoding used for all operations
public static function getEncoding() { return static::$encoding ?: 'utf-8'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEncoding();", "public function getEncoding(): string;", "public function encoding()\n {\n return $this->getEncoding();\n }", "public function get_encoding()\n {\n }", "protected static function encoding()\n {\n return static::$encoding;\n }", "public function getEncodingFrom()\n {\n return $this->getInputEncoding();\n }", "public function getEncoding(){\n\t\treturn $this->encoding;\n\t}", "public function getEncoding(): string\n {\n return $this->encoding;\n }", "public function getEncoding(): string\n {\n return $this->encoding;\n }", "public function getEncoder();", "public function getEncoder();", "public function getEncoding()\n {\n return $this->encoding;\n }", "public function getEncoded();", "function getEncoding(): string\n {\n return $this->getEncodingInfo()['encoding'];\n }", "public function getEncoding()\n {\n return $this->encoding;\n }", "public function getEncoding()\n {\n return $this->encoding;\n }", "public function getEncoding()\n {\n return $this->encoding;\n }", "public function getEncoding()\n {\n return $this->encoding;\n }", "public function getEncoding() {\n\t\treturn $this->encoding;\n\t}", "public function getEncoding()\n {\n return $this->_encoding;\n }", "public function getEncoding()\n {\n return $this->_encoding;\n }", "public function getEncoding()\n {\n if (!isset($this->encoding)) {\n $encoding = ps_get_parameter($this->document->resource, 'imageencoding', $this->id);\n $this->encoding = $encoding === 'hex' ? self::ENCODING_HEX : self::ENCODING_85;\n }\n\n return $this->encoding;\n }", "public function getContentEncoding();", "public function getOutputEncoding(): string {\n\t\t\treturn $this->outputEncoding;\n\t\t}", "abstract public function encode();", "public function getInputEncoding()\n {\n return $this->input_encoding;\n }", "public function getContentEncoding()\n {\n }", "public function encode()\n {\n }", "public function getCodec();", "public function getCodec();", "protected function getEncoding(): int\n {\n return $this->encoding;\n }", "function getEncoding ()\n\t{\n\t\treturn $this->doc->encoding;\n\t}", "public function getEncoding()\r\n\t{\r\n\t\treturn $this->m_charset;\r\n\t}", "function getEncoding() {\n\t\treturn mysql_client_encoding($this->connection);\n\t}", "public function getContentTransferEncoding(): string\n {\n if ($this->transferEncoding) {\n return $this->transferEncoding;\n }\n\n $charset = strtoupper($this->charset);\n if (in_array($charset, $this->charset8bit, true)) {\n return '8bit';\n }\n\n return '7bit';\n }", "public function getContentEncoding() {\n return $this->content_encoding;\n }", "public function getEncoder()\n {\n return $this->encoder;\n }", "public function getEncoding()\n {\n return $this->getDomDocument()->encoding;\n }", "function getDatabaseEncoding() {\n\t\t$sql = \"SELECT getdatabaseencoding() AS encoding\";\n\n\t\treturn $this->selectField($sql, 'encoding');\n\t}", "public function getEncoding()\n {\n return pg_client_encoding($this->connection);\n }", "public function getEncodingID()\n {\n return $this->encodingID;\n }", "public function getEncodeOptions(){\n\t\treturn $this->options;\n\t}", "public function getFinalEncode() {\r\n\t\treturn $this->finalEncode;\r\n\t}", "protected function getEncoder()\n\t{\n\t\treturn $this->encoder;\n\t}", "function getXMLEncoding() {\n\t\treturn $this->m_xmlEncoding;\n\t}", "public function encoding($encoding);", "function getXmlEncoding()\n {\n return $this->_props['XmlEncoding'];\n }", "function getEncoding() {\n\t\treturn $this->fetchRow('PRAGMA encoding');\n\t}", "public static function content_encoding()\n {\n }", "public function getInputEncoding(): ?string {\n\t\t\treturn $this->inputEncoding;\n\t\t}", "public function getEncodingFilter()\n {\n return $this->encodingFilter;\n }", "protected function _getEncodingTable() {}", "protected function _getEncodingTable() {}", "protected function _getEncodingTable() {}", "public function getEncoding()\n {\n return $this->fetchRow('PRAGMA encoding');\n }", "abstract protected function _getEncodingTable();", "public function getEncoding()\r\n\t{\r\n\t\t//TODO: Parse the raw response header info for content type\r\n\t\t//EXAMPLE OF RETURNED DATA FROM $this->_solrResponse->getRawResponseHeaders()\r\n\t\t/*\r\n\t\t\"HTTP/1.1 200 OK\r\n\t\tContent-Type: text/xml; charset=utf-8\r\n\t\tContent-Length: 764\r\n\t\tServer: Jetty(6.1.3)\r\n\r\n\t\t\"\r\n\t\t*/\r\n\t\treturn 'utf-8';\r\n\t}", "public function getEncoder()\n {\n return $this;\n }", "function getDoXmlUtf8Encoding()\n {\n return $this->_props['DoXmlUtf8Encoding'];\n }", "public function getEncodings()\n {\n return $this->_encodings;\n }", "function getEncoding($normalize = false){\n\t\tif($normalize){\n\t\t\treturn Translate::_GetCharsetByName($this->_Encoding);\n\t\t}\n\t\treturn $this->_Encoding;\n\t}", "public abstract function getContentTransferEncoding();", "public function getAcceptEncoding(): string\n {\n $headers = $this->getHeaders();\n return isset($headers[HeadersInterface::ACCEPT_ENCODING])\n ? $headers[HeadersInterface::ACCEPT_ENCODING]\n : '';\n }", "public static function getSupportedEncodings()\n {\n return static::$encodings;\n }", "public function getContentEncoding(): ?string\n {\n }", "function __toString(){\n\t\treturn \"UTF-8\";\n\t}", "public function getBaseEncodingTable() {}", "public function getBaseEncodingTable() {}", "public function getBaseEncodingTable() {}", "public function getBaseEncodingTable() {}", "public function getBaseEncodingTable() {}", "public function getBaseEncodingTable() {}", "function getEncoding($conn)\n\t{\n\t\treturn pg_client_encoding($conn);\n\t}", "abstract public function encode(array $options = array());", "public function getCharacterEncoding(): CharacterEncodingInterface;", "function _encode($text)\r\n\t{\r\n\t\t$source_encoding = mb_detect_encoding($text);\r\n\t\t$target_encoding = _get_codeset();\r\n\t\tif ($source_encoding != $target_encoding) {\r\n\t\t\treturn mb_convert_encoding($text, $target_encoding, $source_encoding);\r\n\t\t} else {\r\n\t\t\treturn $text;\r\n\t\t}\r\n\t}", "public function getMessageEncoding() {\n\t\treturn $this->messageEncoding ?: static::config()->default_message_encoding;\n\t}", "function encode($name){\n\t\treturn $name->toUTF8();\n\t}", "public function encode($data) {}", "public function encode($data) {}", "public function encode($data) {}", "public function encode($data) {}", "public function encode($data) {}", "public function encode(): array;", "public function encodeEncodesCorrectlyDataProvider() {}", "abstract function encode($data);", "abstract public static function encode($data): string;", "function encode($input) {\n\t\t$output = $this->get(NULL, $input);\n\t\treturn $output; \n\t}", "public function getAllowEncoding()\n {\n return $this->allowEncoding;\n }", "function acoc_encode( $value ) {\n\n $func = 'base64' . '_encode';\n return $func( $value );\n \n}", "public function getMimeEncoding()\n\t{\n\t\treturn $this->_mime;\n\t}", "protected function getCharsetConversion() {}", "function GetAnsiEncoding() { return 'windows-1252'; }", "public function encode($data);", "public function encode($data);", "public function encode($data);", "public function getEncoding(object|string $structure): string {\n if (property_exists($structure, 'parameters')) {\n foreach ($structure->parameters as $parameter) {\n if (strtolower($parameter->attribute) == \"charset\") {\n return EncodingAliases::get($parameter->value, $this->fallback_encoding);\n }\n }\n } elseif (property_exists($structure, 'charset')) {\n return EncodingAliases::get($structure->charset, $this->fallback_encoding);\n } elseif (is_string($structure) === true) {\n $result = mb_detect_encoding($structure);\n return $result === false ? $this->fallback_encoding : $result;\n }\n\n return $this->fallback_encoding;\n }", "abstract public function encode($data);", "public static function getDefaultEncodingFilter()\n {\n return Form::$defaultEncodingFilter;\n }", "function si_mysql_client_encoding() {\r\n\t\tif (function_exists('mysql_client_encoding')) return mysql_client_encoding();\r\n\t\telse return \"\";\r\n\t}" ]
[ "0.79944247", "0.79384786", "0.786824", "0.7823397", "0.76029164", "0.75511575", "0.7536249", "0.752952", "0.752952", "0.74988914", "0.74988914", "0.7470256", "0.74104", "0.73959696", "0.7390851", "0.7390851", "0.7390851", "0.7390851", "0.73743224", "0.72644585", "0.72644585", "0.72457665", "0.7241985", "0.71861154", "0.7158783", "0.7141157", "0.7093919", "0.70808417", "0.7045853", "0.7045853", "0.70338005", "0.70104563", "0.70036274", "0.69329524", "0.6807681", "0.6740396", "0.67171764", "0.6711222", "0.67058766", "0.66915745", "0.6671943", "0.65740585", "0.65361345", "0.6521601", "0.6519995", "0.64960545", "0.64941996", "0.64788175", "0.6462335", "0.6458716", "0.6445566", "0.642209", "0.642209", "0.6421168", "0.6405114", "0.64049464", "0.640169", "0.6399627", "0.6386651", "0.6358825", "0.63132775", "0.6309697", "0.63060856", "0.6284026", "0.62818146", "0.6263752", "0.624944", "0.624944", "0.6249415", "0.6249415", "0.6249415", "0.6249415", "0.6247484", "0.62304133", "0.6217626", "0.6189954", "0.61847365", "0.61510646", "0.61389554", "0.61383", "0.61383", "0.61383", "0.61383", "0.61189634", "0.6083646", "0.6083356", "0.60772896", "0.60680103", "0.60639435", "0.60125446", "0.6007571", "0.60040617", "0.6002639", "0.5991798", "0.5991798", "0.5991798", "0.5989839", "0.59895056", "0.5947372", "0.59377867" ]
0.7038029
30
Sets encoding for all operations
public static function setEncoding($encoding) { static::$encoding = $encoding; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setEncoding($encode){\n\t\t$this->encodetext=$encode;\n\t}", "public static function setCharsetEncoding () {\r\n\t\tif ( self::$instance == null ) {\r\n\t\t\tself::getInstance ();\r\n\t\t}\r\n\t\tself::$instance->exec (\r\n\t\t\t\"SET NAMES 'utf8';\r\n\t\t\tSET character_set_connection=utf8;\r\n\t\t\tSET character_set_client=utf8;\r\n\t\t\tSET character_set_results=utf8\" );\r\n\t}", "public function encoding($encoding);", "public function updateAutoEncoding() {}", "public function get_encoding()\n {\n }", "public function setEncoding(Encode $encode)\n {\n $this->encode = $encode;\n }", "public function characterSetEncode($charset) {\n if ($this->characterSetEncodeFile && isset($this->element->mimeTypeDetails['charsetUpdatable']) && $this->element->mimeTypeDetails['charsetUpdatable'] && $charset != $this->element->characterSet) {\n $this->element->oldCharacterSet = $this->element->characterSet;\n \n //Set file content to the encoded string of the file\n $this->element->fileContent = mb_convert_encoding(file_get_contents($this->element->path.$this->element->fileName),$this->characterSet,$this->element->oldCharacterSet);\n \n //Add Conversion To Element\n $this->element->fileContentConversions['charset'][] = $charset;\n \n $this->element->characterSet = $this->characterSet; \n } else {\n $this->element->fileContent = file_get_contents($this->element->path.$this->element->fileName);\n }\n }", "public function getContentEncoding()\n {\n }", "public function encode()\n {\n }", "public function setEncoding($encoding) {\n\t\t$this->encoding = is_null($encoding) ? \"ASCII\" : $encoding;\n\t}", "public function setAll(array $data, $encoding = 'UTF-8') {}", "function setEncoding( $encoding )\n\t{\n\t\t$this->encoding\t=\t$encoding;\n\t}", "public static function content_encoding()\n {\n }", "final public function setUTF() {\n mysqli_query($this->resourceId,\"SET NAMES 'utf8'\");\n }", "function setEncoding ($a_encode,$a_overwrite = false)\n\t{\n\t\tif (empty($this->doc->encoding) or ($a_overwrite)) {\n\t\t\t$this->doc->encoding = $a_encode;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function getEncoding();", "public function setObjectEncoding($encoding);", "abstract public function encode();", "public static function change_encoding($data, $input, $output)\n {\n }", "function setXmlEncoding($value)\n {\n $this->_props['XmlEncoding'] = $value;\n }", "public function setEncoding($encoding) {\r\r\n\t\t$this->encoding = $encoding;\r\r\n\t}", "function setDoXmlUtf8Encoding($value)\n {\n $this->_props['DoXmlUtf8Encoding'] = $value;\n }", "public function getEncoding(): string;", "public static function encoding($charset)\n {\n }", "public function getContentEncoding();", "public function getEncoding(){\n\t\treturn $this->encoding;\n\t}", "public function encoding()\n {\n return $this->getEncoding();\n }", "public function set_input_encoding($encoding = \\false)\n {\n }", "private function _setUTFEncoder($encoder = 'iconv')\n\t{\n\t\t$this->_encoderFunction = '';\n\t\tif ($encoder == 'iconv') {\n\t\t\t$this->_encoderFunction = function_exists('iconv') ? 'iconv' : 'mb_convert_encoding';\n\n\t\t} elseif ($encoder == 'mb') {\n\n\t\t}\n\t}", "private function set_charset() {\n\t\t//regresa bool\n\t\t$this->conn->set_charset(\"utf8\");\n\t}", "protected static function encoding()\n {\n return static::$encoding;\n }", "public function getEncoding()\n {\n return $this->encoding;\n }", "protected function _getEncodingTable() {}", "protected function _getEncodingTable() {}", "protected function _getEncodingTable() {}", "function setCharEncoding($sEncoding)\n\t{\n\t\t$this->sEncoding = $sEncoding;\n\t}", "protected function setCharacterSet() {}", "function encode($encoding, $errors=false, $normalize=true) {\n // TODO: Normalize the encoding name\n if (0 === strcasecmp($encoding, $this->encoding))\n // No change was requested. Just return the object unchanged\n return $this;\n return Codec::encode($this, $encoding, $errors);\n }", "public function setCharEncoding($encoding) {\n\t\t$this->_text[$this->_lineNumber][$this->_section]['encoding']=$encoding;\n\t}", "function set_encoding($encoding=\"\")\r\n {\r\n if(\"\" == $encoding)\r\n $encoding = $this->encoding;\r\n $sql = \"SET SESSION character_set_database = \" . $encoding; //'character_set_database' MySQL server variable is [also] to parse file with rigth encoding\r\n $res = @mysql_query($sql);\r\n return mysql_error();\r\n }", "public function passOnEncodingAuto()\n {\n return false;\n }", "function setCodeStat($encode){\n\t\t$this->encodestat=$encode;\n\t}", "function wp_set_internal_encoding()\n {\n }", "public function setOutputEncoding( $encoding ) {\n\t\t$this->defaultEncoding = $encoding;\n\t}", "function Set_CharacterEncoding($charSet)\r\n\t{\r\n $this->_charEncoding = $charSet;\r\n\t}", "abstract protected function _getEncodingTable();", "abstract public function setUTF();", "function setEncoding($enc) {\n\t\treturn $this->_execute('SET NAMES ' . $enc) != false;\n\t}", "public function setEncoding(string $encoding) {\n\t\t$this->_encoding = $encoding;\n\t}", "protected function getCharsetConversion() {}", "public function encodeEncodesCorrectlyDataProvider() {}", "public function getEncoding()\n {\n return $this->encoding;\n }", "public function getEncoding()\n {\n return $this->encoding;\n }", "public function getEncoding()\n {\n return $this->encoding;\n }", "public function getEncoding()\n {\n return $this->encoding;\n }", "abstract protected function encodingTables();", "function _encode($text)\r\n\t{\r\n\t\t$source_encoding = mb_detect_encoding($text);\r\n\t\t$target_encoding = _get_codeset();\r\n\t\tif ($source_encoding != $target_encoding) {\r\n\t\t\treturn mb_convert_encoding($text, $target_encoding, $source_encoding);\r\n\t\t} else {\r\n\t\t\treturn $text;\r\n\t\t}\r\n\t}", "function _encoding($val)\n{\n\tif ( is_string($val) )\n\t\t$val = iconv('cp1251', 'utf-8', $val);\n\t\n\tif ( is_array($val) )\n\t\tforeach ($val as $k => $v)\n\t\t\t\t$val[$k] = _encoding($v);\n\t\t\t\t\n\treturn $val;\n}", "private function charset()\n\t{\n\t\tif (isset($this->_conf['charset']) AND $this->_conf['charset'] != '')\n\t\t{\n\t\t\tif (isset($this->_conf['collation']) AND $this->_conf['collation'] != '')\n\t\t\t{\n\t\t\t\t$this->_con->exec('SET NAMES '.$this->_conf['charset'].' COLLATE '.$this->_conf['collation']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->_con->exec('SET NAMES '.$this->_conf['charset']);\n\t\t\t}\n\t\t}\n\t}", "public function fixCharsets() {}", "abstract protected function set_charset($charset);", "public function convPOSTCharset() {}", "public function getEncoding() {\n\t\treturn $this->encoding;\n\t}", "public function setCharset($charset)\n {\n parent::setCharset($charset);\n if (isset($this->paramEncoder)) {\n $this->paramEncoder->charsetChanged($charset);\n }\n }", "public function getEncoding()\n {\n return $this->_encoding;\n }", "public function getEncoding()\n {\n return $this->_encoding;\n }", "function setEncoding($enc) {\n\t\tif (!in_array($enc, array(\"UTF-8\", \"UTF-16\", \"UTF-16le\", \"UTF-16be\"))) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->_execute(\"PRAGMA encoding = \\\"{$enc}\\\"\") !== false;\n\t}", "protected function setUtf8Context()\n {\n setlocale(LC_ALL, $locale = 'en_US.UTF-8');\n putenv('LC_ALL=' . $locale);\n }", "public function setCharset($charset);", "public function encode($data) {}", "public function encode($data) {}", "public function encode($data) {}", "public function encode($data) {}", "public function encode($data) {}", "function setXMLEncoding($xmlEncoding) {\n\t\t$this->m_xmlEncoding = $xmlEncoding;\n\t}", "protected static function resolveDefaultEncoding() {}", "function _encoding(&$text, $in_charset, $out_charset)\r\n\t{\r\n\t\t// refer to schinese.php for example\r\n\t\t$text =& XoopsLocal::convert_encoding($text, $out_charset, $in_charset);\r\n\t}", "protected function setUtf8Context()\n {\n $locale = 'en_US.UTF-8';\n setlocale(LC_ALL, $locale);\n putenv('LC_ALL=' . $locale);\n }", "public function getEncoder();", "public function getEncoder();", "public function getEncoding(): string\n {\n return $this->encoding;\n }", "public function getEncoding(): string\n {\n return $this->encoding;\n }", "function convert_data_encodings($known_utf8 = false)\n{\n global $VALID_ENCODING, $CONVERTED_ENCODING;\n $VALID_ENCODING = true;\n\n if ($CONVERTED_ENCODING) {\n return; // Already done it\n }\n\n if (preg_match('#^[\\x00-\\x7F]*$#', serialize($_POST) . serialize($_GET) . serialize($_FILES)) != 0) { // Simple case, all is ASCII\n $CONVERTED_ENCODING = true;\n return;\n }\n\n require_code('character_sets');\n _convert_data_encodings($known_utf8);\n}", "abstract public function encode(array $options = array());", "public function getInputEncoding()\n {\n return $this->input_encoding;\n }", "public function __construct()\n {\n $this->charset = strtoupper('UTF-8');\n }", "public function setEncodingType($encoding)\n {\n $this->encoding = $encoding;\n }", "public function setEncoding($enc)\n {\n return $this->query('SET NAMES '.$enc) != false;\n }", "public function setValue($value, $encoding = 'UTF-8') {}", "public function setValue($value, $encoding = 'UTF-8') {}", "protected function setUpSystemLocaleAndEncodings () {\n\t\tif ($this->responseEncoding === NULL) {\n\t\t\t$this->responseEncoding = $this->response ? $this->response->GetEncoding() : NULL;\n\t\t\t$this->responseEncoding = ($this->responseEncoding === NULL\n\t\t\t\t? $this->defaultEncoding\n\t\t\t\t: strtoupper($this->responseEncoding));\n\t\t}\n\t\t$this->systemEncoding = NULL;\n\t\tif ($this->lang !== NULL && $this->locale !== NULL) {\n\t\t\t$systemEncodings = [];\n\t\t\tforeach ($this->localeCategories as $localeCategory) {\n\t\t\t\t$newRawSystemLocaleValue = \\MvcCore\\Ext\\Tools\\Locale::SetLocale(\n\t\t\t\t\t$localeCategory,\n\t\t\t\t\t$this->langAndLocale . '.' . $this->responseEncoding\n\t\t\t\t);\n\t\t\t\tif ($newRawSystemLocaleValue === FALSE) continue;\n\t\t\t\t$systemParsedLocale = \\MvcCore\\Ext\\Tools\\Locale::GetLocale($localeCategory);\n\t\t\t\tif ($systemParsedLocale !== NULL && $systemParsedLocale->encoding !== NULL)\n\t\t\t\t\t$systemEncodings[] = $systemParsedLocale->encoding;\n\t\t\t}\n\t\t\tif ($systemEncodings && count($systemEncodings) == count($this->localeCategories))\n\t\t\t\t$this->systemEncoding = $systemEncodings[0];\n\t\t}\n\t\t$this->encodingConversion = (\n\t\t\t$this->systemEncoding !== $this->responseEncoding &&\n\t\t\t$this->systemEncoding !== NULL &&\n\t\t\t$this->responseEncoding !== NULL\n\t\t);\n\t}", "public function init_charset()\n {\n }", "protected function getEncoding(): int\n {\n return $this->encoding;\n }", "abstract function encode($data);", "public function getEncodeOptions(){\n\t\treturn $this->options;\n\t}", "public function setInputFileEncoding($encoding) {\n if(!empty($encoding)) {\n $this->inputFileEncoding = $encoding;\n }\n }", "public function setCharset($charset) {\n\t\tif($charset == self::CHARSET_ISO){\n\t\t\t$this->charset = self::CHARSET_ISO;\n\t\t} else {\n\t\t\t$this->charset = self::CHARSET_UTF;\n\t\t}\n\t}", "abstract public function encode($data);", "public function setCodec(Codec $codec);", "public function withEncoding($e) {\n $this->setEncoding($e);\n return $this;\n }" ]
[ "0.73998123", "0.70162874", "0.6853176", "0.6838934", "0.6763614", "0.6650767", "0.65684295", "0.6558256", "0.65187585", "0.6515188", "0.6478027", "0.6474988", "0.6413016", "0.63858485", "0.6331285", "0.6324695", "0.62920266", "0.6288779", "0.62768316", "0.6274752", "0.62636197", "0.6250378", "0.62427926", "0.6200725", "0.6192601", "0.6173186", "0.6161793", "0.6155451", "0.6145029", "0.61406535", "0.61377496", "0.6128458", "0.60717297", "0.60717297", "0.6070385", "0.6044952", "0.6035872", "0.60206074", "0.6018159", "0.6017933", "0.6013966", "0.6002818", "0.5990287", "0.598544", "0.5972472", "0.59595394", "0.59479356", "0.5933197", "0.59251225", "0.5919654", "0.5915693", "0.5913593", "0.5913593", "0.5913593", "0.5913593", "0.58816195", "0.58800066", "0.5855541", "0.58431256", "0.58431196", "0.5836746", "0.5833369", "0.5820241", "0.58191544", "0.5814715", "0.5814715", "0.5813609", "0.5801298", "0.57949287", "0.5784162", "0.5783347", "0.5783347", "0.5783347", "0.5783347", "0.57703435", "0.5763318", "0.5754833", "0.5754652", "0.5753313", "0.5753313", "0.5747868", "0.5747868", "0.57466906", "0.5736188", "0.5705291", "0.5696742", "0.56849724", "0.56782514", "0.5673677", "0.56732047", "0.567098", "0.56635714", "0.56410056", "0.5633482", "0.56319773", "0.56316024", "0.56315553", "0.56219953", "0.56207216", "0.5594075" ]
0.5940819
47
Name case. (ex: Thomas, Lewis). Works properly with separated by '' words
public static function name($string) { if (strpos($string, '-') !== false) { return implode('-', array_map([__CLASS__, __FUNCTION__], explode('-', $string))); } return static::upper(static::slice($string, 0, 1)) . static::lower(static::slice($string, 1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatName(array $name)\r\n {\r\n return $name['last_name'] . ' ' . preg_replace('/\\b([A-Z]).*?(?:\\s|$)+/','$1',$name['first_name']);\r\n }", "function accronym($string) {\n $out = '';\n foreach (explode(' ', $string) as $value) {\n if ($value) {\n $out .= strtoupper($value[0]);\n }\n }\n return $out;\n}", "function nomeCase($string, $delimiters = array(\" \", \"-\", \".\", \"'\", \"O'\", \"Mc\"), $exceptions = array(\"de\", \"da\", \"dos\", \"das\", \"do\", \"I\", \"II\", \"III\", \"IV\", \"V\", \"VI\"))\n{\n $string = mb_convert_case($string, MB_CASE_TITLE, \"UTF-8\");\n foreach ($delimiters as $dlnr => $delimiter) {\n $words = explode($delimiter, $string);\n $newwords = array();\n foreach ($words as $wordnr => $word) {\n if (in_array(mb_strtoupper($word, \"UTF-8\"), $exceptions)) {\n // check exceptions list for any words that should be in upper case\n $word = mb_strtoupper($word, \"UTF-8\");\n } elseif (in_array(mb_strtolower($word, \"UTF-8\"), $exceptions)) {\n // check exceptions list for any words that should be in upper case\n $word = mb_strtolower($word, \"UTF-8\");\n } elseif (!in_array($word, $exceptions)) {\n // convert to uppercase (non-utf8 only)\n $word = ucfirst($word);\n }\n array_push($newwords, $word);\n }\n $string = join($delimiter, $newwords);\n }//foreach\n return $string;\n}", "function fixName($str = \"\") {\n\tif ( preg_match(\"/[A-Z]{3}/\", $str) ) {\n\t\t$str = strtolower($str);\n\t\t// First letter after hyphen\n\t\t$str = preg_replace(\"/(-[A-Z])/\", \"$1\", $str);\n\t\tif ( \"$1\" != \"\" ) {\n\t\t\t$upper1 = strtoupper(\"$1\");\n\t\t\t$str = str_replace(\"$1\", \"$upper1\", $str);\n\t\t}\n\t\t//$str = preg_replace(\"/(-[A-Z])/\", strtoupper($1), $str); // T_LNUMBER error\n\t\t$str = ucwords($str);\n\t}\n\t// Is all-lowercase + hyphen space apostrophe\n\telseif ( preg_match(\"/^[- 'a-z]+$/\", $str) ) {\n\t\t// Need exceptions: \"di\", \"de la\", ... ?\n\t\t$str = ucwords($str);\n\t}\n\t// Already mixed-case\n\telse {\n\t\t1;\n\t}\n\t$str = str_replace(\"'\", \"''\", $str);\n\treturn($str);\n//fixName\n}", "protected function prepareName($name) {\n\t$name = strip_tags(trim($name));\n\t$name = preg_replace('/[^\\w\\s\\-А-Яа-я]/u', '', $name);\n\t$name = mb_strtolower($name, Yii()->charset);\n\t//$name = mb_ucfirst($name);\n\t$name = mb_ucwords($name);\n\treturn $name;\n }", "protected function parseName($name)\n {\n return ucwords(str_plural($name));\n }", "protected function convName($name){\n if(ctype_upper(substr($name, 0, 1))){\n $name = strtolower(preg_replace('/([^A-Z])([A-Z])/', \"$1_$2\", $name));\n }\n else{\n $name = preg_replace('/(?:^|_)(.?)/e',\"strtoupper('$1')\", $name);\n }\n return $name;\n }", "public static function Name ($name) {\n\t\t\n\t\t\t//\tPerform a few initial clean up\n\t\t\t//\tsteps:\n\t\t\t//\n\t\t\t//\t1.\tLower case the name (proper\n\t\t\t//\t\tcapitalization will be re-added\n\t\t\t//\t2.\tTrim leading/trailing whitespace\n\t\t\t//\t3.\tReplace all sequences of whitespace\n\t\t\t//\t\twith single spaces.\n\t\t\t$name=StringUtil::ToLower(\n\t\t\t\tRegex::Replace(\n\t\t\t\t\t'/(?<=^|\\\\S)\\\\s+(?=\\\\S|$)/u',\n\t\t\t\t\t' ',\n\t\t\t\t\tStringUtil::Trim($name)\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t//\tFilter the name to correct casing\n\t\t\t//\tet cetera\n\t\t\tforeach (array(\n\t\t\t\t//\tFirst letter of each word\n\t\t\t\t//\tis upper cased\n\t\t\t\t'/\\\\b(\\\\w)/u' => function ($matches) {\n\t\t\t\t\n\t\t\t\t\treturn StringUtil::ToUpper($matches[1]);\n\t\t\t\t\t\n\t\t\t\t},\n\t\t\t\t//\tTransform names like \"O'donnel\"\n\t\t\t\t//\tto \"O'Donnel\"\n\t\t\t\t'/(?<=\\\\bO\\')(\\\\w)/u' => function ($matches) {\n\t\t\t\t\n\t\t\t\t\treturn StringUtil::ToUpper($matches[1]);\n\t\t\t\t\n\t\t\t\t},\n\t\t\t\t//\tTransform names like \"Mcdonald\"\n\t\t\t\t//\tand \"Macwilliam\" to \"McDonald\" and\n\t\t\t\t//\t\"MacWilliam\", respectively\n\t\t\t\t'/\\\\b(Ma?c)(\\\\w)/u' => function ($matches) {\n\t\t\t\t\n\t\t\t\t\treturn $matches[1].StringUtil::ToUpper($matches[2]);\n\t\t\t\t\n\t\t\t\t},\n\t\t\t\t//\tTransform \"van\", \"der\", etc. to lower\n\t\t\t\t//\tcase\n\t\t\t\t'/\\\\b(v[ao]n|der?)\\\\b/ui' => function ($matches) {\n\t\t\t\t\n\t\t\t\t\treturn StringUtil::ToLower($matches[1]);\n\t\t\t\t\n\t\t\t\t}\n\t\t\t) as $p=>$s) $name=($s instanceof \\Closure) ? Regex::ReplaceCallback(\n\t\t\t\t$p,\n\t\t\t\t$s,\n\t\t\t\t$name\n\t\t\t) : Regex::Replace(\n\t\t\t\t$p,\n\t\t\t\t$s,\n\t\t\t\t$name\n\t\t\t);\n\t\t\t\n\t\t\treturn $name;\n\t\t\n\t\t}", "function evaluate_name($name){\n\t$name = strtolower($name);\n\t$name = str_replace(\" \",\"\",$name);\n\n\treturn $name;\n}", "function correctCase($name)\n{\n // aAa | AAA | aaA ---> aaa\n $nameLowecase = strtolower($name);\n // aaa --> Aaa\n $uppercaseName = ucfirst($nameLowecase);\n return $uppercaseName;\n}", "protected function testNameExp()\n {\n $exp = '/^([A-Z]+\\s[A-Z]+|[a-z]+\\s[a-z]+)$/';\n\n $names = array(\n 'Bill Smith','BILL SMITH','bILL SMITH',\n 'bill smith','von Richter',\"O'Rielly\",'Greg McReynold','Joe-Schmoe',\n 'JOE berthera',\n 'PRINCE', 'BILLY JOE JNR',\"PETER O'PETERSON\", // Should match but does not\n );\n foreach($names as $name)\n {\n $matched = preg_match($exp,$name);\n if ($matched) echo \"Matched: $name\\n\";\n else echo \"No Match: $name\\n\";\n }\n }", "private function filterName(string $name): string\n {\n $name = str_replace(['-', '_'], ' ', $name);\n $words = explode(' ', $name);\n $filtered = '';\n foreach ($words as $word) {\n $filtered .= ucfirst($word);\n }\n return $filtered;\n }", "private function filterName($name)\n {\n $name = ucfirst($name);\n $name = str_replace('_', ' ', $name);\n \n return $name;\n }", "function nameFormatAnglo($str) {\n // allow ' (apostrophe) and - (hyphen) as valid char in name\n $str = preg_replace(\"/[^a-zA-Z'-]/\", \"\", $str);\n $str = strtolower($str);\n $str = ucfirst($str);\n // specific: need check for \"O'Conner\" etc, capitalised after the apostrophe.\n if (strpos($str, \"'\") == 1) {\n $str = join(\"'\", array_map(\"ucfirst\", array_map(\"strtolower\", explode(\"'\", $str))));\n }\n // or have a hyphenated name\n if (strpos($str, \"-\") !== FALSE) {\n $str = join(\"-\", array_map(\"ucfirst\", array_map(\"strtolower\", explode(\"-\", $str))));\n }\n return $str;\n }", "function properCase($propername) {\n //if (ctype_upper($propername)) {\n $propername = ucwords(strtolower($propername));\n //}\n return $propername;\n }", "function camel($string) {\r\n\t$parts = preg_split('/[\\s_\\-]+/i',strtolower($string));\r\n\t$camel = array_shift($parts) . str_replace(\" \",\"\",ucwords(implode(\" \",$parts)));\r\n\treturn $camel;\r\n}", "function ucfirst_sentence($str){\r\n\treturn preg_replace('/\\b(\\w)/e', 'strtoupper(\"$1\")', strtolower($str));\r\n}", "function ucfirst_sentences($s) {\n return preg_replace_callback('/([.!?])\\s+(\\w)/', function ($matches) {\n return strtoupper($matches[1] . ' ' . $matches[2]);\n }, ucfirst(strtolower($s)));\n }", "function pureName($text) {\n $text = preg_replace('~[^\\\\pL\\d]+~u', ' ', $text);\n // trim\n $text = trim($text, '-');\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n // lowercase\n // $text = strtolower($text);\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', ' ', $text);\n if (empty($text)) {\n return 'n-a';\n } else {\n\t return trim($text);\n }\n}", "function the_champ_first_letter_uppercase($word){\r\n\treturn ucfirst($word);\r\n}", "function makeNameLoud($name) {\n return strtoupper($name);\n }", "abstract function normalizedName();", "function human_name($str, $is_class=false) {\n\t# best bet is to see if it has a cap, if so it's a classname\n\t$out = $str;\n\tif ((preg_match('|[A-Z]|', $str) == 1) || $is_class) {\n\t\t$out = preg_replace('/([a-zA-Z])([A-Z])/', '\\\\1 \\\\2', $str);\n\t}\n\t$out = str_replace('_', ' ', str_replace('-', ' ', $out));\n\treturn $out;\n}", "function test_names($data){\n\tif (!preg_match(\"/^[a-zA-Z-' ]*$/\",$data)) {\n \t\treturn \"Only letters and white space allowed\";\n\t}\n\treturn $data;\n}", "public function getProperName(): string\n {\n $wordDelimeters = [' ', '-', 'O’', 'L’', 'D’', 'St.', 'Mc', \"O'\", \"L'\", \"D'\"];\n $lowercaseExceptions = ['the', 'van', 'den', 'von', 'und', 'der', 'de', 'da', 'of', 'and', 'l’', 'd’', \"l'\", \"d'\"];\n $uppercaseException = ['III', 'IV', 'VI', 'VII', 'VIII', 'IX'];\n\n $name = strtolower($this->name);\n\n foreach ($wordDelimeters as $delimiter) {\n $words = explode($delimiter, $name);\n $newwords = [];\n\n foreach ($words as $word) {\n if (in_array(strtoupper($word), $uppercaseException)) {\n $word = strtoupper($word);\n } elseif (! in_array($word, $lowercaseExceptions)) {\n $word = ucfirst($word);\n }\n\n $newwords[] = $word;\n }\n\n if (in_array(strtolower($delimiter), $lowercaseExceptions)) {\n $delimiter = strtolower($delimiter);\n }\n\n $name = join($delimiter, $newwords);\n }\n\n return $name;\n }", "public static function standardize( $name ) {\n\t\treturn self::firstUpper( self::lower( $name )) ;\n\t}", "private static function str_capitalize_name_helper(\n string $names,\n string $delimiter,\n string $encoding = 'UTF-8'\n ) {\n // init\n try {\n $name_helper_array = \\explode($delimiter, $names);\n } catch (\\Error $e) {\n // PHP >= 8.0 : explode() will now throw ValueError when separator parameter is given an empty string (\"\"). Previously, explode() returned false instead.\n $name_helper_array = false;\n }\n if ($name_helper_array === false) {\n return '';\n }\n\n $special_cases = [\n 'names' => [\n 'ab',\n 'af',\n 'al',\n 'and',\n 'ap',\n 'bint',\n 'binte',\n 'da',\n 'de',\n 'del',\n 'den',\n 'der',\n 'di',\n 'dit',\n 'ibn',\n 'la',\n 'mac',\n 'nic',\n 'of',\n 'ter',\n 'the',\n 'und',\n 'van',\n 'von',\n 'y',\n 'zu',\n ],\n 'prefixes' => [\n 'al-',\n \"d'\",\n 'ff',\n \"l'\",\n 'mac',\n 'mc',\n 'nic',\n ],\n ];\n\n foreach ($name_helper_array as &$name) {\n if (\\in_array($name, $special_cases['names'], true)) {\n continue;\n }\n\n $continue = false;\n\n if ($delimiter === '-') {\n foreach ((array) $special_cases['names'] as &$beginning) {\n if (\\strncmp($name, $beginning, \\strlen($beginning)) === 0) {\n $continue = true;\n\n break;\n }\n }\n unset($beginning);\n }\n\n foreach ((array) $special_cases['prefixes'] as &$beginning) {\n if (\\strncmp($name, $beginning, \\strlen($beginning)) === 0) {\n $continue = true;\n\n break;\n }\n }\n unset($beginning);\n\n if ($continue) {\n continue;\n }\n\n $name = self::ucfirst($name, $encoding);\n }\n\n return \\implode($delimiter, $name_helper_array);\n }", "public function camel($word);", "function formatWord ($param1)\n{\n return ucfirst($param1);\n}", "function getInitials($name){\r\n $words=explode(\" \",$name);\r\n $inits='';\r\n //loop through array extracting initial letters\r\n\tforeach($words as $word){\r\n\t $inits.=strtoupper(substr($word,0,1));\r\n\t}\r\n return $inits;\t\r\n}", "public function ucnames($string)\n {\n $format = function ($regex) {\n $word = strtolower($regex[1]);\n if ($word == 'de') {\n return str_replace($regex[1], $word, $regex[0]);\n }\n $word = ucfirst($word);\n if (substr($word, 1, 1) == \"'\") {\n if (substr($word, 0, 1) == 'D') {\n $word = strtolower($word);\n }\n $next = substr($word, 2, 1);\n $next = strtoupper($next);\n $word = substr_replace($word, $next, 2, 1);\n }\n $word = preg_replace_callback('/\n\t\t\t\t(?: ^ | \\\\b ) # assertion: beginning of string or a word boundary\n\t\t\t\t( O\\' | Ma?c | Fitz) # attempt to match Irish surnames\n\t\t\t\t( [^\\W\\d_] ) # match next char; we exclude digits and _ from \\w\n\t\t\t/x', function ($match) {\n return $match[1] . strtoupper($match[2]);\n}, $word);\n return str_replace($regex[1], $word, $regex[0]);\n };\n $string = preg_replace_callback('/(?:^|\\\\s)([\\\\w\\']+)\\\\s?/s', $format, $string);\n return $string;\n }", "function ucname($string) {\n $string =ucwords(strtolower($string));\n\t\n foreach (array('-', '/', '\\\\') as $delimiter) {\n if (strpos($string, $delimiter)!==false) {\n $string =implode($delimiter, array_map('ucfirst', explode($delimiter, $string)));\n }\n }\n return $string;\n}", "function MCW_make_name_acceptable($name) {\n \n $name = strtr($name,\" \",\"_\");\n $name=preg_replace(\"/[^a-zA-Z0-9_äöüÄÖÜ]/\" , \"\" , $name);\n return $name;\n }", "function initials(string $fullname) : string {\n\t$fullname = ltrim($fullname,\" \");\n\t$nameParts = explode(' ', $fullname);\n\tif (count($nameParts) >= 2) {\n\t\t\treturn strtoupper(substr($nameParts[0], 0, 1) . substr(end($nameParts), 0, 1));\n\t}\n\tpreg_match_all('#([A-Z]+)#', $nameParts, $capitals);\n\tif (count($capitals[1]) >= 2) {\n\t\t\treturn substr(implode('', $capitals[1]), 0, 2);\n\t}\n\treturn strtoupper(substr($nameParts, 0, 2));\n}", "function get_name_sanitized():string{\n $sanitize_name = $this->name ;\n foreach (self::SANITIZED_WORDS as $old => $new) {\n $sanitize_name = str_replace($old, $new, $sanitize_name);\n }\n return $sanitize_name;\n }", "function submitted_events_strip_surname($name) {\n\t$parts = explode ( ' ', $name );\n\tif (sizeof ( $parts ) > 1) {\n\t\treturn $parts [0] . ' ' . substr ( $parts [1], 0, 1 );\n\t} else {\n\t\treturn $name;\n\t}\n}", "function titleCase($string, $delimiters = array(\" \", \"-\", \".\", \"'\", \"O'\", \"Mc\"), $exceptions = array(\"de\", \"da\", \"dos\", \"das\", \"do\", \"um\", \"uma\", \"e\",\"é\", \"I\", \"II\", \"III\", \"IV\", \"V\", \"VI\"))\n\t {\n\t\t\t $string = mb_convert_case($string, MB_CASE_TITLE, \"UTF-8\");\n\t\t\t foreach ($delimiters as $dlnr => $delimiter) {\n\t\t\t\t\t $words = explode($delimiter, $string);\n\t\t\t\t\t $newwords = array();\n\t\t\t\t\t foreach ($words as $wordnr => $word) {\n\t\t\t\t\t\t\t if (in_array(mb_strtoupper($word, \"UTF-8\"), $exceptions)) {\n\t\t\t\t\t\t\t\t\t // check exceptions list for any words that should be in upper case\n\t\t\t\t\t\t\t\t\t $word = mb_strtoupper($word, \"UTF-8\");\n\t\t\t\t\t\t\t } elseif (in_array(mb_strtolower($word, \"UTF-8\"), $exceptions)) {\n\t\t\t\t\t\t\t\t\t // check exceptions list for any words that should be in upper case\n\t\t\t\t\t\t\t\t\t $word = mb_strtolower($word, \"UTF-8\");\n\t\t\t\t\t\t\t } elseif (!in_array($word, $exceptions)) {\n\t\t\t\t\t\t\t\t\t // convert to uppercase (non-utf8 only)\n\t\t\t\t\t\t\t\t\t $word = ucfirst($word);\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t array_push($newwords, $word);\n\t\t\t\t\t }\n\t\t\t\t\t $string = join($delimiter, $newwords);\n\t\t\t}//foreach\n\t\t\treturn $string;\n\t }", "function ajoutpoint($text) // good\r\n {\r\n if(!preg_match_all('#[.?!]#', $text))\r\n {\r\n $text=$text.' . ';\r\n echo ucfirst($text);\r\n }\r\n else{ echo ucfirst($text);}\r\n // return $text;\r\n }", "public function getTitleCase($value) {\n\t\t$value = str_replace('_', ' ', $value);\n\t\t$value = ucwords($value);\n\t\t$value = str_replace(' ', '', $value);\n\t\treturn $value;\n\t}", "function parseName($value){\n $name=explode(' ',$value);\n $genName=\"\";\n $len= count($name);\n if($len > 0){\n for($i=0;$i<$len;$i++){\n if(trim($name[$i])!=\"\"){\n if($genName!=\"\"){\n $genName =$genName .\" \".$name[$i];\n }\n else{\n $genName =$name[$i];\n } \n }\n }\n }\n if($genName!=\"\"){\n $genName=\" OR CONCAT(TRIM(s.firstName),' ',TRIM(s.lastName)) LIKE '\".$genName.\"%'\";\n } \n \n return $genName;\n}", "function parseName($value){\n $name=explode(' ',$value);\n $genName=\"\";\n $len= count($name);\n if($len > 0){\n for($i=0;$i<$len;$i++){\n if(trim($name[$i])!=\"\"){\n if($genName!=\"\"){\n $genName =$genName .\" \".$name[$i];\n }\n else{\n $genName =$name[$i];\n } \n }\n }\n }\n if($genName!=\"\"){\n $genName=\" OR CONCAT(TRIM(s.firstName),' ',TRIM(s.lastName)) LIKE '\".$genName.\"%'\";\n } \n \n return $genName;\n}", "function parseName($value){\n $name=explode(' ',$value);\n $genName=\"\";\n $len= count($name);\n if($len > 0){\n for($i=0;$i<$len;$i++){\n if(trim($name[$i])!=\"\"){\n if($genName!=\"\"){\n $genName =$genName .\" \".$name[$i];\n }\n else{\n $genName =$name[$i];\n } \n }\n }\n }\n if($genName!=\"\"){\n $genName=\" OR CONCAT(TRIM(s.firstName),' ',TRIM(s.lastName)) LIKE '\".$genName.\"%'\";\n } \n \n return $genName;\n}", "function camelCase($str, array $noStrip = [])\r\n{\r\n $str = preg_replace('/[^a-z0-9' . implode(\"\", $noStrip) . ']+/i', ' ', $str);\r\n $str = trim($str);\r\n // uppercase the first character of each word\r\n $str = ucwords($str);\r\n\r\n return $str;\r\n}", "function uncapitalize(){\n\t\t$first = $this->substr(0,1)->downcase();\n\t\treturn $first->append($this->substr(1));\n\t}", "function getPuzzleName($name)\n {\n return str_replace(\"-\", \" \", ucwords($name));\n }", "function from_camel_case($input)\n{\n preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $input, $matches);\n $ret = $matches[0];\n foreach ($ret as &$match) {\n $match = $match == strtoupper($match) ? strtolower($match) : lcfirst($match);\n }\n return implode('_', $ret);\n}", "function vFullName( $name ) \r\n\t\t{\r\n\t\t\t return preg_match ('/^[A-Z \\',.-]{1,750}$/i', $name);\r\n\t\t\t\t\t\t \r\n\t\t}", "function titleCase($string) {\r\n // Remove no_parse content.\r\n $string_array = preg_split(\"/(<no_parse>|<\\/no_parse>)+/i\",$string);\r\n $newString = '';\r\n for ($k=0; $k<count($string_array); $k=$k+2) {\r\n $string = $string_array[$k];\r\n // If the entire string is upper case, don't perform any title case on it.\r\n if ($string != strtoupper($string)) {\r\n // TITLE CASE RULES:\r\n // 1.) Uppercase the first char in every word.\r\n $new = preg_replace(\"/(^|\\s|\\'|'|\\\"|-){1}([a-z]){1}/ie\",\"''.stripslashes('\\\\1').''.stripslashes(strtoupper('\\\\2')).''\", $string);\r\n // 2.) Lower case words exempt from title case.\r\n // Lowercase all articles, coordinate conjunctions (\"and\", \"or\", \"nor\"), and prepositions regardless of length, when they are other than the first or last word.\r\n // Lowercase the \"to\" in an infinitive.\" - this rule is of course approximated since it is context sensitive.\r\n $matches = array();\r\n // Perform recursive matching on the following words.\r\n preg_match_all(\"/(\\sof|\\sa|\\san|\\sthe|\\sbut|\\sor|\\snot|\\syet|\\sat|\\son|\\sin|\\sover|\\sabove|\\sunder|\\sbelow|\\sbehind|\\snext\\sto|\\sbeside|\\sby|\\samoung|\\sbetween|\\sby|\\still|\\ssince|\\sdurring|\\sfor|\\sthroughout|\\sto|\\sand){2}/i\",$new ,$matches);\r\n for ($i=0; $i<count($matches); $i++) {\r\n for ($j=0; $j<count($matches[$i]); $j++) {\r\n $new = preg_replace(\"/(\".$matches[$i][$j].\"\\s)/ise\",\"''.strtolower('\\\\1').''\",$new);\r\n }\r\n }\r\n // 3.) Do not allow upper case apostrophes.\r\n $new = preg_replace(\"/(\\w'S)/ie\",\"''.strtolower('\\\\1').''\",$new);\r\n $new = preg_replace(\"/(\\w'\\w)/ie\",\"''.strtolower('\\\\1').''\",$new);\r\n $new = preg_replace(\"/(\\W)(of|a|an|the|but|or|not|yet|at|on|in|over|above|under|below|behind|next to| beside|by|amoung|between|by|till|since|durring|for|throughout|to|and)(\\W)/ise\",\"'\\\\1'.strtolower('\\\\2').'\\\\3'\",$new);\r\n // 4.) Capitalize first letter in the string always.\r\n $new = preg_replace(\"/(^[a-z]){1}/ie\",\"''.strtoupper('\\\\1').''\", $new);\r\n // 5.) Replace special cases.\r\n // You will add to this as you find case specific problems.\r\n $new = preg_replace(\"/\\sin-/i\",\" In-\",$new);\r\n $new = preg_replace(\"/(\\s|\\\"|\\'){1}(ph){1}(\\s|,|\\.|\\\"|\\'|:|!|\\?|\\*|$){1}/ie\",\"'\\\\1pH\\\\3'\",$new);\r\n $new = preg_replace(\"/^ph(\\s|$)/i\",\"pH \",$new);\r\n $new = preg_replace(\"/(\\s)ph($)/i\",\" pH\",$new);\r\n $new = preg_replace(\"/(\\s|\\\"|\\'){1}(&){1}(\\s|,|\\.|\\\"|\\'|:|!|\\?|\\*){1}/ie\",\"'\\\\1and\\\\3'\",$new);\r\n $new = preg_replace(\"/(\\s|\\\"|\\'){1}(groundwater){1}(\\s|,|\\.|\\\"|\\'|:|!|\\?|\\*){1}/e\",\"'\\\\1Ground Water\\\\3'\",$new);\r\n $new = preg_replace(\"/(\\W|^){1}(cross){1}(\\s){1}(connection){1}(\\W|$){1}/ie\",\"'\\\\1\\\\2-\\\\4\\\\5'\",$new); // Always hyphenate cross-connections.\r\n $new = preg_replace(\"/(\\s|\\\"|\\'){1}(vs\\.){1}(\\s|,|\\.|\\\"|\\'|:|!|\\?|\\*){1}/ie\",\"'\\\\1Vs.\\\\3'\",$new);\r\n $new = preg_replace(\"/(\\s|\\\"|\\'){1}(on-off){1}(\\s|,|\\.|\\\"|\\'|:|!|\\?|\\*){1}/ie\",\"'\\\\1On-Off\\\\3'\",$new);\r\n $new = preg_replace(\"/(\\s|\\\"|\\'){1}(on-site){1}(\\s|,|\\.|\\\"|\\'|:|!|\\?|\\*){1}/ie\",\"'\\\\1On-Site\\\\3'\",$new);\r\n // Special cases like Class A Fires.\r\n $new = preg_replace(\"/(\\s|\\\"|\\'){1}(class\\s){1}(\\w){1}(\\s|,|\\.|\\\"|\\'|:|!|\\?|\\*|$){1}/ie\",\"'\\\\1\\\\2'.strtoupper('\\\\3').'\\\\4'\",$new);\r\n $new = stripslashes($new);\r\n $string_array[$k] = $new;\r\n }\r\n }\r\n for ($k=0; $k<count($string_array); $k++) {\r\n $newString .= $string_array[$k];\r\n }\r\n return($newString);\r\n }", "function transform_name( $name = '', $type = '' ) {\n\t$word = array( ' ' => $type, '&' => '' );\n\t$new = strtr( $name, $word );\n $new = strtolower( $new );\n return $new;\n}", "protected function _formatName($unformatted)\n {\n $unformatted = str_replace(array('-', '_', '.'), ' ', strtolower($unformatted));\n $unformatted = preg_replace('[^a-z0-9 ]', '', $unformatted);\n return str_replace(' ', '', ucwords($unformatted));\n }", "function LetterCapitalize($str) { \r\n return ucwords($str); \r\n}", "public function automaticName($data)\n\t{\n\t\t$name = (isset($data['name']) && $data['name'] ? $data['name'] : $data['label']);\n\t\t$name = strip_tags($name);\n\t\t$name = trim($name);\n\n\t\treturn preg_replace(\"/[^a-zA-Z0-9_]/\", '', strtolower($name));\n\t}", "function convertNamingFromUnderlineToCamelCase($text,$firstLetterLowerCase=true) {\n\t\t\tpreg_match_all('/(^[a-zA-Z])|(_[a-zA-Z])/', $text, $matches, PREG_PATTERN_ORDER);\n\t\n\t\t\tfor ($i = 0; $i < count($matches[0]); $i++) {\n\t\t\t\t\t$original=$matches[0][$i];\n\t\t\t\t\t$originals[]=$original;\n\t\t\t\t\tif ($i==0 and $firstLetterLowerCase)\n\t\t\t\t\t\t\t$replacement=str_replace('_','',$matches[0][$i]);\n\t\t\t\t\telse\n\t\t\t\t\t\t\t$replacement=strtoupper(str_replace('_','',$matches[0][$i]));\n\t\t\t\t\t$replacements[]=$replacement;\n\t\t\t}\n\t\n\t\t\treturn str_replace($originals,$replacements,$text);\n\t}", "private function transformName( $name ): string {\n\t\treturn lcfirst( implode( '', array_map( 'ucfirst', explode( '-', $name ) ) ) );\n\t}", "function camelCase($str, array $noStrip = [])\n{\n $str = preg_replace('/[^a-z0-9' . implode(\"\", $noStrip) . ']+/i', ' ', $str);\n $str = trim($str);\n // uppercase the first character of each word\n $str = ucwords($str);\n $str = str_replace(\" \", \"\", $str);\n $str = lcfirst($str);\n\n return $str;\n}", "function makeTitleCase($input_title)\n {\n $input_array_of_words = explode(\" \", strtolower($input_title));\n $output_titlecased = array();\n $designated = array(\"a\", \"as\", \"an\", \"by\", \"of\", \"on\", \"to\", \"the\", \"or\", \"in\", \"from\", \"is\");\n foreach ($input_array_of_words as $word) {\n //if any of the words in designated array appear, lowercase them\n if (in_array($word, $designated)) {\n array_push($output_titlecased, lcfirst($word));\n //otherwise, uppercase\n } else {\n array_push($output_titlecased, ucfirst($word));\n }\n\n\n }\n\n//overrides the first if statement, making every first word capitalized no matter what\n $output_titlecased[0] = ucfirst($output_titlecased[0]);\n\n return implode(\" \", $output_titlecased);\n }", "function normaliseNames($names) { //{{{\n $normalised = array();\n $maxNames = 3;\n \n $n = 0;\n foreach ($names as $i => $name) {\n // skip names after third\n if (++ $n > $maxNames) {\n continue;\n }\n \n // split name into surname and forenames and split up forenames\n list ($surname, $forenames) = explode(', ', $name, 2);\n $forenames = explode(' ', $forenames);\n $fullname = '';\n \n // check that first letter of forename is uppercase\n foreach ($forenames as $fn) {\n $i = substr($fn, 0, 1);\n // add to full name as initial\n if (IntlChar::isupper($i)) {\n $fullname .= sprintf('%s. ', $i);\n }\n }\n \n // add surname and add to normalised\n $fullname .= $surname;\n $normalised[] = $fullname;\n }\n \n // join names\n $presentation = implode(', ', $normalised);\n \n // check whether to add et al\n if ($n > $maxNames) {\n $presentation .= ' et al';\n }\n \n return $presentation;\n}", "protected function initials(): string\n {\n preg_match_all(\"/[A-Z]/\", ucwords(strtolower($this->value)), $matches);\n\n return implode('', $matches[0]);\n }", "public final function getName() { return strToUpper($this->name); }", "public static function tidyName($name) {\n if (!Utils::isEmpty($name)) {\n $maps = [\n 'Academies News' => 'Academies',\n 'Alternative provision focus' => 'Alternative provision',\n 'Behavior' => 'Behaviour',\n 'Book review' => 'Book reviews',\n 'Business and financial management' => 'Business, finance and economics',\n 'Ed tech' => 'EdTech',\n 'Revision Tips' => 'Revision tips',\n 'Local authority' => 'Local government',\n 'Local authorities' => 'Local government',\n 'Ofsted blog' => 'Ofsted',\n 'Ofsted watch' => 'Ofsted',\n 'PE' => 'Physical education',\n 'RE' => 'Religious education',\n 'PSHE' => 'Personal, social and health education',\n 'religion' => 'Religion',\n ];\n // CSV hacks: issues experienced in CSV version where tagname explode didnt work,\n // e.g. Business, finance and economics => gives 2 tagnames\n $maps['finance and economics'] = 'Business, finance and economics';\n //\n if (isset($maps[$name])) {\n $name = $maps[$name];\n }\n elseif (preg_match('/^TES /', $name)) {\n $name = 'Tes ' . substr($name, 4);\n }\n }\n return $name;\n }", "function FormatName ($name) {\n\t\n\t\t//\tStart by lower casing the name\n\t\t$name=MBString::ToLower(MBString::Trim($name));\n\t\t\n\t\t//\tFilter the name through\n\t\t//\tthe substitutions\n\t\tforeach (array(\n\t\t\t'(?<=^|\\\\W)(\\\\w)' => function ($matches) {\treturn MBString::ToUpper($matches[0]);\t},\n\t\t\t'(?<=^|\\\\W)O\\'\\\\w' => function ($matches) {\treturn MBString::ToUpper($matches[0]);\t},\n\t\t\t'(?<=^|\\\\W)(Ma?c)(\\\\w)' => function ($matches) {\treturn $matches[1].MBString::ToUpper($matches[2]);\t}\n\t\t) as $pattern=>$substitution) {\n\t\t\n\t\t\t$pattern='/'.$pattern.'/u';\n\t\t\t\n\t\t\t$name=(\n\t\t\t\t($substitution instanceof Closure)\n\t\t\t\t\t?\tpreg_replace_callback($pattern,$substitution,$name)\n\t\t\t\t\t:\tpreg_replace($pattern,$substitution,$name)\n\t\t\t);\n\t\t\n\t\t}\n\t\t\n\t\t//\tReturn formatted name\n\t\treturn $name;\n\t\n\t}", "public static function camelCase($str) {}", "function seoname($name) {\n\tglobal $language_char_conversions, $originals, $replacements;\n\tif ((isset($language_char_conversions)) && ($language_char_conversions == 1)) {\n\t\t$search = explode(\",\", $originals);\n\t\t$replace = explode(\",\", $replacements);\n\t\t$name = str_replace($search, $replace, $name);\n\t}\n\t$name = stripslashes($name);\n\t$name = strtolower($name);\n\t$name = str_replace(\"&\", \"and\", $name);\n\t$name = str_replace(\" \", \"-\", $name);\n\t$name = str_replace(\"---\", \"-\", $name);\n\t$name = str_replace(\"/\", \"-\", $name);\n\t$name = str_replace(\"?\", \"\", $name);\n\t$name = preg_replace( \"/[\\.,\\\";'\\:]/\", \"\", $name );\n\t//$name = urlencode($name);\n\treturn $name;\n}", "function getFirstName($name) {\r\n\t$n = explode(\" \",$name);\r\n\treturn $n[0];\r\n}", "function vName( $name ) \r\n\t\t{\t \r\n\t\t\t\t\r\n\t\t\t\treturn preg_match (\"/^[a-zA-ZàáâäãåąćęèéêëìíîïłńòóôöõøùúûüÿýżźñçčšžÀÁÂÄÃÅĄĆĘÈÉÊËÌÍÎÏŁŃÒÓÔÖÕØÙÚÛÜŸÝŻŹÑßÇŒÆČŠŽ∂ð ,.'-]+$/u\", $name);\r\n\t\t\t\t\t\t \r\n\t\t}", "function SM_prettyName($name) {\n\n // firstName = First Name\n if (preg_match(\"/[a-z][A-Z]/\",$name)) {\n $name = preg_replace(\"/([a-z])([A-Z])/\",\"\\\\1%\\\\2\",$name);\n $wordList = explode('%',$name);\n $name = '';\n foreach ($wordList as $word) {\n $name .= ucfirst($word).' ';\n }\n chop($name);\n }\n // FirstName = First Name\n elseif (preg_match(\"/[A-Z][a-z]/\",$name)) { \n $name = preg_replace(\"/([A-Z])([a-z])/\",\"\\\\1%\\\\2\",$name);\n \n $wordList = explode('%',$name);\n $name = '';\n foreach ($wordList as $word) {\n $name .= ucfirst($word).' ';\n }\n }\n // address1 = Address 1\n // address2 = Address 2\n elseif (preg_match(\"/^(\\w+)(\\d)\\$/\",$name,$m)) {\n $name = ucfirst($m[1]).' '.$m[2];\n }\n // sometext = Sometext\n else {\n $name = ucfirst($name);\n }\n \n // strip a trailing _idxNum\n if (preg_match(\"/^(.+)_idx\\s*Num\\s*\\$/\",$name,$m)) {\n $name = $m[1];\n } \n \n return trim($name);\n\n}", "function fix_names($firstName, $lastName) {\n\t$n[0] = ucfirst(strtolower($firstName));\n\t$n[1] = ucfirst(strtolower($lastName));\n\treturn $n;\n}", "function formatInput($param1)\n{\n return ucwords(strtolower($param1));\n}", "function transform_name( $name = '', $type = '' ) {\n $word = array( ' ' => $type, '&' => '' );\n $new = strtr( $name, $word );\n $new = strtolower( $new );\n\n return $new;\n}", "public function capitalizePersonalName()\n {\n $stringy = $this->collapseWhitespace();\n $stringy->str = $this->capitalizePersonalNameByDelimiter($stringy->str, ' ');\n $stringy->str = $this->capitalizePersonalNameByDelimiter($stringy->str, '-');\n return $stringy;\n }", "function camelCase(string $param): string\n{\n $resultat = \"\";\n $resultat .= strtolower($param[0]);\n\t$debut = false;\n\n\tfor ($i = 1; $i < strlen(trim($param)); $i++) {\n\n\t\tif ($param[$i] == \" \") {\n\t\t\t$debut = true;\n continue;\n\t\t}\n\t\t$resultat .= ($debut) ? strtoupper($param[$i]) : strtolower($param[$i]);\n\t\t$debut = false;\n }\n return $resultat;\n}", "public static function explodeAuthorName($name) // {{{\n {\n $vons = array(\"von der\", \"van der\", \"von\", \"van\", \"du\", \"de\", \"de la\");\n $jrs = array(\"Jr.\", \"Sr.\", \"II\", \"III\");\n $name_tokens = array();\n $exploded = array(\"\", \"\", \"\", \"\");\n // Enclose every word into braces if not already\n $name_parts = explode(\" \", $name);\n foreach ($name_parts as $name_part)\n {\n // We use mb_substr instead of $name_part[0] to be multibyte-safe\n $first = mb_substr($name_part, 0, 1);\n $last = mb_substr($name_part, mb_strlen($name_part) - 1, 1);\n if ($first !== \"{\" && $last !== \"}\")\n $name_tokens[] = $name_part;\n if ($first === \"{\" && $last === \"}\")\n $name_tokens[] = substr($name_part, 1, mb_strlen($name_part) - 2);\n if ($first === \"{\" && $last !== \"}\")\n $temp_name = substr($name_part, 1, mb_strlen($name_part) - 1);\n if ($first !== \"}\" && $last === \"}\")\n $name_tokens[] = $temp_name.\" \".substr($name_part, 0, mb_strlen($name_part) - 1);\n }\n // Now, every token that should be considered as a single word is\n // an element in the array. We proceed according to BibTeX rules. \n for ($i = 0; $i < count($name_tokens); $i++)\n {\n $token = $name_tokens[$i];\n if (in_array($token, $vons))\n {\n // There is a von part; add it and remove it from the name\n $exploded[1] = $token;\n unset($name_tokens[$i]);\n $name_tokens = array_values($name_tokens);\n $i--;\n }\n if (in_array($token, $jrs))\n {\n // There is a Jr. part; add it and remove it from the name\n $exploded[3] = $token;\n unset($name_tokens[$i]);\n $name_tokens = array_values($name_tokens);\n $i--;\n }\n }\n // The last remaining token is the last name, the rest is the first name\n $exploded[2] = $name_tokens[count($name_tokens) - 1];\n unset($name_tokens[count($name_tokens) - 1]);\n $exploded[0] = implode($name_tokens, \" \");\n return $exploded;\n }", "function camel_case_with_initial_capital($s) {\n return camel_case($s, true);\n }", "public function underscoredToLowerCamelCaseDataProvider() {}", "public function lowercase()\n {\n return $this->getNameInstance()->lowercase();\n }", "function vLongName( $name ) \r\n\t\t{\r\n\t\t\t return preg_match ('/^[A-Z \\',.-]{1,50}$/i', $name);\r\n\t\t\t\t\t\t \r\n\t\t}", "function funcs_getNames($name,$bothnames = true){\n\t$last = ucwords(preg_replace('/^(.+), .+/','\\\\1',$name));\n\t$first = ucwords(preg_replace('/^.+, (.+)/','\\\\1',$name));\n\tif ($bothnames){\n\t\treturn array($first,$last);\n\t}else{\n\t\treturn $first;\n\t}\n}", "function validName($name) {\n \n return preg_replace('/\\s+/', '_',$name);\n\n}", "static public function classify($str)\n\t{\n\t\t$str = trim($str, '-');\n\t\t\n\t\t$result = preg_replace_callback('/(-\\w)/', function ($match) {\n\t\t\treturn strtoupper($match[1][1]);\n\t\t}, $str);\n\t\t\n\t\treturn ucfirst($result);\n\t}", "protected function _normalizeHeader($name)\r\n\t{\r\n\t\t$filtered = str_replace(array('-', '_'), ' ', (string)$name);\r\n\t\t$filtered = ucwords(strtolower($filtered));\r\n\t\t$filtered = str_replace(' ', '-', $filtered);\r\n\t\treturn $filtered;\r\n\t}", "function Capitalize($title, $delimiter = \" \")\n{\n\n /* Capitalizes the words in a title according to the MLA Handbook.\n\t $delimiter parameter is optional. It is only needed if delimiter\n\t is not a space. */\n\t \n\t$articles = 'a|an|the';\n\t$prepositions = 'aboard|above|according|across|against|along|around|as|at|because|before|below|beneath|beside|between|beyond|by|concerning|during|except|for|from|inside|into|like|near|next|of|off|on|out|outside|over|past|since|through|to|toward|underneath|until|upon|with';\n\t$conjunctions = 'and|but|nor|or|so|yet';\n\t$verbs = 'are|be|did|do|is|was|were|will';\n\t$exceptions = explode('|',$articles.'|'.$prepositions.'|'.$conjunctions.'|'.$verbs); \n\t$words = explode($delimiter,$title);\n\t$lastWord = count($words)-1; // first & last words are always capitalized\n\t$words[0] = ucfirst($words[0]);\n\t$words[$lastWord] = ucfirst($words[$lastWord]);\n\tfor($i=1; $i<$lastWord; $i++) {\n\t\tif (!in_array($words[$i],$exceptions)) {\n\t\t\t$words[$i] = ucfirst($words[$i]);\n\t\t\t}\n\t\t}\n\t$newTitle = implode(' ',$words);\n\treturn $newTitle;\n}", "function camelCase($input)\n{\n $words = \\__::words(preg_replace(\"/['\\x{2019}]/u\", '', $input));\n\n return array_reduce(\n $words,\n function ($result, $word) use ($words) {\n $isFirst = \\__::first($words) === $word;\n $word = \\__::toLower($word);\n return $result . (!$isFirst ? \\__::capitalize($word) : $word);\n },\n ''\n );\n}", "public function underscoredToUpperCamelCaseDataProvider() {}", "public function get_clean_first_name($member_first_name) {\n $first_name = mb_strtolower($member_first_name);\n $first_name_pieces = explode(' ', $first_name);\n $first_name = array();\n foreach($first_name_pieces as $piece) {\n array_push($first_name, ucfirst($piece));\n }\n $first_name = implode(' ', $first_name);\n $first_name_pieces = explode('-', $first_name);\n $first_name = array();\n foreach($first_name_pieces as $piece) {\n array_push($first_name, ucfirst($piece));\n }\n $first_name = implode('-', $first_name);\n return $first_name;\n }", "function handle_sanitise_name($name, $is_surname) {\n $array_names = array_map(function ($item_name) use ($is_surname) {\n //Remove whitespace character from every item inside exploded name array\n if ($is_surname) {\n return remove_whitespace_characters(handle_capitalise_surname($item_name));\n } else {\n return remove_whitespace_characters(ucfirst(strtolower($item_name)));\n }\n }, explode(\" \", trim($name)));\n return implode(\" \", array_filter($array_names, function ($item_name) {\n //Combine all entries from exploded name array if string length is greater than zero\n return strlen($item_name) > 0;\n }));\n}", "public function getInitial()\n {\n return ucwords(trim($this->first_name . ' ' . substr($this->last_name, 0, 1)));\n }", "function str_camelcase($str, $capital_first_char = false)\n{\n $str = str_replace(' ', '', ucwords(str_replace('_', ' ', $str)));\n return $capital_first_char ? $str : lcfirst($str);\n}", "function titleDisplay($input){\n $p1= strripos($input, \" \");\n $sub_string= substr($input, 0,$p1);\n $word = explode(\" \",$sub_string);\n $end = substr($input,$p1+1,3);\n \n $short = \"\";\n\n foreach ($word as $w) {\n if (!ctype_alnum($w) && !is_numeric($w)){\n $short .= \"_\"; \n }\n else{\n \n $short .= $w[0]; \n }\n }\n if(strlen($short) == 1){\n $short = substr($input, 0,3);\n }\n $short .= \".\".$end;\n return strtolower($short) ;\n}", "public function upper_case_string($emp_name){\n\t\t$let = ucwords($emp_name);\n\t\treturn $let;\t\n\t}", "public function upper_case_string($emp_name){\n\t\t$let = ucwords($emp_name);\n\t\treturn $let;\t\n\t}", "function flipName($name){\r\n\r\n $initPattern = '/^(\\p{Lu}\\p{M}*)[.]/u';\t\t\t\t\t\t\t\t// Pattern for initial\r\n\t\t$altPattern = '/(Jr[.]*|Sr[.]*|III[.]*)/u';\t\t\t\t\t// Pattern for Jr, Sr, III\r\n\t\t\t\r\n\t\t$initials = '';\r\n\t\t$lastname = '';\r\n\t\t$alt = '';\r\n\r\n\t\t// remove Jr, Sr, and III to place at end of name\r\n\t\tif (preg_match($altPattern, $name, $matches) == 1) {\r\n\t\t\t$alt = $matches[0];\r\n\t\t\t$name = trim(preg_replace($altPattern, '', $name));\r\n\t\t}\r\n\t\t\r\n\t\t// build string of initials\r\n\t\twhile (preg_match($initPattern, $name, $matches) == 1) {\r\n\t\t\t$initials = $initials.$matches[0].' ';\r\n\t\t\t$name = trim(preg_replace($initPattern, '', $name));\r\n\t\t}\r\n\r\n\t\t$lastname = trim(preg_replace('/[,]|[.]/u', '', $name)); \t// remove comma, period, and space from last name\r\n\r\n\t\treturn $lastname.', '.$initials.$alt.', ';\r\n\t}", "protected function _normalizeHeader($name) {\r\n\t\t$filtered = str_replace ( array (\r\n\t\t\t\t'-',\r\n\t\t\t\t'_' \r\n\t\t), ' ', ( string ) $name );\r\n\t\t$filtered = ucwords ( strtolower ( $filtered ) );\r\n\t\t$filtered = str_replace ( ' ', '-', $filtered );\r\n\t\treturn $filtered;\r\n\t}", "function _fixName($field_or_value_name) {\r\n if ($field_or_value_name == \"\")\r\n return \"\";\r\n // convert space into underscore\r\n $result = preg_replace(\"/ /\", \"_\", strtolower($field_or_value_name));\r\n // strip all non alphanumeric chars\r\n $result = preg_replace(\"/\\W/\", \"\", $result);\r\n return $result;\r\n }", "function capitalize_sentences($str) {\n\n $str = strtolower($str);\n return preg_replace_callback('/(^|\\.\\s*)([a-z])/', '_capitalize_sentences_helper');\n\n }", "function _name_check($str){\n }", "function title_case($value)\n {\n return Str::title($value);\n }", "function title_case($value)\n {\n return Str::title($value);\n }", "function humanize($str){\n return ucwords(preg_replace('/[_\\-]+/', ' ', strtolower(trim($str))));\n }", "protected static function upperCamelCase($name)\n {\n /*\n $name = str_replace('-', ' ', $name);\n $name = ucwords($name);\n $name = str_replace(' ', '', $name);\n return $name;\n */\n\n return str_replace(' ', '', ucwords(str_replace('-', ' ', $name)));\n }", "static public function lc_( $name )\r\n {\r\n $name = lcfirst($name);\r\n $len = strlen($name);\r\n \r\n for( $i = 1; $i < $len; ++$i )\r\n {\r\n $ord = ord($name[$i]);\r\n if( $ord >= 65 && $ord <= 90 ) {\r\n $name = str_replace( $name[$i], '_'.lcfirst($name[$i]), $name );\r\n }\r\n }\r\n return $name;\r\n }", "public static function label($str, $space = ' ')\n {\n $str = preg_replace('/(?<=\\\\w)(?=[A-Z])/', $space . \"$1\", $str);\n return $space === ' ' ? ucfirst(trim(str_replace('_', ' ', strtolower($str)))) : $str;\n }" ]
[ "0.7060522", "0.6970395", "0.68820673", "0.6874002", "0.6818582", "0.68102926", "0.6798277", "0.6765081", "0.67549217", "0.6654978", "0.66251963", "0.6586632", "0.65746003", "0.6515771", "0.65150625", "0.65042514", "0.64891225", "0.6484637", "0.6476503", "0.64726955", "0.64645183", "0.6456973", "0.6453014", "0.6452336", "0.64496034", "0.6440842", "0.6440476", "0.6440299", "0.64377826", "0.6429564", "0.6417668", "0.6417144", "0.64020514", "0.63890463", "0.63810617", "0.63416433", "0.6339282", "0.6322603", "0.63201857", "0.63186044", "0.63186044", "0.63186044", "0.6317935", "0.6303333", "0.62915397", "0.62679785", "0.62631714", "0.62446046", "0.6244296", "0.62411124", "0.6221236", "0.62136847", "0.621247", "0.6209175", "0.62073505", "0.62065643", "0.62027234", "0.6191155", "0.61910504", "0.61897725", "0.61884534", "0.6187572", "0.6186039", "0.6180204", "0.6176729", "0.6168051", "0.6165092", "0.6160112", "0.61545867", "0.61464053", "0.6136002", "0.6132255", "0.61276984", "0.61245334", "0.61160123", "0.6086431", "0.6077094", "0.60729825", "0.6072302", "0.606947", "0.60655767", "0.6061686", "0.6052033", "0.60499907", "0.60499233", "0.60498804", "0.60382396", "0.60287637", "0.6007041", "0.6007041", "0.60069346", "0.6005533", "0.5995903", "0.59903896", "0.59891546", "0.59800386", "0.5977866", "0.59718764", "0.5963383", "0.59620935", "0.59601027" ]
0.0
-1
Slices string like python.
public static function slice($string, $start, $end = null) { if ($end !== null) { $end -= $start; } if (function_exists('mb_substr')) { return mb_substr($string, $start, $end, static::getEncoding()); } if (function_exists('iconv_substr')) { return iconv_substr($string, $start, $end ?: iconv_strlen($string), static::getEncoding()); } throw new RuntimeException('Unreachable'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function slice($string, $start, $length = null)\n {\n return mb_substr($string, $start, $length, '8bit');\n }", "public function slice($start, $end = null)\n {\n if ($end === null) {\n $length = $this->length();\n } elseif ($end >= 0 && $end <= $start) {\n return static::create('', $this->encoding);\n } elseif ($end < 0) {\n $length = $this->length() + $end - $start;\n } else {\n $length = $end - $start;\n }\n\n $str = UTF8::substr($this->str, $start, $length, $this->encoding);\n\n return static::create($str, $this->encoding);\n }", "function slice(array|string $input, int $start, int $end = null, bool $keep_keys = false): array|string\n{\n return is_array($input) ? array_slice($input, $start, $end, $keep_keys)\n : mb_substr($input, $start, $end);\n}", "function substr($offset, $length = -1, $remove = false) {}", "public function substr(int $start, int $length): string {}", "function _string_shift(&$string, $index = 1)\r\n {\r\n $substr = substr($string, 0, $index);\r\n $string = substr($string, $index);\r\n return $substr;\r\n }", "function atk_substr($str,$start,$length='')\n{\n\treturn atkString::substr($str,$start,$length);\n}", "function _string_shift(&$string, $index = 1)\n {\n $substr = substr($string, 0, $index);\n $string = substr($string, $index);\n return $substr;\n }", "public static function slice(\n string $subject,\n int $start = 0,\n int $length = null,\n string $encoding = 'UTF-8'\n ): string {\n return mb_substr($subject, $start, $length, $encoding);\n }", "public static function substr($string, $start, $length = null, $encoding = 'UTF-8') {}", "public function substr($string, $offset, $length = 0) {\r\n return iconv_substr($string, $offset, $length, $this->charset);\r\n }", "function _substr($binary_string, $start, $length) {\r\n if (function_exists('mb_substr')) {\r\n return mb_substr($binary_string, $start, $length, '8bit');\r\n }\r\n return substr($binary_string, $start, $length);\r\n }", "function slice(int $offset, ?int $length = null): self {\n if($length === null) {\n $this->buffer = \\substr($this->buffer, $offset);\n } else {\n $this->buffer = \\substr($this->buffer, $offset, $length);\n }\n \n return $this;\n }", "function aksubstr($string, $start, $length = null)\n\t{\n\t\treturn function_exists('mb_substr') ? mb_substr($string, $start, $length, '8bit') :\n\t\t\tsubstr($string, $start, $length);\n\t}", "function getSlice(int $start, int $end): string\n {\n if ($start === $end || $start < 0 || $end < 0) {\n return '';\n }\n\n if ($start < $end) {\n return (string) substr($this->html, $start, $end - $start);\n } else {\n return (string) substr($this->html, $end, $start - $end);\n }\n }", "public function substr($start, $length) {\r\n return substr($this->contents, $start, $length);\r\n }", "function substr($offset,$length = null){\n\t\tif($offset<0){\n\t\t\t$offset = $this->getLength() - abs($offset);\n\t\t\tif($offset<0){\n\t\t\t\t// $length = is_null($length) ? $length : $length - abs($offset);\n\t\t\t\t$offset = 0;\n\t\t\t}\n\t\t}\n\n\t\t$out = \"\";\n\t\tforeach($this->_Items as $b){\n\t\t\tif(!is_null($length) && $length<=0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$b_length = $b->getLength();\n\t\t\tif($offset>$b_length-1){\n\t\t\t\t$offset = $offset-$b_length;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$out .= $b->substr($offset,$length);\n\t\t\tif(!is_null($length)){\n\t\t\t\t$bytes_taken = min($length,$b_length - $offset);\n\t\t\t\t$length = $length - $bytes_taken;\n\t\t\t}\n\t\t\t$offset = 0;\n\t\t}\n\t\treturn $out;\n\t}", "public function utf8_substr($str, $offset, $length = null)\n\t{\n\t\t#в начале пробуем найти стандартные функции\n\t\tif (function_exists('mb_substr')) return mb_substr($str, $offset, $length, 'utf-8'); #(PHP 4 >= 4.0.6, PHP 5)\n\t\tif (function_exists('iconv_substr')) return iconv_substr($str, $offset, $length, 'utf-8'); #(PHP 5)\n\t\tif (! function_exists('utf8_str_split')) include_once 'utf8_str_split.php';\n\t\tif (! is_array($a = utf8_str_split($str))) return false;\n\t\tif ($length !== null) $a = array_slice($a, $offset, $length);\n\t\telse $a = array_slice($a, $offset);\n\t\treturn implode('', $a);\n\t}", "public function write($string, $start = 0) {}", "function spip_substr($c, $start=0, $length = NULL) {\n\t// Si ce n'est pas utf-8, utiliser substr\n\tif ($GLOBALS['meta']['charset'] != 'utf-8') {\n\t\tif ($length)\n\t\t\treturn substr($c, $start, $length);\n\t\telse\n\t\t\tsubstr($c, $start);\n\t}\n\n\t// Si utf-8, voir si on dispose de mb_string\n\tif (init_mb_string()) {\n\t\tif ($length)\n\t\t\treturn mb_substr($c, $start, $length);\n\t\telse\n\t\t\treturn mb_substr($c, $start);\n\t}\n\n\t// Version manuelle (cf. ci-dessous)\n\treturn spip_substr_manuelle($c, $start, $length);\n}", "function esquerda($str, $length) \n{\n\t$length++;\n return substr($str, (strlen($str) - $length), $length - 1);\n}", "public function getStringOffset() {}", "public function slice(int $offset, int $length = null): self;", "function csubstr($str, $start=0, $length, $charset=\"gbk\", $suffix=true){\n\t$re['utf-8'] = \"/[\\x01-\\x7f]|[\\xc2-\\xdf][\\x80-\\xbf]|[\\xe0-\\xef][\\x80-\\xbf]{2}|[\\xf0-\\xff][\\x80-\\xbf]{3}/\";\n\t$re['gb2312'] = \"/[\\x01-\\x7f]|[\\xb0-\\xf7][\\xa0-\\xfe]/\";\n\t$re['gbk'] = \"/[\\x01-\\x7f]|[\\x81-\\xfe][\\x40-\\xfe]/\";\n\t$re['big5'] = \"/[\\x01-\\x7f]|[\\x81-\\xfe]([\\x40-\\x7e]|\\xa1-\\xfe])/\";\n\tpreg_match_all($re[$charset], $str, $match);\n\t\n\t$slice = join(\"\",array_slice($match[0], $start, $length));\n\t\n\tif(count($match[0])>$length && $suffix){\n\t $slice = join(\"\",array_slice($match[0], $start, $length-1)).\"..\";\n\t}\n\t\n\t//if($suffix) return $slice.\"..\";\n\t\n\treturn $slice;\n}", "public function slice(int $index, int $length = null): Sequence;", "abstract public function slice($offset, $length = null, $preserveKeys = false);", "public static function str_slice(\n string $str,\n int $start,\n int $end = null,\n string $encoding = 'UTF-8'\n ) {\n if ($encoding === 'UTF-8') {\n if ($end === null) {\n $length = (int) \\mb_strlen($str);\n } elseif ($end >= 0 && $end <= $start) {\n return '';\n } elseif ($end < 0) {\n $length = (int) \\mb_strlen($str) + $end - $start;\n } else {\n $length = $end - $start;\n }\n\n return \\mb_substr($str, $start, $length);\n }\n\n $encoding = self::normalize_encoding($encoding, 'UTF-8');\n\n if ($end === null) {\n $length = (int) self::strlen($str, $encoding);\n } elseif ($end >= 0 && $end <= $start) {\n return '';\n } elseif ($end < 0) {\n $length = (int) self::strlen($str, $encoding) + $end - $start;\n } else {\n $length = $end - $start;\n }\n\n return self::substr($str, $start, $length, $encoding);\n }", "function substr($start,$length = null){\n\t\tif(function_exists(\"mb_substr\")){\n\t\t\tif(PHP_VERSION_ID<50408 && is_null($length)){\n\t\t\t\treturn $this->_copy(mb_substr($this->_String4,$start));\n\t\t\t}\n\t\t\treturn $this->_copy(mb_substr($this->_String4,$start,$length,$this->getEncoding()));\n\t\t}\n\n\t\tif(is_null($length)){\n\t\t\treturn $this->_copy(substr($this->_String4,$start));\n\t\t}\n\t\treturn $this->_copy(substr($this->_String4,$start,$length));\n\t}", "abstract public function getContents($offset, $length);", "protected function substr($string, $start, $length = 2147483647)\n {\n if ($this->encoding !== 'ASCII') {\n return \\mb_substr($string, $start, $length);\n }\n\n return \\substr($string, $start, $length);\n }", "public function offsetGet($offset)\n {\n // init\n $offset = (int)$offset;\n $length = $this->length();\n\n if (\n ($offset >= 0 && $length <= $offset)\n ||\n $length < abs($offset)\n ) {\n throw new \\OutOfBoundsException('No character exists at the index');\n }\n\n return UTF8::substr($this->str, $offset, 1, $this->encoding);\n }", "function substr($str, $start, $length = NULL, $encoding = 'UTF-8') {\n if (function_exists('mb_substr'))\n return mb_substr($str, $start, $length, $encoding);\n else\n return substr($str, $start, $length);\n}", "function the_substr($string, $length) {\n\techo get_substr($string, $length);\n}", "public function substr(string $string, int $start, int $length = null): string\n {\n return mb_substr($string, $start, $length, 'UTF-8');\n }", "static function getViewSubString($str_,$len){\n $str = trim($str_);\n\n if ($str_ != \"\") {\n if (mb_strlen($str_,'UTF-8') <= $len) {\n $str = $str_;\n } else {\n $str = mb_substr($str_, 0, $len,'UTF-8').'....';\n }\n }\n return $str;\n }", "function str_colapse($string,$length=150,$side=\"center\",$filler=\"[....]\"){\n \t\t // side= side to cut chars off, center places .. in the center.\n \t\t // filler is the strning used to indicate chopped of chars.\n\n \t\t $strlength=strlen($string);\n \t\t if($strlength>$length){\n \t\t \t \t if($side==\"right\" or $side==\"end\"){\n \t\t \t \t \t \t $tmpstring=substr($string,0,($length-strlen($filler))).$filler;\n \t\t \t \t } elseif($side==\"left\" or $side==\"begin\"){\n \t\t \t \t \t \t $tmpstring=$filler.\nsubstr($string,\n ($strlength-($length-strlen($filler))),\n ($length-strlen($filler)));\n \t\t \t \t } elseif($side==\"center\" or $side==\"middle\"){\n \t\t \t \t \t \t $firstlength=ceil(($length/100)*20);\n \t\t \t \t \t \t $tmpstring=substr($string,0,$firstlength).$filler.\nsubstr($string,\n ($strlength-($length-($firstlength+strlen($filler)))),\n ($length-($firstlength+strlen($filler))));\n \t\t \t \t }\n \t\t \t \t return $tmpstring;\n \t\t } else {\n \t\t \t \t return $string;\n \t\t }\n }", "public function substr($start, $length = null)\n {\n if ($length === null) {\n $length = $this->length();\n }\n\n $str = UTF8::substr($this->str, $start, $length, $this->encoding);\n\n return static::create($str, $this->encoding);\n }", "public static function substring($s, $start, $length = NULL)\n\t{\n\t\tif (function_exists('mb_substr')) {\n\t\t\tif ($length === NULL && PHP_VERSION_ID < 50408) {\n\t\t\t\t$length = self::length($s);\n\t\t\t}\n\t\t\treturn mb_substr($s, $start, $length, 'UTF-8'); // MB is much faster\n\t\t} elseif ($length === NULL) {\n\t\t\t$length = self::length($s);\n\t\t} elseif ($start < 0 && $length < 0) {\n\t\t\t$start += self::length($s); // unifies iconv_substr behavior with mb_substr\n\t\t}\n\t\treturn iconv_substr($s, $start, $length, 'UTF-8');\n\t}", "public static function strPart($string, $start, $length = 0)\n {\n if (self::isMBString()) {\n if (0 == $length) {\n $length = self::length($string);\n }\n return mb_substr($string, $start, $length, self::$encoding);\n } else {\n\n // @codeCoverageIgnoreStart\n return substr($string, $start, $length);\n // @codeCoverageIgnoreEnd\n }\n }", "public static function substr($str, $start, $length = NULL) {\n preg_match_all('/[\\x01-\\x7F]|[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF][\\x80-\\xBF]/', $str, $arr);\n\n if (is_int($length))\n return implode('', array_slice($arr[0], $start, $length));\n else\n return implode('', array_slice($arr[0], $start));\n }", "public static function substring(string $str, int $start, int $end): string {\n return substr($str, $start, $end - $start);\n }", "public static function byteSubstr($string, $start, $length = null)\n {\n return mb_substr($string, $start, $length === null ? mb_strlen($string, '8bit') : $length, '8bit');\n }", "public function substr($str, $offset = 0, $length = null)\n {\n $length ??= $this->strlen($str);\n assert($length !== false);\n\n return iconv_substr($str, $offset, $length, $this->getEncoding());\n }", "public function readInternal( $pos, $length ) {\n\t\tif ( $pos >= $this->len ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn substr( $this->contents, $pos, $length );\n\t}", "public function stdWrap_substringDataProvider() {}", "static function cutAt(string $s, int $len = 60, int $at = 20, int $cut_len = 0): array|string {\n // \"Original String\" | [pre, cutted, post]\n error_if($at > $len, \"CutAt prefix position can't exceed expected length\");\n $s = preg_replace('/[^[:print:]]/', '.', $s); // replace non-printable with \".\"\n $s = preg_replace('/\\.\\.+/', '..', $s); // multiple dots with 2 dots\n $l = \\strlen($s);\n if ($l <= $len) {\n return $s;\n }\n $to_cut = $l - $len;\n if (0 === $cut_len) {\n $cut = '...';\n } else {\n $cut = substr($s, $at, $to_cut);\n if (\\strlen($cut) > $cut_len) {\n $hcl = $cut_len >> 1; // half-cut-len\n $cut = substr($cut, 0, $hcl).'...'.substr($cut, -$hcl);\n }\n // $cut = Str::cut($cut, $cut_len); // cut cutted part even more if it is long\n $cut = mb_strimwidth($cut, 0, $cut_len, '...');\n }\n\n return [substr($s, 0, $at), $cut, substr($s, $at + $to_cut)];\n }", "function substr_left($string, $length)\n{\n\treturn substr($string, 0, $length);\n}", "public function slice($offset, $length = null, $preserveKeys = true);", "function spip_substr_manuelle($c, $start, $length = NULL) {\n\n\t// Cas pathologique\n\tif ($length === 0)\n\t\treturn '';\n\n\t// S'il y a un demarrage, on se positionne\n\tif ($start > 0)\n\t\t$c = substr($c, strlen(spip_substr_manuelle($c, 0, $start)));\n\telseif ($start < 0)\n\t\treturn spip_substr_manuelle($c, spip_strlen($c)+$start, $length);\n\n\tif (!$length)\n\t\treturn $c;\n\n\tif ($length > 0) {\n\t\t// on prend n fois la longueur desiree, pour etre surs d'avoir tout\n\t\t// (un caractere utf-8 prenant au maximum n bytes)\n\t\t$n = 0; while (preg_match(',[\\x80-\\xBF]{'.(++$n).'},', $c));\n\t\t$c = substr($c, 0, $n*$length);\n\t\t// puis, tant qu'on est trop long, on coupe...\n\t\twhile (($l = spip_strlen($c)) > $length)\n\t\t\t$c = substr($c, 0, $length - $l);\n\t\treturn $c;\n\t}\n\n\t// $length < 0\n\treturn spip_substr_manuelle($c, 0, spip_strlen($c)+$length);\n}", "public function substring(string $string, int $start = 0, int $length = self::DEFAULT_SUBSTRING_LENGTH, bool $addDots = true): string\n {\n $substring = substr($string, $start, $length);\n\n if(\n $addDots\n && strlen($string) > $length\n ){\n $substring .=\"...\";\n }\n\n return $substring;\n }", "function print_content_char_limit($content,$char_limit , $end_string){\n echo substr($content, 0,$char_limit).$end_string;\n}", "public static function substr($string, $start, $length = null){\n return mb_substr($string, $start, $length, 'UTF-8');\n }", "abstract public function _limit($str, $limit, $offset = false);", "public function read($start = 0, $length) {}", "function splice(array|string $input, int $start, int $end = null, array|string $replace = null, array|string &$replaced = null): array|string\n{\n $split = is_array($input) ? $input : mb_str_split($input);\n $splice = array_splice($split, $start, $end, (array) $replace);\n\n $replaced = null;\n if ($splice) {\n $replaced = is_array($input) ? $splice : join($splice);\n }\n\n return is_array($input) ? $split : join($split);\n}", "public function subString($start, $length) {\n $this->_value = substr($this->_value, $start, $length);\n $this->countLength();\n \n return $this;\n }", "function str_replace_from_offset($search, $replace, $subject, $count = -1, $offset = 0) {\r\n\t\t$substr = substr($subject, $offset);\r\n\t\t$substr = str_replace($search, $replace, $substr, $count);\r\n\t\t$subject = substr($subject, 0, $offset) . $substr;\r\n\t\treturn $subject;\r\n\t}", "public static function substr($string, $start, $length = NULL)\n\t{\n\t\tif (function_exists(\"mb_substr\"))\n\t\t\treturn mb_substr($string, $start, $length, self::ENCODING);\n\t\telse\n\t\t\treturn substr($string, $start, $length);\n\t}", "function at($position){\n\t\treturn $this->_copy($this->substr($position,1));\n\t}", "function SubString($str = '', $from = 1, $len = 1)\n\t{\n\t\tif ($str == '') {\n\t\t\treturn '';\n\t\t}\n\t\treturn \" SUBSTR(\".$this->Quote($str).\", $from, $len) \";\n\t}", "public function slice($n)\n {\n if ($this->length < $n) {\n throw new BufferUnderflowException();\n\n } elseif ($this->length === $n) {\n return new Buffer($this->buffer);\n\n } else {\n return new Buffer(substr($this->buffer, 0, $n));\n }\n }", "function maskString($s, $start=1, $end=null, $char = '*') {\n $start = $start - 1;\n\n $array = str_split($s);\n\n $end = strlen($s) < $end ? strlen($s) : $end ? : strlen($s);\n\n for ($start; $start < $end; $start++) {\n $array[$start] = $char;\n }\n return join('',$array);\n }", "function snipString($checkMe){ // cuts the string to an acceptable size for the database\n\t$newString=\tsubstr($checkMe, 0, $STRING_LIMIT); // this may throw an error if the end can't be longer than the string\n\treturn $newString; // return the clipped string for database insert\n}", "public function offsetUnset($offset)\n {\n // Don't allow directly modifying the string\n throw new \\Exception('Stringy object is immutable, cannot unset char');\n }", "public function consumeSlice($n)\n {\n if ($this->length < $n) {\n throw new BufferUnderflowException();\n\n } elseif ($this->length === $n) {\n $buffer = $this->buffer;\n $this->buffer = \"\";\n $this->length = 0;\n return new Buffer($buffer);\n\n } else {\n $buffer = substr($this->buffer, 0, $n);\n $this->buffer = substr($this->buffer, $n);\n $this->length -= $n;\n return new Buffer($buffer);\n }\n }", "public static function getSubString($string, $length=NULL)\n{\n if ($length == NULL)\n $length = 50;\n //Primero eliminamos las etiquetas html y luego cortamos el string\n $stringDisplay = substr(strip_tags($string), 0, $length);\n //Si el texto es mayor que la longitud se agrega puntos suspensivos\n if (strlen(strip_tags($string)) > $length)\n $stringDisplay .= ' ...';\n return $stringDisplay;\n}", "public static function substr($string, $start, $length = null)\n {\n return mb_substr($string, $start, $length, 'UTF-8');\n }", "public static function substr($string, $start, $length = null)\n {\n return mb_substr($string, $start, $length, 'UTF-8');\n }", "public static function substring(string $str, int $start, int $end = null)\n {\n if ($end === null) {\n return substr($str, $start);\n }\n return substr($str, $start, $end - $start);\n }", "public function substr($string, $start, $length) {\n\t\treturn grapheme_substr($string, $start, $length);\n\t}", "function pos(string $string) {\n $result = \"\";\n\n for ($x = strlen($string) - 1; $x >= 0; $x--) {\n $result .= substr($string, $x, 1);\n }\n return $result;\n}", "public function slice($start = 0, $length = null)\n {\n return new ByteArray(\\array_slice($this->toArray(), $start, $length));\n }", "public function subStringFrom($start) {\n $this->_value = substr($this->_value, $start);\n $this->countLength();\n \n return $this;\n }", "static public function extrait( $string, $start = 20, $sep = ' [...]')\r\n {\r\n $extrait = substr( $string, 0, $start );\r\n $extrait = substr( $string, 0, strrpos( $extrait, ' ' ) ) . $sep;\r\n return $extrait;\r\n }", "public function slice($start, $amount);", "public static function substr_in_byte(string $str, int $offset = 0, int $length = null)\n {\n // empty string\n if ($str === '' || $length === 0) {\n return '';\n }\n\n // whole string\n if (!$offset && $length === null) {\n return $str;\n }\n\n if (self::$SUPPORT['mbstring_func_overload'] === true) {\n // \"mb_\" is available if overload is used, so use it ...\n return \\mb_substr($str, $offset, $length, 'CP850'); // 8-BIT\n }\n\n return \\substr($str, $offset, $length ?? 2147483647);\n }", "function substr_right($string, $length)\n{\n\treturn substr($string, -$length, $length);\n}", "public function first($length = null) {\n if ($length === null) {\n $length = 1;\n }\n\n $rawString = mb_substr($this->rawString, 0, $length, $this->charset);\n\n return new static($rawString, $this->charset);\n }", "public function cutStart($length) {\n $rawString = mb_substr($this->rawString, $length, null, $this->charset);\n\n return new static($rawString, $this->charset);\n }", "static function limit_content($str, $length)\n {\n $str = strip_tags($str);\n $str = str_replace('[/', '[', $str);\n $str = strip_shortcodes($str);\n $str = explode(\" \", $str);\n return implode(\" \", array_slice($str, 0, $length));\n }", "function excerpt($str, $len, $end = '...')\n{\n\tif(strlen($str) > $len)\n\t{\n\t\t$str = mb_substr($str, 0, $len, 'UTF-8');\n\t\t$pos = max(strrpos($str, '.'), strrpos($str, ' '), strrpos($str, \"\\n\"));\n\t\tif($pos) $str = substr($str, 0, $pos);\n\t\t$str .= $end;\n\t}\n\treturn $str;\n}", "protected function getSlice($startPosition, $endPosition = 0)\n {\n if (!$endPosition) {\n $endPosition = strlen($this->tempDocumentMainPart);\n }\n\n return substr($this->tempDocumentMainPart, $startPosition, ($endPosition - $startPosition));\n }", "public function LIMIT_string($str) {\n\t\t$row_count = (int)$str;\n\t\t$offset = null;\n\n\t\t/* Check for \"offset, row_count\" notation */\n\t\tif (preg_match('/(\\d+)[, ]\\s{0,2}(\\d+)/', $str, $mc)) {\n\t\t\tlist($tmp, $offset, $row_count) = $mc;\n\t\t} else \n\t\t/* Check for \"row_count OFFSET offset\" notation */\n\t\tif (preg_match('/(\\d+)\\sOFFSET\\s(\\d+)/', $str, $mc)) {\n\t\t\tlist($tmp, $row_count, $offset) = $mc;\n\t\t}\n\n\t\t$this->LIMIT_once($offset, $row_count);\n\t}", "function left($string, $count){\n return substr($string, 0, $count);\n}", "function read(int $length): string {\n $size = $this->getSize();\n if($size < $length) {\n throw new \\OverflowException('Trying to read behind buffer, requested '.$length.' bytes, only got '.$size.' bytes');\n }\n \n $str = \\substr($this->buffer, 0, $length);\n $this->buffer = \\substr($this->buffer, $length);\n \n return $str;\n }", "public static function mask(string $string, int $offset = 0, int $length = 0, string $replacement = '*')\n {\n if ($length < 0) {\n throw new InvalidArgumentException('The length must equal or greater than zero.');\n }\n\n $stringLength = mb_strlen($string);\n $absOffset = abs($offset);\n if ($absOffset >= $stringLength) {\n return $string;\n }\n\n $hiddenLength = $length ?: $stringLength - $absOffset;\n\n if ($offset >= 0) {\n return mb_substr($string, 0, $offset) . str_repeat($replacement, $hiddenLength) . mb_substr($string, $offset + $hiddenLength);\n }\n\n return mb_substr($string, 0, max($stringLength - $hiddenLength - $absOffset, 0)) . str_repeat($replacement, $hiddenLength) . mb_substr($string, $offset);\n }", "function stringLengthSplit($str, $stringLength = 50) {\n\t$returnString = '';\n\tif($stringLength < 5) return '...';\n\t\n\tif(strlen($str) > $stringLength) {\n\t\t$returnString = substr($str, 0, $stringLength - 3) . '...';\n\t} else {\n\t\t$returnString = $str;\n\t}\n\t\n\treturn $returnString;\n}", "private function moveStringCursor($positionOffset, $byteStreamOffset)\n {\n }", "function get_substr($string, $length) {\n\n\tif ( strlen($string) > $length ) {\n\t\treturn $string = trim(substr($string, 0, $length)) . '&hellip;';\n\t}\n\n\treturn $string;\n\n}", "function str_cut ($str, $size) {\n\t// is the string already short enough?\n\t// we count '…' for 1 extra chars.\n\tif( strlen($str) <= $size+1 ) {\n\t\treturn $str;\n\t}\n\n\treturn substr($str, 0, $size) . '…';\n}", "function limitar($sString, $iLimite) {\n\n if ( strlen($sString) > $iLimite ) {\n $sString = mb_substr($sString, 0, $iLimite - 3) . '...';\n } else {\n $sString = mb_substr($sString, 0, $iLimite);\n }\n\n return $sString;\n}", "function getSubString($string, $length=NULL) {\n if ($length == NULL)\n $length = 45;\n //Primero eliminamos las etiquetas html y luego cortamos el string\n $stringDisplay = substr(strip_tags($string), 0, $length);\n //Si el texto es mayor que la longitud se agrega puntos suspensivos\n if (strlen(strip_tags($string)) > $length)\n $stringDisplay .= ' ...';\n return $stringDisplay;\n }", "static function left($str, $length)\n {\n return substr($str, 0, $length);\n }", "public function setCharStartLength($start,$length);", "public function offsetSet($offset, $value)\n {\n // Stringy is immutable, cannot directly set char\n throw new \\Exception('Stringy object is immutable, cannot modify char');\n }", "function left($str, $length) {\n return substr($str, 0, $length);\n}", "function subText($len,$str) {\n if (mb_strlen($str,'utf-8')>$len) {\n return mb_substr($str,0,$len,'utf-8').'...';\n } else {\n return $str;\n }\n}", "public function read($length);", "public function read($length);", "public function read($length);" ]
[ "0.651862", "0.6339322", "0.6238182", "0.61369294", "0.608373", "0.59860986", "0.59843695", "0.5947018", "0.58893776", "0.58860546", "0.58248353", "0.5765659", "0.5724889", "0.56798184", "0.56346923", "0.5599828", "0.55781144", "0.55702823", "0.555053", "0.5493331", "0.5468438", "0.5407055", "0.54022", "0.5380221", "0.5368471", "0.5325369", "0.5318831", "0.52851397", "0.52806234", "0.5264479", "0.52610517", "0.52597666", "0.52416396", "0.52270365", "0.5211092", "0.5209179", "0.5207979", "0.52079517", "0.5202695", "0.5173188", "0.51714355", "0.5165937", "0.5163831", "0.51292026", "0.5105689", "0.5094722", "0.50798595", "0.5072409", "0.5067555", "0.5062745", "0.5044586", "0.50349945", "0.50281096", "0.5013733", "0.49825513", "0.49671346", "0.4953983", "0.49514103", "0.4948137", "0.49461284", "0.4940357", "0.4939706", "0.49241027", "0.4904082", "0.4894998", "0.48935637", "0.48878762", "0.48878762", "0.48808935", "0.4876878", "0.4869528", "0.48604274", "0.48591778", "0.48539665", "0.48439613", "0.4842083", "0.48403057", "0.4829624", "0.48294824", "0.48237053", "0.48056027", "0.48051363", "0.48037317", "0.48027742", "0.48017076", "0.47951883", "0.479472", "0.47915587", "0.47812358", "0.4779152", "0.47755933", "0.47746766", "0.47666135", "0.47505698", "0.47399142", "0.47358006", "0.47254246", "0.47233298", "0.47233298", "0.47233298" ]
0.61575466
3
Check that string has one of passed substrings
public static function stringContains($string, array $variants) { foreach ($variants as $variant) { if (static::findFirstPosition($string, $variant) !== false) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function str_istarts_with_any(string $str, array $substrings): bool\n {\n if ($str === '') {\n return false;\n }\n\n if ($substrings === []) {\n return false;\n }\n\n foreach ($substrings as &$substring) {\n if (self::str_istarts_with($str, (string) $substring)) {\n return true;\n }\n }\n\n return false;\n }", "function str_contains($haystack, $needles) {\n foreach ((array) $needles as $needle) {\n if ($needle != '' && strpos($haystack, $needle) !== false) {\n return true;\n }\n }\n return false;\n}", "function contains($substring, $string)\n{\n\t$pos = strpos($string, $substring);\n\tif ($pos === FALSE) {\n\t\treturn false;\n\t}\n\telse {\n\t\treturn true;\n\t}\n}", "function contains($str, array $arr) {\n foreach( $arr as $a ) {\n if ( stripos($str, $a) !== false ) {\n \treturn true;\n }\n }\n return false;\n}", "public static function str_starts_with_any(string $str, array $substrings): bool\n {\n if ($str === '') {\n return false;\n }\n\n if ($substrings === []) {\n return false;\n }\n\n foreach ($substrings as &$substring) {\n if (self::str_starts_with($str, (string) $substring)) {\n return true;\n }\n }\n\n return false;\n }", "private function testSubArg($string) {\n if (strlen($string) >= 3) {\n $subarg = substr($string, 3);\n $pattern = \"+[ ]{2, }+\";\n if (preg_match($pattern, $string)) {\n return false;\n }\n return true;\n }\n \n return false;\n\n }", "static function haveSubstring(string|array $str, string|array $substring, bool $caseSensitive = true): bool {\n if (\\is_array($str)) {\n foreach ($str as $s) {\n if (self::haveSubstring($s, $substring)) {\n return true;\n }\n }\n\n return false;\n }\n if (\\is_array($substring)) {\n foreach ($substring as $ss) {\n if (self::haveSubstring($str, $ss)) {\n return true;\n }\n }\n\n return false;\n }\n\n return (bool) preg_match('!\\\\b\\\\Q'.$substring.'\\\\E\\\\b!'.($caseSensitive ? '' : 'i'), $str);\n }", "function contains_all($str,array $words) {\r\n if(!is_string($str))\r\n { return false; }\r\n\r\n foreach($words as $word) {\r\n if(!is_string($word) || stripos($str,$word)===false)\r\n { return false; }\r\n }\r\n return true;\r\n}", "public function isFirstPartOfStrReturnsFalseForNotMatchingFirstPartDataProvider() {}", "function haveStr(string $haystack, string $needle) : bool\n{\n return (strpos($haystack, $needle) !== false);\n}", "public function isFirstPartOfStrReturnsTrueForMatchingFirstPartDataProvider() {}", "static function match($string);", "function array_contains_part_of_string ($string, $array) {\n\tforeach ($array as $value) {\n\t\t//if (strstr($string, $url)) { // mine version\n\t\tif (strpos($string, $value) !== FALSE) { // Yoshi version\n\t\t\treturn true;\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t}\n return false;\n\t\n}", "public static function str_ends_with_any(string $str, array $substrings): bool\n {\n if ($substrings === []) {\n return false;\n }\n\n foreach ($substrings as &$substring) {\n if (\\substr($str, -\\strlen($substring)) === $substring) {\n return true;\n }\n }\n\n return false;\n }", "function acf_str_exists($needle, $haystack)\n{\n}", "function _string_contains( $needle, $haystack )\n{\n return strpos( $haystack, $needle ) !== false;\n}", "static function has_string( $var, $string ){\n\t\treturn stripos( self::get( $var ), $string ) !== false;\n\t}", "static function contains(string $s, array|string $needles): bool {\n foreach ((array) $needles as $needle) {\n if ('' !== $needle && false !== mb_strpos($s, $needle)) {\n return true;\n }\n }\n\n return false;\n }", "function starts_with($string,...$start)\n{\n if(!$string)\n return false;\n foreach( $start as $s )\n if( strpos(\"$string\",\"$s\") === 0 )\n return true;\n return false;\n}", "public static function contains($value, $subString)\n {\n return (false !== strpos($value, $subString)) ? true : false;\n }", "public function exists(string $string);", "function isMatch($s, $p)\n{\n if ($s == $p) {\n return true;\n }\n if (empty($p)) {\n return ($s == '');\n }\n if (@$p[1] != '*') {\n return (($s[0] == $p[0]) || ($p[0] == '.' && isset($s[0]))) && isMatch(substr($s,1), substr($p,1));\n }\n $i = 0;\n while((@$s[$i] == $p[0]) || ($p[0] == '.' && isset($s[$i]))) {\n if (isMatch($s, substr($p,2))) {\n return true;\n }\n $i++;\n }\n return isMatch(substr($s, $i), substr($p,2));\n}", "public static function str_iends_with_any(string $str, array $substrings): bool\n {\n if ($substrings === []) {\n return false;\n }\n\n foreach ($substrings as &$substring) {\n if (self::str_iends_with($str, $substring)) {\n return true;\n }\n }\n\n return false;\n }", "function strContains($haystack, $needle)\n{\n return strpos($haystack, $needle) > -1 ? true : false;\n}", "static function contains( $str, $val )\n {\n return ( strpos($str, $val) !== false );\n }", "private function contains($str, array $arr)\n {\n foreach ($arr as $a) {\n if (stripos($str, $a) !== false) {\n return true;\n }\n }\n return false;\n }", "public function isLastPartOfStringReturnsTrueForMatchingFirstPartDataProvider() {}", "function contains($haystack, $needles)\n{\n foreach ((array) $needles as $needle) {\n if ($needle !== '' && mb_strpos($haystack, $needle) !== false) {\n return true;\n }\n }\n return false;\n}", "public function ifStr($str);", "function substr_in_array($needle, array $haystack){\n foreach($haystack as $item){\n if(false !== strpos($item, $needle)){\n return false;\n }\n }\n return true;\n}", "static function containsAll(string $s, array $needles): bool {\n foreach ($needles as $needle) {\n if ('' !== $needle && false === mb_strpos($s, $needle)) {\n return false;\n }\n }\n\n return true;\n }", "function ends_with($string,...$end)\n{\n if(!$string)\n return false;\n foreach( $end as $e )\n if( substr($string,strlen($string)-strlen($e)) == $e )\n return true;\n return false;\n}", "function InStr($chars, $string)\r\n{\r\n\tif ($chars == '') return true;\r\n\treturn strpos($string, $chars) !== false;\r\n}", "function contains($c, $s){\r\n for ($i = 0; $i < strlen($s); $i++){\r\n if ($s[$i] == $c){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "function judge($str) {\r\n\t\tforeach ($this->allergicWord as $key) {\r\n\t\t\tif (is_int(strpos($str, $key))) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static function stringContains($string, $substring)\n {\n if(empty($string) && empty($substring)){\n return false;\n }\n return strpos($string, $substring) !== false ? true : false;\n }", "public function matches($str, array $inputs)\n\t{\n\t\tforeach ($inputs as $key)\n\t\t{\n\t\t\tif ($str !== (isset($this[$key]) ? $this[$key] : NULL))\n\t\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "static function isInSet($str, array $a_set) {\n return in_array($str, $a_set);\n }", "public static function isValid(string $string): bool;", "private function validate_strings(array &$string_arr) {\n foreach ($string_arr as $string) {\n if (self::getChar($string, 0) !== '-' || \n self::testArgExists($string) === false ||\n self::testSubArg($string) === false) {\n trigger_error(\"Malformed string $string found via\n validate_strings.\");\n }\n }\n }", "public static function contains($subject, $substring): bool\n {\n return mb_strpos($subject, $substring) !== false;\n }", "public function check( $str ) {\n if(empty($str)) return false;\n \n $str = str_replace(' ', '', $str);\n //remove special characters\n $str = preg_replace('/[^A-Za-z0-9\\-]/', '', $str);\n //change case to lower\n $str = strtolower($str);\n $length = strlen($str);\n $i = 0;\n // \n while ($str[$i] == $str[$length - ($i + 1)]) {\n $i++;\n\n if ($i > $length / 2) {\n return true;\n }\n }\n return false;\n }", "function check_string($str){\r\n\tif(substr_count($str,\" \")==strlen($str)){\r\n return FALSE;\r\n }\r\n\treturn TRUE;\r\n}", "function str_contains (string $str, string $needle): bool {\n\treturn (strpos($str, $needle) !== false);\n}", "function check_string ($var) {\n \n if (preg_match ('/^([A-Za-z0-9 ]+)+$/', $var)) {\n return true;\n } else {\n return false;\n }\n}", "public function testContains4()\n {\n $this->assertFalse(Str::contains('foo', ['y', 'b']));\n }", "function checkStrings($str1, $str2){\n if(validateInput($str1) && validateInput($str2))\n compareStrings($str1, $str2);\n else\n invalidInput();\n }", "function seachString($name,$str)\n\t{\n\t\t$result='';\n\t\t$result = strpos($name,$str);\n\t\tif ($result != '') {\n\t\t\techo \"True\";\n\t\t}\n\t\telse{\n\t\t\techo\"Flase\";\n\t\t}\n\n\t}", "function startsWith($string, $startString) \n\t{\n\t\t// with given substring\n \t\n \t// from https://www.geeksforgeeks.org/php-startswith-and-endswith-functions/\n \t\n \t$len \t\t\t\t\t\t\t\t\t\t\t= strlen($startString); \n\t\treturn (substr($string, 0, $len) === $startString); \n\t}", "public function testContains3()\n {\n $this->assertFalse(Str::contains('foo', 'y'));\n }", "function template_share_status($string){\n\n if($_POST['access']==$string){\n return true;\n }else{\n if(strpos($string,\"other-\"==0)){\n return true;\n }else{\t\t\n return false;\n }\n }\n\n}", "function template_share_status($string){\n\n if($_POST['access']==$string){\n return true;\n }else{\n if(strpos($string,\"other-\"==0)){\n return true;\n }else{\t\t\n return false;\n }\n }\n\n}", "function isstr($array, $text)\n{\nif(strpos($text, $array) === false) {\nreturn false;\n} else {\nreturn true;\n}\n}", "public function testContains1()\n {\n $this->assertTrue(Str::contains('foo', 'oo'));\n }", "function string_has_params($string) {\n if (strpos($string, $this->parse['before']) !== false) {\n if (strpos($string, $this->parse['after']) !== false) {\n return strpos($string, $this->parse['after']) >\n strpos($string, $this->parse['before']);\n }\n }\n\n return false;\n }", "function contains_word($haystack, array $needles)\n {\n foreach($needles as $a) {\n if (stripos($haystack,$a) !== false) return true;\n }\n return false;\n }", "function ends_iwith($string,...$end)\n{\n if(!$string)\n return false;\n $string = strtolower($string);\n foreach( $end as $e )\n if( substr($string,strlen($string)-strlen($e)) == strtolower($e) )\n return true;\n return false;\n}", "function str_contains(string $haystack, string $needle): bool\n {\n return '' === $needle || false !== strpos($haystack, $needle);\n }", "function check_string ($var)\n{\n if (preg_match ('/^([A-Za-z0-9 ]+)+$/', $var))\n {\n return true;\n }\n else\n {\n return false;\n }\n}", "function strStartsWith($haystack,$needle){\n\n if(strlen($haystack)<strlen($needle)){\n return false;\n }\n $pos=stripos($haystack,$needle);\n if(!$pos||$post>0){\n return false;\n }\n return true;\n}", "function preg_match_array($regexArray, $str) {\r\n foreach ($regexArray as $p) {\r\n $trimP = trim($p);\r\n if ($trimP != '') {\r\n if (preg_match('/' . $trimP . '/', $str)) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n}", "private function strContains($string, $niddle)\n {\n return mb_strpos(mb_strtolower($string), mb_strtolower($niddle)) !== false;\n }", "function has_prefix($string, $prefix)\n {\n return substr($string, 0, strlen($prefix)) == $prefix;\n }", "public function validate($string) {\n $normalized = $this->normalize($string);\n return !in_array($normalized, $this->getList());\n }", "function matchstr($string1, $string2 ){\n\t\t//$string2 = utf8_strtolower( preg_replace('/([\\s+])/', '', Encoding::fixUTF8($string2 )));\n\t\t$string1 = explode(\" \", utf8_strtolower(Encoding::fixUTF8($string1)) );\n\t\t$string2 = explode(\" \", utf8_strtolower(Encoding::fixUTF8($string2)) );\n\t\t\n\t\t$filterStr1 = array();\n\t\tforeach( $string1 as $str1 ){\n\t\t\tif( trim($str1,'.') == $str1 ){\n\t\t\t\t$filterStr1[] = $str1;\n\t\t\t}\n\t\t}\n\t\t$filterStr2 = array();\n\t\tforeach( $string2 as $str2 ){\n\t\t\tif( trim($str2,'.') == $str2 ){\n\t\t\t\t$filterStr2[] = $str2;\n\t\t\t}\n\t\t}\n\t\t$foundName = array_intersect( $filterStr1, $filterStr2 );\n\t\treturn (count($foundName)==count($filterStr1));\n\t}", "public function testNOTMatchingMultipleSubstrings() {\n\t\techo 'The quick brown fox jumps over the lazy dog';\n\n\t\t$this->expectOutputContains( 'brown dog' ); // Not failing.\n\t\t$this->expectOutputContains( 'lazy dog' );\n\t}", "function InString($what,$where) {\n\t\t$pos = strpos ($where, $what);\n\t\tif (is_string($pos) && !$pos) {\n\t\t return false;\n\t\t}\n\t\treturn true;\n\t}", "function _strDetect ($needles, $offset) {\r\n foreach ($needles as $needle) {\r\n $l = strlen ($needle);\r\n if (substr ($this->_text, $offset, $l) == $needle) {\r\n return $needle;\r\n }\r\n }\r\n return false;\r\n }", "function valid_words ( $str )\n\t{\n\t\t$bReturn = TRUE;\n\t\tif ( $this->forbidden_words === '') return FALSE;\n\t\t$aWords = explode( ',', $this->forbidden_words );\n\t\tforeach( $aWords as $sWord )\n\t\t{\n\t\t\t$sWord = trim( $sWord );\n\t\t\t$uPos = stripos( $str, $sWord );\n\t\t\tif (ereg(\"([0-9])\", $uPos)) // Avoid using boolean because the word can be in 0 (first) position\n\t\t\t{\n\t\t\t\t$bReturn = FALSE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $bReturn;\n\t}", "public function testContains2()\n {\n $this->assertTrue(Str::contains('foo', ['y', 'o']));\n }", "private function _hasSpecificSequence($string)\n {\n $hasSpecificSequence = FALSE;\n $specialMeaningStrs = array('\\n', '\\r', '\\t', '\\v', '\\f');\n foreach ($specialMeaningStrs as $splStr) {\n if (FALSE !== strpos($string, $splStr)) {\n $hasSpecificSequence = TRUE;\n }\n }\n $specialMeaningPtrns = array('\\[0-7]{1,3}', '\\x[0-9A-Fa-f]{1,2}');\n foreach ($specialMeaningPtrns as $splPtrn) {\n if (1 === preg_match(\"/{$splPtrn}/\", $string)) {\n $hasSpecificSequence = TRUE;\n }\n }\n return $hasSpecificSequence;\n }", "function has_prefix($string, $prefix) {\n return substr($string, 0, strlen($prefix)) == $prefix;\n }", "private function match($chArray, $string)\n {\n foreach ($chArray as $ch) {\n if (strpos($string, $ch) !== false) {\n return true;\n }\n }\n return false;\n }", "function CheckError($str)\n{\n\tif (strpos($str, 'myclubapi-error') !== false) \n\t{\n\t\treturn true;\n\t}\n\treturn false;\n}", "public static function stringContains($haystack, $needles)\n {\n foreach ((array)$needles as $needle) {\n if ($needle != '' && mb_strpos($haystack, $needle) !== false) {\n return true;\n }\n }\n return false;\n }", "function buscar($x, $z) {\n $zlong = strlen($z);\n $xlong = strlen($x);\n $w_start = $xlong-$zlong-1;\n //substr devuelve parte de una cadena\n if(substr($x, $xlong-$zlong, $zlong) == $z){\n return \"true\";\n } \n else{\n return \"false\";\n }\n}", "public function startsWith($string, $substring) {\n if (empty($string) || empty($substring)) return false;\n return strpos($string, $substring) === 0;\n }", "static public function checkString($s){\n if (ctype_lower($s) || ctype_upper($s) || ctype_alpha($s)){\n return false;\n }\n return true;\n }", "function cpay_ispos($string,$search) {\r\n if (strpos($string,$search)===false) {\r\n return(false);\r\n } else {\r\n return(true);\r\n }\r\n }", "function is_obscene($str)\n{\n $str = strtolower($str);\n $bad_array = [\n 'fuck',\n 'shit',\n 'nigger',\n 'nigga',\n 'whore',\n 'bitch',\n 'slut',\n 'cunt',\n 'cock',\n 'dick',\n 'penis',\n 'damn',\n 'spic'\n ];\n $obsene = false;\n foreach ($bad_array as $bad) {\n if (strpos($str, $bad) !== false) {\n $obsene = true;\n break;\n }\n }\n return $obsene;\n}", "function is_obscene($str)\n{\n $str = strtolower($str);\n $bad_array = [\n 'fuck',\n 'shit',\n 'nigger',\n 'nigga',\n 'whore',\n 'bitch',\n 'slut',\n 'cunt',\n 'cock',\n 'dick',\n 'penis',\n 'damn',\n 'spic'\n ];\n $obsene = false;\n foreach ($bad_array as $bad) {\n if (strpos($str, $bad) !== false) {\n $obsene = true;\n break;\n }\n }\n return $obsene;\n}", "function parse_string_is_once_param($string) {\n if (\n substr($string, 0, strlen($this->parse['before'])) == $this->parse['before'] &&\n substr($string, -strlen($this->parse['after']), strlen($this->parse['after'])) == $this->parse['after']) {\n return\n substr_count($string, $this->parse['before']) == 1 &&\n substr_count($string, $this->parse['after']) == 1;\n }\n\n return false;\n }", "public function isLastPartOfStringReturnsFalseForNotMatchingFirstPartDataProvider() {}", "function isPrefix($prefix, $string){\n\t\tif(strlen($prefix) > strlen($string)){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\treturn (substr($string, 0, strlen($prefix)) == $prefix);\n\t\t}\n\t}", "function validateSpecial($string)\n\t\t{\n\t\t\t$specials=\tarray(\"!\",\"@\",\"#\",\"$\",\"%\",\"^\",\"&\",\"*\",\"(\",\")\",\"_\",\"-\",\"=\",\"+\",\"'\",\"\\\"\",\".\",\",\",\":\",\";\");\n\t\t\t$string\t=\ttrim($string);\n\t\t\t$count\t=\t0;\n\t\t\tfor($i=0;$i<strlen($string);$i++){\n\t\t\t\tif(in_array($string[$i],$specials)){\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif($count>0){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function find_string_notes($string, $note, $strings, $start, $end) {\n // loop through the notes in our string\n for ($i = $start; $i <= $end; $i++) {\n // if the note matches, let us know\n if ($strings[$string][$i] == $note) {\n return true;\n }\n }\n \n // if we've gotten this far, it wasn't found\n return false;\n }", "function str_contains($haystack, $needles)\n {\n return Str::contains($haystack, $needles);\n }", "function validate_string($input) {\n if (!is_string($input) || empty($input)) return false;\n\n return true;\n}", "protected static function __startsWith(string $subStr, string $str): bool {\n\t\treturn substr($str, 0, strlen($subStr)) === $subStr;\n\t}", "function check_str_end(string $string, string $end, int $len, $endLength): bool\n{\n return substr($string, $len - $endLength, $endLength) == $end;\n}", "function email_contains($needle, $barn) {\n\n\t// If not empty ...\n\tif ( ! empty ( $barn ) ) {\n\t\t// search string\n\t\tforeach ( $barn as $straw ) {\n\t\t\tif ( $straw == $needle ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n\n}", "public function beginsWithReturnsFalseForNotMatchingFirstPartDataProvider() {}", "function checkWords($input, $unwanted_words) {\n foreach ($unwanted_words as $value) {\n if(strpos($input, $value) !== false){ return false; }\n }\n return true;\n }", "function is_reserved_name($str) {\n\t\t$reserved = array('name','value','content','parent','rank','password','timestamp');\n\t\tif(empty($str) || in_array($str, $reserved)) return true;\n\t\treturn false;\n\t}", "function checkInput($string1, $string2, $string3)\n\t{\n\t\tif (is_string($string1) && is_string($string2) && is_string($string3))\n\t\t{\n \t\techo 'True';\n\t\t}\n\t\telse{\n \t\tthrow new LogicException('<b>Invalid parameter </b>');\n \t}\n\t}", "function matchStrings($userValue, $label)\n{\n// debug(\"matchStrings $label\", $userValue);\n\n if(!strcasecmp($userValue, $label)) return true;\n \n $firstWord = substringBefore($label, \" \");\n return startsWith($userValue, $firstWord);\n}", "private function _match($keyword, $string) {\n\t\t//sanitize\n\t\tforeach (array(' ', '-', '_') AS $key => $val) {\n\t\t\t$keyword = str_replace($val, '', $keyword);\n\t\t\t$string = str_replace($val, '', $string);\n\t\t}\n\t\t\n\t\t$keyword = strtolower($keyword);\n\t\t$string = ' '.strtolower($string);\n\t\tif (!$keyword || !$string) return false;\n\t\t\n\t\tif (strpos($string, $keyword) >= 1) return true;\n\t}", "public static function validateString($str)\n {\n if(strpos($str, \"=\")!==false) return false;\n if(strpos($str, \" \")!==false) return false;\n if(strpos($str, \"(\")!==false) return false;\n if(strpos($str, \")\")!==false) return false;\n if(strpos($str, \"'\")!==false) return false;\n if(strpos($str, \"/\")!==false) return false;\n return true;\n }", "function exact_value ( $str, $val )\n\t{\n\t\tif ( strcmp( strval( $str ), strval( $val ) ) !== 0 ) return FALSE;\n\t\treturn TRUE;\n\t}", "function valid_input($myinput, $good_input) {\n if (preg_match(\"/$good_input/\", $myinput, $regs)) {\n return true;\n }\n else {\n return false;\n }\n}" ]
[ "0.7009283", "0.70012707", "0.6965653", "0.69632995", "0.6947512", "0.6916798", "0.68115985", "0.6811339", "0.6777383", "0.66523534", "0.6642791", "0.6636761", "0.66121846", "0.65797126", "0.6548112", "0.6540831", "0.65159124", "0.6475113", "0.645381", "0.6421629", "0.64184", "0.63870496", "0.6384946", "0.63829345", "0.63620824", "0.6341116", "0.63230044", "0.63170093", "0.6314006", "0.62863135", "0.6282471", "0.6270441", "0.62556165", "0.6253989", "0.6253061", "0.625047", "0.6238526", "0.62248945", "0.6218778", "0.6207669", "0.6207353", "0.6206039", "0.62053835", "0.62035364", "0.6196923", "0.617261", "0.61715025", "0.6169543", "0.6165675", "0.61557776", "0.6141547", "0.6141547", "0.6123001", "0.612161", "0.61113095", "0.6111022", "0.61062557", "0.6102942", "0.6101112", "0.60967225", "0.60816574", "0.60783136", "0.606208", "0.60601616", "0.60479563", "0.60448366", "0.60410637", "0.6039153", "0.602251", "0.60223794", "0.6021299", "0.6007788", "0.6007196", "0.6006042", "0.6003453", "0.60026056", "0.6000493", "0.59998673", "0.59952146", "0.59890354", "0.59890354", "0.5984578", "0.59691256", "0.59613943", "0.5957161", "0.5950612", "0.5938484", "0.5938074", "0.59303427", "0.5928338", "0.59267855", "0.59191716", "0.5916845", "0.5886166", "0.58763146", "0.5864037", "0.58636695", "0.5857326", "0.5848763", "0.5845228" ]
0.6206204
41
/ formdagi dropdown orqali kelgan ID ni API dan topib, malumotlarini uzatadi
public function GetStatisticsDateStart($date) { $date = explode(' - ',$date); return $date[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dropdown_ijin() {\n $result = $this->db->get('tbl_ijin');\n\n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $dd[''] = 'Please Select';\n if ($result->num_rows() > 0) {\n foreach ($result->result() as $row) {\n // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)\n $dd[$row->id_ijin] = $row->nomor . \"/KODE KANTOR/\" . $row->id_seksi . \"/\" . $row->tahun;\n }\n }\n return $dd;\n }", "public function get_mata_kuliah(){\n\t\t$this->load->model('m_aka');\n $id_prodi = $this->input->post('id_prodi');\n $dataMataKuliah = $this->m_aka->getDataMatakuliah($id_prodi);\n \n echo '<select name=\"mata_kuliah\" id=\"mata_kuliah\">';\n foreach($dataMataKuliah as $a){\n echo '<option value=\"'.$a->id_mk.'\">'.$a->kode_mk.'/ '.$a->nama_mk;'</option>';\n }\n echo '</select>';\n\t}", "public function ambil_dropdown(){\n\t\treturn $this->db->get('daftar_akun')->result();\n\t}", "function _dispen_hari(){\n\t\t$CI =& get_instance();\n\t\t$api_url \t= URL_API_SIA.'sia_sistem/data_view';\n\t\t$parameter = array('api_kode' =>200002, 'api_subkode' => 1, 'api_search' => array());\n\t\t$data \t\t= $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\treturn $data[0]->KADALUWARSA_HARI1;\n\t}", "public function chondethi($id){\n if($id == 0){\n echo \"<option>Đề Thi</option>\";\n foreach(dethi::all() as $dt){\n echo \"<option value='\".$dt->id.\"'>\".$dt->tendethi.\"</option>\";\n }\n }else{\n $nguoirade = nguoirade::find($id);\n $dethi = dethi::where('id_nguoirade', $nguoirade->id)->orderBy('id', 'desc')->get();\n echo \"<option>Đề Thi</option>\";\n foreach($dethi as $dt){\n echo \"<option value='\".$dt->id.\"'>\".$dt->tendethi.\"</option>\";\n }\n }\n\n }", "public function select2_noakun($idakun = null) {\n\t\t// $data = $this->db->get('mnoakun')->result_array();\n\t\t$this->output->set_content_type('application/json')->set_output(json_encode($this->Noakun_model->select2_noakun($idakun)));\n\t}", "public function dropdown_kondisi()\n {\n //Query untuk mengambil data kondisi dan diurutkan berdasarkan nama kondisi\n $sql = \"SELECT * FROM kondisi ORDER BY waktu_respon\";\n $query = $this->db->query($sql);\n\n //Value default pada dropdown\n $value[''] = '-- CHOOSE --';\n //Menaruh data kondisi ke dalam dropdown, value yang akan diambil adalah value id_kondisi\n foreach ($query->result() as $row) {\n $value[$row->id_kondisi] = $row->nama_kondisi . \" - (Process Target \" . $row->waktu_respon . \" \" . \"Day)\";\n }\n return $value;\n }", "public function actionSelect(){\n $select = $this->select('Pilih donk akhh..', ['kopi'=>'kopi', 'susu'=>'susu']);\n echo \"Pilihan nya adalah : $select\";\n }", "function kontrakt()\r\n\t{\r\n\t\t$obr = \"SELECT ID, KONTRAKT FROM KONTRAKT ORDER BY ID\";\t\r\n\t\t$res_obr = mysql_query($obr);\r\n\t\t$number = 1;\r\n /* show result */\r\n\t \twhile ($row = mysql_fetch_array($res_obr, MYSQL_ASSOC)) \r\n\t\t{\r\n\t\t\tprintf(\"<option value='\".$row[\"ID\"].\"'>\");\r\n \tprintf ($row[\"KONTRAKT\"]);\r\n\t\t\tprintf(\"</option>\");\r\n\t\t\t$number ++;\r\n\t\t}\r\n\t\tmysql_free_result($res_obr);\r\n\t}", "function select_by_get($id) {\r\n //id_berita dapat dari get\r\n $response = array();\r\n $data['data'] = array();\r\n\r\n $result = $this->Berita_m->select_berita_where($id);\r\n\r\n if (sizeof($result) > 0) {\r\n foreach ($result as $value) {\r\n $response['id_berita'] = $value->id_berita;\r\n $response['judul'] = $value->judul;\r\n $response['deskripsi'] = $value->deskripsi;\r\n $response['kategori'] = $value->kategori;\r\n array_push($data['data'], $response);\r\n }\r\n\r\n $data['status'] = 0;\r\n $data['response'] = 'Data Ditemukan';\r\n\r\n die(json_encode($data));\r\n } else {\r\n $response['status'] = 1;\r\n $response['response'] = 'Tidak data yang ditampilkan';\r\n\r\n die(json_encode($response));\r\n }\r\n }", "public function controleur_option()\n {\n $this->load->model('m_utilisateurs');\n $resultat = $this->m_utilisateurs->liste_option();\n $results = json_decode(json_encode($resultat), true);\n\n echo \"<option value='' selected='selected'>(choisissez)</option>\";\n foreach ($results as $row) {\n echo \"<option value='\" . $row['utl_id'] . \"'>\" . $row['utl_nom'] . \"</option>\";\n }\n }", "public function show_rekapkat(){\n // load library to cek user session and level\n $this->pageauth->sess_auth();\n $this->load->model('pages/m_crud_forecast');\n $query = $this->m_crud_forecast->select_cat();\n echo \"<option>- PILIH -</option>\";\n foreach ($query->result() as $row){\n echo \"<option value='$row->cat_code'>\" . $row->cat_desc . \"</option>\";\n }\n }", "public function client_option()\n {\n $this->load->model('m_contacts');\n $resultat = $this->m_contacts->liste_option();\n $results = json_decode(json_encode($resultat), true);\n\n echo \"<option value='' selected='selected'>(choisissez)</option>\";\n foreach ($results as $row) {\n echo \"<option value='\" . $row['id'] . \"'>\" . $row['value'] . \"</option>\";\n }\n }", "public function mostrarID(){\n $conexion = Conexion();\n $sql=\"SELECT * from tbl_categoria\"; \n foreach ($conexion->query($sql) as $row){\n echo \"<option value='{$row ['id_categoria']}'>{$row ['id_categoria']}</option>\";\n }\n }", "function otdelenie()\r\n\t{\r\n\t\t$obr = \"SELECT ID, FORMAOBUCH FROM FORMAOBUCH ORDER BY ID\";\t\r\n\t\t$res_obr = mysql_query($obr);\r\n\t\t$number = 1;\r\n /* show result */\r\n\t \twhile ($row = mysql_fetch_array($res_obr, MYSQL_ASSOC)) \r\n\t\t{\r\n\t\t\tprintf(\"<option value='\".$row[\"ID\"].\"'>\");\r\n \tprintf ($row[\"FORMAOBUCH\"]);\r\n\t\t\tprintf(\"</option>\");\r\n\t\t\t$number ++;\r\n\t\t}\r\n\t\tmysql_free_result($res_obr);\r\n\t}", "public function resultat_option()\n {\n $resultat = $this->m_feuille_controle->resultat_liste_option();\n $results = json_decode(json_encode($resultat), true);\n\n echo \"<option value='' selected='selected'>(choisissez)</option>\";\n foreach ($results as $row) {\n echo \"<option value='\" . $row['id'] . \"'>\" . $row['value'] . \"</option>\";\n }\n }", "function getDropDown() ;", "public function dropdown_pembeli()\n {\n $this->db->select ('\n pembeli.kd_pembeli,\n pembeli.nm_pembeli\n ');\n\n // Urut abjad\n $this->db->order_by('nm_pembeli');\n\n $result = $this->db->get('pembeli');\n \n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $dropdown[''] = '--Pilih Pembeli--';\n\n if ($result->num_rows() > 0) {\n \n foreach ($result->result_array() as $row) {\n // Buat array berisi 'value' (id kategori) dan 'nama' (nama kategori)\n $dropdown[$row['kd_pembeli']] = $row['nm_pembeli'];\n }\n }\n\n return $dropdown;\n }", "public function dropdown_barang()\n {\n $this->db->select ('\n barang.kd_brg,\n barang.nm_brg\n ');\n\n // Urut abjad\n $this->db->order_by('nm_brg');\n\n $result = $this->db->get('barang');\n \n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $dropdown[''] = '--Pilih Barang--';\n\n if ($result->num_rows() > 0) {\n \n foreach ($result->result_array() as $row) {\n // Buat array berisi 'value' (id kategori) dan 'nama' (nama kategori)\n $dropdown[$row['kd_brg']] = $row['nm_brg'];\n } \n }\n\n return $dropdown;\n }", "public function dropdown_lokasi()\n {\n //Query untuk mengambil data lokasi dan diurutkan berdasarkan nama lokasi\n $sql = \"SELECT * FROM lokasi ORDER BY lokasi\";\n $query = $this->db->query($sql);\n\n //Value default pada dropdown\n $value[''] = '-- CHOOSE --';\n //Menaruh data lokasi ke dalam dropdown, value yang akan diambil adalah value id_lokasi\n foreach ($query->result() as $row) {\n $value[$row->id_lokasi] = $row->lokasi;\n }\n return $value;\n }", "function listadoregiones() {\n $query8 = \"SELECT * FROM intranet_roadmap_regiones\";\n $result8 = (array) json_decode(miBusquedaSQL($query8), true) ;\n foreach ($result8 as $pr8) {\n $proyectos .= '<option value=\"'.$pr8['id_region'].'\">'.$pr8['nombre_region'].'</option> \n';\n }\n return $proyectos;\n\n}", "function shfaqKurset( $id )\n\t{\t\n\n\t\tglobal $db;\n\n\t\t$output = '<select class=\"form-control\">';\n\n\t\t$sql = \"SELECT kurs_id FROM menaxhon WHERE instruktor_id = '$id'\";\n\n\t\t$results = $db->query( $sql );\n\n\t\tif( mysqli_num_rows( $results ) > 0 )\n\t\t{\n\t\t\twhile( $kurs = $results->fetch_assoc() )\n\t\t\t{\t\n\t\t\t\t$k_id = $kurs[ 'kurs_id' ];\n\n\t\t\t\t$sql2 = \"SELECT lloji_kursit FROM kurse WHERE kurs_id = '$k_id'\";\n\n\t\t\t\t$pergjigja = $db->query( $sql2 );\n\n\t\t\t\t$kurs = mysqli_fetch_assoc( $pergjigja );\n\n\n\t\t\t\t$output .= '<option style=\"padding: 0 0 0 20px;\" value=\"'. $kurs[ 'lloji_kursit' ] .'\">' . $kurs[ 'lloji_kursit' ]. '</option>';\n\t\t\t}\n\t\t}///FUND if\n\t\telse\n\t\t{\n\t\t\t$output = '<option>Ky instruktor nuk ka kurse per momentin!</option>';\n\t\t}\n\n\t\treturn $output;\n\t}", "function dropdown_teknisi()\n { \n //Query untuk mengambil data user yang memiliki level 'Technician'\n $query = $this->db->query(\"SELECT A.username, B.nama FROM user A LEFT JOIN karyawan B ON B.nik = A.username WHERE A.level = 'Technician'\");\n\n //Value default pada dropdown\n $value[''] = '-- CHOOSE --';\n //Menaruh data user teknisi ke dalam dropdown, value yang akan diambil adalah value id_user yang memiliki level 'Technician'\n foreach ($query->result() as $row) {\n $value[$row->username] = $row->nama;\n }\n return $value;\n }", "public function obtener()\r\n {\r\n\r\n $estado=$_POST[\"miestado\"];\r\n\r\n $data=$this->usuarios_Model->obtenerCapitales($estado);\r\n\r\n // print_r(json_encode($data)); \r\n\r\n echo '<option>'.$data->capital.'</option>';\r\n\r\n\r\n\r\n \r\n\r\n // combo dependiente a lo picapiedra\r\n\r\n // $options=\"\";\r\n // if ($_POST[\"miestado\"]== 'Amazonas') \r\n // {\r\n // $options= '\r\n // <option value=\"Puerto Ayacucho\">Puerto Ayacucho</option> \r\n // '; \r\n \r\n // }\r\n\r\n // if ($_POST[\"miestado\"]== 'Anzoátegui') \r\n // {\r\n // $options= '\r\n // <option value=\"Aragua\">Aragua</option> \r\n // '; \r\n \r\n // }\r\n\r\n // if ($_POST[\"miestado\"]== 'Apure') \r\n // {\r\n // $options= '\r\n // <option value=\"San Fernando de Apure\">San Fernando de Apure</option> \r\n // '; \r\n \r\n // }\r\n\r\n // if ($_POST[\"miestado\"]== 'Aragua') \r\n // {\r\n // $options= '\r\n // <option value=\"Maracay\">Maracay</option> \r\n // '; \r\n \r\n // }\r\n\r\n // if ($_POST[\"miestado\"]== 'Barinas') \r\n // {\r\n // $options= '\r\n // <option value=\"Barinas\">Barinas</option> \r\n // '; \r\n \r\n // }\r\n\r\n // echo $options;\r\n\r\n }", "function lgot_vne()\r\n\t{\r\n\t\t$obr = \"SELECT ID, LGOTAVNEKONK FROM LGOTAVNEKONK ORDER BY ID\";\t\r\n\t\t$res_obr = mysql_query($obr);\r\n\t\t$number = 1;\r\n /* show result */\r\n\t \twhile ($row = mysql_fetch_array($res_obr, MYSQL_ASSOC)) \r\n\t\t{\r\n\t\t\tprintf(\"<option value='\".$row[\"ID\"].\"'>\");\r\n \tprintf ($row[\"LGOTAVNEKONK\"]);\r\n\t\t\tprintf(\"</option>\");\r\n\t\t\t$number ++;\r\n\t\t}\r\n\t\tmysql_free_result($res_obr);\r\n\t}", "function ajax_listpaket_by_To($idTO) {\n\t\t$list = $this->load->Mtoback->paket_by_toID($idTO);\n\t\t$data = array();\n\t\t$no=0;\n\t\t$baseurl = base_url();\n\t\tforeach ( $list as $list_paket ) {\n\t\t\t$no++;\n\t\t\t$row = array();\n\t\t\t$row[] = $no;\n\t\t\t$row[] = $list_paket['nm_paket'];\n\t\t\t$row[] = $list_paket['deskripsi'];\n\t\t\t$row[] = '\n\t\t\t<a class=\"btn btn-sm btn-danger\" title=\"Hapus\" onclick=\"dropPaket('.\"'\".$list_paket['idKey'].\"'\".')\"><i class=\"ico-remove\"></i></a>';\n\t\t\t$data[] = $row;\n\t\t}\n\n\t\t$output = array(\n\t\t\t\"data\"=>$data,\n\t\t\t);\n\t\techo json_encode( $output );\n\n\t}", "function dropdown_perusahaan() {\n $result = $this->db->get('tbl_perusahaan');\n\n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $dd[''] = 'Please Select';\n if ($result->num_rows() > 0) {\n foreach ($result->result() as $row) {\n // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)\n $dd[$row->id_perusahaan] = $row->nama_perusahaan;\n }\n }\n return $dd;\n }", "protected function get_model_kenaikan_select(){\n $name = $this->get_model_name();\n $default = array( \"class\" => \"selectpicker col-md-12\" , \"name\" => $name , \"id\" => $name , 'selected' => $this->get_value($name) );\n $items = array(\"Persen\" , \"Peringkat\");\n return $this->get_select( $items , $default);\n }", "public function selectbarang()\n\t{\n\t\t$data = $this->input->get('term');\n\t\t$this->load->model('barang_model');\n\t\t$dataarray = $this->barang_model->selectbaranglike($data)->result_array();\n\t\tforeach ($dataarray as $kolom) {\n\t\t\t$dataajax[] = array('id'=>$kolom['kodebarang'],'label'=>$kolom['kodebarang'].' - '.$kolom['namabarang'],'value'=>$kolom['namabarang'],'harga'=>$kolom['hargajual']);\n\t\t}\n\t\techo json_encode($dataajax);\n\t}", "public function generate_kategori_induk_dropdown() {\n $this->db->select ('\n kategori_induk.kode_kategori_induk,\n kategori_induk.jenis_kegiatan\n ');\n // Urut abjad\n $this->db->order_by('kode_kategori_induk');\n $result = $this->db->get('kategori_induk');\n \n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $dropdown[''] = 'Pilih';\n if ($result->num_rows() > 0) {\n \n foreach ($result->result_array() as $row) {\n // Buat array berisi 'value' (id kategori) dan 'nama' (nama kategori)\n $dropdown[$row['kode_kategori_induk']] = $row['jenis_kegiatan'];\n }\n }\n return $dropdown;\n }", "public function selectItemNameUnitAngularById()\n {\n \n\n \n $itemTypeIdss = !empty($_GET['itemTypeIdssd']) ? $_GET['itemTypeIdssd'] : '';\n \n \n \n if (!empty($_GET['itemTypeIdss'])) {\n \n $itemDatasName = DB::select('SELECT * FROM item_type_master WHERE is_deleted_status = \"N\"');\n if (!empty($itemDatasName)) {\n $purchaseItemTyppeListHtml = '';\n foreach ($itemDatasName as $itemTypeName) {\n $purchaseItemTyppeListHtml .= '<option value=\"'.$itemTypeName->id.'_'.$itemTypeName->name.'\"';\n if ($itemTypeName->id == $_GET['itemTypeIdss']) {\n $purchaseItemTyppeListHtml .= 'selected=selected';\n }\n $purchaseItemTyppeListHtml .= '>'.$itemTypeName->name.'</option>';\n }\n echo $purchaseItemTyppeListHtml;\n }\n\n\n } else if (!empty($_GET['itemIdss'])) {\n\n \n $itemDatasName = DB::select('SELECT * FROM item_master WHERE is_deleted_status = \"N\" AND item_type_id = '.$itemTypeIdss.'');\n\n if (!empty($itemDatasName)) {\n\n $purchaseItemNameListHtml = '';\n foreach ($itemDatasName as $itemName) {\n\n $purchaseItemNameListHtml .= '<option value=\"'.$itemName->id.'_'.$itemName->name.'\"';\n\n if ($itemName->id == $_GET['itemIdss']) {\n\n $purchaseItemNameListHtml .= 'selected=selected';\n\n }\n\n $purchaseItemNameListHtml .= '>'.$itemName->name.'</option>';\n\n }\n echo $purchaseItemNameListHtml;\n\n\n\n }\n\n\n\n } else {\n\n $itemTypeId = !empty($_GET['itemTypeId']) ? $_GET['itemTypeId'] : '';\n\n $purchaseListHtml = '';\n if (!empty($itemTypeId)) {\n $itemDatas = DB::select('SELECT * FROM item_master WHERE is_deleted_status = \"N\" AND \n item_type_id = '.$itemTypeId.'');\n\n $purchaseListHtml1 = '<option value=\"\"> Select Item Name</option>';\n\n if (!empty($itemDatas)) {\n foreach ($itemDatas as $item) {\n $purchaseListHtml .= '<option value=\"'.$item->id.'_'.$item->name.'\"';\n $purchaseListHtml .= '>'.$item->name.'</option>';\n //echo $purchaseListHtml; \n } \n }\n\n echo $purchaseListHtml1.$purchaseListHtml;\n\n }\n\n }\n\n }", "public function generate_kategori_dropdown() {\n $this->db->select ('\n kategori.id_kategori_point,\n kategori.tingkat_kegiatan\n ');\n // Urut abjad\n $this->db->order_by('tingkat_kegiatan');\n $result = $this->db->get('kategori');\n \n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $dropdown[''] = 'Pilih';\n if ($result->num_rows() > 0) {\n \n foreach ($result->result_array() as $row) {\n // Buat array berisi 'value' (id kategori) dan 'nama' (nama kategori)\n $dropdown[$row['id_kategori_point']] = $row['tingkat_kegiatan'];\n }\n }\n return $dropdown;\n }", "function getTierOne()\n{\n session_start();\n $id=($_SESSION['id']);\n\n $querykd=\"select kodepos.kab from info_form,biodata,kodepos where info_form.nis=biodata.nis and biodata.kodepos=kodepos.kodepos and info_form.iduser='$id'\";\n $hasilkd=mysql_query($querykd);\n $rowkab=mysql_fetch_array($hasilkd);\n\n $result = mysql_query(\"SELECT DISTINCT kab FROM kodepos\")\n or die(mysql_error());\n\n while($tier = mysql_fetch_array( $result ))\n {\n if ($tier['kab']==$rowkab['kab']){$sel2=\"selected='selected'\";}else{$sel2='';}\n echo '<option value=\"'.$tier['kab'].'\"'.$sel2.'>'.$tier['kab'].'</option>';\n }\n\n}", "public function dropdown_pegawai()\n {\n //Query untuk mengambil data pegawai dan diurutkan berdasarkan nama\n $sql = \"SELECT A.nama, A.nik FROM karyawan A \n LEFT JOIN bagian_departemen B ON B.id_bagian_dept = A.id_bagian_dept\n LEFT JOIN departemen C ON C.id_dept = B.id_dept \n ORDER BY nama\";\n $query = $this->db->query($sql);\n\n //Value default pada dropdown\n $value[''] = '-- CHOOSE --';\n //Menaruh data pegawai ke dalam dropdown, value yang akan diambil adalah value nik\n foreach ($query->result() as $row) {\n $value[$row->nik] = $row->nama;\n }\n return $value;\n }", "public function getDropDown() {}", "public function getDropDown() {}", "public function get_kelurahan($id)\n {\n header('Access-Control-Allow-Origin: *');\n $data = $this->model_for_all->dropdown_kelurahan($id)->result();\n echo json_encode($data);\n }", "function listadocategoria() {\n $query9 = \"SELECT * FROM intranet_roadmap_categorias\";\n $result9 = (array) json_decode(miBusquedaSQL($query9), true) ;\n foreach ($result9 as $pr9) {\n $proyectos .= '<option value=\"'.$pr9['id_categoria'].'\">'.$pr9['nombre'].'</option> \n';\n }\n return $proyectos;\n}", "function get_idcabang()\n {\n $this->db->order_by('CB_ID', 'asc');\n $result = $this->db->get('tb_cabang');\n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $data[''] = 'Please Select';\n if ($result->num_rows() > 0) {\n foreach ($result->result() as $row) {\n // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)\n $data[$row->CB_ID] = $row->CB_NAMA;\n }\n }\n return $data;\n\t}", "public function getSelect($param) {\n //operario y poder seleccionar el operario que va ser foranea en otra tabla\n $json = FALSE;\n extract($param);\n $select = \"\";\n $select .= \"<option value='0'>Seleccione un Operario</option>\";\n foreach ($conexion->getPDO()->query(\"SELECT fk_usuario, nombres FROM operario ORDER BY nombres\") as $fila) {\n $select .= \"<option value='{$fila['fk_usuario']}'>{$fila['fk_usuario']} - {$fila['nombres']}</option>\";\n }\n echo $json ? json_encode($select) : (\"<select id='$id'>$select</select>\");\n }", "public function loadAction() {\n \t// set no render\n \t$this->_helper->getHelper('viewRenderer')->setNoRender();\n \t// If you use layout, disable it\n \t$this->_helper->layout()->disableLayout();\n \n \t// Get the id from request\n \t$id = $_POST['id'];\n \tif($id != 0){\n\t \t// Query from database\n\t \t$data = Khcn_Api::_()->getDbTable('bo_mon','default')->getBoMonByDonViAssoc($id);\n\t \t$result = '';\n\t \tforeach ($data as $k=>$v)\n\t \t{\n\t \t\t$result .= '<option value=' . $k . '>' . $v .'</option>';\n\t \t}\n\t \techo $result;\n \t}else{\n \t\techo '<option value=\"0\">===== Chọn bộ môn =====</option>';\n \t}\n }", "public function nomor_baru() {\n\t\t//variabel\n\t\t$data['datas'] = $this->siswa_model->get_many_by('status','Aktif');\n\t\t//select2 js\n\t\t$template_data['js_plugins'] = [\n\t\t\tbase_url('assets/plugins/select2/select2.js'),\n\t\t\tbase_url('assets/js/sms_select2.js')\n\t\t];\n\t\t$template_data['css_plugins'] = [\n base_url('assets/plugins/select2/select2.css')\n ];\n\t\t$template_data['title'] \t= 'SMS Gateway ';\n\t\t$template_data['subtitle'] \t= 'Kirim SMS';\n $template_data['crumb'] \t= ['SMS Gateway' => 'smsgateway','Nomor Baru' => 'smsgateway/kirimsms/nomor_baru',];\n\t\t//view\n\t\t$this->layout->set_wrapper('nomorbaru_form', $data);\n\t\t$this->layout->auth();\n\t\t$this->layout->render('admin', $template_data);\n\t}", "function haki($param = null, $id = null){\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\n\t\t$data['p_ta'] = $this->input->post(\"thn\");\n\t\t$data['p_smt'] = $this->input->post(\"smt\");\n\t\tif ($data['p_ta'] == null && $data['p_smt'] == null){\n\t\t\t$data['ta'] = $this->session->userdata('ta');\n\t\t\t$data['smt'] = $this->session->userdata('smt');\t\t\n\t\t}else{\n\t\t\t$data['ta'] = $this->input->post(\"thn\");\n\t\t\t$data['smt'] = $this->input->post(\"smt\");\n\t\t}\n\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_data_haki';\n\t\t$parameter = array('api_search' => array($kd_dosen));\n\t\t$data['haki'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\n\t\t# get data dosen prodi \n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_all_dosen';\n\t\t\t$parameter = array('api_search' => array());\n\t\t\t$data['dosen'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/data_bebankerja';\n\t\t\t\n\t\t\t$thn= $this->session->userdata('ta');\n\t\t\t$smt=$this->session->userdata('smt');\n\t\t\t$parameter = array('api_search' => array('H',$kd_dosen, $thn, $smt));\n\t\t\t$data['data_beban'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\tif ($param != null){\n\t\t\t$data['jenis_haki'] = $this->s00_lib_api->get_api_jsob(URL_API_BKD.'bkd_beban_kerja/get_jenis_haki','POST',array());\t\n\t\t\tif($param == 'tambah'){\n\t\t\t\tif($id != null){\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_haki';\n\t\t\t\t\t$parameter = array('api_search' => array($id));\n\t\t\t\t\t$ch=$data['curr_haki'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_bkd';\n\t\t\t\t\t$parameter = array('api_search' => array($ch->KD_BK, 'H'));\n\t\t\t\t\t$data['current_data'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t}\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_all_dosen';\n\t\t\t\t$parameter = array('api_search' => array());\n\t\t\t\t$data['dosen'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\n\t\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t\t$this->output99->output_display('dosen/form_haki',$data);\n\t\t\t}\n\t\t\telse if ($param == 'detail'){\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_haki';\n\t\t\t\t$parameter = array('api_search' => array($id));\n\t\t\t\t$data['curr_haki'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\t\t\t\t\t\t\t\n\n\t\t\t\t# GET PARTNER\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/partner';\n\t\t\t\t$parameter = array('api_kode' => 11000, 'api_subkode' => 1, 'api_search' => array($id,'HAKI'));\n\t\t\t\t$data['partner'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\n\t\t\t\t#print_r($data['partner']); die();\n\t\t\t\t$data['nama_partner'] = array();\n\t\t\t\tforeach ($data['partner'] as $p){\n\t\t\t\t\t$data['nama_partner'][$p->PARTNER] = $this->get_nama_partner($p->PARTNER);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t\t$this->output99->output_display('dosen/daftar_haki',$data);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t\t$this->output99->output_display('dosen/daftar_haki',$data);\n\t\t\t}\n\t\t}else{\n\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t$this->output99->output_display('dosen/daftar_haki',$data);\n\t\t}\n\t}", "function select_tb_penduduk(){\n\t\t$this->load->model('mamdani');\n\t\t//$klasifikasi['klasifikasi']=$this->mamdani->getdata();\n\t\t$klasifikasi['jumlah_aset']=$this->mamdani->jumlah_aset();\n\t\t$klasifikasi['tingkat']= $this->mamdani->klasifikasi3();\n\n\t\t$this->load->view('templates/header');\n\t\t$this->load->view('admin/lihatdata/tabel_klasifikasi_penduduk',$klasifikasi);\n\t\t$this->load->view('templates/footer');\n\t\t// var_dump($jml_aset);\n\t\t// die;\n\n\t}", "public function consultarTiposJSONSelectAction() {\n $select = \"<select>\";\n //$select = $select . \"<option value='' >Seleccione una Acción</option>\";\n $select = $select . \"<option value=\" . User::$VENDEDOR . \" >\" . User::$VENDEDOR_TEXT . \"</option>\";\n $select = $select . \"<option value=\" . User::$COMPRADOR . \" >\" . User::$COMPRADOR_TEXT . \"</option>\";\n $select = $select . \"<option value=\" . User::$APROBADOR . \" >\" . User::$APROBADOR_TEXT . \"</option>\";\n $select = $select . \"<option value=\" . User::$DIGITADOR . \" >\" . User::$DIGITADOR_TEXT . \"</option>\";\n $select = $select . \"</select>\";\n\n $response = new Response($select);\n return $response;\n }", "public function bitorondropdown(){\n\t\tif(!empty($_REQUEST['id'])){\n\t\t\t$this->layout='ajax';\n\t\t\t//$this->loadModel('Maincategory');\n\t\t\t$childCatIds = $this->Childcategory->find('list',array('fields'=>array('id','name'),\n\t\t\t\t'conditions' =>array('maincategory_id' =>$_REQUEST['id'])));\n\n\t\t\t$this->set(compact('childCatIds'));\n\t\t}\n\n\t}", "function priznak()\r\n\t{\r\n\t\t$obr = \"SELECT ID, PRIZNAKDOC FROM PRIZNAKDOC ORDER BY ID\";\t\r\n\t\t$res_obr = mysql_query($obr);\r\n\t\t$number = 1;\r\n /* show result */\r\n\t \twhile ($row = mysql_fetch_array($res_obr, MYSQL_ASSOC)) \r\n\t\t{\r\n\t\t\tprintf(\"<option value='\".$row[\"ID\"].\"'>\");\r\n \tprintf ($row[\"PRIZNAKDOC\"]);\r\n\t\t\tprintf(\"</option>\");\r\n\t\t\t$number ++;\r\n\t\t}\r\n\t\tmysql_free_result($res_obr);\r\n\t}", "public function devis_option($id = 0)\n {\n //if (! $this->input->is_ajax_request()) die('');\n $resultat = $this->m_feuille_controle->liste_option_devis_by_client($id);\n $results = json_decode(json_encode($resultat), true);\n\n echo \"<option value='' selected='selected'>(choisissez)</option>\";\n echo \"<option value=-1 >aucun</option>\";\n foreach ($results as $row) {\n echo \"<option value='\" . $row['id'] . \"'>\" . $row['value'] . \"</option>\";\n }\n }", "function ogretmen_odev_getir ()\n {\n // if($odev=$this->vtb->query($sorgu))\n // {\n // $odevlist = $odev->fetchAll();\n\n // foreach ($odevlist as $o)\n // {\n // echo \"<div class='panel_akis_kutusu'>\".\"<p>\" . $o['odevadi'] . \"</p>\" . \"<p>\" . $o['dersadi'] . \"</p><p>\". $o['dtarih'] . \" \". $o['ttarih'] . \"</p></div>\" ;\n // }\n // }\n $sorgu=new sorgubul(\"select * from seviye_odevleri\",\"dersid\",\"=\",$_SESSION['dersler'],\"0,30\",\"or\");\n $sorgu=$sorgu->sorgu;\n\n if ($odev=$this->vtb->query($sorgu))\n {\n $odevlist = $odev->fetchAll();\n\n foreach ($odevlist as $o)\n {\n if ($a=$this->vtb->query(\"select count(*) from seviye_odev_teslimleri where odevid = \" . $o['soid']) and $b =$this->vtb->query(\"select count(*) from seviye_odev_teslimleri where odevid = \" . $o['soid'] . ' and okundumu = 0') )\n {\n $c = $a->fetchColumn();\n $d = $b->fetchColumn();\n $derssev=$this->vtb->prepare(\"select seviyeno,dersid from ders_seviyeler where seviyeid = ?\");\n $derssev->execute(array($o['seviye']));\n $derssev=$derssev->fetch();\n $ders=$this->vtb->prepare(\"select dersadi from dersler where dersid = ?\");\n $ders->execute(array($o['dersid']));\n $ders=$ders->fetchColumn();\n echo \"<div class='isbox' style='height:auto;overflow:hidden;'> \".\" <div class='isboxust'><p class='icerik' style='color: #048CAD; margin:5px 5px 0px 0px;'>\" . $o['odevbaslik'] . \" > \" . $ders . \" > \" . $derssev['seviyeno'] . \". Seviye</p></div>\" . \"<div class='icerik' style='position:relative;'><p >\" . $o['odevmetni'] . \"</p></div><div class='isboxalt'><p style='padding: 10px 0px 0px 100px;float:left;'>\". $c . \" kişi teslim etti,\". $d . \" kişiyi okumadınız</p><a style='margin-left:20px;' class='soruonay' href='ogretmen_ders_goruntuleme.php?dersid=\" . $derssev['dersid'] . \"&seviyeno=\" . $derssev['seviyeno'] . \"&dersadi=\" . $ders .\"'>Kontrol et</a></div></div>\" ;\n\n }\n else\n {\n echo \"<div class='isbox' style='height:auto;overflow:hidden;'> \".\" <div class='isboxust'><p class='icerik' style='color: #048CAD; margin:5px 5px 0px 0px;'>\" . $o['odevbaslik'] . \" > \" . $ders . \" > \" . $derssev['seviyeno'] . \". Seviye</p></div>\" . \"<div class='icerik' style='position:relative;'><p >\" . $o['odevmetni'] . \"</p></div><div class='isboxalt'><p>Kimse teslim etmedi</p></div></div>\" ;\n }\n }\n }\n\n }", "public function dropdown_jabatan()\n {\n //Query untuk mengambil data jabatan dan diurutkan berdasarkan nama jabatan\n $sql = \"SELECT * FROM jabatan ORDER BY nama_jabatan\";\n $query = $this->db->query($sql);\n\n //Value default pada dropdown\n $value[''] = '-- CHOOSE --';\n //Menaruh data jabatan ke dalam dropdown, value yang akan diambil adalah value id_jabatan\n foreach ($query->result() as $row) {\n $value[$row->id_jabatan] = $row->nama_jabatan;\n }\n return $value;\n }", "public function dropdown()\n {\n $building_id = \\Request::get('building_id');\n return \\App\\Floor::where('building_id', $building_id)->lists('name','id');\n }", "public function getUpozila($divisionId){\r\n\r\n\t$this->db->where('dis_id',$divisionId);\r\n\t$upozila=$this->db->get('upozila_tab');\r\n\t$output='<option value=\"\">Select an option</option>';\r\n \r\n foreach ($upozila->result() as $upo) {\r\n \t$output.='<option value=\"'.$upo->id.'\">'.$upo->upozila_name.'</option>';\r\n }\r\n return $output;\r\n}", "public function Estado_Civil()\n {\n include('conexion.php');\n $Consulta_Estado_Civil = \"SELECT * FROM p_estado_civil ORDER BY civ_nombre\";\n $Resultado_Consulta_Estado_Civil = $conexion->prepare($Consulta_Estado_Civil);\n $Resultado_Consulta_Estado_Civil->execute();\n while ($a = $Resultado_Consulta_Estado_Civil->fetch())\n {\n echo '<option value=\"'.$a[civ_codigo].'\">'.$a[civ_nombre].'</option>';\n }\n\n }", "function dropdown_tag ($xmlobjekt, $benutzer, $programmnr, $anweisungsnr, $tagtyp){\n\n #Liest den Wert des Tages aus\n $tagwert=$xmlobjekt->programm[$programmnr]->anweisung[$anweisungsnr]->wenn[0]->bedingung[$tagtyp]->wert[0];\n $index=100000*($benutzer+1)+10000*$programmnr+1000*($anweisungsnr+1)+100*0+10*$tagtyp+3;\n echo \"<select name=$index style=\\\"width:65px;\\\">\";\n if (strpos($tagwert,\"Mo\") !== false) {echo \"<option selected>Mo</option>\";} else {echo \"<option>Mo</option>\";}\n if (strpos($tagwert,\"Di\") !== false) {echo \"<option selected>Di</option>\";} else {echo \"<option>Di</option>\";}\n if (strpos($tagwert,\"Mi\") !== false) {echo \"<option selected>Mi</option>\";} else {echo \"<option>Mi</option>\";}\n if (strpos($tagwert,\"Do\") !== false) {echo \"<option selected>Do</option>\";} else {echo \"<option>Do</option>\";}\n if (strpos($tagwert,\"Fr\") !== false) {echo \"<option selected>Fr</option>\";} else {echo \"<option>Fr</option>\";}\n if (strpos($tagwert,\"Sa\") !== false) {echo \"<option selected>Sa</option>\";} else {echo \"<option>Sa</option>\";}\n if (strpos($tagwert,\"So\") !== false) {echo \"<option selected>So</option>\";} else {echo \"<option>So</option>\";}\n echo \"</select>\";\n}", "function carga_insumo1($value, $primary_key)\n{\n\t\n\t$id_insumo = $this->uri->segment(3);\n\t\n//id_insumo = $this->entregas_model->obtener_idinsumo($primary_key);\n $data = $this->insumos_model->obtener_insumos_general();\n /* fin prueba */\n // $data = $this->entregas_model->obtener_equipos($this->session->userdata('insumo'));\n//guardo id para el campo sector (necesito conocer la equipo para mostrar el sector)\n//$this->session->set_userdata('equipo', $filas['id']);\n$html = \"<select id='field-id_insumo' name='id_insumo' class='chosen-select' data-placeholder='Seleccionar Insumo' style='width:300px'>\";\n\t $html = $html.\"<option value=''></option>\";\n\tforeach ($data as $filas)\n\t{\n if ( $filas['id'] == $id_insumo)\n {\n\t\t$html = $html.\"<option value='\".$filas['id'].\"' selected>\".$filas['codigo_insumo'].'</option>'; \t\n\t\t \n\t\t }\n\t\t else\n\t\t {\n\t\t \n $html = $html.\"<option value='\".$filas['id'].\"' >\".$filas['codigo_insumo'].'</option>';\n \t}\n }\n $html=$html.'</select>';\n \t return $html;\n \t//return $id_insumo;\n}", "public function formSelect($sId=\"\",$sNome=\"\",$sValore=\"\",$sLunghezza=0,$sTag=\"\", $jolly=\"\"){\r\n\r\n $sValore=split(\";\",htmlentities($sValore));\r\n\t\t\r\n\t\tif($sTag==\"\"){\r\n\t\t\techo \"<select name=\\\"\" . $sNome . \"\\\">\";\r\n\t\t}else{\r\n\t\t\techo \"<select name=\\\"\" . $sNome . \"\\\"\" . $sTag . \">\";\r\n\t\t}\r\n\r\n\t\tforeach($sValore as $value){\r\n\t\t\t$sRecord=split(\",\",$value);\r\n\t\t\tif(substr($sRecord[1],0,1)==$jolly){\r\n\t\t\t\techo \"<option style=\\\"font-weight:bold;\\\" value=\\\"\" . $sRecord[0] . \"\\\">Gruppo: \" . substr($sRecord[1],1) . \"</option>\";\r\n\t\t\t}else{\r\n\t\t\t\techo \"<option value=\\\"\" . $sRecord[0] . \"\\\">\" . $sRecord[1] . \"</option>\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\techo \"</select>\";\r\n\t\t\r\n\t}", "function budynekKoncowy(){\r\n\t\t$this->retriveDataRow();\r\n\t\treturn $this->data['id_budynku_koncowego'];\r\n\t}", "function TampilkanHeaderNilai($mnux='') {\r\n $prodiku = $_SESSION['_ProdiID'];\r\n $arrprodi = explode(',', $prodiku);\r\n $whr = array();\r\n foreach ($arrprodi as $val) {\r\n $whr[] = \"INSTR(j.ProdiID, '.$val.')>0\";\r\n }\r\n $_whr = \" (\". implode(' or ', $whr) . \") \";\r\n // query\r\n $s = \"select j.JadwalID, j.MKKode, j.Nama, j.JenisJadwalID, j.NamaKelas, j.DosenID,\r\n concat(d.Nama, ', ', d.Gelar) as DSN\r\n from jadwal j\r\n left outer join dosen d on j.DosenID=d.Login\r\n where TahunID='$_SESSION[tahun]' \r\n and $_whr \r\n and j.JadwalSer = 0\r\n group by j.JadwalID, j.MKKode, j.JenisJadwalID, j.NamaKelas\r\n order by j.MKKode, j.NamaKelas, j.JenisJadwalID\";\r\n $r = _query($s);\r\n // buat option\r\n $opt = \"<option>--</option>\";\r\n while ($w = _fetch_array($r)) {\r\n $sel = ($w['JadwalID'] == $_SESSION['JadwalID']) ? \"selected\" : \"\";\r\n $opt .= \"<option value='$w[JadwalID]' $sel>$w[MKKode] $w[Nama] - $w[NamaKelas] ($w[JenisJadwalID]) - $w[DSN]</option>\\r\";\r\n }\r\n // Tampilkan opsi\r\n echo \"<p><table class=box cellspacing=1 cellpadding=4>\r\n <form action='?' methos=POST>\r\n <input type=hidden name='mnux' value='$mnux'>\r\n <tr><td class=inp>Tahun :</td><td class=ul><input type=text name='tahun' value='$_SESSION[tahun]' size=10 maxlength=10> <input type=submit name='Tampilkan' value='Tampilkan'></td></tr>\r\n <tr><td class=inp>Jadwal :</td><td class=ul><select name='JadwalID' onChange='this.form.submit()'>$opt</select></td></tr>\r\n </form></table></p>\";\r\n}", "public function select_umenu(){\n// ORDER BY pathid ASC\";\n $sql = \"SELECT info FROM \".$this ->db ->dbprefix('wx_umenu');\n $data = $this ->db ->query($sql)->result_array();\n return $data[0]['info'];\n }", "public function selectTagihanadm()\n {\n $sql = \"SELECT pesanan.notagihan,pesanan.metode_pembayaran,pesanan.status_pembayaran,pesanan.catatan,pelanggan.nama_lengkap,pelanggan.nohp,\n SUM(produk.harga) AS 'totaltagihan' FROM pesanan\n INNER JOIN pesanan_detail ON pesanan_detail.notagihan=pesanan.notagihan\n INNER JOIN produk ON produk.idproduk=pesanan_detail.idproduk\n INNER JOIN pelanggan ON pelanggan.idpelanggan=pesanan_detail.idpelanggan\n GROUP BY pesanan.notagihan order by pesanan.notagihan desc\";\n $result = $this->connect()->query($sql);\n if ($result->rowCount() > 0) {\n while ($row = $result->fetch()) {\n $data[] = $row;\n }\n return $data;\n }\n }", "public function select(){\n $records =10;\n $data = $this->repository->getObjects($records);\n $user = $this->returnTr($data);\n $area = Area::all();\n $select = $this->returnOption($area,\"Chọn khu vực\" );\n return response()->json(['user'=>$user,'select'=>$select]); \n }", "public function fieldSelect($sId=\"\",$sNome=\"\",$aValue=\"\",$sLunghezza=0,$sTag=\"\", $jolly=\"\"){\r\n\t\t\r\n\t\tif($sTag==\"\"){\r\n\t\t\techo \"<select name=\\\"\" . $sNome . \"\\\">\";\r\n\t\t}else{\r\n\t\t\techo \"<select name=\\\"\" . $sNome . \"\\\"\" . $sTag . \">\";\r\n\t\t}\r\n\r\n\t\tforeach($aValue as $key=>$value){\r\n\t\t\tif(substr($value,0,1)==$jolly){\r\n\t\t\t\techo \"<option style=\\\"font-weight:bold;\\\" value=\\\"\" . $key . \"\\\">Gruppo: \" . substr($value,1) . \"</option>\";\r\n\t\t\t}else{\r\n\t\t\t\techo \"<option value=\\\"\" . $key . \"\\\">\" . $value . \"</option>\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\techo \"</select>\";\r\n\t\t\r\n\t}", "function PilihanCetakTidak(){\r\n global $pilihanYN;\r\n $a = '';\r\n for ($i=0; $i<sizeof($pilihanYN); $i++) {\r\n $sel = ($i == $_SESSION['_pilihanYN'])? 'selected' : '';\r\n $v = explode('~', $pilihanYN[$i]);\r\n $_v = $v[0];\r\n $a .= \"<option value='$i' $sel>$_v</option>\\r\\n\";\r\n }\r\n echo \"<p><table class=box cellspacing=1 cellpadding=4>\r\n <form action='?' method=post>\r\n <input type=hidden name='mnux' value='akd.lap.mhswkss'>\r\n <input type=hidden name='gos' value='Daftar'>\r\n <tr><td class=inp>Cetak Berdasarkan: </td>\r\n <td class=ul><select name='_pilihanYN' onChange='this.form.submit()'>$a</select></td></tr>\r\n </form></table></p>\";\r\n}", "function SelectValuesUnidadesPerteneceMedico($db_conx, $cod_med) {\r\n $sql = \"SELECT uni_codigo, uni_descrip FROM vunidadmedico WHERE med_codigo = $cod_med ORDER BY uni_descrip ASC\";\r\n\r\n $query = mysqli_query($db_conx, $sql);\r\n\r\n $n_filas = $query->num_rows;\r\n $data = '<select style=\"width: 400px;\" onchange=\"getLocalizacionData();\"';\r\n if ($n_filas == 1) {\r\n $data .= 'id=\"cmbunidad\" disabled=\"true\">';\r\n $row = mysqli_fetch_array($query);\r\n $data .= '<option value=\"' . $row[0] . '\">' . $row[1] . '</option>';\r\n } else {\r\n $data .= 'id=\"cmbunidad\">';\r\n $c = 0;\r\n while ($c < $n_filas) {\r\n $row = mysqli_fetch_array($query);\r\n $data .= '<option value=\"' . $row[0] . '\">' . $row[1] . '</option>';\r\n $c++;\r\n }\r\n }\r\n $data .= '</select\">';\r\n echo $data;\r\n}", "public function listKota(){\n $id_provinsi = $this->input->post('id_provinsi');\n \n $kota = $this->KotaModel->viewByProvinsi($id_provinsi);\n \n // Buat variabel untuk menampung tag-tag option nya\n // Set defaultnya dengan tag option Pilih\n $lists = \"<option value=''>Pilih</option>\";\n \n foreach($kota as $data){\n $lists .= \"<option value='\".$data->id.\"'>\".$data->nama.\"</option>\"; // Tambahkan tag option ke variabel $lists\n }\n \n $callback = array('list_kota'=>$lists); // Masukan variabel lists tadi ke dalam array $callback dengan index array : list_kota\n echo json_encode($callback); // konversi varibael $callback menjadi JSON\n}", "function select_by_post() {\r\n //id_berita dapat dari post\r\n\r\n $id = $this->input->post('id_berita');\r\n \r\n $response = array();\r\n $data['data'] = array();\r\n\r\n $result = $this->Berita_m->select_berita_where($id);\r\n\r\n if (sizeof($result) > 0) {\r\n foreach ($result as $value) {\r\n $response['id_berita'] = $value->id_berita;\r\n $response['judul'] = $value->judul;\r\n $response['kategori'] = $value->kategori;\r\n $response['deskripsi'] = $value->deskripsi;\r\n array_push($data['data'], $response);\r\n }\r\n\r\n $data['status'] = 0;\r\n $data['response'] = 'Data Ditemukan';\r\n\r\n die(json_encode($data));\r\n } else {\r\n $response['status'] = 1;\r\n $response['response'] = 'Tidak data yang ditampilkan';\r\n\r\n die(json_encode($response));\r\n }\r\n }", "function selectpais(){\n\n\t$listado= mysql_query( 'SELECT * FROM country');\n\t \n\twhile ($key = mysql_fetch_array($listado)) {\n\t\t\techo'<option value=\"'.mb_convert_encoding($key['Code'], \"UTF-8\").'\">'.mb_convert_encoding($key['Name'], \"UTF-8\").'</option>';\n\t\t}\n\t\n}", "function getThemengebieteOption(){\n\t\t$strThemengebiete = '';\n\t\t$resThemengebiete = $GLOBALS['TYPO3_DB']-> exec_SELECTquery('*', 'tx_topic_detail', 'deleted=0 AND hidden=0');\n\t\tif(mysql_num_rows($resThemengebiete) > 0){\n\t\t\twhile($rowThemenge = mysql_fetch_array($resThemengebiete)){\n\t\t\t\t$strThemengebiete .= '<option value=\"' . $rowThemenge['uid'] . '\">' . $rowThemenge['title'] . '</option>';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $strThemengebiete;\n\t}", "function ajax_listsiswa_by_To($idTO) {\n\t\t$list = $this->load->Mtoback->siswa_by_totID($idTO);\n\t\t$data = array();\n\n\t\t$baseurl = base_url();\n\t\t$no=1;\n\t\tforeach ( $list as $list_siswa ) {\n\t\t\t// $no++;\n\t\t\t$row = array();\n\t\t\t$row[] = $no;\n\t\t\t$row[] = $list_siswa ['namaPengguna'];\n\t\t\t$row[] = $list_siswa ['namaDepan'].' '.$list_siswa ['namaBelakang'];\n\t\t\t$row[] = $list_siswa['aliasTingkat'];\n\t\t\t$row[] = '<a class=\"btn btn-sm btn-danger\" title=\"Hapus\" onclick=\"dropSiswa('.\"'\".$list_siswa['idKey'].\"'\".')\"><i class=\"ico-remove\"></i></a>';\n\n\t\t\t$data[] = $row;\n\t\t\t$no++;\n\t\t}\n\n\t\t$output = array(\n\t\t\t\"data\"=>$data,\n\t\t\t);\n\n\t\techo json_encode( $output );\n\t}", "public function edit() {\n\t\t$id = $this->input->get('id');\n\t\t$data = $this->kategori_m->get_by(array('id' => $id));\n\t\t$kode_induk = $data->kode_induk_kategori;\n\t\tif (!is_null($kode_induk)) {\n\t\t\t$id_induk = $this->kategori_m->get_by(array('kode_kategori' => $kode_induk))->id;\n\t\t\t$data->id_induk = $id_induk;\n\t\t} else {\n\t\t\t$data->id_induk = \"\";\n\t\t}\n\t\t$this->printOptionOnCombobox($data, $id);\n\t\techo json_encode($data);\n\t}", "public function list_gestiones(){\n $listar_gestion= $this->model_configuracion->lista_gestion();\n $tabla='';\n\n $tabla.='\n <input type=\"hidden\" name=\"gest\" id=\"gest\" value=\"'.$this->gestion.'\">\n <select name=\"gestion_usu\" id=\"gestion_usu\" class=\"form-control\" required>\n <option value=\"0\">seleccionar gestión</option>'; \n foreach ($listar_gestion as $row) {\n if($row['ide']==$this->gestion){\n $tabla.='<option value=\"'.$row['ide'].'\" select >'.$row['ide'].'</option>';\n }\n else{\n $tabla.='<option value=\"'.$row['ide'].'\" >'.$row['ide'].'</option>';\n }\n };\n $tabla.='</select>';\n return $tabla;\n }", "public function selectItemNamedAngularById()\n {\n\n $itemTypeId = !empty($_GET['itemTypeId']) ? $_GET['itemTypeId'] : '';\n if (!empty($itemTypeId)) {\n $itemDatasUnitData = DB::select('SELECT * FROM item_master WHERE is_deleted_status = \"N\" AND item_type_id = '.$itemTypeId.'');\n if (!empty($itemDatasUnitData)) {\n $unitId = $itemDatasUnitData[0]->unit_id;\n } \n }\n\n $itemUnitData = DB::select('SELECT * FROM unit_master WHERE is_deleted_status = \"N\" AND id = '.$unitId.'');\n if (!empty($itemUnitData)) {\n echo $itemUnitData[0]->unit;\n }\n\n }", "private function dropdown_tabla_anuncios($id_arr){\n\n\t\t$salt = $this->Perfil->select_salt();\n\t\t$controlator = '&controlator='.$salt;\n\n\t\treturn '<div class=\"dropdown\">\n <button class=\"btn btn-default dropdown-toggle\" type=\"button\" id=\"dropdownMenu1\" data-toggle=\"dropdown\">\n Opciones\n <span class=\"caret\"></span>\n </button>\n <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"dropdownMenu1\">\n <li role=\"presentation\">\n\t\t\t\t\t<a role=\"menuitem\" tabindex=\"-1\" href=\"index.php?pag='.$id_arr.'\">Ver anuncio</a>\n\t\t\t\t</li>\n\t\t\t\t<li role=\"presentation\">\n\t\t\t\t\t<a role=\"menuitem\" tabindex=\"-1\" href=\"index.php?perfil=2&art='.$id_arr.'\">Editar anuncio</a>\n\t\t\t\t</li>\n <li role=\"presentation\">\n\t\t\t\t\t<a role=\"menuitem\" tabindex=\"-1\" href=\"index.php?perfil=3&art='.$id_arr.'\">Editar imagenes</a>\n\t\t\t\t</li>\n <li role=\"presentation\">\n\t\t\t\t\t<a role=\"menuitem\" tabindex=\"-1\" href=\"index.php?perfil=4&art='.$id_arr.'\">Idiomas del anuncio</a>\n\t\t\t\t</li>\n\t\t\t\t<li role=\"presentation\">\n\t\t\t\t\t<a class=\"desactivador\" role=\"menuitem\" tabindex=\"-1\" rel=\"'.$id_arr.'\" \n\t\t\t\t\t data-wey=\"'.$salt.'\">Activar/Desactivar</a>\n\t\t\t\t</li>\n <li role=\"presentation\" class=\"divider\"></li>\n <li role=\"presentation\">\n\t\t\t\t\t<a role=\"menuitem\" tabindex=\"-1\" href=\"index.php?perfil=1&art='.$id_arr.$controlator.'\">Eliminar anuncio</a>\n\t\t\t\t</li>\n </ul>\n </div>';\n\n\t}", "public function lista_oregional_pi($proy_id){\n $list_oregional= $this->model_objetivoregion->get_unidad_pregional_programado($proy_id);\n $tabla='';\n if(count($list_oregional)==1){\n $tabla.=' <section class=\"col col-6\">\n <label class=\"label\"><b>OBJETIVO REGIONAL '.$list_oregional[0]['or_id'].'</b></label>\n <label class=\"input\">\n <i class=\"icon-append fa fa-tag\"></i>\n <input type=\"hidden\" name=\"or_id\" id=\"or_id\" value=\"'.$list_oregional[0]['or_id'].'\">\n <input type=\"text\" value=\"'.$list_oregional[0]['or_codigo'].'.- '.$list_oregional[0]['or_objetivo'].'\" disabled>\n </label>\n </section>'; \n }\n else{\n $tabla.='<section class=\"col col-6\">\n <label class=\"label\"><b>OBJETIVO REGIONAL</b></label>\n <select class=\"form-control\" id=\"or_id\" name=\"or_id\" title=\"SELECCIONE\">\n <option value=\"0\">SELECCIONE OBJETIVO REGIONAL</option>';\n foreach($list_oregional as $row){ \n $tabla.='<option value=\"'.$row['or_id'].'\">'.$row['or_codigo'].'.- '.$row['or_objetivo'].'</option>'; \n }\n $tabla.='\n </select>\n </section>'; \n }\n \n return $tabla;\n }", "function seleccionInicio($idP){\r\n }", "function get_idbrg()\n {\n\t\t$this->db->order_by('ID_BRG', 'asc');\n\t\t$result = $this->db->get('tb_barang');\n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $data[''] = 'Please Select';\n if ($result->num_rows() > 0) {\n foreach ($result->result() as $row) {\n // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)\n $data[$row->ID_BRG] = $row->NAMA_BRG;\n }\n }\n return $data;\n }", "public function halaman_selengkapnya($id){\n\t\t$data['judul1'] = 'Detail Laporan';\n\t\t$data['lapor'] = $this->Lapor_model->getDataId($id);\n\t\t//folder = Lapor dan file = halaman_selengkapnya\n\t\t$this->load->view('templates/header_daftar_login',$data);\n\t\t$this->load->view('Lapor/halaman_selengkapnya',$data);\n\t\t$this->load->view('templates/footer');\n\t}", "function detail_ambil_paket_isi_perawatan_list(){\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t$master_id = (integer) (isset($_POST['master_id']) ? $_POST['master_id'] : $_GET['master_id']);\r\n\t\t$result=$this->m_master_ambil_paket->detail_ambil_paket_isi_perawatan_list($master_id,$query,$start,$end);\r\n\t\techo $result;\r\n\t}", "function sawlihat($id)\n\t{\n\t\t//$a = 'A1';\n\t\t//foreach ($q2 as $key) {\n\t\t\t//echo \"<br/>\";\n\t\t\t//echo $key->nidn.\" = \".$a;\n\t\t\t//echo \"<br/>\";\n\t\t\t\n\t\t\t//echo \"Hasil Akhir = \".number_format($kumulatip,2);\n\t\t\t//echo \"<br/>\";\n\t\t\t//$a++;\n\t\t//}\n\t\t$data['tahun'] = $id;\n\t\t$data['q2'] = $this->db->query(\"SELECT DISTINCT nidn,nama_karyawan FROM tbl_jadwal_matakuliah a JOIN tbl_karyawan b on a.nidn = b.nik where tahunajaran = '\".$id.\"'\")->result();\n\t\t$data['page'] = 'penilaian/saw_lihat';\n\t\t$this->load->view('template', $data);\t\n\t}", "public function list_tagihan()\n\t{\n\t\t$data['container'] = 'transaction/list_tagihan';\n\t\t$data['current_date'] = $this->format_date_detail($this->current_date(),'id',false,'/');\n\t\t$data['produk'] = $this->model_transaction->get_product_financing(false, true);\n\t\t$data['product_smile'] = $this->model_transaction->get_product_financing(false, false, '52');\n\t\t$data['kopegtel'] = $this->model_laporan->get_data_kopegtel();\n\t\t$data['peruntukan'] = $this->model_laporan->get_data_peruntukan();\n\t\t$data['akad'] = $this->model_laporan->get_all_akad('2');\n\t\t$data['status_telkom'] = $this->model_laporan->get_status_telkom();\n\t\t$data['get_divisi'] = $this->model_laporan->get_divisi();\n\t\t$data['get_divisi_child'] = $this->model_laporan->get_divisi('1');\n\t\t$this->load->view('core',$data);\n\t}", "public function list_gol_barang() {\n $records = $this->input->get('filter');\n $query = $this->input->get('query');\n $params = array();\n\n if ($records) {\n $raw_record = json_decode($records, true);\n $params = $this->generate_db_query($raw_record);\n }\n\n if ($query) {\n if ($query != \"\") {\n $params[] = array('field' => 'mi_name', 'param' => 'like', 'operator' => '', 'value' => $query);\n }\n }\n\n $tablename = 'dt_item';\n $params[] = array('field' => 'mi_child_stat', 'param' => 'where', 'operator' => '', 'value' => 0);\n $opt['sortBy'] = 'id';\n $opt['sortDirection'] = 'ASC';\n\n $result = $this->Shared_model->gets($params, $opt, $tablename);\n\n if ($result != NULL) {\n echo json_encode(array('success' => 'true', 'data' => $result, 'title' => 'Info', 'msg' => 'List All Golongan'));\n } else {\n echo json_encode(array('success' => 'true', 'data' => NULL, 'title' => 'Info', 'msg' => 'Tidak ada data'));\n }\n }", "public function lista_oregional($proy_id){\n $list_oregional=$this->model_objetivoregion->list_proyecto_oregional($proy_id);\n $tabla='';\n if(count($list_oregional)==1){\n $tabla.=' <section class=\"col col-3\">\n <label class=\"label\"><b>OBJETIVO REGIONAL '.$list_oregional[0]['or_id'].'</b></label>\n <label class=\"input\">\n <i class=\"icon-append fa fa-tag\"></i>\n <input type=\"hidden\" name=\"or_id\" id=\"or_id\" value=\"'.$list_oregional[0]['or_id'].'\">\n <input type=\"text\" value=\"'.$list_oregional[0]['or_codigo'].'.- '.$list_oregional[0]['or_objetivo'].'\" disabled>\n </label>\n </section>'; \n }\n else{\n $tabla.='<section class=\"col col-6\">\n <label class=\"label\"><b>OBJETIVO REGIONAL</b></label>\n <select class=\"form-control\" id=\"or_id\" name=\"or_id\" title=\"SELECCIONE\">\n <option value=\"0\">SELECCIONE OBJETIVO REGIONAL</option>';\n foreach($list_oregional as $row){ \n $tabla.='<option value=\"'.$row['or_id'].'\">'.$row['or_codigo'].'.- '.$row['or_objetivo'].'</option>'; \n }\n $tabla.='\n </select>\n </section>'; \n }\n \n return $tabla;\n }", "function search2(){\n\t\t$keyword = $this->uri->segment(5);\n\t\t$keyword2 = preg_replace('/%20/', '', $keyword);\n\t\t$kategori = \"A\";\n\t\t/*print_r($keyword);*/\n\t\t//api kategori bkd\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/kategori_bkd_bebankerja';\n\t\t$parameter = array('api_search' => array($keyword2, $kategori));\n\t\t$data['data_bebankerja'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t//pengambilan data dan pengrimimannya ke view\n\t\t//print_r($data);\n\t\tforeach($data['data_bebankerja'] as $row)\n\t\t{\n\t\t\t$arr['query'] = $keyword;\n\t\t\t$arr['suggestions'][] = array(\n\t\t\t\t'value'\t=>$row->NM_KAT,\n\t\t\t\t'nilai'=>$row->KD_KAT,\n\t\t\t\t'satuan' =>$row->SATUAN,\n\t\t\t\t'nilai_kat' => $row->NILAI_KAT,\n\t\t\t\t'set_masa_tugas' =>1,\n\t\t\t\t'set_rincian_masa' =>'Semester',\n\t\t\t\t'set_tempat'=>''\n\t\t\t);\n\t\t}\n\t\t// minimal PHP 5.2\n\t\techo json_encode($arr);\n\t}", "function SelectValuesUnidadFiltro($db_conx) {\r\n $sql = \"SELECT uni_codigo, uni_descrip FROM tunidad ORDER BY uni_descrip ASC\";\r\n $query = mysqli_query($db_conx, $sql);\r\n\r\n $n_filas = $query->num_rows;\r\n $data = '<select style=\"width:207px;\" id=\"cmbuni\">';\r\n $data .= '<option value=\"0\">Todos</option>';\r\n $c = 0;\r\n while ($c < $n_filas) {\r\n $row = mysqli_fetch_array($query);\r\n $data .= '<option value=\"' . $row[0] . '\">' . $row[1] . '</option>';\r\n $c++;\r\n }\r\n $data .= '</select>';\r\n echo $data;\r\n}", "function option1($id){\n\n\n$dat=\"\";\n$dat.= ' <option>Sila Pilih</option>';\n$dat.= ' <option ';\nif($id=='1') $dat.= ' selected=selected ';\n$dat.= ' value=\"1\" ';\n$dat.= '>Ada</option>';\n$dat.= ' <option ';\nif($id=='0') $dat.= ' selected=selected ';\n$dat.= ' value=\"0\" ';\n$dat.= '>Tiada</option>';\n\n\nreturn $dat;\n}", "public function mostrarSeleccionado(){\n\t\t//se recibe por metodo post el id del estado a mostar\n\t\t$idestado = $_POST['idestado'];\n\t\t$res = Estado::selectEstado($idestado);\n\t\techo json_encode($res);\n\t}", "function getAccompagnatore() {\n if ($this->session->userdata('role') == 550 || $this->session->userdata('role') == 551) {\n $txtCollaboratore = $this->input->post('txtCollaboratore');\n $accompagnatoreList = '';\n if ($txtCollaboratore != '')\n $accompagnatoreList = $this->webservicemodel->getAccompagnatoreFromCollaboratore($txtCollaboratore);\n\n if ($accompagnatoreList != '') {\n ?>\n <select id=\"txtAccompagnatore\" name=\"txtAccompagnatore\">\n <option value=\"\">Select Accompagnatore</option>\n <option value=\"All\">All</option>\n <?php\n if ($accompagnatoreList) {\n foreach ($accompagnatoreList as $accompagnatore) {\n ?>\n <option value=\"<?php echo $accompagnatore; ?>\"><?php echo $accompagnatore; ?></option>\n <?php\n }\n }\n ?>\n </select>\n <?php\n } else {\n ?>\n <select id=\"txtAccompagnatore\" name=\"txtAccompagnatore\">\n <option value=\"\">Select Accompagnatore</option>\n </select>\n <?php\n }\n } else {\n redirect('backoffice', 'refresh');\n }\n }", "function cargar_zonas_h()\n {\n\n $profe=$this->model->get_profe($_SESSION['iduser']);\n $zonas=$this->model->get_zona_p($profe[0]['id_profesores']);\n $options=\"\";\n //generamos los options de cada zona\n foreach ($zonas as $zona)\n {\n $options.=\"<option value='\".$zona['id_zonas'].\"'>\".utf8_encode($zona['nombre']).\"</option>\";\n }\n echo $options;\n }", "public function generate_prodi_dropdown()\n {\n $this->db->select ('\n prodi.id_prodi,\n prodi.nama_prodi\n ');\n\n // Urut abjad\n $this->db->order_by('nama_prodi');\n\n $result = $this->db->get('prodi');\n \n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $dropdown[''] = 'Pilih prodi';\n\n if ($result->num_rows() > 0) {\n \n foreach ($result->result_array() as $row) {\n $dropdown[$row['id_prodi']] = $row['nama_prodi'];\n }\n }\n\n return $dropdown;\n }", "public function getKojabStruktural(){\n if(isset($_POST['kolok'])){\n $kolok = $_POST['kolok'];\n }else{\n $return = array('response' => 'GAGAL', 'err' => 'No Kolok');\n echo json_encode($return);\n exit();\n }\n \n $listKojab = $this->infopegawai->getMasterKojab($kolok);\n //var_dump($listKojab);\n $arr = array('response' => 'SUKSES', 'listKojab' => $listKojab);\n echo json_encode($arr);\n }", "function detail_ambil_paket_list(){\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t//$master_id = (integer) (isset($_POST['master_id']) ? $_POST['master_id'] : $_GET['master_id']);\r\n\t\t$dpaket_id = (integer) (isset($_POST['dpaket_id']) ? $_POST['dpaket_id'] : 0);\r\n\t\t$tanggal = isset($_POST['tanggal']) ? $_POST['tanggal'] : \"\";\r\n\t\t$dapaket_cust = isset($_POST['dapaket_cust']) ? $_POST['dapaket_cust'] : 0;\r\n\t\t$dapaket_stat_dok=trim(@$_POST[\"dapaket_stat_dok\"]);\r\n\t\t$dapaket_stat_dok=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$dapaket_stat_dok);\r\n\t\t$dapaket_stat_dok=str_replace(\"'\", '\"',$dapaket_stat_dok);\r\n\t\t$dapaket_nobukti_pajak\t= trim(@$_POST[\"dapaket_nobukti_pajak\"]);\r\n\t\t$dapaket_nobukti_medis\t= trim(@$_POST[\"dapaket_nobukti_medis\"]);\r\n\t\t$result=$this->m_master_jual_rawat->detail_ambil_paket_list($dpaket_id,$tanggal,$dapaket_cust,$query,$dapaket_stat_dok,$start,$end, $dapaket_nobukti_pajak, $dapaket_nobukti_medis);\r\n\t\techo $result;\r\n\t}", "public function factures_option($id = 0)\n {\n //if (! $this->input->is_ajax_request()) die('');\n $resultat = $this->m_feuille_controle->liste_option_factures_by_devis($id);\n $results = json_decode(json_encode($resultat), true);\n\n echo \"<option value='' selected='selected'>(choisissez)</option>\";\n echo \"<option value=-1 >aucune</option>\";\n foreach ($results as $row) {\n echo \"<option value='\" . $row['id'] . \"'>\" . $row['value'] . \"</option>\";\n }\n }", "public function buku()\n\t{\n $respon = $this->curl->simple_get($this->API . '/buku');\n $buku = json_decode($respon, true);\n $data['buku'] = $buku['values'];\n $data['title'] = 'Admin Perpustakaan | Halaman Buku';\n\t\t$this->load->view('admin/include/head', $data);\n\t\t$this->load->view('admin/include/header');\n\t\t$this->load->view('admin/include/sidebar');\n\t\t$this->load->view('admin/buku', $data);\n\t\t$this->load->view('admin/include/script');\n\t\t$this->load->view('admin/include/footer');\n\t}", "function loadHotel($inp=-1)\n\t{\n\t\t$inp = (int)$inp;\n\t\t$hotelList=daftar_class::hotelList((int)$_SESSION['daftar_id']);\n\t\t$shart = ' and 1=0';\n\t\tif($hotelList)\n\t\t\t$shart=' and ( `id`='.implode(\" or `id`=\",$hotelList).\")\";\n\t\t$out = '<select name=\"hotel_id\" class=\"form-control inp\" style=\"width:auto;\" onchange=\"document.getElementById(\\'frm1\\').submit();\">';\n\t\t$out .= '<option value=\"-1\"></option>';\n\t\tmysql_class::ex_sql(\"select `id`,`name` from `hotel` where `is_our`!=2 and `moeen_id` > 0 $shart order by `name` \",$q);\n\t\twhile($r = mysql_fetch_array($q))\n\t\t{\n\t\t\t$sel = (($r['id']==$inp)?'selected=\"selected\"':'');\n\t\t\t$out.=\"<option $sel value='\".$r['id'].\"' >\".$r['name'].\"</option>\\n\";\n\t\t}\n\t\t$out.='</select>';\n\t\treturn $out;\n\t}", "public function katkampanyaazurunlistele($kmpnyaID) {\n $sql = \"SELECT urun_ID,urun_kodu,urun_benzersizkod,urun_fiyat,urun_anaresim,urun_adi,urun_benzad FROM flora_urun WHERE urun_kmpnyaid=$kmpnyaID AND urun_aktiflik=1 ORDER BY urun_adi ASC\";\n return $this->db->select($sql);\n }", "function selectTipoper(){\n\t$this->output->set_header('Content-type: application/json');\n\t$res = $this->reg->selectTipoper();\n\t\t if($res!=false){\n $data = array();\n foreach ($res as $row){\n $fila = array( 'tipo'=>$row['codigo'],'nombre'=>trim(utf8_encode($row['dsctip'])));\n $data[] = $fila;\n }\n echo json_encode($data);\n }else{\n echo '{\"msg\":\"0\"}';\n }\n\t}", "function displayAvailableCountries() {\n $db = dbConnect();\n $countries = dbGetAllCountries($db); // Récupération des pays\n\n // Création d'une ligne par pays avec comme value le code ISO et comme texte le nom du pays\n foreach($countries as $country) {\n echo \"<option value='\" . $country->getIso_code() . \"'>\" . $country->getName() . \"</option>\";\n }\n }", "function TampilkanFilterIPKIPS($mnux) {\r\n $arrUrut = array(\"IPS\", \"IPK\");\r\n $optUrut = '';\r\n for ($i = 0; $i < sizeof($arrUrut); $i++) {\r\n $isi = $arrUrut[$i];\r\n $sel = ($isi == $_SESSION['IPUrut'])? 'selected' : '';\r\n $optUrut .= \"<option value='$isi' $sel>$isi</option>\";\r\n }\r\n echo \"<p><table class=box cellspacing=1>\r\n <form action='?' method=POST>\r\n <input type=hidden name='mnux' value='$mnux'>\r\n <tr><td class=inp1><b>Filter</b></td>\r\n <td class=inp>Minimal IPS</td>\r\n <td class=ul><input type=text name='IPSMin' value='$_SESSION[IPSMin]' size=4 maxlength=4></td>\r\n <td class=inp>Minimal IPK</td>\r\n <td class=ul><input type=text name='IPKMin' value='$_SESSION[IPKMin]' size=4 maxlength=4></td>\r\n <td class=inp>Urutkan</td>\r\n <td class=ul><select name='IPUrut'>$optUrut</select></td>\r\n <td class=ul><input type=submit name='Simpan' value='Simpan'></td>\r\n </form></table></p>\";\r\n}", "private static function showIndirizzi(){\n $Magazzini=\\Singleton::DB()->query(\"SELECT indirizzi.id as id_magazzino, comuni.nome as citta,comuni.provincia as provincia, comuni.CAP as cap, indirizzi.via, indirizzi.civico FROM `magazzini`,comuni,indirizzi WHERE magazzini.id_indirizzo=indirizzi.id AND indirizzi.id_comune=comuni.id;\");\n while($r = mysqli_fetch_assoc($Magazzini)) {$rows[] = $r; }\n if(isset($rows))echo json_encode($rows);\n else self::setSuccess(\"empty\");\n }", "public function get2(){\n\t\t\n\t\t$get['id'] = $_GET['id'];\n\t\t$get['ukuran'] = $_POST['ukuran'];\n\t\t$result = $this->kelola->edit_barang2($get);\n\t\t$array = $result[0]->$get['ukuran'];\n echo json_encode($array);\n\t}", "function select_cuotas($id){\r\n\r\n\t$sql = \"SELECT * FROM cuotas WHERE credito_idcredito = $id AND estatus = 'PENDIENTE' ORDER BY idcuotas ASC\";\r\n\t$ej = mysql_query($sql);\r\n\t$var = '';\r\n\twhile($dt = mysql_fetch_array($ej)){\r\n\t\t$var .= '<option value=\"'.$dt['idcuotas'].'\" >'.$dt['capital'].'</option>';\r\n\t}\r\n\treturn $var;\r\n}" ]
[ "0.6731925", "0.6730893", "0.66908574", "0.6618406", "0.6613717", "0.6612627", "0.6609346", "0.6604749", "0.65953106", "0.6553289", "0.65200204", "0.6518845", "0.6518775", "0.64848566", "0.6478122", "0.64732665", "0.64685404", "0.6460909", "0.64439857", "0.6414969", "0.6411745", "0.6405168", "0.6371799", "0.63607126", "0.6346561", "0.63158137", "0.63120824", "0.6270823", "0.6247733", "0.62357634", "0.6225962", "0.62173873", "0.6196124", "0.61923087", "0.618586", "0.618586", "0.61785626", "0.61750257", "0.6172904", "0.6167656", "0.616191", "0.6157379", "0.61519855", "0.61425924", "0.6132833", "0.6106622", "0.61051685", "0.6104871", "0.6101446", "0.6097628", "0.6093605", "0.609331", "0.60903746", "0.60846573", "0.60803115", "0.6080203", "0.60682666", "0.606503", "0.6058393", "0.6050248", "0.60490805", "0.604609", "0.60411257", "0.60359496", "0.60355175", "0.60325754", "0.6029713", "0.6015537", "0.60114264", "0.6002972", "0.599352", "0.59800005", "0.5979459", "0.596413", "0.59614956", "0.59590065", "0.59578454", "0.5956602", "0.59521157", "0.5945785", "0.59378064", "0.592955", "0.592674", "0.5916031", "0.5915858", "0.59146166", "0.5907852", "0.59049565", "0.5898965", "0.5890251", "0.58890325", "0.58866096", "0.5884144", "0.5877365", "0.587672", "0.58743197", "0.5867587", "0.5863022", "0.5862196", "0.5861664", "0.58526444" ]
0.0
-1
/remont qilingan mashinani minutga asosida narxini xisoblash
public function CalculatePrice($sector_id,$model,$case,$starting_time,$finishing_time) { if($model=='1CR48' or $model=='1CP48' or $model=='1MW48') { $model='1CQ48'; } else if ($model=='1TH69') { $model='1TF69'; } if($case==1) { $case='is_little'; } else if($case==2) { $case='is_medium'; } else if($case==3) { $case='is_large'; } /* finding time interval*/ $datetime1 = date_create($starting_time); $datetime2 = date_create($finishing_time); $interval = date_diff($datetime1, $datetime2); /*get time*/ $minutes = $interval->format('%i'); $hours = $interval->format('%h'); ($hours>0)?$hours = $hours*60:null; $overallTime = $minutes+$hours; $priceList = ServicePrice::find() ->where(['sector_id'=>$sector_id]) ->andWhere(['model'=>$model]) ->one(); $prise = $priceList->$case*$overallTime; return $prise; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mois_suivant($mois,$annee){\n\t$mois++;\t//mois suivant, donc on incrémente de 1\n\tif($mois==13){\t\n\t\t$annee++;\n\t\t$mois=1;\n\t}\n\treturn $_SERVER['PHP_SELF'].\"?m=$mois&a=$annee\";\n}", "function cariPosisi($batas){\nif(empty($_GET['halpengumuman'])){\n\t$posisi=0;\n\t$_GET['halpengumuman']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengumuman']-1) * $batas;\n}\nreturn $posisi;\n}", "function hapusawalan1($kata){\n if(substr($kata,0,4)==\"meng\"){\n if(substr($kata,4,1)==\"e\"||substr($kata,4,1)==\"u\"){\n $kata = \"k\".substr($kata,4);\n }else{\n $kata = substr($kata,4);\n }\n }else if(substr($kata,0,4)==\"meny\"){\n $kata = \"ny\".substr($kata,4);\n }else if(substr($kata,0,3)==\"men\"){\n $kata = substr($kata,3);\n }else if(substr($kata,0,3)==\"mem\"){\n if(substr($kata,3,1)==\"a\" || substr($kata,3,1)==\"i\" || substr($kata,3,1)==\"e\" || substr($kata,3,1)==\"u\" || substr($kata,3,1)==\"o\"){\n $kata = \"p\".substr($kata,3);\n }else{\n $kata = substr($kata,3);\n }\n }else if(substr($kata,0,2)==\"me\"){\n $kata = substr($kata,2);\n }else if(substr($kata,0,4)==\"peng\"){\n if(substr($kata,4,1)==\"e\" || substr($kata,4,1)==\"a\"){\n $kata = \"k\".substr($kata,4);\n }else{\n $kata = substr($kata,4);\n }\n }else if(substr($kata,0,4)==\"peny\"){\n $kata = \"s\".substr($kata,4);\n }else if(substr($kata,0,3)==\"pen\"){\n if(substr($kata,3,1)==\"a\" || substr($kata,3,1)==\"i\" || substr($kata,3,1)==\"e\" || substr($kata,3,1)==\"u\" || substr($kata,3,1)==\"o\"){\n $kata = \"t\".substr($kata,3);\n }else{\n $kata = substr($kata,3);\n }\n }else if(substr($kata,0,3)==\"pem\"){\n if(substr($kata,3,1)==\"a\" || substr($kata,3,1)==\"i\" || substr($kata,3,1)==\"e\" || substr($kata,3,1)==\"u\" || substr($kata,3,1)==\"o\"){\n $kata = \"p\".substr($kata,3);\n }else{\n $kata = substr($kata,3);\n }\n }else if(substr($kata,0,2)==\"di\"){\n $kata = substr($kata,2);\n }else if(substr($kata,0,5)==\"keter\"){\n $kata = substr($kata,5);\n }else if(substr($kata,0,3)==\"ter\"){\n $kata = substr($kata,3);\n }else if(substr($kata,0,2)==\"ke\"){\n $kata = substr($kata,2);\n }\n return $kata;\n }", "public function AggiornaPrezzi(){\n\t}", "function cariPosisi($batas){\nif(empty($_GET[halaman])){\n\t$posisi=0;\n\t$_GET[halaman]=1;\n}\nelse{\n\t$posisi = ($_GET[halaman]-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halpengajar'])){\n\t$posisi=0;\n\t$_GET['halpengajar']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengajar']-1) * $batas;\n}\nreturn $posisi;\n}", "function SuoritaLisaysToimet(){\n /*Otetaan puuhaId piilotetustaKentasta*/\n $puuhaid = $_POST['puuha_id'];\n \n /* Hae puuhan tiedot */\n $puuha = Puuhat::EtsiPuuha($puuhaid);\n $suositus=luoSuositus($puuhaid,null);\n \n /*Tarkistetaan oliko suosituksessa virheita*/\n if(OlioOnVirheeton($suositus)){\n LisaaSuositus($suositus,$puuhaid);\n header('Location: puuhanTiedotK.php?puuhanid=' . $puuhaid . '.php');\n } else {\n $virheet = $suositus->getVirheet();\n naytaNakymaSuosituksenKirjoitusSivulle($puuha, $suositus, $virheet, \"Lisays\");\n }\n}", "function tach_chu_hien_thi($content){\r\n $mang = explode(\" \", $content);\r\n $str = \"\";\r\n $sochu = sizeof($mang);\r\n if($sochu < 10){\r\n for($j = 0; $j < sizeof($mang); $j++){\r\n $str = $str.\" \".$mang[$j];\r\n }\r\n }else{\r\n for($j = 0; $j < 15; $j++){\r\n $str = $str.\" \".$mang[$j];\r\n }\r\n }\r\n return $str;\r\n}", "function cariPosisi($batas){\nif(empty($_GET['halgalerifoto'])){\n\t$posisi=0;\n\t$_GET['halgalerifoto']=1;\n}\nelse{\n\t$posisi = ($_GET['halgalerifoto']-1) * $batas;\n}\nreturn $posisi;\n}", "function cc_ho_vetrina($agenzia, $rif){\n\tglobal $invetrina;\n\t\n\t// $agenzia qua è il numero interno di Cometa\n\tif( isset( $invetrina[$agenzia] ) ){\t\t\n\t\t\n\t\tif ($invetrina[$agenzia]['imm'] == $rif) {\n\t\t\t// questo immobile è in vetrina\n\t\t\t$vetrina = '1';\n\t\t\tcc_import_immobili_error_log($rif.\" è in vetrina\");\n\t\t\t\n\t\t\t// vediamo se è lo stesso di quello che era già in vetrina o meno\n\t\t\t$oldrif = cc_get_rif_vetrina( substr($rif, 0, 2) );\n\t\t\tcc_import_immobili_error_log(\"oldrif: \".$oldrif);\n\t\t\t\n\t\t\t// se l'immobile attualemnte in vetrina non è questo tolgo quello attuale da vetrina\n\t\t\tif($oldrif != $rif) {\n\t\t\t\tcc_updateVetrina($oldrif); \n\t\t\t\tcc_import_immobili_error_log(\"Tolgo vetrina da \".$oldrif);\n\t\t\t}\n\t\t}else{\n\t\t\t$vetrina = '0';\n\t\t}\t\t\n\t\n\t}else{\n\t\t$vetrina = '0';\n\t}\n\t\n\treturn $vetrina;\n}", "function cariPosisi($batas){\nif(empty($_GET['halhasilkelulusansiswa'])){\n\t$posisi=0;\n\t$_GET['halhasilkelulusansiswa']=1;\n}\nelse{\n\t$posisi = ($_GET['halhasilkelulusansiswa']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halberita'])){\n\t$posisi=0;\n\t$_GET['halberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halberita']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halberita'])){\n\t$posisi=0;\n\t$_GET['halberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halberita']-1) * $batas;\n}\nreturn $posisi;\n}", "function motivoDeAnulacionAsig(){\n\t\t$sql = \"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNAS' and status='1'\";\n\t\treturn $this->ejecuta($sql);\n\t}", "function cariPosisi($batas){\nif(empty($_GET['halhasillulusadministrasi'])){\n\t$posisi=0;\n\t$_GET['halhasillulusadministrasi']=1;\n}\nelse{\n\t$posisi = ($_GET['halhasillulusadministrasi']-1) * $batas;\n}\nreturn $posisi;\n}", "function noidungtt($sotu,$noidung)\n{\n\n\t$n=explode(\" \",$noidung);\n\t$noidunginra=\" \";\n\tif($sotu<=count($n)){\n for($i=0;$i<$sotu;$i++)\n\t\t $noidunginra = $noidunginra.$n[$i].\" \";\n $noidunginra .=\"...\";\n }\n\telse\n\t\techo \"<h1>cảnh báo : số từ tóm lược nhiều hơn nội dung ban đầu</h1>\"; \n\treturn $noidunginra;\n}", "function kompresGambar($kualitas,$fileGambarSumber,$fileGambarTujuan,$widthMaksimal,$heightMaksimal,$rasioWidth,$rasioHeight) {\n //cek parameter inti!!\n //============================================================================\n if((empty($kualitas)) or (empty($fileGambarSumber)) or (empty($fileGambarTujuan))) {\n //parameter inti belum di tentukan\n //============================================================================\n echo(\" Kesalahan: Parameter belum ditentukan! \");\n return 0;\n }\n else {\n if(!file_exists($fileGambarSumber)) {\n //parameter inti belum di tentukan\n //============================================================================\n echo(\" Kesalahan: File sumber tidak ditemukan! \");\n return 0;\n }\n else {\n //parameter inti benar\n //============================================================================\n if(!is_numeric($kualitas)) {\n // kualitas harus bertipe numerik\n //============================================================================\n echo(\" Kesalahan: Parameter kualitas harus berupa bilangan numerik! \");\n return 0;\n }\n else {\n if((empty($rasioWidth)) xor (empty($rasioHeight))) {\n //parameter rasio tidak boleh kosong salah satu\n //============================================================================\n echo \" Kesalahan: Parameter rasio tidak sesuai! \";\n return 0;\n }\n else {\n //siapkan variabel\n //============================================================================\n $tmp = explode(\"/\",$fileGambarSumber);\n $fileGambar = end($tmp); //nama file gambar\n unset($tmp);\n list($widthSumber,$heightSumber) = getimagesize($fileGambarSumber);\n $skip = 0;\n \n //cek apakah menggunakan rasio atau tidak\n if((empty($rasioHeight)) and (empty($rasioWidth))) {\n //kompres tanpa parameter rasio\n //============================================================================\n $heightMaksimal = $widthMaksimal;\n $xSumber = 0;\n $ySumber = 0;\n \n if($widthSumber > $heightSumber) {\n $rasio = $widthSumber / $widthMaksimal;\n $widthTujuan = $widthMaksimal;\n $heightTujuan = $heightSumber / $rasio;\n }\n elseif($heightSumber > $widthSumber) {\n $rasio = $heightSumber / $heightMaksimal;\n $widthTujuan = $widthSumber / $rasio;\n $heightTujuan = $heightMaksimal;\n }\n else {\n $rasio = $heightSumber / $heightMaksimal;\n $widthTujuan = $widthMaksimal;\n $heightTujuan = $heightMaksimal;\n }\n }\n else {\n //kompres dengan parameter rasio\n //============================================================================\n if($rasioWidth == $rasioHeight) {\n //rasio 1:1\n $widthTujuan = $widthMaksimal;\n $heightTujuan = $heightMaksimal;\n \n // hitung besar gambar baru\n if($widthSumber > $heightSumber) {\n $sisa = $widthSumber - $heightSumber;\n $xSumber = $sisa / 2;\n $ySumber = 0;\n $widthSumber = $widthSumber - $sisa;\n $heightSumber = $heightSumber;\n if($heightSumber < $heightMaksimal) {\n $widthTujuan = $heightSumber;\n $heightTujuan = $heightSumber;\n }\n }\n elseif($heightSumber > $widthSumber) {\n $sisa = $heightSumber - $widthSumber;\n $xSumber = 0;\n $ySumber = $sisa / 2;\n $widthSumber = $widthSumber;\n $heightSumber = $heightSumber - $sisa;\n if($widthSumber < $widthMaksimal) {\n $widthTujuan = $widthSumber;\n $heightTujuan = $widthSumber;\n }\n }\n else {\n $xSumber = 0;\n $ySumber = 0;\n $widthSumber = $heightSumber;\n $heightSumber = $widthSumber;\n if($heightSumber <= $heightMaksimal) {\n $skip = 1;\n }\n }\n }\n else {\n //rasio width:height\n // hitung besar gambar baru\n if($rasioWidth > $rasioHeight) {\n $tmpvar = ($widthSumber / $rasioWidth) * $rasioHeight;\n if($widthSumber < $widthMaksimal) {\n $widthTujuan = $widthSumber;\n $heightTujuan = $tmpvar;\n }\n else {\n $widthTujuan = $widthMaksimal;\n $heightTujuan = ($widthMaksimal / $rasioWidth) * $rasioHeight;\n }\n \n if($heightSumber > $tmpvar) {\n $sisa = $heightSumber - $tmpvar;\n $ySumber = $sisa / 2;\n $heightSumber = $heightSumber - $sisa;\n }\n else {\n $ySumber = 0;\n }\n $xSumber = 0;\n }\n elseif($rasioHeight > $rasioWidth) {\n $tmpvar = ($heightSumber / $rasioHeight) * $rasioWidth;\n if($heightSumber < $heightMaksimal) {\n $widthTujuan = $tmpvar;\n $heightTujuan = $heightSumber;\n }\n else {\n $widthTujuan = ($heightMaksimal / $rasioHeight) * $rasioWidth;\n $heightTujuan = $heightMaksimal;\n }\n \n if($widthSumber > $tmpvar) {\n $sisa = $widthSumber - $tmpvar;\n $xSumber = $sisa / 2;\n $widthSumber = $widthSumber - $sisa;\n }\n else {\n $xSumber = 0;\n }\n $ySumber = 0;\n }\n }\n }\n \n //mulai peng-kompres-an apabila $skip = 0 atau rasio > 1\n //============================================================================\n if(($skip == 0) or ($rasio > 1)) {\n // nama file anyar\n $tmp = explode(\".\",$fileGambar);\n $tipeGambar = end($tmp);\n $tipeGambar = strtolower($tipeGambar);\n unset($tmp);\n \n // load gambar\n switch ($tipeGambar) {\n case 'jpg':\n $tmpGambar = imagecreatefromjpeg($fileGambarSumber);\n break;\n case 'png':\n $tmpGambar = imagecreatefrompng($fileGambarSumber);\n break;\n case 'gif':\n $tmpGambar = imagecreatefromgif($fileGambarSumber);\n break;\n default:\n //file tidak didukung\n echo \" Kesalahan: Tipe file tidak didukung! \";\n return 0;\n break;\n }\n \n $tmp = imagecreatetruecolor($widthTujuan, $heightTujuan);\n imagecopyresampled($tmp, $tmpGambar,\n 0, 0,\n $xSumber, $ySumber,\n $widthTujuan, $heightTujuan,\n $widthSumber, $heightSumber);\n \n //simpan\n switch ($tipeGambar) {\n case 'jpg':\n if(imagejpeg($tmp, $fileGambarTujuan, $kualitas)) {\n //sukses\n /* cleanup memory */\n imagedestroy($tmpGambar);\n imagedestroy($tmp);\n return 1;\n }\n else {\n //gagal\n /* cleanup memory */\n imagedestroy($tmpGambar);\n imagedestroy($tmp);\n echo \" Kesalahan: Gagal membuat file tujuan! \";\n return 0;\n }\n break;\n case 'png':\n if(imagepng($tmp, $fileGambarTujuan)) {\n //sukses\n /* cleanup memory */\n imagedestroy($tmpGambar);\n imagedestroy($tmp);\n return 1;\n }\n else {\n //gagal\n echo \" Kesalahan: Gagal membuat file tujuan! \";\n /* cleanup memory */\n imagedestroy($tmpGambar);\n imagedestroy($tmp);\n return 0;\n }\n break;\n case 'gif':\n if(imagegif($tmp, $fileGambarTujuan)) {\n //sukses\n /* cleanup memory */\n imagedestroy($tmpGambar);\n imagedestroy($tmp);\n return 1;\n }\n else {\n //gagal\n /* cleanup memory */\n imagedestroy($tmpGambar);\n imagedestroy($tmp);\n echo \" Kesalahan: Gagal membuat file tujuan! \";\n return 0;\n }\n break;\n default:\n /* cleanup memory */\n imagedestroy($tmpGambar);\n imagedestroy($tmp);\n return 0;\n break;\n }\n }\n }\n }\n }\n }\n }", "public function hapus_toko(){\n\t}", "function cariPosisi($batas){\nif(empty($_GET['haldatasiswa'])){\n\t$posisi=0;\n\t$_GET['haldatasiswa']=1;\n}\nelse{\n\t$posisi = ($_GET['haldatasiswa']-1) * $batas;\n}\nreturn $posisi;\n}", "function moviextranjeros($ejer,$poli){\n\t\t\t$sql=$this->query(\"select m.*,c.manual_code from cont_polizas p,cont_movimientos m,cont_accounts c,cont_config con\n\t\t\twhere m.IdPoliza=p.id and m.Cuenta=c.`account_id` and c.currency_id!=1 and m.Activo=1 and c.main_father!=con.CuentaBancos\n\t\t\t and p.idejercicio=\".$ejer.\" and p.id=\".$poli);\n\t\t\t \n\t\t\treturn $sql;\n\t\t\t\n\t\t}", "public function masodik()\n {\n }", "function limpiarcadena($char)\n{\n\t$ban=0;//Bandera para saber si estan ejecutando una Inyeccion SQL\n\t$char_w_replaced = stripslashes($char);//Guardamos la Inyeccion original para informacion a la BD\n\t//Array con las palabras reservadas, para modificar a gusto :D\n\t$hack_array = array(\"'\", '\"', \";\", \"UNION\", \"union\", \"DROP\", \"drop\", \"table\", \"TABLE\", \"SET\", \"set\", \"UPDATE\", \"update\", \"SELECT\", \"select\", \"-\", \"--\", \"MEMB_INFO\", \"memb_info\", \"memb__pwd\", \"memb___id\"); //Caracter por el que será reemplazada cada palabra reservada del sitio\n\t$hack_replace = \"\"; //Separamos la cadena en un Array para poder hacer la comparacion y determinar si estan\n\t//ejecutando o no una Inyeccion SQL\n\t$char1=explode(\" \",$char);\n\tfor($i=0;$i<count($char1);$i++)\n\t{\n\t\tif(in_array($char1[$i],$hack_array))//si se quiere se puede convertir todo a mayusculas para la comprobacion.\n\t\t{\n\t \t\t$ban=1;\n\t\t}\n\t}\n\t\n\tif ($ban==1)\n\t{\n\t\t$add=\"ESTAS HACKEANDO SI SI\"; \t\n\t}\n\telse \n\t{\n\t\t$add=\"NO ESTAS HACKEANDO\"; \n\t\t//seguir con los procesos del POST o GET sin guardar ips ni nada\n\t} \n\t\n\t//reemplazamos las palabras reservadas\n\t$char_replaced = str_replace($hack_array, $hack_replace, $char);\n\t//evitamos codigos html y espacios en blanco\n\t$char_clean=htmlentities(trim($char_replaced)); //retornamos la cadena limpia para usar en nuestra consulta, o podemos devolver segun el resultado de ban\n\t//un die para no ejecutar nada o como se les ocurra\n\treturn $char_clean;\n}", "function identificar_pago_cli_mercantil($acceso,$id_cuba,$abrev_cuba){\n\t$acceso2=conexion();\n\t\n\t\tsession_start();\n\t\t$ini_u = $_SESSION[\"ini_u\"]; \n\t\tif($ini_u==''){\n\t\t\t$ini_u =\"AA\";\n\t\t}\n\t$acceso->objeto->ejecutarSql(\"select *from pagodeposito where (id_pd ILIKE '$ini_u%') ORDER BY id_pd desc\"); \n\t$id_pd = $ini_u.verCoo($acceso,\"id_pd\");\n\t$login = $_SESSION[\"login\"]; \n\t$fecha= date(\"Y-m-d\");\n\t$hora= date(\"H:i:s\");\n\t\n\t$palabra_clave='DEPOSITO EN EFECTIVO';\n\t$palabra_clave1='DEPO-FACIL ELECTRONICO';\n\t//ECHO \" select * from vista_tablabancos where id_cuba='$id_cuba' and descrip_tb ilike 'REC. INT. CARGO CUENTA%'\";\n\t$acceso2->objeto->ejecutarSql(\" select * from vista_tablabancos where id_cuba='$id_cuba' and (descrip_tb ilike '$palabra_clave%' or descrip_tb ilike '$palabra_clave1%' )AND (Status_tb='REGISTRADO' or status_tb='NO RELACIONADO')order by id_tb \");\n\t\twhile($row=row($acceso2)){\n\t\t\t$abrev_cuba=trim($row[\"abrev_cuba\"]);\n\t\t\t$id_tb=trim($row[\"id_tb\"]);\n\t\t\t//echo \"<br>$abrev_cuba:\";\n\t\t\t$fecha_tb=trim($row[\"fecha_tb\"]);\n\t\t\t$referencia_tb=trim($row[\"referencia_tb\"]);\n\t\t\t$monto_tb=trim($row[\"monto_tb\"]);\n\t\t\t$descrip_tb=trim($row[\"descrip_tb\"]);\n\t\t\t$valor=explode($palabra_clave,$descrip_tb);\n\t\t\t$ini=substr($referencia_tb, 0, 3);\n\t\t\t$nro_contrato='00000000000000000000000000';\n\t\t\t//echo \"<br>:$referencia_tb:\";\n\t\t\t//if($ini=='000'){\n\t\t\t\t//$nro_contrato=\t$ano=substr($referencia_tb, 3, 8);\n\t\t\t\t$nro_contrato=\t$referencia_tb;\n\t\t\t\tif(strlen($nro_contrato)!=8 && strlen($nro_contrato)!=7){\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//\techo \"<br>nro_contrato:$nro_contrato:\";\n\t\t\t//}\n\t\t\t//echo \"<br>$referencia_tb: select * from contrato where nro_contrato ilike '%$nro_contrato%' \";\n\t\t\t$acceso->objeto->ejecutarSql(\" select * from contrato where nro_contrato ilike '%$nro_contrato%' \");\n\t\t\tif($row=row($acceso)){\n\t\t\t\t$id_contrato=trim($row[\"id_contrato\"]);\n\t\t\t\t$acceso->objeto->ejecutarSql(\"insert into pagodeposito(id_pd,id_contrato,fecha_reg,hora_reg,login_reg,fecha_dep,banco,numero_ref,status_pd,tipo_dt,monto_dep,obser_p,id_tb,fecha_conf,hora_conf,login_conf) values \n\t\t\t\t('$id_pd','$id_contrato','$fecha','$hora','$login','$fecha_tb','$id_cuba','$referencia_tb','CONFIRMADO','DEPOSITO','$monto_tb','$descrip_tb','$id_tb','$fecha','$hora','$login')\");\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update tabla_bancos set status_tb='CONCILIADO' , tipo_tb='CLIENTES' where id_tb='$id_tb'\");\t\n\t\t\t\t$id_pd=$ini_u.verCoo_inc($acceso,$id_pd);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update tabla_bancos set status_tb='NO RELACIONADO', tipo_tb='CLIENTES' where id_tb='$id_tb'\");\t\n\t\t\t}\n\t\t}\n\treturn $cad;\t\n}", "public static function doYouMean() {\r\n\t\t$aranan_kelime = 'ph'; //Bu değerin veritabanından geldiğini varsayalım\r\n\t\t$diziler = array('php', 'asp', '.net', 'jsp', 'java', 'javascript', 'html', 'c', 'css', 'xml');\r\n\t\t//$diziler dizisi, veritabanından çekilen birçok veri dizisi olduğu varsayalım\r\n\t\t$uzunluk = -1;\r\n\t\t\r\n\t\tforeach($diziler as $dizi) {\r\n\t\t\t$benzerlik = levenshtein($aranan_kelime, $dizi);\r\n\t\t\tif($benzerlik == 0) {\r\n\t\t\t\t$yakinlik = $dizi;\r\n\t\t\t\t$uzunluk = 0;\r\n\t\t\t}\r\n\t\t\tif(($benzerlik <= $uzunluk) || ($uzunluk < 0)) {\r\n\t\t\t\t$yakinlik = $dizi;\r\n\t\t\t\t$uzunluk = $benzerlik;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$op = \"Aranan Kelime: \".$aranan_kelime;\r\n\t\tif($uzunluk == 0) {\r\n\t\t\t$op .= $yakinlik.\" için herhangi bir sonuç bulunamadı!\";\r\n\t\t} else {\r\n\t\t\t$op .= \"Bunu mu demek istediniz? \".$yakinlik;\r\n\t\t}\r\n\t\treturn $op;\r\n\t}", "function verMas()\t\r\n\t\t{\r\n\t\t\t\r\n\t\t\tglobal $use;\r\n\t\t\tglobal $priv;\r\n\r\n\t\t\t//NOTA: Para ver si funciona tienen que asociarle un adherente en la tabla socios, ya que en los datos de ejemplo todos son titulares\r\n\t\t\t//NOTA: Lo que hice fue: en tabla socios en numero_soc=00044 cambiar el campo soc_titula de manera que quede soc_titula=00277\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DEL ASOCIADO TITULAR----------------\r\n\t\t\t\r\n\t\t\t$numero_socio = $_GET['num_soc']; //Es el número del socio titular que debe ser tomado del PASO 1\r\n\t\t\t\r\n\r\n\t\t\t\t$resultadoTitular = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t\t\t\t\t\t FROM socios,persona \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n AND socios.numero_soc= socios.soc_titula\");\r\n\t\t\t\t\t\t\t\t\t \r\n\r\n\t\t\tif(!$resultadoTitular)\r\n\t\t\t{\r\n\t\t\t\t$error=[\r\n\t\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t\t'funcion'\t\t=>\"verMas\",\r\n\t\t\t\t'descripcion'\t=>\"No se encuentra al titular $numero_socio\"\r\n\t\t\t\t];\r\n\t\t\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use','priv'));\t\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t///---FUNCIÓN PARA CALCULAR EDAD----\r\n\t\t\t\r\n\t\t\t$fecha=$resultadoTitular[0]['fecnacim'];\r\n\t\t\t$dias = explode(\"-\", $fecha, 3);\r\n\t\t\t\r\n\t\t\t// $dias[0] es el año\r\n\t\t\t// $dias[1] es el mes\r\n\t\t\t// $dias[2] es el dia\r\n\t\t\t\r\n\t\t\t// mktime toma los datos en el orden (0,0,0, mes, dia, año) \r\n\t\t\t$dias = mktime(0,0,0,$dias[1],$dias[2],$dias[0]);\r\n\t\t\t$edad = (int)((time()-$dias)/31556926 );\r\n\t\t\t$resultadoTitular[0]['edad']=$edad;\r\n\t\t\t\r\n\t\t\t///---FIN FUNCIÓN PARA CALCULAR EDAD----\r\n\t\t\t\r\n\t\t\t$estado[0]='1';\r\n\t\t\t$estado[1]='1';\r\n\t\t\t$estado[2]='1';\r\n\t\t\t$estado[3]='1';\r\n\t\t\t$estado[4]='1';\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DE LOS SERVICIOS DEL ASOCIADO TITULAR----------------\r\n\t\t\t\r\n\t\t\t//Por cuota\r\n\t\t\t$resultadoTitularServicios1 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,fme_adhsrv.codigo,fme_adhsrv.parentesco,fme_adhsrv.periodoini,fme_adhsrv.periodofin,fme_adhsrv.motivobaja,fme_adhsrv.documento\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.idmutual \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,fme_adhsrv,tar_srv \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n AND socios.numero_soc= socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.socnumero = socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.codigo = tar_srv.idmutual\");\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\tif(!$resultadoTitularServicios1)\r\n\t\t\t\t$estado[0]='0';\r\n\t\t\t\r\n\t\t\t//Por tarjeta\r\n\t\t\t$resultadoTitularServicios2 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.codigo AS codigotarsrv, tar_srvadherentes.codigo, tar_srvadherentes.parentesco \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,tar_srv, tar_srvadherentes \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n AND socios.numero_soc= socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.socnumero = socios.soc_titula \r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.codigo = tar_srv.codigo\");\r\n\t\t\t\r\n\t\t\tif(!$resultadoTitularServicios2)\r\n\t\t\t\t$estado[1]='0';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DE LOS ADHERENTES DEL ASOCIADO TITULAR CON APORTES POR CUOTA----------------\r\n\t\t\t\r\n\r\n\t\t $resultadoAdherentes1 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,fme_adhsrv.codigo,fme_adhsrv.parentesco,fme_adhsrv.periodoini,fme_adhsrv.periodofin,fme_adhsrv.motivobaja,fme_adhsrv.documento\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.idmutual \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,fme_adhsrv,tar_srv \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio'\r\n\t\t\t\t\t\t\t\t\t AND socios.numero_soc != socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.socnumero = socios.numero_soc \r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.codigo = tar_srv.idmutual\");\r\n\t\t\t\r\n\t\t\tif(!$resultadoAdherentes1)\r\n\t\t\t\t$estado[2]='0';\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DE LOS ADHERENTES DEL ASOCIADO TITULAR CON APORTES POR TARJETA----------------\r\n\r\n\t\t\t$resultadoAdherentes2 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.codigo AS codigotarsrv, tar_srvadherentes.codigo, tar_srvadherentes.parentesco \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,tar_srv, tar_srvadherentes \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio'\r\n\t\t\t\t\t\t\t\t\t AND socios.numero_soc != socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.socnumero = socios.numero_soc \r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.codigo = tar_srv.codigo\");\t\r\n\r\n\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\r\n\t\t\tif(!$resultadoAdherentes2)\r\n\t\t\t\t$estado[3]='0';\r\n\t\t\r\n\t\t \r\n\t\t\t//---------------CONSULTA QUE DEVUELVE EL LISTADO DE TODAS LAS ASISTENCIAS----------------\r\n\t\t\t\r\n\t\t\t//NOTA: Para que puedan ver si funciona o no hacer la prueba con el siguiente ejemplo:\r\n\t\t\t// En la tabla fme_asistencia modifiquen en cualquier lado y pongan alguno con doctitu = 06948018 (o busquen cualquier DNI de un socio titular y usen ese)\r\n\t\t\t// Cuando prueben el sistema vayan al ver más de Barrionuevo Samuel y van a ver el listado de atenciones que tiene asociado\r\n\t\t\t\r\n\t\t\t$asistencias = $GLOBALS['db']->select(\"SELECT fme_asistencia.doctitu, fme_asistencia.numdoc, fme_asistencia.nombre,\r\n\t\t\t\t\t\t\t\t\t fme_asistencia.fec_pedido, fme_asistencia.hora_pedido, fme_asistencia.dessit, fme_asistencia.fec_ate,\r\n\t\t\t\t\t\t\t\t\t fme_asistencia.sintomas, fme_asistencia.diagnostico, fme_asistencia.tratamiento, fme_asistencia.hora_aten,\r\n\t\t\t\t\t\t\t\t\t fme_asistencia.profesional\r\n\t\t\t\t\t\t\t\t\t FROM fme_asistencia, socios, persona \r\n\t\t\t\t\t\t\t\t\t WHERE soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n\t\t\t\t\t\t\t\t\t AND numero_soc = soc_titula\r\n\t\t\t\t\t\t\t\t\t AND persona.numdoc = fme_asistencia.doctitu\");\r\n\t\t\t\r\n\t\t\tif(!$asistencias)\r\n\t\t\t\t$estado[4]='0';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t\techo $GLOBALS['twig']->render('/Atenciones/perfil.html', compact('resultadoTitular', \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoTitularServicios1', \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoTitularServicios2', \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoAdherentes1',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoAdherentes2',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'asistencias',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'estado','use','priv'));\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "function sobre_planeacion($minimoMes,$maximoMes,$vigencia,$unidades,$tipo_usuario)\n\t\t{\n\t\t\t//$tipo_usuario ALMACENA EL TIPO DE USUARIO( I O E), EN UN ARRAY, ESTE SE CARGA EN LA PAGINA DE PLANEACION DE PROYECTOS (upHTplaneacionProy.PHP)\t\n//echo $unidades[0].\" - $minimoMes - $maximoMes - $vigencia ********************** <br><br>\";\n\t\t?>\n\n<?\t\t\n\t\t$ban_reg=0; //PERMITE IDENTIFICAR, SI SE ENCONTRO ALMENOS, UN USUARIO SOBRE PLANEADO, DE NO SER ASI, NO SE ENVIA EL CORREO\n\t\t$pTema ='<table width=\"100%\" border=\"0\">\n\t\t <tr class=\"Estilo2\" >\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\n\t\t\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td width=\"5%\" >Asunto:</td>\n\t\t\t<td >Sobre planeaci&oacute;n de participantes.</td>\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t \n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td colspan=\"2\">Los siguientes participantes, tienen una dedicaci&oacute;n superior a 1 en los siguientes proyectos:</td>\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\n\t\t\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\n\t\t </tr>\n\t\t\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td colspan=\"2\" >\n\t\t\t\t<table width=\"100%\" border=\"1\" >\n\n\t\t\t\t <tr class=\"Estilo2\">\n\t\t\t\t\t<td colspan=\"5\"></td>\n\t\t\t\t\t<td colspan=\"'.(($maximoMes-$minimoMes)+1).'\" align=\"center\" >'.$vigencia.'</td>\n\t\t\t\t </tr>\t\t\t\t\n\t\t\t\t\n\t\t\t\t <tr class=\"Estilo2\">\n\t\t\t\t\t<td>Unidad</td>\n\t\t\t\t\t<td>Nombre</td>\n\t\t\t\t\t<td>Departamento</td>\n\t\t\t\t\t<td>Divisi&oacute;n</td>\n\t\t\t\t\t<td>Proyecto</td>';\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t$vMeses= array(\"\",\"Ene\",\"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"); \n\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t{\n\n\t\t\t\t\t $pTema = $pTema.'<td>'.$vMeses[$m].' </td>';\n\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t $pTema = $pTema.' </tr>';\n\t\t\t\t$cur_tipo_usu=0; //CURSOR DEL ARRAY, DEL TIPO DE USUARIO \n\t\t\t\tforeach($unidades as $unid)\n\t\t\t\t{\n//tipo_usuario\n\t\t\t\t\tif($tipo_usuario[$cur_tipo_usu]==\"I\")\t\n\t\t\t\t\t{\n\t\t\t\t\t//CONSULTA SI EL USUARIO ESTA SOBREPLANEADO EN ALMENOS, UN MES DURANTE LA VIGENCIA\n\n\t\t\t\t\t//COSNULTA PARA LOS USUARIOS INTERNOS\n\t\t\t\t\t\t\t$sql_planea_usu=\"select top(1) SUM (hombresMes) as total_hombre_mes ,PlaneacionProyectos.unidad ,mes \n\t\t\t\t\t\t\t\t\t\t\t--,PlaneacionProyectos.id_proyecto\n\t\t\t\t\t\t\t\t\t\t\t, PlaneacionProyectos.unidad, Usuarios.nombre, \n\t\t\t\t\t\t\t\t\t\t\tUsuarios.apellidos ,Divisiones.nombre as div,Departamentos.nombre as dep\n\t\t\t\t\t\t\t\t\t\t\tfrom PlaneacionProyectos \n\t\t\t\t\t\t\t\t\t\t\t inner join Usuarios on PlaneacionProyectos.unidad=Usuarios.unidad \n\t\t\t\t\t\t\t\t\t\t\t inner join Departamentos on Departamentos.id_departamento=Usuarios.id_departamento \n\t\t\t\t\t\t\t\t\t\t\t inner join Divisiones on Divisiones.id_division=Departamentos.id_division \n\t\t\t\t\t\t\t\t\t\t\t inner join Proyectos on PlaneacionProyectos.id_proyecto=Proyectos.id_proyecto \n\t\t\t\t\t\t\t\t\t\t\twhere vigencia=\".$vigencia.\" and mes in( \"; \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\" \".$m.\",\";\n\t\t//PlaneacionProyectos.id_proyecto,\t\t\t\t\n\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\"0) and PlaneacionProyectos.unidad=\".$unid.\" \n\t\t\t\t\t\t\t\t\t\t\tand esInterno='I'\n\t\t\t\t\t\t\t\t\t\t\tgroup by PlaneacionProyectos.unidad,mes,Usuarios.nombre, Usuarios.apellidos,Divisiones.nombre ,Departamentos.nombre \n\t\t\t\t\t\t\t\t\t\t\tHAVING (SUM (hombresMes))>1 \";\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif($tipo_usuario[$cur_tipo_usu]==\"E\")\t\n\t\t\t\t\t{\n\t\t\t\t\t\t//COSNULTA PARA LOS USUARIOS EXTERNOS\n\t\t\t\t\t\t$sql_planea_usu=\" select top(1) SUM (hombresMes) as total_hombre_mes ,PlaneacionProyectos.unidad ,mes \n\t\t\t\t\t\t\t\t\t--,PlaneacionProyectos.id_proyecto\n\t\t\t\t\t\t\t\t\t, PlaneacionProyectos.unidad, TrabajadoresExternos.nombre, \n\t\t\t\t\t\t\t\t\tTrabajadoresExternos.apellidos,'' div, ''dep\n\t\t\t\t\t\t\t\t\tfrom PlaneacionProyectos \n\t\t\t\t\t\t\t\t\t inner join TrabajadoresExternos on PlaneacionProyectos.unidad=TrabajadoresExternos.consecutivo \n\t\t\t\t\t\t\t\t\t inner join Proyectos on PlaneacionProyectos.id_proyecto=Proyectos.id_proyecto \n\t\t\t\t\t\t\t\t\twhere vigencia=\".$vigencia.\" and mes in( \";\n\t\t\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\" \".$m.\",\";\n\n\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\"0) and PlaneacionProyectos.unidad=\".$unid.\" \n\t\t\t\t\t\t\t\t\tand esInterno='E'\n\t\t\t\t\t\t\t\t\tgroup by PlaneacionProyectos.unidad,mes,TrabajadoresExternos.nombre, TrabajadoresExternos.apellidos\n\t\t\t\t\t\t\t\t\tHAVING (SUM (hombresMes))>1 \t\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$cur_planea_usu=mssql_query($sql_planea_usu);\n//echo $sql_planea_usu.\" ---- <br>\".mssql_get_last_message().\" *** \".mssql_num_rows($cur_planea_usu).\"<br>\";\n\t\t\t\t\twhile($datos__planea_usu=mssql_fetch_array($cur_planea_usu))\n\t\t\t\t\t{\n\t\t\t\t\t\t$ban_reg=1; //SI ENCUENTRA ALMENOS UN USUARIO SOBREPLANEADO, ENVIA EL CORREO\n\t\t\t\t\n\t\t\t\t\t\t//CONSULTA LOS PROYECTOS, EN LOS CUALES EL PARTICIAPENTE HA SIDO PLANEADO, ESTO PARA PODER DOBUJAR LA TABLA DE FORMA CORRECTA\n\t\t\t\t\t\t$sql_uu=\" select distinct(id_proyecto),nombre,codigo,cargo_defecto from (select SUM (hombresMes) as total_hombre_mes ,unidad, mes,PlaneacionProyectos.id_proyecto ,Proyectos.nombre,Proyectos.codigo,Proyectos.cargo_defecto \n\t\t\t\t\t\t\t\t\tfrom PlaneacionProyectos\n\t\t\t\t\t\t\t\t\t\tinner join Proyectos on PlaneacionProyectos.id_proyecto=Proyectos.id_proyecto \n\t\t\t\t\t\t\t\t\t where vigencia=\".$vigencia.\" and mes in( \";\n\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$sql_uu=$sql_uu.\" \".$m.\",\";\n\t\t\t\t\t\t\t\t\t\t$total_planeado[$m]=0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$sql_uu=$sql_uu.\"0) and unidad in(\".$unid.\") and esInterno= '\".$tipo_usuario[$cur_tipo_usu].\"' group by unidad, mes , PlaneacionProyectos.id_proyecto,Proyectos.nombre,Proyectos.codigo,Proyectos.cargo_defecto ) aa \";\n// HAVING (SUM (hombresMes)\t>1\t\n\t\t\t\t\t\t$cur_uu=mssql_query($sql_uu);\n\t\t\t\t\t\t$cant_proy=mssql_num_rows($cur_uu);\n//echo \"<br><BR>---//**************--------------\".$sql_uu.\" \".mssql_get_last_message().\"<br>\".$cant_proy.\"<br>\";\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t<?\n\t\t\t\t//echo $sql_proy_planea.\" ---- <br>\".mssql_get_last_message().\"<br><br>\";\n\t\t\t\t\n\t\t\t\t\t\t$total_planeado= array();\n\t\t\t\t\t\t$cont=0;\n\t\t\t\t\t\twhile($datos_uu=mssql_fetch_array($cur_uu))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($cont==0)\n\t\t\t\t\t\t\t{\n\t\n\t\t\t\t\t\t\t\t $pTema = $pTema.' <tr class=\"Estilo2\">\t\t\t\t\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \"> '.$datos__planea_usu[\"unidad\"].' </td>\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \">'.$datos__planea_usu[\"apellidos\"].' '.$datos__planea_usu[\"nombre\"].' </td>\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \">'. $datos__planea_usu[\"dep\"].' </td>\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \">'. $datos__planea_usu[\"div\"].' </td>';\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$pTema = $pTema.'<td class=\"Estilo2\" >['.$datos_uu[\"codigo\"].'.'.$datos_uu[\"cargo_defecto\"].'] '. $datos_uu[\"nombre\"].' </td>';\n\n\t\t\t\t\t\t\t//CONSULTA LA INFORMACION DE LO PLANEADO EN CADA MES, DE ACUERDO AL PORYECTO CONSULTADO\n\t\t\t\t\t\t\t$sql_pro=\"select SUM (hombresMes) as total_hombre_mes ,PlaneacionProyectos.id_proyecto,PlaneacionProyectos.unidad,mes\n\t\t\t\t\t\t\t\t\t\t from PlaneacionProyectos \n\t\t\t\t\t\t\t\t\t\t where vigencia=\".$vigencia.\" and PlaneacionProyectos.unidad=\".$unid.\" and id_proyecto=\".$datos_uu[\"id_proyecto\"].\" and mes in(\";\n\t\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t$sql_pro=$sql_pro.\" \".$m.\",\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$sql_pro=$sql_pro.\" 0) and esInterno= '\".$tipo_usuario[$cur_tipo_usu].\"' group by PlaneacionProyectos.id_proyecto ,PlaneacionProyectos.unidad ,mes order by (mes) \";\n// HAVING (SUM (hombresMes))>1\n\t\t\t\t\t\t\t$cur_proy_planea=mssql_query($sql_pro);\n//\t\t\t\techo $sql_pro.\" --22222222222-- <br>\".mssql_get_last_message().\"<br><br>\";\n\t\t\t\t\t\t\t$m=$minimoMes;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile($datos_proy_planea=mssql_fetch_array($cur_proy_planea))\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\tfor ($m;$m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($datos_proy_planea[\"mes\"]==$m)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$total_planeado[$m]+=( (float) $datos_proy_planea[\"total_hombre_mes\"]);\n\n\t\t\t\t\t\t\t\t\t\t$pTema = $pTema.'<td class=\"Estilo2\" align=\"right\" >'.((float) $datos_proy_planea[\"total_hombre_mes\"] ).'</td>';\n\n\t\t\t\t\t\t\t\t\t\t$m=$datos_proy_planea[\"mes\"];\n\t\t\t\t\t\t\t\t\t\t$m++;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\t$pTema = $pTema.'<td>&nbsp; </td>';\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$m--;\n\t\t\t\t\t\t\tfor ($m++;$m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t\t\t\t $pTema = $pTema.'<td>&nbsp;</td>';\n\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t$cont++;\n\t\t\t\t\t\t\tunset($datos_proy_planea);\n\n\t\t\t\t\t\t\t $pTema = $pTema.' </tr>';\n\n\t\t\t\t//\t\t\techo $datos_proy_planea[\"total_hombre_mes\"].\"<br>\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t $pTema = $pTema.' <tr class=\"Estilo2\">\n\t\t\t\t\t\t<td colspan=\"4\" >&nbsp;</td>\n\n\t\t\t\t\t\t<td>Total planeaci&oacute;n</td>';\n\n\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($total_planeado[$m]==0)\n\t\t\t\t\t\t\t\t$pTema = $pTema.'<td>&nbsp;</td>';\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$pTema = $pTema.'<td>'.$total_planeado[$m].'</td>';\n\t\t\t\t\t\t}\n \n\t\t\t\t\t $pTema = $pTema.' </tr>\n\t\t\t\t\t <tr >\n\t\t\t\t\t\t<td colspan=\"17\">&nbsp;</td>\n\t\t\t\t\t </tr>\t';\n\n\t\t\t\t\t}\n\t\t\t\t\t$cur_tipo_usu++;\n\t\t\t\t}\n\t\t\t\t$pTema = $pTema.'\n\n\t\t\t\t</table>\n\t\t\t</td>\n\t\t </tr>\n\t\t<tr class=\"Estilo2\"><td colspan=\"2\" >Para consultar en detalle la planeaci&oacute;n de un participante, en un proyecto especifico, utilice el reporte Usuarios por proyecto, accediendo a el, atravez del boton Consolidados por divisi&oacute;n, ubicado en la parte superior de la pagina principal de la planeaci&oacute;n por proyectos. </td></tr>\n\t\t</table>';\n\n\t\t/*\n\t\t\t\t//consulta la unidad del director y el coordinador de proyecto\n\t\t\t\t$sql=\"SELECT id_director,id_coordinador FROM HojaDeTiempo.dbo.proyectos where id_proyecto = \" . $cualProyecto.\" \" ;\n\t\t\t\t$eCursorMsql=mssql_query($sql);\n\t\t\t\t$usu_correo= array(); //almacena la unidad de los usuarios a los que se le enviara el correo\n\t\t\t\t$i=1;\n\t\t\t\twhile($datos_dir_cor=mssql_fetch_array($eCursorMsql))\n\t\t\t\t{\n\t\t\t\t\t$usu_correo[$i]=$datos_dir_cor[\"id_coordinador\"];\n\t\t\t\t\t$i++;\n\t\t\t\t\t$usu_correo[$i]=$datos_dir_cor[\"id_director\"];\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\n\t\t\t\t//consulta la unidad porgramadores y ordenadores de gasto\t\t\t\n\t\t//select unidad from HojaDeTiempo.dbo.Programadores where id_proyecto=\".$cualProyecto.\" union\n\t\t\t\t$sql_pro_orde=\" select unidadOrdenador from GestiondeInformacionDigital.dbo.OrdenadorGasto where id_proyecto=\".$cualProyecto;\n\t\t\t\t$cur_pro_orde=mssql_query($sql_pro_orde);\n\t\t\t\twhile($datos_pro_orde=mssql_fetch_array($cur_pro_orde))\n\t\t\t\t{\n\t\t\t\t\t$usu_correo[$i]=$datos_pro_orde[\"unidad\"];\n\t\t\t\t\t$i++;\n\t\t\t\t}\t\t\t\n\t\t\n\t\t\t\t$i=0;\n\t\t\t\t//consulta el correo de los usuarios(director,cordinador,ordenadroes de G, y programadores) asociados al proyecto\n\t\t\t\t$sql_usu=\" select email from HojaDeTiempo.dbo.Usuarios where unidad in(\";\n\t\t\t\tforeach($usu_correo as $unid)\n\t\t\t\t{\n\t\t\t\t\tif($i==0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql_usu=$sql_usu.\" \".$unid;\t\t\n\t\t\t\t\t\t$i=1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$sql_usu=$sql_usu.\" ,\".$unid;\n\t\t\t\t}\n\t\t\t\t$sql_usu=$sql_usu.\") and retirado is null\";\n\t\t\t\t$cur_usu=mssql_query($sql_usu);\t\t\t\t\n\t\t\n\t\t\t\t//se envia el correo a el director, cordinador, orenadores de gasto, y programadores del proyecto\t\n\t\t\t\twhile($eRegMsql = mssql_fetch_array($cur_usu))\n\t\t\t\t{\t\t\n\t\t\t\t $miMailUsuarioEM = $eRegMsql[email] ;\n\t\t\t\n\t\t\t\t //***EnviarMailPEAR\t\n\t\t\t\t $pPara= trim($miMailUsuarioEM) . \"@ingetec.com.co\";\n\t\t\t\n\t\t\t\t enviarCorreo($pPara, $pAsunto, $pTema, $pFirma);\n\t\t\t\n\t\t\t\t //***FIN EnviarMailPEAR\n\t\t\t\t $miMailUsuarioEM = \"\";\n\t\t\t\n\t\t\t\t}\n\t\t*/\n\t\t\tif($ban_reg==1) //SEW ENVIA EL CORREO SI EXISTE ALMENOS UN USUARIO SOBREPLANEADO\n\t\t\t{\n\t\t///////////////////////////**********************************************************PARA QUITAR\n\t\t\t $miMailUsuarioEM = 'carlosmaguirre'; //$eRegMsql[email] ;\t\n\t\t\t\t$pAsunto='Sobre planeaci&oacute;n de proyectos';\n\t\t\t //***EnviarMailPEAR\t\n\t\t\t $pPara= trim($miMailUsuarioEM) . \"@ingetec.com.co\";\t\n\t\t\t enviarCorreo($pPara, $pAsunto, $pTema, $pFirma);\t\n\t\t\t //***FIN EnviarMailPEAR\n\t\t\t $miMailUsuarioEM = \"\";\n\t\t\t}\n\t\t\n\t\t?>\n\n<?\n}", "function hitungDenda(){\n\n return 0;\n }", "function seguranca_arq(){\n #echo 'Segurança ativa!';\n $array_url = explode(\"/\", $_SERVER[\"REQUEST_URI\"]);\n //Garante que não existam controles nem ações repetidas\n $array_url = array_unique($array_url);\n #var_dump($array_url);\n \n if(isset($_SESSION['session']['logado'])){//verifica se usuario está logado e para verificar se ele tem acesso a página\n $perm_usu = $_SESSION['session']['logado']['permissao']['action'];\n #var_dump($perm_usu);\n\n $acesso = FALSE;\n foreach ($perm_usu as $perm){\n #echo 'link_verify: '.$perm['link'].' - '.$array_url[3].'<br>';\n\n if($perm['link']== $array_url[3]){\n $acesso = TRUE;\n #echo 'link_verify:'.$perm['link'].'-'.$array_url[3];\n break;\n }\n }\n if(!$acesso){\n #echo ' Acao nao permitida!';\n $_SESSION['msg'] =' Ação não permitida!';\n redirecionar('menu/minhaarea');\n exit();\n }\n \n }\n else{\n #echo 'nao logado';\n \n if($array_url[3]== 'quemsomos' || $array_url[3]== 'faleconosco');\n else redirecionar('menu/index');\n }\n \n \n }", "public function pasaje_abonado();", "public function obtenerViajesplusAbonados();", "function rp($nominal) {\n //mengupdate nominal menjadi string, takutnya yang dimasukkan bertipe data int (angka)\n //mengeset string kosong buat penampung nanti, dan counter $c = 0\n $nominal = strval($nominal); $r = ''; $c = 0;\n $nominal = explode('.', $nominal); //memisah jika terdapat titik, takutnya ada titik seperti 4000.00\n $nominal = $nominal[0]; //mengambil data index pertama sebelum titik, berarti mengambil 4000-nya\n $nominal = explode('-', $nominal); //jika ada tanda minus di depan, maka akan dipecah lagi berdasarkan tanda minus tsb\n if (sizeof($nominal)>1) { //jika ternyata array yang dihasilkan oleh pemecahan tanda minus berjumlah lebih dari 1, berarti angka tersebut memang minus\n $min = '-'; $nominal = $nominal[1]; //dilakukan pemisahan dengan index 0 nin dan nominalnya di array index 1\n } else {\n $min = ''; $nominal = $nominal[0]; //jika tidak, maka memang bukan angka minus dan $min diset string kosong agar tidak berpengaruh saat direturn\n }\n for ($x=strlen($nominal)-1; $x>=0; $x--) { //diulang sebanyak string tapi dari belakang\n $r = $nominal[$x].$r; $c++; //menambah string kosong $r dengan index nominal dari belakang sambil menambah counter ($c)\n //jika counter kelipatan 3, maka saatnya ditambahkan dengan titik\n //misalnya 10000000, maka tiap perulangan 3x dari belakang akan ditambah titik, sehingga menjadi 10.000.000\n if ($c%3==0 & $x>0) $r = \".\".$r;\n }\n //mereturn hasil tadi, dengan tanda minusnya, tetapi jika tidak minus makan tidak akan mengganggu, karena variabel $min diisi string kosong di atas\n //return ditambahkan dengan ,00 dibelakang dan tanda Rp di depan sehingga berformat Rp ##.###,00\n return 'Rp '.$min.$r.',00';\n}", "function konjugacija($ige) {\r\n $sug = ('(b|c|d|f|g|h|k|m|p|t|v)');\r\n $sugl = ('(b|c|d|f|g|h|j|k|l|m|n|p|r|t|v)'); \r\n $av1 = '';\r\n $av2 = '';\r\n $h1 = harmony1($ige);\r\n $h2 = ($h1 === 'o') ? 'u' : 'ü';\r\n $h3 = ($h1 === 'o') ? 'o' : 'e';\r\n $ai = ($h1 === 'o') ? 'a' : 'i';\r\n $aai = ($h1 === 'o') ? 'á' : 'i';\r\n $ae = a_e($h1);\r\n $aaee = aa_ee($h1);\r\n $ik = check_ik($ige);\r\n $it = check_it($ige);\r\n $ige1 = filter_ige_past1($ige,$h1);\r\n $ige2 = filter_ige_past2($ige, $h1); \r\n $ige3 = filter_ige($ige);\r\n $te = te($ige3,$h1);\r\n $duplo1 = check_duplo1($ige, $h1);\r\n $duplo2 = check_duplo2($ige);\r\n $z = check_z($ige);\r\n $z2 = check_z2($ige, $h1);\r\n $inf = inf($ige, $ae);\r\n $cond = str_replace(substr($inf,-1),'',$inf);\r\n $imp = imperativ($ige);\r\n $imp2 = imperativ2($imp);\r\n \r\n if ($it === 1) {\r\n $av1 = $h1;\r\n $av2 = $ae;\r\n }\r\n if ((preg_match($sugl, substr($ige,-2,1))) && (preg_match($sug, substr($ige,-2,2)))) {\r\n $av1 = $h1;\r\n $av2 = $ae;\r\n }\r\n echo \"<h2>Osnovni oblik: \" . \"<strong>\" . $ige . \r\n \"</strong></h2>\" . \"<br>\" . \"<h3>Infinitiv: $inf</h3><br>\";\r\n \r\n echo \"<table id=\\\"sad\\\">\" .\r\n \"<tr><td>én</td><td>\" . $ige3 . $z . $h1 . \"k\" . \"</td>\" .\r\n \"<td>\" . $ige3 . $z . $h1 . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $ige3 . $z . $av2 . $te . \"</td>\"\r\n . \"<td>\" . $ige3 . $z . $h1 . \"d</td></tr>\" .\r\n \"<tr><td>Ön,ő</td><td>\" . $ige3 . $z . $ik . \"</td>\" .\r\n \"<td>\" . $ige3 . $duplo1 . $z2 . $ai . \"</td></tr>\" .\r\n \"<tr><td>mi</td><td>\" . $ige3 . $z . $h2 . \"nk</td>\" .\r\n \"<td>\" . $ige3 . $duplo2 . $h2 . \"k</td></tr>\"\r\n . \"<tr><td>ti</td><td>\" . $ige3 . $z . $av1 . \"t\" . $h1 . \"k</td>\" .\r\n \"<td>\" . $ige3 . $duplo1 . $z2 . $aai . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td>\" . \"<td>\" . $ige3 . $z . $av2 . \"n\" . $ae . \"k</td>\" .\r\n \"<td>\" . $ige3 . $duplo1 . $z2 . $aai . \"k</td></tr>\" .\r\n \"</table>\";\r\n \r\n echo \"<table id=\\\"pro\\\">\" . \r\n \"<tr><td>én</td><td>\" . $ige1 . $ae . \"m\" . \"</td>\" . \r\n \"<td>\" . $ige1 . $ae . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $ige1. $aaee . \"l</td>\" .\r\n \"<td>\" .$ige1 . $ae . \"d</td></tr>\" . \r\n \"<tr><td>Ön,ő</td><td>\" . $ige2 . \"</td>\" . \r\n \"<td>\" . $ige1 . $ae . \"</td></tr>\" .\r\n \"<tr><td>mi</td><td>\" . $ige1 . $h2 . \"nk</td>\" .\r\n \"<td>\" . $ige1 . $h2 . \"k</td></tr>\" . \r\n \"<tr><td>ti</td><td>\" . $ige1 . $ae . \"t\" . $h3 . \"k</td><td>\"\r\n . $ige1 . $aaee . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td><td>\" . $ige1 . $ae . \"k</td><td>\" \r\n . $ige1 . $aaee . \"k</td></tr></table>\";\r\n \r\n echo \"<table id=\\\"kond\\\"><tr><td>én</td><td>\" . $cond . \"ék\" . \r\n \"</td><td>\" . $cond . $aaee . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $cond . $aaee . \"l</td><td>\" .\r\n $cond . $aaee . \"d</td></tr><tr><td>Ön,ő</td><td>\" .\r\n $cond . $ae . \"</td><td>\" . $cond . $aaee . \r\n \"</td></tr><tr><td>mi</td><td>\" . $cond . $aaee . \r\n \"nk</td><td>\" . $cond . $aaee . \"nk</td></tr><tr><td>\"\r\n . \"ti</td><td>\" . $cond . $aaee . \"t\" . $h3 . \"k</td><td>\"\r\n . $cond . $aaee . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td><td>\" . $cond . $aaee . \"n\" . $ae . \r\n \"k</td><td>\" . $cond . $aaee . \"k</td></tr></table>\";\r\n \r\n echo \"<table id=\\\"imp\\\"><tr><td>én</td><td>\" . $imp . $ae . \r\n \"k</td><td>\" . $imp . $ae . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $imp . \"(\" . $aaee . \"l)</td><td>\" .\r\n $imp2 . \"d</td></tr><tr><td>Ön,ő</td><td>\" .\r\n $imp . $h1 . \"n</td><td>\" . $imp . $ae . \r\n \"</td></tr><tr><td>mi</td><td>\" . $imp . $h2 . \r\n \"nk</td><td>\" . $imp . $h2 . \"k</td></tr><tr><td>\"\r\n . \"ti</td><td>\" . $imp . $ae . \"t\" . $h3 . \"k</td><td>\"\r\n . $imp . $aaee . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td><td>\" . $imp . $ae . \"n\" . $ae . \r\n \"k</td><td>\" . $imp . $aaee . \"k</td></tr></table>\";\r\n }", "private static function pre_cifrado_heredado($t){\n\t $t=preg_replace(\"/0/ms\",'s',$t);\n\t $t=preg_replace(\"/9/ms\",'e',$t);\n\t $t=preg_replace(\"/8/ms\",'R',$t);\n\t $t=preg_replace(\"/7/ms\",'a',$t);\n\t $t=preg_replace(\"/6/ms\",'y',$t);\n\t $t=preg_replace(\"/5/ms\",'k',$t);\n\t $t=preg_replace(\"/4/ms\",'l',$t);\n\t $t=preg_replace(\"/3/ms\",'L',$t);\n\t $t=preg_replace(\"/2/ms\",'A',$t);\n\t $t=preg_replace(\"/1/ms\",'u',$t);\n\t return self::genNRand(8).$t.self::genNRand(13);\n\t}", "function cariPosisi($batas){\nif(empty($_GET['halkategoriberita'])){\n\t$posisi=0;\n\t$_GET['halkategoriberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halkategoriberita']-1) * $batas;\n}\nreturn $posisi;\n}", "function mot($chaine){\r\n $retourFinal = \"faux\";\r\n for($i=0;$i<laTaille($chaine);$i++){\r\n if(testAlphabet($chaine[$i])==\"vrai\"){\r\n $retour[$i]=\"vrai\";\r\n }\r\n else{\r\n $retour[$i]=\"faux\";\r\n }\r\n }\r\n $j=0;\r\n while($j<laTaille($chaine) && $retour[$j]==\"vrai\"){\r\n $j++;\r\n }\r\n if($j==laTaille($chaine)){\r\n $retourFinal = \"vrai\";\r\n }\r\n return $retourFinal;\r\n }", "function DanhMuc_Them(&$loi){\t\n\t\n\t\t$thanhcong=true;\n\t\t\n\t\t$quocgia = $_POST[quocgia];settype($quocgia,\"int\");\n\t\t$idMien = $_POST[idMien];settype($idMien,\"int\");\n\t\t$TenDM_KS = $this->processData($_POST[TenDM_KS]);\n\t\t$TenDM_KS_KD = $this->processData($_POST[TenDM_KS_KD]);\n\t\t$Title = $this->processData($_POST[Title]);\n\t\t$MetaD = $this->processData($_POST[MetaD]);\n\t\t$MetaK = $this->processData($_POST[MetaK]);\n\t\t\n\t\t$ThuTu = $this->ThuTuMax('dvt_ks_danhmuc') + 1;\n\t\t\n\t\t$AnHien = $_POST[AnHien];settype($AnHien,\"int\");\n\t\t\n\t\tif($Title==\"\") $Title=$TenDM_KS;\n\t\tif($MetaD==\"\") $MetaD=$TenDM_KS;\n\t\tif($MetaK==\"\") $MetaK=$TenDM_KS;\n\t\tif($TenDM_KS_KD==\"\") $TenDM_KS_KD = $this->changeTitle($TenDM_KS);\n\t\t\n\t\tif($idMien==0 && $quocgia==0)\n\t\t{\n\t\t\t$thanhcong= false;\n\t\t\t$loi[idMien]= \"Chọn miền\";\n\t\t}\n\t\tif($TenDM_KS==\"\")\n\t\t{\n\t\t\t$thanhcong= false;\n\t\t\t$loi[TenDM_KS]= \"Chưa nhập tên danh mục\";\n\t\t}\n\t\n\t\tif($thanhcong==false){\n\t\t\treturn $thanhcong;\n\t\t}else{\n\t\t\t$sql = \"INSERT INTO dvt_ks_danhmuc \n\t\t\t\t\tVALUES(NULL,$quocgia,$idMien,'$TenDM_KS','$TenDM_KS_KD','$Title','$MetaD','$MetaK',$ThuTu,$AnHien)\";\n\t\t\tmysql_query($sql) or die(mysql_error().$sql);\t\t\n\t\t}\n\t\treturn $thanhcong;\n\t}", "public function manga(){\t\n\t\t\t$LimitRowPegination = 4;\n\t\t\t$API_LastUpdateManga = SiteMap::LastUpdateManga(18,0,$LimitRowPegination);\n\t\t\t$PTR_API['API_LastUpdateManga'] = $API_LastUpdateManga;\n\t\t\t$this->load->view('seo/sitemap_manga',$PTR_API);\n\t\t}", "function motivoDeAnulacionDesin(){\n\t\t$sql = \"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNDS' and status='1'\";\n\t\treturn $this->ejecuta($sql);\n\t}", "public function quienesSomos()\n {\n require_once \"_Vista/_Plantillas/head.php\";\n require_once \"_Vista/_Plantillas/navBar.php\";\n require_once \"_Vista/QuienesSomosVista.php\";\n }", "public function abono();", "function en_rojo($anio){\n $ar=array();\n $ar['anio']=$anio;\n $sql=\"select sigla,descripcion from unidad_acad \";\n $sql = toba::perfil_de_datos()->filtrar($sql);\n $resul=toba::db('designa')->consultar($sql);\n $ar['uni_acad']=$resul[0]['sigla'];\n $res=$this->get_totales($ar);//monto1+monto2=gastado\n $band=false;\n $i=0;\n $long=count($res);\n while(!$band && $i<$long){\n \n if(($res[$i]['credito']-($res[$i]['monto1']+$res[$i]['monto2']))<-50){//if($gaste>$resul[$i]['cred']){\n $band=true;\n }\n \n $i++;\n }\n return $band;\n \n }", "function meditation() {\n$header = new header();\n$header->music(\"Nhạc thiền\");\n\nif(isset($_REQUEST['id'])){\n\tif($_REQUEST['id']=='nhacphat')\n\t{\n\t\t$url='http://nhacthien.net/nhacphat.htm';\n\t}\n}\n\nelse {\n$path = \"/\";\n$url=\"http://www.nhacthien.net/\";\n}\n$indexpage = \"?nhacthien\"; \n\n$trans= new web_transfer();\n$indexpage='/';\n$base='/';\n$trans->initiate_news ($url,$indexpage); \n$trans->converturl($url,$base);\n$content ='';\n$trans->start_transfer(\"www.nhacthien.net\");\n$trans->getcontent($content);\n\n//start social plugin\n$content=str_replace('<div id=\"controls\">','<div class=\"social\"><a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-lang=\"en\">Tweet</a><div data-size=\"medium\" class=\"g-plusone\"></div><div class=\"fb-like\" data-href=\"http://myweb.pro.vn/music/meditation/\" data-layout=\"button_count\" data-action=\"recommend\" data-show-faces=\"true\" data-share=\"true\"></div></div>',$content);\n//end social plugin\n\n//hide right element\n$content=str_replace('<a href=\"\" class=\"music-button\">','<a href=\"http://myweb.pro.vn/music/meditation/\" class=\"music-button\">',$content);\n$content=str_replace('<a href=\"xem-video.html\" class=\"video-button\">','<a href=\"xem-video.html\" style=\"display:none\" class=\"video-button\">',$content);\n//end\n\n$content=str_replace('<li><a href=\"http://www.cakhucbathu.com\">CA KHÚC BẤT HỦ</a></li>','<li style=\"dislay:none\" id=\"cakhucbathu\"><a href=\"http://www.cakhucbathu.com\">CA KHÚC BẤT HỦ</a></li><script>document.getElementById(\"cakhucbathu\").remove();</script>',$content);\n$content=str_replace('<li><a href=\"http://www.petalia.org\">PETALIA NETWORK</a>','<a style=\"display:none\" id=\"petalia_temp_remove\" href=\"http://www.petalia.org\">PETALIA NETWORK</a></li><script>document.getElementById(\"petalia_temp_remove\").remove();</script>',$content);\n$content=str_replace('<div id=\"social\">','<div id=\"social\" style=\"display:none\">',$content);\n$content=str_replace('style=\"width:100%;display:inline-block;\"','id=\"fb_album_remove\" style=\"display:none\"',$content);\n$content=str_replace('http://www.facebook.com/nhackhongloi','https://www.facebook.com/elearningsocialvn?ref=hl',$content);\n\n//start change the url\n$content=str_replace('<a href=\"http://www.nhacthien.net\">TRỞ LẠI NHẠC THIỀN</a>','<a href=\"http://myweb.pro.vn/music/meditation/\">TRỞ LẠI NHẠC THIỀN</a>',$content);\n$content=str_replace('<a href=\"http://www.mangamnhac.net\">MẠNG ÂM NHẠC</a>','<a href=\"http://myweb.pro.vn/music/general/\">TỔNG HỢP</a>',$content);\n$content=str_replace('Nhạc thiền trên Facebook','Học tập và giải trí',$content);\n$content=str_replace('data-href=\"http://nhacthien.net\"','data-href=\"http://myweb.pro.vn/music/meditation/\"',$content);\n$content=str_replace('www.facebook.com/nhacthien','www.facebook.com/elearningsocialvn?ref=hl',$content);\n$content=str_replace('nhackhongloi.org','myweb.pro.vn/music/nhackhongloi',$content);\n$content=str_replace('www.tinhkhucbathu.com','myweb.pro.vn/music/tinhkhucbathu',$content);\n$content=str_replace('www.nhacphap.com','myweb.pro.vn/music/nhacphap',$content);\n$content=str_replace('http://nhacthien.net/nhacphat.htm','http://myweb.pro.vn/music/meditation?id=nhacphat',$content);\n$content=str_replace('www.nhacdance.net','myweb.pro.vn/music/dance/',$content);\n//end change the url\n\n$content=str_replace('/skins','http://www.nhackhongloi.org/skins/',$content);\n$content=str_replace('</body>','<p class=\"append_footer_iframe\"><p/></body>',$content);\npreg_match_all('/<body>(.*?)<p class=\"append_footer_iframe\">/s',$content,$matches,PREG_SET_ORDER);\nforeach($matches as $key_music);\n$data['content']=$key_music[0];\n//start analytic\n$analytic = new analytic();\n$analytic->myweb('general');\n//end analytic\n$this->load->view('/music/nhacthien',$data);\n}", "function insertarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_ime';\n\t\t$this->transaccion='SNX_MAQ_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('potencia','potencia','numeric');\n\t\t$this->setParametro('peso','peso','numeric');\n\t\t$this->setParametro('maquinaria','maquinaria','varchar');\n\t\t$this->setParametro('id_factorindexacion','id_factorindexacion','int4');\t\t\n\t\t$this->setParametro('id_tipopreciomaquinaria','id_tipopreciomaquinaria','int4');\n\t\t$this->setParametro('id_ambitoprecio','id_ambitoprecio','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function calcula13o()\n {\n }", "public function calcula13o()\n {\n }", "function QuitarArticulos($palabra) \r\n {\r\n #$palabra = preg_replace('/\\bMC/', '', $palabra); \r\n $palabra = preg_replace('/\\b(DE(L)?|LA(S)?|LOS|Y|A|VON|VAN)\\s+/i', '', $palabra); \r\n return $palabra; \r\n }", "function cariPosisi($batas){\nif(empty($_GET['halvideo'])){\n\t$posisi=0;\n\t$_GET['halvideo']=1;\n}\nelse{\n\t$posisi = ($_GET['halvideo']-1) * $batas;\n}\nreturn $posisi;\n}", "function gaus_jordan_metoda_eliminacije_pokusaj_2($niz_cvorovi, $tacke_x) // $matrica, \n{\n\t// ------------------------------------- Priprema matrice -----------------------------------//\n\n\t// FORMIRANJE MATRICE NA OSNOVU CVOROVA\n\t// $niz_cvorovi = niz_cvorovi($cvorovi);\n // $niz_tacke = niz_tacke($tacke_x);\n $niz_tacke = $tacke_x;\n // sortirani cvorovi po x vrednosti u rastucem poretku radi formiranja intervala\n $niz_cvorovi = sortiranje_cvorova_po_intervalu($niz_cvorovi);\n\n $niz_intervali = niz_intervali($niz_cvorovi);\n // var_dump($niz_intervali);\n $matrica = formiranje_matrice($niz_cvorovi, $niz_intervali);\n\n // -----------------------------------------------------------------------------------------//\n\n\n\t//---------------------------------- RESAVANJE SISTEMA JEDNACINA(matrice) ------------------//\n\n\t$matrica = sort_gl_dijagonala($matrica);\n\t// echo ( napravi_tabelu( $matrica ) );\n\t// exit();\n\n\t// echo ( napravi_tabelu( zaokruzi_koeficijente_za_prikaz ($matrica) ) );\n\t// exit();\n\n\t$matrica = gauss_nuliranje_matrice($matrica);\n\n\t$matrica = jordan_nuliranje_matrice($matrica);\n\n\n\t// -----------------------------------------------------------------------------------------//\n\n\n\t//------------------------ Formiranje konacnih formula za odgovarajuce intervale -----------//\n\n\t$niz_koeficijenata_sa_vrednostima = niz_koeficijenata_sa_vrednostima($matrica);\n\t$abc_grupe = abc_grupe($niz_koeficijenata_sa_vrednostima);\n\t// var_dump($abc_grupe);\n\t// var_dump($niz_koeficijenata_sa_vrednostima);\n\t$formule = formiraj_string_formula_sa_intervalima($niz_koeficijenata_sa_vrednostima);\n\n\t// ispisi formule\n\tfor($form = 1; $form <= count($formule); $form++)\n\t{\n\t\t$formula_str = $formule[$form];\n\t\t$interval_levi = $niz_intervali[$form - 1][0];\n\t\t$interval_desni = $niz_intervali[$form - 1][1];\n\t\techo \"Interval {$form}. je [{$interval_levi}, {$interval_desni}], a formula: {$formula_str} \" . \"<br>\";\n\t}\n\techo \"<br>\";\n\t// -----------------------------------------------------------------------------------------//\n\n\n\t// ------------------------------------Interpolacija----------------------------------------//\n\t$niz_interpoliranih_tacaka = array();\n\tif(!empty($niz_tacke))\n\t{\n\t\tfor($x = 0; $x < count($niz_tacke); $x++)\n\t\t{\n\t\t\t// kriva\n\t\t\t$kr = u_kom_intervalu_je_input($niz_intervali, $niz_tacke[$x]) + 1; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n\t\t\t// Pn(x)\t=\t\t\t x * x * An + x * Bn + Cn \n\t\t\t$vrednost_y = ( $niz_tacke[$x] * $niz_tacke[$x] * $abc_grupe[$kr][0] ) + ( $niz_tacke[$x] * $abc_grupe[$kr][1] ) + $abc_grupe[$kr][2];\n\t\t\t$niz_interpoliranih_tacaka[] = array($niz_tacke[$x], $vrednost_y);\n\n\t\t\t// $prvi = $niz_intervali[$u_kom_intervalu_je_input][0];\n\t\t\t// $drugi = $niz_intervali[$u_kom_intervalu_je_input][1];\n\t\t\t// $t = $niz_tacke[$x];\n\t\t\t// echo \"{$x}. tacka - {$t} - je u intervalu: {$prvi}, {$drugi}\" . \"<br>\";\n\t\t}\n\t}\n\n\t// -----------------------------------------------------------------------------------------//\n\n\treturn array($matrica, $niz_interpoliranih_tacaka);\n\t\n}", "function rekamMedis($nomor_pasien)\n\t{\n\n\t}", "function _ConsultarResultadosPruebasIMM1($tipo_prueba, $id_cliente) //consulta el último biotest para imm se necesitan 16 campos.\n\t{\n\t\t$query='\n\t\t\tselect * from sg_pruebas \n\t\t\twhere Tipo_Prueba=\"'.$tipo_prueba.'\" \n\t\t\tand id_cliente=\"'.$id_cliente.'\" order by fecha and id asc limit 16\n\n\t\t';\n\t\t$con=Conectar::_con();\n\t\t$result=$con->query($query) or die(\"Error en: $query \".mysqli_error($query));\n\t\treturn $result;\n\t}", "function cariPosisi($batas){\nif(empty($_GET['halagenda'])){\n\t$posisi=0;\n\t$_GET['halagenda']=1;\n}\nelse{\n\t$posisi = ($_GET['halagenda']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halagenda'])){\n\t$posisi=0;\n\t$_GET['halagenda']=1;\n}\nelse{\n\t$posisi = ($_GET['halagenda']-1) * $batas;\n}\nreturn $posisi;\n}", "function urls_pages_affiche_milieu($flux){\n\t$texte = \"\";\n\t$exec = $flux['args']['exec'];\n\n\tif ( $exec == 'configurer_urls' )\n\t\t$texte = recuperer_fond('prive/squelettes/contenu/configurer_urls_pages');\n\n\tif ($texte)\n\t\tif ($p=strpos($flux['data'],\"<!--affiche_milieu-->\"))\n\t\t\t$flux['data'] = substr_replace($flux['data'],$texte,$p,0);\n\t\telse\n\t\t\t$flux['data'] .= $texte;\n\n\treturn $flux;\n}", "function getMetar($icao){\n\ttry{\n\t\t$resultado = '';\n\t\t\n\t\tif($icao === false)\n\t\t{\n\t\t\t$resultado = \"🚨 Olá, informe um ICAO válido para que eu consiga te mostrar o METAR e o TAF \\n (Ex.: /metar SBRF) \\n\";\n\t\t\t$resultado .= DEFAULT_FOOTER;\n\t\t\treturn $resultado;\n\t\t}\n\t\telse{\t\t\n\t\t\t$metar = file_get_contents('http://www.redemet.aer.mil.br/api/consulta_automatica/index.php?local='. $icao .'&msg=metar');\n\n\t\t\tif (strpos($metar, 'localizada') == 0){\n\t\t\t\t$resultado = '<b>🌤 A Gold Virtual informa como está o METAR de '. strtoupper($icao) .' neste momento:</b> ';\n\t\t\t\t$resultado .= \"\\n\\n➡️\" . substr($metar, 14) . \"\\n\";\n\t\t\t\t$resultado .= 'Trouxe também o TAF com as previsões das próximas horas, fique ligado!';\n\t\t\t\t$taf = file_get_contents('http://www.redemet.aer.mil.br/api/consulta_automatica/index.php?local='. $icao .'&msg=taf');\n\t\t\t\t$resultado .= \"\\n\\n➡️\" . substr($taf, 14);\t\t\t\t\n\t\t\t\t\n\t\t\t\t$resultado .= DEFAULT_FOOTER;\n\t\t\t}else{\n\t\t\t\t$resultado = \"🚨 Olá, informe um ICAO válido para que eu consiga te mostrar o METAR e o TAF \\n (Ex.: /metar SBRF) \\n\";\n\t\t\t\t$resultado .= \" \\n\" .DEFAULT_FOOTER;\n\t\t\t}\n\t\t}\n\t\treturn $resultado;\n\n\t}catch (Exception $e){\n\t\treturn 'Erro consultando Metar, favor consultar a staff de TI da Gold' . $e->getMessage();\n\t}\n}", "function interdit($message) {//=NULL) {\n\t// Liste des 899 mots interdits dans l'espace membre\n\t// \t\t-> insultes\n\t// \t\t-> language SMS\n\t// Vous pouvez allonger cette liste en mettant ( | ) sans espace entre chaque mot interdit\n\t\t$motInterdit = \"/\\b(anus|baise|baisee|baisent|baiser|baises|baisé|baisée|baisées|baisés|baiz|bande de tâches|bander|barez-vous|barrez-vous-batard|batarde|batardes|batards|bite|bites|bitte|bittes|bondage|bondages|bonnasse|bonnasses|bordel|bordels|branle|branler|branles|branlette|branlettes|branlé|branlés|bâtard|bâtarde|bâtardes|bâtards|bèz|c o n|c o*n|c o^n|c*o n|c*o*n|c*on|c^o n|c^o^n|caca|cacas|casse-toi|cassez-vous|chatte|chiasse|chie|chient|chier|chié|chiées|chiés|clitau|clito|co n|co*n|cocu|cocus|con|con nard|con nards|conar|conard|conarde|conardes|conards|conasse|conasses|connar|connard|connarde|connardes|connards|connasse|connasses|conne|Connerie|Conneries|connes|cons|couille|couilles|couye|couyes|creve|crève|cul|culs|cuni|cunilingus|de ta mer|de ta mere|de ta mèr|de ta mère|debil|debile|debiles|débil|débile|débiles|echangisme|emerde|emerdent|emerder|emerdeur|emerdeurs|emerdeuse|emerdeuses|emerdé|emerdée|emerdés|emmerde|emmerdent|emmerder|emmerdeur|emmerdeurs|emmerdeuse|emmerdeuses|emmerdé|emmerdée|emmerdés|en cul|en cule|en culer|en cules|encule|enculer|encules|enculé|enculés|enfoiré|enfoirée|enfoirées|enfoirés|et ta mere|et ta mère|exta|f o ck|f o k|F U C K|f u ck|f.uck|f_u_c_k|faire mettre|fcuk|fcvk|fela tion|felation|fella tion|fellation|fI_Ick|fl_lck|fo ck|foc k|fock|foutoir|foutoire|foutre|foutrement|fu c k|fu ck|fu.ck|fuc|fuc.k|FUCK|fuk|fuque|fuuck|fuuuck|fuuuuck|fuuuuuck|fvck|féla tion|féla tions|félation|félations|gouine|gouines|gouinne|gouinnes|groniasse|groniasses|k o n|k o*n|k o^n|k o_n|k*o n|k*o*n|k*on|k^o n|k^o^n|k_o n|k_o_n|ko n|ko*n|kon|konasse|konasses|konnasse|konnasses|kons|Lesbien|Lesbiene|Lesbienes|lesbienne|Lesbiens|Lesbo|Lesbos|maso|masturbator|masturbe|masturber|masturbé|masturbée|masturbées|masturbés|meeerdes|meeerdeux|meerdes|meerdeux|merdes|merdeux|morveuse|morveuses|morveux|nasi|nasis|nazi|nazis|negre|negres|negrillon|negrillons|negro|negros|nibard|nibards|nichon|nichons|nik|nike|nique|niquer|niqué|niquée|niquées|niqués|negre|negres|negro|negros|negresse|négresse|nègre|nègres|négrillon|négrillons|négro|négros|ordure|ordures|p u t a i n|p u t a i n s|partouse|partouses|partouze|partouzes|pd|pdd|pddd|pdddd|pddddd|pdddddd|pddddddd|pds|pedale|pedales|pede|pederaste|pederastes|pedes|penis|pennis|petasse|petasses|phuck|pignouf|pignoufette|pi|noufettes|pignoufs|pisse|pissee|pissees|pisser|pisses|pissé|pissée|pissées|pissés|plouc|ploucs|plouk|plouks|porno|pornos|pouffiass|pouffiasse|pouffiasses|poufiasse|pouf­fiass|pouf­fiasse|pouf­fiasses|Prostitue|Prostituee|Prostituees|Prostitues|Prostitué|Prostituée|Prostituées|Prostitués|prout|put|put ain|put ains|put in|put ins|put1|putain|putains|pute|putes|putin|putins|putte|puttes|puttin|puttins|pédale|pédales|pédé|pédéraste|pédérastes|pédés|pénétration|pétasse|pétasses|s e x|s e x e|s e x*e|s e xe|s e*x|s ex|s ex e|s ex*e|s exe|sado|salau|salaud|salauds|salaus|salaut|salauts|sale arabe|sallo|sallop|sallopard|sallopards|sallope|sallopes|salloppard|salloppards|salloppe|salloppes|sallos|sallot|sallots|salo|salop|salopard|salopards|salope|salopes|saloppard|saloppards|saloppe|saloppes|salos|salot|salots|se x|se*x|sex|sex e|sex*e|sexe|shit|skinhead|sodomie|sodomise|sodomisee|sodomisees|sodomisent|sodomiser|sodomises|sodomisé|sodomisée|sodomisées|sodomisés|sperm|sperme|spermes|suce|suck|tete de noeud|tetes de noeud|tête de noeud|têtes de noeud|va te faire|va te fer|va te fere|va te fèr|va te fère|vagin|vagins|zizi|zizis|1e|1st|1dispo|1posibl|1diféren|1trec|1ternet|1vit|1mn|2min|2ri1|2l8|2labal|2m1|2mand|2van|2vanc|4me|5pa|6gar|6garet|6né|6nema|6T|7adir|7ad|10ko|ab1to|akro|a2m1|af'r|afr|aJ|aG|éD|alé|AR|aPero|a+|apré|aprè|aprem|aprè-mi10|apré-mi10|areT|ariv|a12c4|asap|avan|avanC|ayé|abiT|azar|aniv|aK|aps|avc|avk|azar|AL1DI|ard|admin|ADMIN|ATK|arf|balaD|bavar|bavarD|bi1|bi1sur|bi1to|bizz|bap|bsr|boC|blèm|B|b1|bc|Bdo|BG|bj|bocou|bogos|bye|cé|cad|c b1|c sa|c cho|c 2 labal|c mal1|CT|chanG|capou|chuis|chanmé|CriE|C|camé|cam|came|Cdla|celib|celibatR|chi1|Clib|cok1|cokin|cokine|cok1e|colR|comen|dico|cc|colok|condé|dak|danC|ds|D6D|DpenC|dê|dS100|DzSPré|Dzolé|dsl|DtST|diskuT|douT|d1gue|daron|D|daronne|darone|deuspi|dico|die|DEF|écouT|empr1T|enfR|en+|épaT|éxagR|exClen|exQzé|exiG|éziT|Er|E|enkor|entouK|entouka|epaT|ErE|ErEze|fRfet|fiR|meuf|fliP|francè|FR|frR|fr8|foto|FM|FMloJ|F|fb|frero|foo|fliKé|flik|fone|fonetel|gan|Gen|Gnial|gré|glnD|GraV|G la N|GPTléplon|G|gova|gater6|gd|gde|Gnial|grav|gro|Gséré|GG|HT|H|hard|hl|IR|isTrik|ID|ImaJn|I|ie|irl|jalou|jamé|j'le sav|jenémar|jSpR ktu va bi1|jtm|je t'M|j'tapLdkej'pe|jeteléDjadi|jT|jr|JuG|J|jaten|jme|jsai|jsui|jtem|jtaim|Kdo|keum|Kfar|Kfé|Kl1|Knon|Kc|klR|koQ|kEr|komanD|Kom|komencava|koncR|kontST|kruL|karaT|ke|kL|kLq1|kelkun|keske|keske C|kekina|kestion|ki|kil|koi|koa|kwa|koi29|K|KS|kisdé|kif|jtkif|k7|kan|Ksos|LcKc|lol|l1di|lakL|lekL|l8|lH|l'S tomB|LC|L|LVL|ll|mek|magaz1|m1tNan|mnt|mè|kaze|malad|mal1|manG|mat1|max|mm|ménaG|mR|mê|msg|mne|m jvb|MDR|moy1|muscQ|muscu|muzik|muzic|M|m'man|MP|msg|ml|NRV|néCsR|nRvE|nc|no|nb|nombrE|nouvL|nouvo|NRJ|N|news|ns|ok1|oQne|Ojourd8|ojourd'8|ouf|orEr|otL|OQP|Ô|oZ|ouvR|O|oci|oreur|ou1j|ouinj|OMG|partut|partt|paC|péyé|pRturB|pE|piG|poa|po1|poz|pr|pk|prtan|prtant|preC|pb|P|p'pa|ptdr|POULAGA|PANAM|PANAME|poto|pr|ppr|pti|ptite|plon|qoa|qd|quiT|Q|QG|reuch|remps|rapl|ra|rejo1|rdv|répt|rstp|rep|resto|retard|réu|réucir|ri1|rafr|ras|ru|r|reuf|savapa|sniiif|snif|slt|slt cav ?|savoar|semN|stp|sk8|seur|spor|strC|S|sked|SKEUD|tR|tarD|tps|Tê|ti2|tle +bo|tpa fâché|TT|tabitou|2day|tjr|tt|tr1|trankil|taf|tafer|tu vi1 2m1 ?|T|Tci|tsss|ts|utilizé|U|vazi|Vlo|vR|vi1|vs|VoyaG|vrMen|V|VIP|W|WE|W.E|wesh|WTF|wé|wi|wy|X|X-trem|Xtrem|xpldr|Xcité|Xcit|xd|xplorer|xplozé|xploz|xplor|yo|y|é|ye|yè|ya|yâ|Z|zN|ziva|zonmé)\\b/ui\";\n\t\t$message = str_replace(\"'\", \"\", $message);\n\t\tif(!empty($message)) {\n\t\t\tif(preg_match($motInterdit, $message)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "function modificarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_ime';\n\t\t$this->transaccion='SNX_MAQ_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_maquinaria','id_maquinaria','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('potencia','potencia','numeric');\n\t\t$this->setParametro('peso','peso','numeric');\n\t\t$this->setParametro('maquinaria','maquinaria','varchar');\n\t\t$this->setParametro('id_factorindexacion','id_factorindexacion','int4');\n\t\t$this->setParametro('id_tipopreciomaquinaria','id_tipopreciomaquinaria','int4');\n\t\t$this->setParametro('id_ambitoprecio','id_ambitoprecio','int4');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function barbarella()\n\t{\n\t\tif (preg_match('/^([a-zA-Z0-9].+?) - \\[\\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//Die.Nacht.Der.Creeps.THEATRICAL.GERMAN.1986.720p.BluRay.x264-GH - \"gh-notcreepskf720.nfo\" yEnc\n\t\t//The.Fast.and.the.Furious.Tokyo.Drift.2006.German.1080p.BluRay.x264.iNTERNAL-MWS - \"mws-tfatftd-1080p.nfo\" yEnc\n\t\tif (preg_match('/^([\\w.-]+)\\s+-\\s+\".+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//CorelDRAW Technical Suite X6-16.3.0.1114 x32-x64<><>DRM<><> - (10/48) \"CorelDRAW Technical Suite X6-16.3.0.1114 x32-x64.part09.rar\" - 2,01 GB - yEnc\n\t\t//AnyDVD_7.1.9.3_-_HD-BR - Beta<>give-me-all.org<>DRM<><> - (1/3) \"AnyDVD_7.1.9.3_-_HD-BR - Beta.par2\" - 14,53 MB - yEnc\n\t\t//Android Softarchive.net Collection Pack 27^^give-me-all.org^^^^DRM^^^^ - (01/26) \"Android Softarchive.net Collection Pack 27.par2\" - 1,01 GB - yEnc\n\t\t//WIN7_ULT_SP1_x86_x64_IE10_19_05_13_TRIBAL <> give-me-all.org <> DRM <> <> PW <> - (154/155) \"WIN7_ULT_SP1_x86_x64_IE10_19_05_13_TRIBAL.vol57+11.par2\" - 7,03 GB - yEnc\n\t\t//[Android].Ultimate.iOS7.Apex.Nova.Theme.v1.45 <> DRM <> - (1/3) \"[Android].Ultimate.iOS7.Apex.Nova.Theme.v1.45.par2\" - 21,14 MB - yEnc\n\t\tif (preg_match('/^(\\[[A-Za-z]+\\]\\.|reup\\.)?([a-zA-Z0-9].+?)([\\^<> ]+give-me-all\\.org[\\^<> ]+|[\\^<> ]+)DRM[\\^<> ]+.+? - \\(\\d+\\/\\d+\\) \".+?\" - .+? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //(004/114) - Description - \"Pluralsight.net XAML Patterns (10).rar\" - 532,92 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) - .+? - \"(.+?)( \\(\\d+\\))?' . $this->e0 .\n\t\t\t\t\t ' - \\d+[,.]\\d+ [mMkKgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//(01/12) - \"TransX - Living on a Video 1993.part01.rar\" - 561,55 MB - TransX - Living on a Video 1993.[Lossless] Highh Quality yEnc\n\t\t//(59/81) \"1973 .Lee.Jun.Fan.DVD9.untouched.z46\" - 7,29 GB - Lee.Jun.Fan.sein.Film.DVD9.untouched yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\)( -)? \".+?\" - \\d+[,.]\\d+ [mMkKgG][bB] - (.+?) yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //>>> www.lords-of-usenet.org <<< \"Der Schuh Des Manitu.par2\" DVD5 [001/158] - 4,29 GB yEnc\n\t\tif (preg_match('/^>>> www\\.lords-of-usenet\\.org <<<.+? \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . ' .+? \\[\\d+\\/\\d+\\] - .+? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//NEUES 4y - [@ usenet-4all.info - powered by ssl.news -] [5,58 GB] [002/120] \"DovakinPack.part002.rar\" yEnc\n\t\t//NEUES 4y (PW) [@ usenet-4all.info - powered by ssl.news -] [7,05 GB] [014/152] \"EngelsGleich.part014.rar\" yEnc\n\t\tif (preg_match('/^.+? (-|\\(PW\\))\\s+\\[.+? -\\] \\[\\d+[,.]\\d+ [mMkKgG][bB]\\] \\[\\d+\\/\\d+\\] \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//Old Dad uppt Die Schatzinsel Teil 1+Teil2 AC3 DVD Rip German XviD Wp 01/33] - \"upp11.par2\" yEnc\n\t\t//Old Dad uppt Scary Movie5 WEB RiP Line XviD German 01/24] - \"Scary Movie 5.par2\" yEnc\n\t\tif (preg_match('/^([a-zA-Z0-9].+?\\s{2,}|Old Dad uppt\\s+)(.+?) \\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//>>> 20,36 MB \"Winamp.Pro.v5.70.3392.Incl.Keygen-FFF.par2\" 552 B yEnc\n\t\t//..:[DoAsYouLike]:.. 9,64 MB \"Snooper 1.39.5.par2\" 468 B yEnc\n\t\tif (preg_match('/^.+?\\s{2,}\\d+[,.]\\d+ [mMkKgG][bB]\\s{2,}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '\\s{2,}(\\d+ B|\\d+[,.]\\d+ [mMkKgG][bB]) yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(MKV - DVD - Rip - German - English - Italiano) - \"CALIGULA (1982) UNCUT.sfv\" yEnc\n\t\tif (preg_match('/^\\(.+?\\) - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"sre56565ztrtzuzi8inzufft.par2\" yEnc\n\t\tif (preg_match('/^\"([a-z0-9]+)' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "function suapvalint_iki_sitmecio ($metai) {\r\n if ($metai%100 == 0) {\r\n $simtmetis = $metai/100;\r\n return $simtmetis. \" osom\";\r\n }\r\n\r\n else {\r\n $simtmetis = round($metai/100,0);\r\n return $simtmetis. \" reikejo apvalint\";\r\n }\r\n}", "function penyebut($nilai)\n{\n $nilai = abs($nilai);\n $huruf = array(\"\", \"satu\", \"dua\", \"tiga\", \"empat\", \"lima\", \"enam\", \"tujuh\", \"delapan\", \"sembilan\", \"sepuluh\", \"sebelas\");\n $temp = \"\";\n if ($nilai < 12) {\n $temp = \" \" . $huruf[$nilai];\n } else if ($nilai < 20) {\n $temp = penyebut($nilai - 10) . \" belas\";\n } else if ($nilai < 100) {\n $temp = penyebut($nilai / 10) . \" puluh\" . penyebut($nilai % 10);\n } else if ($nilai < 200) {\n $temp = \" seratus\" . penyebut($nilai - 100);\n } else if ($nilai < 1000) {\n $temp = penyebut($nilai / 100) . \" ratus\" . penyebut($nilai % 100);\n } else if ($nilai < 2000) {\n $temp = \" seribu\" . penyebut($nilai - 1000);\n } else if ($nilai < 1000000) {\n $temp = penyebut($nilai / 1000) . \" ribu\" . penyebut($nilai % 1000);\n } else if ($nilai < 1000000000) {\n $temp = penyebut($nilai / 1000000) . \" juta\" . penyebut($nilai % 1000000);\n } else if ($nilai < 1000000000000) {\n $temp = penyebut($nilai / 1000000000) . \" milyar\" . penyebut(fmod($nilai, 1000000000));\n } else if ($nilai < 1000000000000000) {\n $temp = penyebut($nilai / 1000000000000) . \" trilyun\" . penyebut(fmod($nilai, 1000000000000));\n }\n return $temp;\n}", "function cariPosisi($batas){\nif(empty($_GET['halproduk'])){\n\t$posisi=0;\n\t$_GET['halproduk']=1;\n}\nelse{\n\t$posisi = ($_GET['halproduk']-1) * $batas;\n}\nreturn $posisi;\n}", "function halamanf3($jum)\n{// function halaman() - mula\n $mula = '<div style=\"background-color: #fffaf0; color:black;text-align:center\">';\n $tamat = '</div>';\n $page = $jum['page'];\n // Tentukan had query berasaskan nombor halaman semasa.\n //$jum['dari'] = (($jum['page'] * $jum['max']) - $jum['max']); \n // Tentukan bilangan halaman. $jum['muka_surat'] \n\t$jum['max'] = 30; // ubahsuai bil max untuk cetakf3\n\t$muka_surat = ceil($jum['bil_semua'] / $jum['max']);\n $bil_semua = $jum['bil_semua'];\n $baris_max = $jum['max'];\n \n $url = dpt_url(); // sepatutnya kawalan/semua/30/1/amin/\n $class = ( !isset($url[0]) ) ? null : $url[0]; //'kawalan'; \n $fungsi = 'cetakf3'; //( !isset($url[1]) ) ? null : $url[1]; //'semua'; \n $batch = ( !isset($url[2]) ) ? null : $url[2]; //'30'; \n $item = ( !isset($url[3]) ) ? null : $url[3]; //'30'; \n $ms = ( !isset($url[4]) ) ? null : $url[4]; //'ms'; \n //$fe = ( !isset($url[4]) ) ? null : $url[4]; //'fe'; \n \n //return \"\\$batch:$batch|\\$bil_semua:$bil_semua|\\$baris_max:$baris_max|\\$muka_surat:$muka_surat\";\n\t\n\t$senarai = URL . \"$class/$fungsi/$batch/$baris_max/\";\n $halaman = \"\\n$mula\\r\" \n\t\t. '<ul class=\"pagination pagination-sm\">' \n\t\t. \"\\r<li><a>Bil:($bil_semua) ms($muka_surat)- Papar halaman</a></li>\";\n \n if($page > 1) // Bina halaman sebelum\n $halaman .= \"\\r<li><a href='$senarai\" . ($page-1) . \"'>&laquo;</a></li>\";\n for($i = 1; $i <= $muka_surat; $i++) // Bina halaman terkini\n {$halaman .= ($page==$i)? \"\\r<li><a href='$senarai$i'>($i)</a></li>\" : \n\t\t\"\\r<li><a href='$senarai$i'>$i</a></li>\";}\n if($page < $muka_surat) // Bina halaman akhir\n $halaman .= \"\\r<li><a href='$senarai\" . ($page+1) . \"'>&raquo;</a></li>\";\n \n $halaman .= \"\\n</ul>\\n$tamat\";\n\n return $halaman;\n\t\n}", "function buat_karakter($nilai) {\n\t$panjang = strlen($nilai);\n\t\n\tif($panjang % 16 != 0) {\n\t\tfor($i = 0 ; $i < 16 - ($panjang % 16) ; $i++) {\n\t\t\t$nilai .= \" \";\n\t\t}\n\t}\n\n\t$panjang = strlen($nilai);\n\t// echo $nilai . \"<br />\";\n\n\t$hasil = \"\";\n\t$arrHasil = array();\n\n\t// echo $panjang.\"<br />\";\n\n\tfor($i = 0 ; $i < $panjang ; $i++) {\n\t\t\n\t\t$hasil .= $nilai[$i];\n\n\t\tif(strlen($hasil) == 16) {\n\t\t\t$arrHasil[] = $hasil;\n\t\t\t$hasil = \"\";\n\t\t}\n\t}\n\treturn $arrHasil;\n}", "function hieu($p_tuso, $p_mauso)\n {\n $ps = new PHAN_SO();\n $ps->khoitao_ps($p_tuso, $p_mauso);\n $ps->tuso = ($this->tuso*$ps->mauso) - ($ps->tuso*$this->mauso);\n $ps->mauso = $this->mauso*$ps->mauso;\n // $ps->toigian_ps();\n return $ps;\n }", "public function boleta()\n\t{\n\t\t//\n\t}", "function yumusamaCheck($kelime){\n\t\t// $sondanIkinci = mb_substr($kelime, -2, -1);\n\t\t// // eger sondan ikinci unlu degilse yumusama olamaz\n\t\t// if(!in_array($sondanIkinci, UNLULER)) return -1;\n\t\t$sonHarf = mb_substr($kelime, -1);\n\t\tif($sonHarf === \"b\") {\n\t\t\treturn mb_substr($kelime, 0 ,mb_strlen($kelime)-1).\"p\";\n\t\t}\n\t\tif($sonHarf === \"c\") {\n\t\t\treturn mb_substr($kelime, 0 ,mb_strlen($kelime)-1).\"ç\";\n\t\t}\n\t\tif($sonHarf === \"d\") {\n\t\t\treturn mb_substr($kelime, 0 ,mb_strlen($kelime)-1).\"t\";\n\t\t}\n\t\tif($sonHarf === \"g\") {\n\t\t\treturn mb_substr($kelime, 0 ,mb_strlen($kelime)-1).\"k\";\n\t\t}\n\t\tif($sonHarf === \"ğ\") {\n\t\t\treturn mb_substr($kelime, 0 ,mb_strlen($kelime)-1).\"k\";\n\t\t}\n\t\treturn -1;\n\t}", "function mots_indexation_ext($texte, $min_long = 3) {\n\tinclude_spip('inc/charsets');\n\tinclude_spip('inc/texte');\n\n\t// Point d'entree pour traiter le texte avant indexation\n\t$texte = pipeline('pre_indexation', $texte);\n\n\t// Recuperer les parametres des modeles\n\t$texte = traiter_modeles($texte, true);\n\t\n\t// Supprimer les tags HTML\n\t$texte = preg_replace(',<.*>,Ums',' ',$texte);\n\n\t// Translitterer (supprimer les accents, recuperer les &eacute; etc)\n\t// la translitteration complexe (vietnamien, allemand) duplique\n\t// le texte, en mettant bout a bout une translitteration simple +\n\t// une translitteration riche\n\tif ($GLOBALS['translitteration_complexe'])\n\t\t$texte_c = ' '.translitteration_complexe ($texte, 'AUTO', true);\n\telse\n\t\t$texte_c = '';\n\t$texte = translitteration($texte);\n\tif($texte!=trim($texte_c)) $texte .= $texte_c;\n\t# NB. tous les caracteres non translitteres sont retournes en utf-8\n\n\t// OPTIONNEL // Gestion du tiret '-' :\n\t// \"vice-president\" => \"vice\"+\"president\"+\"vicepresident\"\n#\t$texte = preg_replace(',(\\w+)-(\\w+),', '\\1 \\2 \\1\\2', $texte);\n\n\t// Supprimer les caracteres de ponctuation, les guillemets...\n\t$e = \"],:;*\\\"!\\r\\n\\t\\\\/)}{[|@<>$%'`?\\~.^(\";\n\t$texte = strtr($texte, $e, ereg_replace('.', ' ', $e));\n\n\t//eliminare +\\- non all'inizio di una parola\n\t$texte = preg_replace(\",(?:\\S)[\\-+],\",\" \",$texte);\n\t// Cas particulier : sigles d'au moins deux lettres\n\t$texte = preg_replace(\"/ ([A-Z][0-9A-Z]{1,\".($min_long - 1).\"}) /\",\n\t\t' \\\\1___ ', $texte.' ');\n\n\t// Tout passer en bas de casse\n\t$texte = strtolower($texte);\n\n\t// Retourner sous forme de table\n\treturn preg_split(\"/ +/\", trim($texte));\n}", "public function contAlumExtemp($anio)\n {\n }", "function nustatome_kintamuosius ($a, $b, $c){\n $this -> modelis = $a;\n $this -> marke = $b;\n $this -> gamybosMetai = $c;\n $this -> spalva = \"Raudona\";\n $this -> duruSkaicius = 5;\n\n }", "function smileys($chaine) \t{\n\t$dirbase = _DIR_PLUGIN_SPIPBB.\"smileys/\";\n\t##$dirbase = _DIR_SMILEYS_SPIPBB;\n\t$listsmil = genere_list_smileys($dirbase);\n\n\t# h. indispensable !! pour gerer le changement de repertoire\n\t# en cours de route, donc tous les smileys dispo\n\tif(_DIR_SMILEYS_SPIPBB!=$dirbase) {\n\t\t$listperso=genere_list_smileys(_DIR_SMILEYS_SPIPBB);\n\t\t$listsmil = array_merge($listsmil, $listperso); // array verifies\n\t}\n\n\twhile (list($nom,$chem) = each($listsmil)) {\n\t\t$smil_html = \"<img src='\".$chem.\"' style='border:0' title='\".$nom.\"' alt='smil' align='baseline' />\";\n\t\t$chaine = str_replace(\":\".$nom, $smil_html , $chaine);\n\t}\n\treturn $chaine;\n}", "private function _broFist()\n {\n $this->_message(\"..............__\");\n $this->_message(\"......../´¯/''/´`¸\");\n $this->_message(\"...../'/../../..../¨¯\\\\\");\n $this->_message(\"...('(...´..´.¯~/'..')\");\n $this->_message(\"....\\...........'.../\");\n $this->_message(\".....\\...\\.... _.·´\");\n $this->_message(\"......\\.......(\");\n $this->_message(\"BRO FIST\");\n }", "function cl_issarqsimplesreg() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"issarqsimplesreg\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cuentabancos(){\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,c.description,c.manual_code\n\t\t\tfrom cont_movimientos m,cont_polizas p,cont_accounts c,cont_config conf\n\t\t\twhere m.cuenta=c.account_id and c.currency_id=2 \n\t\t\tand c.`main_father`=conf.CuentaBancos and p.idtipopoliza!=3 and m.TipoMovto not like '%M.E%'\n\t\t\tand m.IdPoliza=p.id and p.activo=1 and m.Activo=1 group by m.Cuenta\n\t\t\t\");\n\t\t\treturn $sql;\n\t\t}", "function stocks_affiche_milieu($flux) {\n\t$texte = \"\";\n\tif ($flux['args']['exec'] == 'produit') {\n\t\t$flux['data'] .= recuperer_fond(\n\t\t\t'prive/squelettes/inclure/gerer_stock',\n\t\t\t$flux['args'] // On passe le contexte au squelette\n\t\t);\n\t}\n\tif($texte){\n\t\tif ($p = strpos($flux['data'], \"<!--affiche_milieu-->\")) {\n\t\t\t$flux['data'] = substr_replace($flux['data'], $texte, $p, 0);\n\t\t} else {\n\t\t\t$flux['data'] .= $texte;\n\t\t}\n\t}\n\treturn $flux;\n}", "public function hapus_kuota_matkul_pilihan(){\n\t\t$sql = $this->m_aka->hapus_kuota_matkul_pilihan();\n\t\tif($sql){\n\t\t\tredirect('c_index_aka/Kuota_mata_kuliah_pilihan');\n\t\t}\t\t\n\t}", "function determinaFechosVazios()\n{\n\tglobal $mTransicoes, $lAlfabeto, $fechoVazio, $lEstados, $lTokens; \t\n\n\t//Variáveis\n\t$arrayEstados = NULL; //array com as diversas transições vazias de um mesmo estado\n\t$arrayEstados2 = NULL;\t\n\t$transConcatenadas = NULL; //array com a string inteira da transição, pode ter diversas transições vazias\n\n\techo \"------------------------------------<br>\";\n\techo \"Passo 1: Fechos dos estados<br>\";\n\t\n\tfor($i = 1; $i <= sizeof($lEstados); $i++) //determina o fecho para cada estado do autômato\n\t{ \n\t\t//echo \"Fecho de \".$lEstados[$i].\":<br>\";\n\t\t//echo \"&nbsp;&nbsp;Transicoes vazias: \".$mTransicoes[$lEstados[$i]][$lAlfabeto[0]].\"<br>\";\n\t\tif($mTransicoes[$lEstados[$i]][$lAlfabeto[0]] != '-') //mtransicoes[\"q0\"][\"e\"] != \"-\" \n\t\t{\n\t\t\t//echo \"&nbsp;&nbsp;Diferente de '-'<br>\";\n\t\t\t$fechoVazio[$lEstados[$i]][] = $lEstados[$i]; //coloca ele mesmo na lista //fechoVazio[\"q0\"][0] = \"q0'\n\t\t\t$lTokens = NULL; //limpa conteúdo de $lTokens\n\t\t\ttokeniza($mTransicoes[$lEstados[$i]][$lAlfabeto[0]]); //\"tokeniza\" vai deixar em $lTokens todos os estados de transição vazia\n\t\t\t$arrayEstados = $lTokens;\t\n\t\n\t\t\tfor($j = 0; $j < sizeof($arrayEstados); $j++)\n\t\t\t{\n\t\t\t\t//echo \"&nbsp;&nbsp;arrayEstados[$j] = \".$arrayEstados[$j].\"<br>\";\t\t\t\t\n\t\t\t\t//ve se o estado está no fecho, se não estiver coloca\n\t\t\t\tif(array_search($arrayEstados[$j], $fechoVazio[$lEstados[$i]]) == NULL \t\n\t\t\t\t\t\t\t\t&& $arrayEstados[$j] != '-'\n\t\t\t\t\t\t\t\t&& $arrayEstados[$j] != $fechoVazio[$lEstados[$i]][0])\t\n\t\t\t\t{ //o teste é igual a NULL, logo não achou o estado no fecho\n\t\t\t\t\t$fechoVazio[$lEstados[$i]][sizeof($fechoVazio[$lEstados[$i]])] = $arrayEstados[$j];\n\t\t\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;1fechoVazio[$lEstados[$i]][\".sizeof($fechoVazio[$lEstados[$i]]).\"]: \".$arrayEstados[$j].\"<br>\";\n\t\t\t\t\t//agora precisamos ver as transições vazias do arrayEstados[$j]\n\t\t\t\t\t$lTokens = NULL; //limpa conteúdo de $lTokens\n\t\t\t\t\ttokeniza($mTransicoes[$arrayEstados[$j]][$lAlfabeto[0]]); \n\t\t\t\t\t$arrayEstados2 = NULL;\n\t\t\t\t\t$arrayEstados2 = $lTokens;\n\t\t\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\";\t\n\t\t\t\t\t//echo \"transicao: \".$arrayEstados2[0].\"<br>\";\n\t\n\t\t\t\t\tfor($k = 0; $k < sizeof($arrayEstados2); $k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(array_search($arrayEstados2[$j], $fechoVazio[$lEstados[$i]]) == NULL \n\t\t\t\t\t\t\t\t\t\t&& $arrayEstados2[$j] != '-' \n\t\t\t\t\t\t\t\t\t\t&& $arrayEstados2[$j] != $fechoVazio[$lEstados[$i]][0])\t\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$fechoVazio[$lEstados[$i]][sizeof($fechoVazio[$lEstados[$i]])] = $arrayEstados2[$k];\n\t\t\t\t\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;2fechoVazio[$lEstados[$i]][\".sizeof($fechoVazio[$lEstados[$i]]).\"]: \".$arrayEstados2[$j].\"<br>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t} \t\n\t\t}\n\t\telse //estado sem transições vazias, logo o fecho vazio é vazio\n\t\t{\n\t\t\t$fechoVazio[$lEstados[$i]][] = $lEstados[$i]; //o fecho de um estado contém ele próprio sempre\n\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;Eh vazio, coloca so ele mesmo<br>\";\n\t\t}\n\t}\t\n\n\tfor($i = 1; $i <= sizeof($lEstados); $i++) //determina o fecho para cada estado do autômato\n\t{ \n\t\tsort($fechoVazio[$lEstados[$i]]);\n\t\techo $lEstados[$i].\": \";\n\t\tfor($j = 0; $j < sizeof($fechoVazio[$lEstados[$i]]); $j++)\n\t\t{\n\t\t\techo $fechoVazio[$lEstados[$i]][$j].\".\";\n\t\t}\n\t\techo \"<br>\";\n\t}\n\n\techo \"------------------------------------<br>\";\n\treturn;\n}", "function cl_rhempenhofolharubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhempenhofolharubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cariPosisi($batas){\nif(empty($_GET['haldownload'])){\n\t$posisi=0;\n\t$_GET['haldownload']=1;\n}\nelse{\n\t$posisi = ($_GET['haldownload']-1) * $batas;\n}\nreturn $posisi;\n}", "function primario($comentario){\n\t\tif(strpos($comentario,\"*\"))\n\t\t \treturn true;\n\t\telse\n\t\t\treturn false;\t\n\t}", "public function command()\n\t{\n\t\tif(count($this->arguments) == 0){\n\t\t$this->say(\"Con este comando puedes buscar salas.\\nUsa:\".$this->help);\n\t\t$this->say(\"Por ejemplo, si quieres buscar Electromagnetismo, escribe: horario electro, horario Electromagnetismo, etc...\");\n\t\treturn;\n\t\t}\n\t\t$message = implode(' ', $this->arguments);\n\t\t$this->say('Salas UAI: Buscando horarios🔎');\n\t\t$args = $this->arguments;\n\t\tif(stristr((string)$message,'viña') !== FALSE || stristr((string)$message,'vina') !== FALSE) {\n\t\t $l='vina';\n\t\t $message = str_replace(\"vina\", \"\", $message);\n\t\t $message = str_replace(\"viña\", \"\", $message);\n\t\t}\n\t\telse {\n\t\t $l='santiago';\n\t\t}\n\t\t$getJson = $this->fetch(\"http://api.salasuai.com/units/location/\".urlencode($l).\"/search/\".urlencode($message));\n\t\t$ramos = json_decode($getJson);\n\t\tif($ramos){\n\t\t$data = \"\";\n\t\t$separator = \"\";\n\t\tforeach($ramos as $ramo){\n\t\t$i=0;\n\t\t$separator=null;\n\t\twhile ($i < strlen($ramo->name)) {\n\t\t$separator = '_'.$separator;\n\t\t$i++;\n\t\t}\n\t\tif($ramo->section!=\"\"|| $ramo->section){\n\t\t\t$section=\"\\n📚Sec.\".$ramo->section;\n\t\t}\n\t\telse{\n\t\t\t$section=null;\n\t\t}\n\t\t$data=\"\\t\\t🕐\".$ramo->module.\"🕐\\t\\n🎓\".\n\t\t\t\t\t\tmb_strtoupper($ramo->name,'UTF-8').\"🎓\".$section.\"\\n👤\".\n\t\t\t\t\t\tucwords($ramo->teacher).\"\\n🚪\".\n\t\t\t\t\t\t$ramo->classroom.\"\\n\".$separator.\"\\n\".\n\t\t\t\t\t\t$data;\n\t\t}\n\t\tif (strlen($data)<=3028){\n\t\t$this->say($data);\n\t\t}\n\t\telse {\n\t\t$this->say(\"Salas UAI: Utiliza un criterio mas especifico. Muchos resultados.\");\n\t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->say('SalasUAI: ⚠No encontre ningun ramo :(');\n\t\t\t$this->say('SalasUAI: Revisa http://www.salasuai.com');\n\t\t\t$this->say('Ejemplo de Uso: horario contabilidad, horario electro');\n\t\t\treturn;\n\t\t}\n\t}", "function Resumen() {\r\n\t\t/*RGB begin*/\r\n\t\tglobal $variables;\r\n\t\tif (!$variables)\r\n\t\t{\r\n\t\t\tchangeVariables();\r\n\t\t\t$variables = 1;\r\n\t\t}\r\n\t\t/*RGB end*/\r\n\t\r\n\t\tglobal $mis_puntos, $wcag1, $lst_A, $lst_AA, $lst_AAA, $resultados, $lang;\r\n\t\t$resultados = array();\r\n\t\t$letras = array('A' => 'lst_A', 'AA' => 'lst_AA', 'AAA' => 'lst_AAA');\r\n\r\n\t\tforeach ($letras as $p => $arr) {\r\n\t\t\tforeach ($$arr as $k => $v) {\r\n\t\t\t\tif (array_key_exists($v, $wcag1)) {\r\n\t\t\t\t\t$x = $p.$mis_puntos[$v];\r\n\t\t\t\t}\r\n\t\t\t\t/*RGB begin*/\r\n\t\t\t\tif($_SESSION['emag'] == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($v != 53 && $v != 56 && $v != 92 && $v != 72)\r\n\t\t\t\t\t\t$resultados[$x]++;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t$resultados[$x]++;\r\n\t\t\t\t/*RGB end*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->t_duda = $resultados['Aduda'] + $resultados['AAduda'] + $resultados['AAAduda'];\r\n\t\t$this->t_mal = $resultados['Amal'] + $resultados['AAmal'] + $resultados['AAAmal'];\r\n\t\t$this->t_parcial = $resultados['Aparcial'] + $resultados['AAparcial'] + $resultados['AAAparcial'];\r\n\t\t$this->t_nose = $resultados['Anose'] + $resultados['AAnose'] + $resultados['AAAnose'];\r\n\r\n\t\tif ($resultados['Aduda'] + $resultados['Anose'] + $resultados['Aparcial'] + $resultados['Amal'] == 0) {\r\n\t\t\tif ($resultados['AAduda'] + $resultados['AAnose'] + $resultados['AAparcial'] + $resultados['AAmal'] == 0) {\r\n\t\t\t\tif ($resultados['AAAduda'] + $resultados['AAAnose'] + $resultados['AAAparcial'] + $resultados['AAAmal'] == 0) {\r\n\t\t\t\t\t$ico_acc = 'AAA';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$ico_acc = 'AA';\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$ico_acc = 'A';\r\n\t\t\t}\r\n\t\t\t$this->accesibilidad = ' <img src=\"img/her_'.$ico_acc.'.gif\" alt=\"'.sprintf($lang['ico_hera_acc'], $ico_acc).'\" width=\"90\" height=\"30\" style=\"float:right\" />';\r\n\t\t}\r\n\t\t\r\n\t\t$this->myresults = $resultados;\r\n\r\n\t}", "static function definisiMeni(){\n\t\t $stavke[0]=array('naziv'=>'home','link'=>'/pilot/home');\n\t\t $stavke[1]=array('naziv'=>'o nama','link'=>'/pilot/onama');\n\t\t if(session_id()!='pilot1sesija1'){\n\t\t\tsession_id('pilot1sesija1');\n\t\t\tsession_start();\n\t\t }\n\t\t if(isset($_SESSION['pravo'])){\n\t\t\t if($_SESSION['pravo']==1 || $_SESSION['pravo']==2){ \n\t\t\t\t$stavke[2]=array('naziv'=>'clanci','link'=>'/pilot/clanci'); \n\t\t\t\t$stavke[3]=array('naziv'=>'korisnici','link'=>'/pilot/korisnici'); \n\t\t\t }\n\t\t \n\t\t }\n\t\t return $stavke;\n\t}", "function penyebut($nilai) {\n\t\t$nilai = abs($nilai);\n\t\t$huruf = array(\"\", \"satu\", \"dua\", \"tiga\", \"empat\", \"lima\", \"enam\", \"tujuh\", \"delapan\", \"sembilan\", \"sepuluh\", \"sebelas\");\n\t\t$temp = \"\";\n\t\tif ($nilai < 12) {\n\t\t\t$temp = \" \". $huruf[$nilai];\n\t\t} else if ($nilai <20) {\n\t\t\t$temp = penyebut($nilai - 10). \" belas\";\n\t\t} else if ($nilai < 100) {\n\t\t\t$temp = penyebut($nilai/10).\" puluh\". penyebut($nilai % 10);\n\t\t} else if ($nilai < 200) {\n\t\t\t$temp = \" seratus\" . penyebut($nilai - 100);\n\t\t} else if ($nilai < 1000) {\n\t\t\t$temp = penyebut($nilai/100) . \" ratus\" . penyebut($nilai % 100);\n\t\t} else if ($nilai < 2000) {\n\t\t\t$temp = \" seribu\" . penyebut($nilai - 1000);\n\t\t} else if ($nilai < 1000000) {\n\t\t\t$temp = penyebut($nilai/1000) . \" ribu\" . penyebut($nilai % 1000);\n\t\t} else if ($nilai < 1000000000) {\n\t\t\t$temp = penyebut($nilai/1000000) . \" juta\" . penyebut($nilai % 1000000);\n\t\t} else if ($nilai < 1000000000000) {\n\t\t\t$temp = penyebut($nilai/1000000000) . \" milyar\" . penyebut(fmod($nilai,1000000000));\n\t\t} else if ($nilai < 1000000000000000) {\n\t\t\t$temp = penyebut($nilai/1000000000000) . \" trilyun\" . penyebut(fmod($nilai,1000000000000));\n\t\t} \n\t\treturn $temp;\n\t}", "function cl_bomov() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"bomov\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function text_arabic($sura,$aya,$text){\n\t\t$table_per_kata\t= get_table(\"SELECT * FROM terjemah_kata WHERE sura='$sura' \n\t\t\t\t\t\t\t\t\tAND aya='$aya'\");\n\t\t// inisialisasi\n\t\t$arr_terjemah = array();\n\t\tforeach($table_per_kata as $j => $row_per_kata){\n\t\t\t$m = $j+1;\n\t\t\t$arr_terjemah[$m] \t\t= $row_per_kata[indonesia]; \n\t\t\t$arr_arab_harokat[$m] \t= $row_per_kata[arab_harokat]; \n\t\t}\n\t\t\n\t\t// explode aya text into word\n\t\t$arr_kata_arab\t= explode(\" \",$text);\n\t\t\n\t\t//menampilkan tiap kata beserta terjemahnya\n\t\t/*echo \"\n\t\t<pre>\n\t\t$sura:$aya \";*/\n\t\t\n\t\t$m = 1;\n\t\tforeach($arr_kata_arab as $k => $kata_arab){\n\t\t\t$event_aya_word =\"\";\n\t\t\t//menampilkan terjemahan per kata\n\t\t\t//echo \"$kata_arab {$arr_arab[$m]}<br>\";\n\t\t\tif($kata_arab==$arr_arab_harokat[$m] ){\n\t\t\t\t$output .= \"\n\t\t\t\t<span id='terjemah_{$sura}_{$aya}_{$m}' \n\t\t\t\t\tstyle='visibility:hidden;position:absolute;width:0px;height:0px;' >\n\t\t\t\t\t{$arr_terjemah[$m]}\n\t\t\t\t</span>\n\t\t\t\t\";\n\t\t\t\t$event_aya_word =\"\n\t\t\t\tonmousemove='move_terjemah($sura,$aya,$m,event)' \n\t\t\t\tonmouseout='hide_terjemah($sura,$aya,$m)'\n\t\t\t\t\";\n\t\t\t\t\n\t\t\t\t$id_kata = \"kata_{$sura}_{$aya}_{$m}\";\n\t\t\t\t$m++;\n\t\t\t}\n\t\t\t//menampilkan kata arab\n\t\t\t$output .= \"\n\t\t\t<span \n\t\t\t\tid='$id_kata'\n\t\t\t\tclass='aya_word'\n\t\t\t\t$event_aya_word >\n\t\t\t\t\".repair_ar($kata_arab).\"\n\t\t\t</span>\n\t\t\t\";\n\t\t}\n\t\treturn $output;\n\t}", "function kiemTraChanLe()\n\t{\n\t\tglobal $a;\n\t\t$total = 100; // bien cuc bo\n\t\t// luu y: hay dat cau lenh nay ben tren cac lenh khac truoc khi goi bien do ra su dung\n\t\tif($a % 2 == 0) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function getMataPelajaran();", "private function generateNilaiAkhir($thn_ajaran = NULL, $smt = NULL, $kode_kel = NULL, $nbi = NULL) {\r\n if ( !$this->session->userdata('isLecturerTps') && !$this->session->userdata('isAdminTps') ) {\r\n redirect('public/home','refresh');\r\n }\r\n\r\n $dataFilter = [\r\n 'thn_ajaran' => $thn_ajaran,\r\n 'smt' => $smt,\r\n 'kode_kel' => $kode_kel,\r\n 'nbi' => $nbi\r\n ];\r\n\r\n $dataAnggota = $this->M_anggota->getAnggota($dataFilter)->row();\r\n\r\n if ( $dataAnggota ) {\r\n \r\n $setting = $this->M_setting->getSetting()->row();\r\n\r\n // Bobot masing masing nilai\r\n $bobot_bimbingan = $setting->bobot_bimbingan;\r\n $bobot_moderator = $setting->bobot_moderator;\r\n $bobot_penguji1 = $setting->bobot_penguji1;\r\n $bobot_penguji2 = $setting->bobot_penguji2;\r\n $kom_a = $setting->kom_a;\r\n $kom_b = $setting->kom_b;\r\n $kom_c = $setting->kom_c;\r\n $kom_d = $setting->kom_d;\r\n // Bobot masing masing nilai\r\n\r\n // nilai bimbingan\r\n $bimb = ( $bobot_bimbingan/100 ) * $dataAnggota->nilai_bimb;\r\n // nilai bimbingan\r\n\r\n // nilai moderator\r\n $kom_a_mod = ( $kom_a/100 ) * $dataAnggota->nilai_11;\r\n $kom_b_mod = ( $kom_b/100 ) * $dataAnggota->nilai_12;\r\n $kom_c_mod = ( $kom_c/100 ) * $dataAnggota->nilai_13;\r\n $kom_d_mod = ( $kom_d/100 ) * $dataAnggota->nilai_14;\r\n\r\n $tot_mod = ( $kom_a_mod + $kom_b_mod + $kom_c_mod + $kom_d_mod ) * ( $bobot_moderator/100 );\r\n // nilai moderator\r\n \r\n // nilai penguji 1\r\n $kom_a_p1 = ( $kom_a/100 ) * $dataAnggota->nilai_21;\r\n $kom_b_p1 = ( $kom_b/100 ) * $dataAnggota->nilai_22;\r\n $kom_c_p1 = ( $kom_c/100 ) * $dataAnggota->nilai_23;\r\n $kom_d_p1 = ( $kom_d/100 ) * $dataAnggota->nilai_24;\r\n\r\n $tot_p1 = ( $kom_a_p1 + $kom_b_p1 + $kom_c_p1 + $kom_d_p1 ) * ( $bobot_penguji1/100 );\r\n // nilai penguji 1\r\n \r\n // nilai penguji 2\r\n $kom_a_p2 = ( $kom_a/100 ) * $dataAnggota->nilai_31;\r\n $kom_b_p2 = ( $kom_b/100 ) * $dataAnggota->nilai_32;\r\n $kom_c_p2 = ( $kom_c/100 ) * $dataAnggota->nilai_33;\r\n $kom_d_p2 = ( $kom_d/100 ) * $dataAnggota->nilai_34;\r\n\r\n $tot_p2 = ( $kom_a_p2 + $kom_b_p2 + $kom_c_p2 + $kom_d_p2 ) * ( $bobot_penguji2/100 );\r\n // nilai penguji 2\r\n\r\n // Perhitungan nilai kahir\r\n $totalNilai = $bimb + $tot_mod + $tot_p1 + $tot_p2;\r\n // Perhitungan nilai kahir\r\n \r\n $dataUpdate = ['nilai_akhir' => $totalNilai];\r\n $updateNilaiAkhir = $this->M_anggota->update($thn_ajaran,$smt,$kode_kel,$nbi,$dataUpdate);\r\n\r\n if ( $updateNilaiAkhir ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "function lebih($slug) {\n\n\t\t/* ---- PREPARE VARIABLE ------*/\n\t\t$arr_slug\t\t= explode('_', $slug);\n\t\t$pegawai_result = $this->db->get_where('pegawai', array('id_pegawai' => $arr_slug[1]))->result();\n\t\t$pegawai \t\t= $pegawai_result['0']->nama_pegawai;\n\t\t$jabatan\t\t= $pegawai_result['0']->jabatan_pegawai;\n\t\t$nip \t\t= $pegawai_result['0']->nip_pegawai;\n\t\t$surat_result \t= $this->db->get_where('data_rinci', array('id_surat' => $arr_slug[0],\n\t\t\t'id_pegawai' => $arr_slug[1]))->result();\n\t\t$nomor \t\t\t= $surat_result['0']->nomor;\n\n\t\t//Get data rinci\n\t\t$data_rinci_all\t= $this->db->get_where('data_rinci',\n\t\t\tarray('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$id_tiket = $data_rinci_all['0']->id_tiket;\n\t\t$id_transport2 = $data_rinci_all['0']->id_transport2;\n\t\t\t\n\t\t//get data uang tiket\n\t\tif ($id_tiket == 0) {\n\t\t\t$sbu_tiket = 0;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$transport2 = $this->db->get_where('biaya_transport',array('id' => $id_transport2))->result();\n\t\t\t$rute = $transport2['0']->provinsi;\n\n\t\t} else {\n\t\t\t$tiket_result = $this->db->get_where('tiket_pesawat',array('id' => $id_tiket))->result();\n\t\t\t$sbu_tiket = $tiket_result['0']->biaya_tiket;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$rute = $tiket_result['0']->rute;\n\t\t}\n\n\t\t//get real pengeluaran untuk tiket\n\t\t$r_tiket_result = $this->db->get_where('spd_rampung', array('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$r_tiket = $r_tiket_result != NULL ? $r_tiket_result['0']->tiket : 0;\n\n\t\t$ppk \t\t\t= $this->db->get_where('pejabat_administratif',\n\t\t\tarray('jabatan' => 'Pejabat Pembuat Komitmen'))->result();\n\t\t$nama_ppk \t\t\t\t= $ppk['0']->nama;\n\t\t$nip_ppk \t\t\t\t= $ppk['0']->nip;\n\n\t\t$var_tgl_skrg = $this->tanggal_indo(date('Y').'-'.date('m').'-'.date('d'), '-');\n\t\t$var_tgl_surat \t= $this->tanggal_indo($surat_result['0']->tgl_surat,'/');\n\n\t\t/* -----------------------------*/\n\t\tif(empty($r_tiket_result)) {\n\t\t\techo \"<script> \t\n \talert('Anda belum mengisi SPD Rampung!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t}\n\n\t\tif($sbu_tiket<$r_tiket) {\n\t\t\t$pdf = new PDF_MC_Table('p','mm','A4');\n\t\t\t$pdf->AddPage();\n\t\t\t$pdf->SetFont('Arial','B',14);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->MultiCell(0,25,\"SURAT PERNYATAAN\",0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(25,7,'',0,0);\n\t\t\t$pdf->MultiCell(0,6,\"Yang bertandatangan di bawah ini :\",0,'L');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Nama',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$pegawai,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'NIP',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$nip,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Jabatan',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$jabatan,0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Berdasarkan Surat Tugas Nomor:'.$nomor.' tanggal '.$var_tgl_surat.' dengan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sesungguhnya bahwa : input alasan lebih here',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'1. Tiket '.$rute.' (PP) dengan jumlah tiket pesawat di bawah ini melebihi dengan',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'SBU tahun '.date('Y').', meliputi :',0,1);\n\t\t\t$pdf->Ln();\n\n\t\t\t//here is table\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'No.',1,0,'C',0);\n\t\t\t$pdf->Cell(70,5,'Uraian',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Nilai SBU',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Pengeluaran Rill',1,0,'C',0);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\n\t\t\t$counterrr = 1;\n\t\t\t\t$pdf->SetWidths(array(10, 70, 40, 40));\n\t\t\t\tfor($i=0;$i<1;$i++) {\n\t\t\t\t\t$pdf->Row(array($counterrr,\"Tiket Pesawat \".$rute. \" (PP)\",\"Rp \".$sbu_tiket_ena, \"Rp \".number_format($r_tiket,2,',','.')));\n\t\t\t\t\t$counterrr++;\n\t\t\t\t}\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'','LB',0,'L',0);\n\t\t\t$pdf->Cell(70,5,'Jumlah','LRB',0,'C',0);\n\t\t\t$pdf->Cell(7,5,'Rp ','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Cell(7,5,'Rp ','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Ln();\n\t\t\t\n\t\t\t//end of table\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'2. Bahwa tiket '.$rute.' (PP) dengan jumlah uang tersebut pada angka (1)',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'melebihi jumlah SBU dan benar - benar dikeluarkan dengan bukti rill kuitansi tiket',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Perjalanan Dinas dimaksud.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Demikian pernyataan ini kami buat dengan sebenarnya, untuk dipergunakan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sebagaimana mestinya.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t//Footer Surat\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(10,6,\"\",0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'L');\n\t\t\t$pdf->Cell(15,6,'',0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'R');\n\t\t\t$pdf->Cell(20,6,'',0,0,'C');\n\t\t\t$pdf->MultiCell(60,6,'Jakarta, '.$var_tgl_skrg,0,'R');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(18,6,'',0,0,'L');\n\t\t\t$pdf->MultiCell(55,6,'Mengetahui/Menyetujui',0,'R');\n\t\t\t$pdf->Cell(100,6,'Pejabat Pembuat Komitmen',0, 0,'C');\n\t\t\t$pdf->MultiCell(50,6,'Pelaksana SPD',0,'R');\n\t\t\t$pdf->Cell(100,6,' Pusat Data Informasi dan Humas',0, 0,'C');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','BU',12);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(100,6,$nama_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(72.5,6,$pegawai,0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(100,6,\"NIP. \".$nip_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(72.5,6,'NIP. '.$nip,0,'C');\n\n\t\t\t//Cetak gans\n\t\t\t$filename = \"Lebih - \".$arr_slug[0].\" - \".$pegawai.$this->extension;\n\t\t\t$pdf->setTitle($filename);\n\t\t\t$pdf->Output(\"I\", $filename);\n\t\t} else {\n\t\t\techo \"<script> \t\n \talert('Tidak bisa mencetak karena biaya tiket tidak lebih dari SBU!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t}\n\t}", "private function fecharRamo($no, $atomosMarcados) {\n\n // Importa a pilha de ramos a serem executados.\n global $pilhaDeRamos;\n\n // Atribui o valoração referente ao status.\n $valoracao = $no->status == \"T\" ? 1 : 0;\n\n // Define o átomo marcado a ser buscado.\n $buscado = $no->sequente.\" = \".$valoracao;\n\n // Reverso do átomo marcado a ser buscado.\n if($valoracao){\n $buscadoReverso = $no->sequente.\" = 0\";\n }else{\n $buscadoReverso = $no->sequente.\" = 1\";\n }\n\n // Se o atomo buscado está no vetor de átomos marcados, fechar ramo.\n if(in_array($buscadoReverso, $atomosMarcados)) {\n \n // Retorna mensagem.\n echo \"Ramo fechado. \".join($atomosMarcados,\" ; \").\" ; $buscado <br><br>\";\n\n // Retira ramo da pilha, para o próximo ser executado.\n array_pop($pilhaDeRamos);\n \n }\n\n }", "public function valordelospasajesplus();", "public static function preslovi($text, $pismo)\n {\n $cirilica = array (\"панјелиниз\",\"конјуг\",\"конјук\",\"конјун\",\"анјуг\",\"поджил\",\"поджет\",\"поджањ\",\"поджњ\",\"преджет\",\"преджив\",\"подждр\",\"подржар\",\"поджуп\",\"оджал\",\"оджив\",\"оджвал\",\"оджељ\",\"оджел\",\"оджден\",\"наджир\",\"наджуп\",\"надрждрел\",\"наджањ\",\"наджњ\",\"наджет\",\"наджив\",\"наджн\",\"инјункт\",\"инјек\",\"Џ\",\"џ\",\"Љ\",\"љ\",\"Њ\",\"њ\",\"Ђ\",\"ђ\",\"а\",\"б\",\"в\",\"г\",\"д\",\"е\",\"ж\",\"з\",\"и\",\"ј\",\"к\",\"л\",\"љ\",\"м\",\"н\",\"о\",\"п\",\"р\",\"с\",\"т\",\"ћ\",\"у\",\"ф\",\"х\",\"ц\",\"ч\",\"ш\",\"ѕ\",\"А\",\"Б\",\"В\",\"Г\",\"Д\",\"Е\",\"Ж\",\"З\",\"И\",\"Ј\",\"К\",\"Л\",\"Љ\",\"М\",\"Н\",\"Њ\",\"О\",\"П\",\"Р\",\"С\",\"Т\",\"Ћ\",\"У\",\"Ф\",\"Х\",\"Ц\",\"Ч\",\"Џ\",\"Ш\",\"Ѕ\");\n\n $latinica = array (\"panjeliniz\",\"konjug\",\"konjuk\",\"konjun\",\"anjug\",\"podžil\",\"podžet\",\"podžanj\",\"podžnj\",\"predžet\",\"predživ\",\"podždr\",\"podžar\",\"podžup\",\"odžal\",\"odživ\",\"odžval\",\"odželj\",\"odžel\",\"odžden\",\"nadžir\",\"nadžup\",\"nadždrel\",\"nadžanj\",\"nadžnj\",\"nadžet\",\"nadživ\",\"nadžn\",\"injunkt\",\"injek\",\"Dž\",\"dž\",\"Lj\",\"lj\",\"Nj\",\"nj\",\"Đ\",\"đ\",\"a\",\"b\",\"v\",\"g\",\"d\",\"e\",\"ž\",\"z\",\"i\",\"j\",\"k\",\"l\",\"lj\",\"m\",\"n\",\"o\",\"p\",\"r\",\"s\",\"t\",\"ć\",\"u\",\"f\",\"h\",\"c\",\"č\",\"š\",\"dz\",\"A\",\"B\",\"V\",\"G\",\"D\",\"E\",\"Ž\",\"Z\",\"I\",\"J\",\"K\",\"L\",\"Lj\",\"M\",\"N\",\"Nj\",\"O\",\"P\",\"R\",\"S\",\"T\",\"Ć\",\"U\",\"F\",\"H\",\"C\",\"Č\",\"Dž\",\"Š\",\"Dz\");\n\n if($pismo === \"Cyrl\") {\n return str_replace($cirilica, $latinica, $text);\n }\n elseif($pismo === \"Latn\")\n {\n return str_replace($latinica, $cirilica, $text);\n }\n\n }", "abstract public function hidupkan();", "function resizeGambar1($pathFileTujuan,$lebarGambar1,$folder1,$namaFileTujuan,$prefix){\n $tipe = preg_replace(\"/.*\\.(.*)$/\",\"\\\\1\",$pathFileTujuan);\n //@header(\"Content-type: image/\".$tipe);\n \n list($lebar1,$tinggi1) = getimagesize($pathFileTujuan);\n $lebar_baru1 = $lebarGambar1;\n $tinggi_baru1= ($lebar_baru1/$lebar1) * $tinggi1;\n // proses copy resize\n $gambar_baru1 = imagecreatetruecolor($lebar_baru1, $tinggi_baru1) or die('Problem In Creating image thumb');\n if($tipe=='jpg' || $tipe=='jpeg') {\n $gambar_asli1 = imagecreatefromjpeg($pathFileTujuan) or die('Problem In opening Source JPEG Image');\n } elseif($tipe=='JPG' || $tipe=='JPEG') {\n $gambar_asli1 = imagecreatefromJPEG($pathFileTujuan) or die('Problem In opening Source GIF Image');\n } elseif($tipe=='gif') {\n $gambar_asli1 = imagecreatefromgif($pathFileTujuan) or die('Problem In opening Source GIF Image');\n } elseif($tipe=='png') {\n $gambar_asli1 = imagecreatefrompng($pathFileTujuan) or die('Problem In opening Source PNG Image');\n } elseif($tipe=='PNG') {\n $gambar_asli1 = imagecreatefrompng($pathFileTujuan) or die('Problem In opening Source PNG Image');\n }\n imagecopyresampled($gambar_baru1, $gambar_asli1, 0, 0, 0, 0, $lebar_baru1, $tinggi_baru1, $lebar1, $tinggi1) or die('Problem In resizing');\n \n // Keluaran\n if($tipe=='jpg' || $tipe=='jpeg') {\n imagejpeg($gambar_baru1, $folder1.$prefix.$namaFileTujuan) or die('Problem In saving JPEG');\n } elseif($tipe=='JPG' || $tipe=='JPEG') {\n imageJPEG($gambar_baru1, $folder1.$prefix.$namaFileTujuan) or die('Problem In saving GIF');\n } elseif($tipe=='gif') {\n imagegif($gambar_baru1, $folder1.$prefix.$namaFileTujuan) or die('Problem In saving GIF');\n } elseif($tipe=='png') {\n imagepng($gambar_baru1, $folder1.$prefix.$namaFileTujuan) or die('Problem In saving PNG');\n } elseif($tipe=='PNG') {\n imagepng($gambar_baru1, $folder1.$prefix.$namaFileTujuan) or die('Problem In saving PNG');\n }\n //hapus resource gambar\n}", "function ler($nome) {\n $x = 1;\n\t while($x < $this->bd[0][0] && !$this->str_igual($nome, $this->bd[$x][2])) {$x++;}\n if($x >= $this->bd[0][0]) {return 0;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\nreturn 1;\n }", "public function bernafas()\n \t{\n \t\techo 'Bernafas menggunakan hidung, '.PHP_EOL;\n \t}", "public function run()\n {\n #primer año\n $this->agregar(7713,[5793,5912],[],[],[5793,5912]); # ipoo\n $this->agregar(7791,[5793,5912],[],[],[5793,5912]); # lenguajes formales\n\n #segundo \n $this->agregar(7655,[5551,7713],[5793],[],[5551,7713,5793]); # ED\n $this->agregar(7949,[7713,7791],[5912],[],[7713,7791,5912]); # tdp\n $this->agregar(5552,[],[5551],[],[5551]); # am2\n $this->agregar(5744,[7791,7655],[7713],[],[7791,7655,7713]); # orga\n $this->agregar(7951,[7655],[7713],[],[7655,7713]); # tdp\n\n #tercero\n $this->agregar(5534,[7951],[7655],[],[7951,7655]); # ayds\n $this->agregar(5561,[5744],[7791],[],[5744,7791]); # arqui\n $this->agregar(5704,[7951],[7949],[],[7951,7951]); # logica\n $this->agregar(7552,[5704,5534],[],[],[5704,5534]); # bases de datos\n $this->agregar(7810,[5552],[7791,7655],[],[5552,7791,7655]); # mcc\n $this->agregar(7820,[7791],[5551,5793],[],[7791,5551,5793]); # estadsitica\n $this->agregar(7925,[5561],[5744],[],[5561,5744]); # soyd\n\n #cuarto\n $this->agregar(5587,[7552],[5534],[],[7552,5534]); # dyds\n $this->agregar(5696,[7925,7552],[5704],[],[7925,7552,5704]); # lenguajes de prog\n $this->agregar(7903,[7925],[],[],[7925]); #redes\n $this->agregar(7502,[5587],[],[],[5587]); # aps\n $this->agregar(5576,[5696],[],[],[5696]); # compiladores\n $this->agregar(5684,[7552],[5704],[],[7552,5704]); # IA\n\n #quinto\n $this->agregar(5523,[5704,7810],[7951],[],[5704,7810,7951]); # algoritmos\n $this->agregar(7680,[5587,7903],[7552],[],[5587,7903,7552]); # iaw\n\n }", "function eliminarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_ime';\n\t\t$this->transaccion='SNX_MAQ_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_maquinaria','id_maquinaria','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function RellenarMinuta()\r\n {\r\n $this->AddPage();\r\n\r\n $this->RellenarTitulo();\r\n\r\n $this->RellenarAsistentes();\r\n\r\n $this->RellenarStatusCompromisosYAsistencias();\r\n\r\n $this->RellenarIndice();\r\n\r\n $this->RellenarDesarrolloReunion();\r\n }", "function cariPosisi($batas){\nif(empty($_GET[halprofile])){\n\t$posisi=0;\n\t$_GET[halprofile]=1;\n}\nelse{\n\t$posisi = ($_GET[halprofile]-1) * $batas;\n}\nreturn $posisi;\n}", "function data_mhs(){\r\n\t\t\techo \"KodeMataKuliah : \".$this->KodeMataKuliah.\"<br />\";\r\n\t\t\techo \"SKS : \".$this->SKS.\"<br />\";\r\n\t\t\techo \"Daftar matakuliah yang diambil:<br />\";\r\n\t\t\t\r\n\t\t\t$i = 0; // nomor urut daftar SKS matakuliah yang diambil\r\n\t\t\tforeach($this->NamaMataKuliah as $mk){\r\n\t\t\t\techo ++$i.\". \".$mk.\"<br />\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Cuma buat ganti baris aja kok :-)\r\n\t\t\techo \"<br />\";\r\n\t\t}" ]
[ "0.57983017", "0.57624364", "0.5697816", "0.56925696", "0.56836087", "0.5676264", "0.5673752", "0.5640158", "0.56301445", "0.56244516", "0.5623838", "0.562325", "0.5614771", "0.5614771", "0.55796665", "0.5548645", "0.5521051", "0.55155885", "0.5510515", "0.5486088", "0.54582375", "0.545704", "0.54502606", "0.54364675", "0.53969985", "0.5395035", "0.5389693", "0.53887284", "0.5374186", "0.5374116", "0.53695095", "0.535721", "0.53482914", "0.5342824", "0.53366035", "0.5323042", "0.53228605", "0.5316345", "0.531628", "0.53014016", "0.5296926", "0.52948254", "0.52689177", "0.52677906", "0.5266677", "0.5266677", "0.5264659", "0.5257451", "0.52537626", "0.524369", "0.5241616", "0.5241238", "0.5241238", "0.5235126", "0.522702", "0.522357", "0.522088", "0.52134836", "0.5202057", "0.51896226", "0.5180812", "0.51716936", "0.5170163", "0.516586", "0.5165531", "0.51634705", "0.5161526", "0.51591563", "0.515751", "0.5157439", "0.5154352", "0.5152026", "0.51498395", "0.51435965", "0.5136884", "0.5135801", "0.5133871", "0.512971", "0.51290077", "0.5126611", "0.5123796", "0.51184124", "0.51183754", "0.51178855", "0.5115861", "0.5110594", "0.51075107", "0.5105986", "0.5102647", "0.50967985", "0.5088775", "0.5086128", "0.5082959", "0.5082037", "0.50766325", "0.5076332", "0.50727534", "0.50718164", "0.5071424", "0.50712234", "0.50707257" ]
0.0
-1
Checks that response body contains specific text.
public function theResponseShouldBeEqual($text) { assertEquals($text, $this->browser->getLastResponse()->getContent()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function theResponseShouldContain($text)\n {\n $expectedRegexp = '/' . preg_quote($text) . '/i';\n $actual = (string) $this->response->getBody();\n Assertions::assertRegExp($expectedRegexp, $actual);\n }", "public function theResponseShouldContain($text)\n {\n $expectedRegexp = '/' . preg_quote($text) . '/i';\n $actual = (string) $this->response->getBody();\n Assertions::assertMatchesRegularExpression($expectedRegexp, $actual);\n }", "public function theResponseShouldNotContain($text)\n {\n $expectedRegexp = '/' . preg_quote($text) . '/';\n $actual = (string) $this->response->getBody();\n Assertions::assertNotRegExp($expectedRegexp, $actual);\n }", "public function theResponseShouldNotContain($text)\n {\n $expectedRegexp = '/' . preg_quote($text) . '/';\n $actual = (string) $this->response->getBody();\n Assertions::assertDoesNotMatchRegularExpression($expectedRegexp, $actual);\n }", "public function hasText()\n {\n return !is_null($this->update->message) &&\n !empty($this->update->message->text);\n }", "public function canHaveBody() {\n return ( $this->status < 100 || $this->status >= 200 ) &&\n (!in_array($this->status, array(201, 204, 304)));\n }", "public function isText() {}", "public function getBodyIsText()\n {\n return $this->bodyIsText;\n }", "public function getBodyIsText()\n {\n return $this->bodyIsText;\n }", "public function testAssertResponseContainsWithIgnoreCaseFlag(): void\n {\n $this->_response = new Response();\n $this->_response = $this->_response->withStringBody('Some content');\n\n $this->assertResponseContains('some', 'Failed asserting that the body contains given content', true);\n }", "protected function isContentCorrect() {}", "public function hasText()\n {\n if ($this->_text) {\n return true;\n } else {\n return false;\n }\n }", "public function hasText()\n {\n return $this->text != null;\n }", "public function testAssertResponseContains(): void\n {\n $this->_response = new Response();\n $this->_response = $this->_response->withStringBody('Some content');\n\n $this->assertResponseContains('content');\n }", "public function isText()\n {\n $mime_type = $this->getMimeType() ?: $this->detectMimeType();\n\n return (strpos($mime_type, 'text') === 0);\n }", "private function check_text($text)\n { \n if(!empty($text))\n return true;\n else\n {\n $this->errors[] = 4; // empty text!\n return false;\n }\n }", "public function isPlain()\n\t{\n\t\treturn Str::contains($this->getHeaderLine('Content-Type'), '/plain');\n\t}", "private static function shouldUsePlainText(): bool {\n $route = $_REQUEST['route'] ?? '';\n return str_contains($route, '/api/v2/') || str_contains($route, '/queries/') || isset($_SERVER['HTTP_X_REQUESTED_WITH']);\n }", "public function hasBodyLines()\n {\n return count($this->getBodyLines()) > 0;\n }", "public function hasText() {\n return !empty($this->text[\\App::getLocale()]);\n }", "function hasBody() {\n\t\t$body = strip_tags($this->body, \"<img><a>\");\n\t\t$body = trim($body);\n\t\tif (empty($body)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function getBodyText();", "protected function textValid()\n {\n return 'is valid JSON';\n }", "protected function textValid()\n {\n return 'is valid JSON';\n }", "function validateResponse($page) {\n\treturn array_key_exists('headers', $page) && array_key_exists('headersRaw', $page) && array_key_exists('body', $page) && array_key_exists('error', $page)\n\t\t&& is_array($page['headers']) && is_array($page['headersRaw']) && is_string($page['body']);\n}", "public function contains($text)\n {\n return strpos($this->text, $text) !== false;\n }", "public function hasContent() {}", "public function hasReturnBody()\n {\n return isset($this->return_body);\n }", "public function testAssertResponseRegExp(): void\n {\n $this->_response = new Response();\n $this->_response = $this->_response->withStringBody('Some content');\n\n $this->assertResponseRegExp('/cont/');\n }", "public abstract function isTextPart();", "public function isText() {\n\t\treturn MimeType::isText($this);\n\t}", "public function isText()\n {\n return $this->getName() === 'text';\n }", "public function testInvalidTextMatchingCaseInsensitive()\n {\n $mock = Mockery::mock('ZafBoxRequest');\n\n $test_result = new stdClass;\n $test_result->status_code = 200;\n $test_result->body = '<html><body><h1 class=\"active hover\">Some Text</h1></body></html>';\n $mock->shouldReceive('get')->andReturn($test_result);\n\n // set the requests object to be our stub\n IoC::instance('requests', $mock);\n\n $tester = IoC::resolve('tester');\n\n $result = $tester->test('text', 'http://dhwebco.com', array(\n 'text' => 'Text not present',\n ));\n\n $this->assertFalse($result);\n }", "public function setBodyText($text);", "public function dontSeeText($text)\n {\n return $this->assertInPage(new HasText($text), true);\n }", "public function noteBody(string $body):bool\n {\n $bool = null;\n if (isset($body)) {\n if(strlen($body) < 1000) {\n $bool = true;\n } else {\n $bool = false;\n }\n }\n return $bool;\n }", "public function accept($text)\n {\n return strpos($text, ':20:STARTUMS') !== false;\n }", "private function isHtml(Response $response): bool\n {\n return 0 === strpos($response->headers->get('Content-Type'), 'text/html');\n }", "public function assertResponseContains($content)\n {\n $this->assertContains(\n $content,\n $this->getResponse()->getBody(),\n \"Failed asserting that response contains '$content'\"\n );\n }", "abstract public function hasContent();", "static public function checkText($text)\n {\n $textErrs = [];\n if (empty($text))\n {\n $textErrs[] = 'Prosím zadajte text';\n }\n return $textErrs;\n }", "private function _check_valid_response($http_body_json = '')\n {\n if(!in_array($this->status_code, $this->valid_response_codes))\n {\n //@todo log bad response info\n $body_string = '';\n $body_array = array();\n $body_array = json_decode($http_body_json, true);\n if(!empty($body_array))\n {\n foreach($body_array as $k => $v)\n {\n $body_string .= \"$k: $v \";\n }\n }\n\n $x_message_data = 'X-Chirpify-Message: ' . $body_string;\n header($x_message_data);\n $header_data = 'HTTP/1.1 ' . $this->status_code;\n header($header_data);\n\n exit();\n }\n }", "abstract protected function checkExistingResponse();", "public function isText()\n {\n return $this->isBinary() === false;\n }", "public function isText(): bool\n\t{\n\t\treturn $this->isOfType( static::TYPE_TEXT );\n\t}", "public function testInvalidElementMatchingWithText() \n {\n $mock = Mockery::mock('ZafBoxRequest');\n\n $test_result = new stdClass;\n $test_result->status_code = 200;\n $test_result->body = '<html><body><h1>Some Text</h1></body></html>';\n $mock->shouldReceive('get')->andReturn($test_result);\n\n // set the requests object to be our stub\n IoC::instance('requests', $mock);\n\n $tester = IoC::resolve('tester');\n\n $result = $tester->test('element', 'http://dhwebco.com', array(\n 'tag' => 'h1',\n 'inner_text' => 'This is not the right text',\n ));\n\n $this->assertFalse($result);\n }", "public function testAssertResponseNotContains(): void\n {\n $this->_response = new Response();\n $this->_response = $this->_response->withStringBody('Some content');\n\n $this->assertResponseNotContains('contents');\n }", "function check_esewa_response() {\n\n\t\t\t@ob_clean();\n\n\t\t\tif ( ! empty( $_REQUEST ) && $this->check_esewa_response_is_valid() ) {\n\n\t\t\t\tdo_action( 'valid-esewa-standard-response' );\n\n\t\t\t} else {\n\n\t\t\t\twp_die( 'eSewa Response Validation Failure' );\n\n\t\t\t}\n\n\t\t}", "protected function assertPageContain($string)\n {\n // Set error message\n $message = 'Page doesn\\'t contain \"'.$string.'\"';\n \n $this->assertTrue(strpos($this->response->getContent(), $string) !== false, $message);\n }", "public static function isValidBodyType($type) {\n $types = array(\n self::TYPE_BEST,\n self::TYPE_HTML,\n self::TYPE_TEXT,\n );\n\n return in_array($type, $types);\n }", "private function checkSpecialConditions(TelegramMethods $method)\r\n { \r\n $method->check_reply_markup();\r\n }", "public function validate_post_text($text) {\n session_start();\n\n // Überprüfen ob der Nutzer eingeloggt ist\n if (isset($_SESSION['isLoggedIn']) && !empty($_SESSION['userid'])) {\n\n // Eingabe validieren (Werte sind gesetzt)\n if (isset($text)) {\n\n // Eingabe validieren (Werte sind nicht leer)\n if (!empty($text)) {\n return true;\n } else {\n header('/post/details?error=Bitte lasse keine Eingabe leer'); // Mit Fehler returnen, dass Werte leer waren\n return false;\n }\n\n } else {\n header('/post/details?error=Bitte gib überall einen Wert an'); // Mit Fehler returnen, dass Werte fehlen\n return false;\n }\n\n } else {\n header('Location: /user/login/?error=Bitte logge dich ein, um einen Post erstellen zu können!'); // Mit Fehler returnen, dass Nutzer nicht eingeloggt war\n return false;\n }\n }", "private function checkResponse ($string) {\n if (substr($string, 0, 3) !== '+OK') {\n $this->error = array(\n 'error' => \"Server reported an error: $string\",\n 'errno' => 0,\n 'errstr' => ''\n );\n\n if ($this->do_debug >= 1) {\n $this->displayErrors();\n }\n\n return false;\n } else {\n return true;\n }\n\n }", "public function testAssertResponseNotRegExp(): void\n {\n $this->_response = new Response();\n $this->_response = $this->_response->withStringBody('Some content');\n\n $this->assertResponseNotRegExp('/cant/');\n }", "public function testGetValidMessageByMessageText(){\n\t\t//create a new message\n\t\t$newMessage =new message (null, $this->VALID_MESSAGE_ID, $this->VALID_LISTING_Id, $this->VALID_ORG_ID, $this->VALID_MESSAGE_ID, $this->VALID_MESSAGE_TEXT);\n\t\t$newMessage->insert($this->getPDO());\n\n\t\t//grab the data from guzzle\n\t\t$response = $this->guzzle->get('http://bootcamp-coders.cnm.edu/~bread-basket/public_html/php/api/message/' . $newMessage-getMessage());\n\t\t$this->assertSame($response->getStatusCode(),200);\n\t\t$body = $response->getBody();\n\t\t$alertLevel = json_decode ($body);\n\t\t$this->assertSame(200, $alertLevel->status);\n\t}", "public function okayContent( $sContent ) {\n\t\t\n\t\t$sContent = strtolower( trim( $sContent ) );\n\t\t\n\t\tif ( $sContent ) {\n\t\t\t\n\t\t\tforeach ( self::$_aContentFilter as $sFilter ) {\n\t\t\t\tif ( FALSE !== strpos( $sContent, $sFilter ) ) {\n\t\t\t\t\treturn FALSE;\t\t\t\t\t// found bad string !!!\n\t\t\t\t}\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}", "static function checkTweetMessage($message) {\n if(strlen($message) <= 140) {\n return true;\n }\n return false;\n }", "protected function check_2_body(Request $request, Response $response, array &$args)\n {\n return true;\n }", "function verify_content($content) // Colorize: green\n { // Colorize: green\n return isset($content) // Colorize: green\n && // Colorize: green\n is_string($content) // Colorize: green\n && // Colorize: green\n $content != \"\"; // Colorize: green\n }", "protected function assertFieldContainsRawText(string $field_name, string $text): void {\n $this->assertTrue((bool) preg_match('/' . preg_quote($text, '/') . '/ui', $this->getFieldHtml($field_name)));\n }", "public function isTextValid(string $text): bool\n {\n $parser = new Node_Container_Document();\n\n if ($this->configData['emoticons']['active']) {\n $parser->add_emoticons($this->configData['emoticons']['path']);\n }\n\n $this->errorText = '';\n $result = true;\n try {\n $parser->parse($text)\n ->detect_links()\n ->detect_emails();\n\n if ($this->configData['emoticons']['active']) {\n $parser->detect_emoticons();\n }\n\n $parser->get_html();\n\n } catch (\\Exception $e) {\n $result = false;\n $this->errorText = $e->getMessage();\n } catch (\\Throwable $e) {\n $result = false;\n $this->errorText = $e->getMessage();\n }\n\n return $result;\n }", "function verify_request ($body) {\n\tglobal $config;\n\treturn strpos($_SERVER['HTTP_USER_AGENT'], 'GitHub-Hookshot') !== false &&\n\t\thash_equals($_SERVER['HTTP_X_HUB_SIGNATURE'], 'sha1=' . hash_hmac('sha1', $body, $config->token));\n}", "protected function assertText($text) {\n @trigger_error('AssertLegacyTrait::assertText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseContains() or $this->assertSession()->pageTextContains() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);\n if (func_num_args() > 1) {\n @trigger_error('Calling AssertLegacyTrait::assertText() with more than one argument is deprecated in drupal:8.2.0 and the method is removed from drupal:10.0.0. Use $this->assertSession()->responseContains() or $this->assertSession()->pageTextContains() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);\n }\n // Cast MarkupInterface to string.\n $text = (string) $text;\n\n $content_type = $this->getSession()->getResponseHeader('Content-type');\n // In case of a Non-HTML response (example: XML) check the original\n // response.\n if (strpos($content_type, 'html') === FALSE) {\n $this->assertSession()->responseContains($text);\n }\n else {\n // Trying to simulate what the user sees, given that it removes all text\n // inside the head tags, removes inline JavaScript, fix all HTML entities,\n // removes dangerous protocols and filtering out all HTML tags, as they are\n // not visible in a normal browser.\n $raw_content = preg_replace('@<head>(.+?)</head>@si', '', $this->getSession()->getPage()->getContent());\n $page_text = Xss::filter($raw_content, []);\n $this->assertStringContainsString($text, $page_text, \"\\\"$text\\\" found\");\n }\n }", "public function shouldAddBody()\n\t{\n\t\t// done? definitely don't add the body\n\t\tif ($this->done)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// eval'd and false? don't show the body\n\t\tif ($this->last_could_eval == TRUE && $this->last_result == FALSE)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "public function validateIdentDataXmlResponse($bodyText)\n {\n //Log\n Mage::helper(\"postident/data\")->logWebserviceResponse(\n \"IdentData\", \n $bodyText\n );\n \n try {\n $simpleXMLResponse = simplexml_load_string($bodyText);\n if (isset($simpleXMLResponse->givenname)) {\n return $simpleXMLResponse;\n } else {\n //throw DeutschePost_Postident_Model_Client_Response_Exception\n DeutschePost_Postident_Model_Client_Response_Exception::throwValidateXMlResponseError('XML Validation failed.');\n }\n } catch (Exception $e) {\n //throw DeutschePost_Postident_Model_Client_Response_Exception\n DeutschePost_Postident_Model_Client_Response_Exception::throwValidateXMlResponseError($e->getMessage());\n }\n }", "public function test_all_item_listed_or_no_listed_items_message_is_displayed()\n {\n $response = $this->get('/');\n if($response->assertSeeText(\"Details\")){\n $response->assertDontSeeText(\"Sorry not items have been listed yet. Please check back later.\");\n } else {\n $response->assertSeeText(\"Sorry not items have been listed yet. Please check back later.\");\n }\n }", "function ok()\r\n {\r\n \tif (!$this->_socket || !is_resource($this->_socket)) {\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n \t$response = $this->getresp();\r\n\t\tforeach ($response as $v)\r\n\t\t{\r\n\t\t\tif (!empty($v) && !preg_match(\"/^[123]/\", $v)) return false;\r\n\t\t}\r\n\t\treturn true;\r\n\t\t/*\r\n\t\tif (ereg(\"^[123]\", $response)) {\r\n \t\treturn TRUE;\r\n \t} else {\r\n \t\treturn FALSE;\r\n \t}*/\r\n }", "public function testTextMatchingCaseInsensitive()\n {\n $mock = Mockery::mock('ZafBoxRequest');\n\n $test_result = new stdClass;\n $test_result->status_code = 200;\n $test_result->body = '<html><body><h1 class=\"active hover\">Some Text</h1></body></html>';\n $mock->shouldReceive('get')->andReturn($test_result);\n\n // set the requests object to be our stub\n IoC::instance('requests', $mock);\n\n $tester = IoC::resolve('tester');\n\n $result = $tester->test('text', 'http://dhwebco.com', array(\n 'text' => 'SOME TEXT',\n ));\n\n $this->assertTrue($result);\n }", "public function testAcceptContentTypeWithBody()\n {\n\n $config = ['accepts' => ['text/html']];\n $response = m::mock(Response::class);\n $headers = m::mock(stdClass::class);\n $response->headers = $headers;\n $request = m::mock(Request::class);\n $app = m::mock(ApplicationContract::class);\n\n /*\n |------------------------------------------------------------\n | Expectation\n |------------------------------------------------------------\n */\n\n $response\n ->shouldReceive('isRedirection')->once()->andReturn(false)\n ->shouldReceive('getContent')->once()->andReturn('<body></body>')\n ->shouldReceive('setContent')->once();\n $headers->shouldReceive('get')->with('Content-type')->once()->andReturn('text/html');\n $request->shouldReceive('ajax')->once()->andReturn(false);\n $tracy = new Tracy($config, $app, $request);\n $excepted = $tracy->renderResponse($response);\n\n /*\n |------------------------------------------------------------\n | Assertion\n |------------------------------------------------------------\n */\n\n $this->assertSame($excepted, $response);\n }", "public function canSeeMessageInQueueContainsText($queue, $text) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\ConditionalAssertion('seeMessageInQueueContainsText', func_get_args()));\n }", "public function canSeeMessageInQueueContainsText($queue, $text) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\ConditionalAssertion('seeMessageInQueueContainsText', func_get_args()));\n }", "public static function hasContent(): bool\n {\n return true;\n }", "function testEmptyResponseBody() {\n\t$config = getConfig();\n\t$root = getRootPath();\n\t\n\t// Get the test page.\n\t$http = new \\AutoHttp\\Http($config);\n\t$page = $http->getPage($root .'/test/pages/http/headersonly.php');\n\t\n\t// Validate basic return structure.\n\tif (!validateResponse($page))\n\t\treturn 'Result array was in a bad format.';\n\t\n\t// Check the test header content.\n\tif (!array_key_exists('X-HttpTestHeader', $page['headers']))\n\t\treturn 'Test header doesn\\'t exist.';\t\t\n\tif ($page['headers']['X-HttpTestHeader'] != 'servertestval')\n\t\treturn 'Test header value wasn\\'t what we were expecting.';\n\t\t\n\t// Check the raw headers.\n\tif (count($page['headersRaw']) < 1 || strpos($page['headersRaw'][0], '200 OK') === false)\n\t\treturn 'Raw headers should contain the HTTP response code.';\n\t\t\n\t// Make sure the body is empty.\n\tif (strlen($page['body']) !== 0)\n\t\treturn 'Response body length should be 0.';\n\t\t\n\treturn true;\n}", "public function hasInfluencedContent();", "public function hasExplicitText(): bool\n {\n return isset($this->text);\n }", "private function testResponseBody($body)\n {\n\n if ( empty($body) ) {\n\n throw (new LarastackPaystackException());\n }\n\n $bodyArray = json_decode($body, true);\n\n if ( empty($bodyArray['status']) || !$bodyArray['status'] || empty($bodyArray['data'])) {\n\n throw (new LarastackPaystackException());\n }\n\n return $bodyArray['data'];\n }", "public function body($body);", "public function containsJson(): bool\n {\n return Str::contains($this->getContentType(), 'application/json');\n }", "static public function text_plain($request_body)\n {\n return $request_body;\n }", "protected function assertNoText($text) {\n @trigger_error('AssertLegacyTrait::assertNoText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseNotContains() or $this->assertSession()->pageTextNotContains() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);\n if (func_num_args() > 1) {\n @trigger_error('Calling AssertLegacyTrait::assertNoText() with more than one argument is deprecated in drupal:8.2.0 and the method is removed from drupal:10.0.0. Use $this->assertSession()->responseNotContains() or $this->assertSession()->pageTextNotContains() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);\n }\n\n // Cast MarkupInterface to string.\n $text = (string) $text;\n\n $content_type = $this->getSession()->getResponseHeader('Content-type');\n // In case of a Non-HTML response (example: XML) check the original\n // response.\n if (strpos($content_type, 'html') === FALSE) {\n $this->assertSession()->responseNotContains($text);\n }\n else {\n // Trying to simulate what the user sees, given that it removes all text\n // inside the head tags, removes inline JavaScript, fix all HTML entities,\n // removes dangerous protocols and filtering out all HTML tags, as they are\n // not visible in a normal browser.\n $raw_content = preg_replace('@<head>(.+?)</head>@si', '', $this->getSession()->getPage()->getContent());\n $page_text = Xss::filter($raw_content, []);\n $this->assertStringNotContainsString($text, $page_text, \"\\\"$text\\\" not found\");\n }\n }", "private function checkResponseFormat(){\n\n }", "public function testElementMatchingWithText() \n {\n $mock = Mockery::mock('ZafBoxRequest');\n\n $test_result = new stdClass;\n $test_result->status_code = 200;\n $test_result->body = '<html><body><h1>Hi!</h1></body></html>';\n $mock->shouldReceive('get')->andReturn($test_result);\n\n // set the requests object to be our stub\n IoC::instance('requests', $mock);\n\n $tester = IoC::resolve('tester');\n\n $result = $tester->test('element', 'http://dhwebco.com', array(\n 'tag' => 'h1',\n 'inner_text' => 'Hi!',\n ));\n\n $this->assertTrue($result);\n }", "public function testInvalidTextMatchingCaseSensitive()\n {\n $mock = Mockery::mock('ZafBoxRequest');\n\n $test_result = new stdClass;\n $test_result->status_code = 200;\n $test_result->body = '<html><body><h1 class=\"active hover\">Some Text</h1></body></html>';\n $mock->shouldReceive('get')->andReturn($test_result);\n\n // set the requests object to be our stub\n IoC::instance('requests', $mock);\n\n $tester = IoC::resolve('tester');\n\n $result = $tester->test('text', 'http://dhwebco.com', array(\n 'text' => 'SOME Text',\n 'case_sensitive' => TRUE,\n ));\n\n $this->assertFalse($result);\n }", "function isPostResult($result) {\n return (preg_match(\"/entry xml:lang=\\\"en\\\"/\", $result)\n && preg_match(\"/<title/\", $result)\n && preg_match(\"/<ss:community/\", $result));\n}", "abstract public function hasUTF();", "public function containsHtml(string $text): bool\n {\n return $text !== \\htmlspecialchars_decode($text);\n }", "protected function isContentToBeParsed() {\n\t\t$result = FALSE;\n\t\t$currentPageUid = $GLOBALS['TSFE']->id;\n\t\t// get rootline of the current page\n\t\t$rootline = $GLOBALS['TSFE']->sys_page->getRootline($currentPageUid);\n\t\t// build an array of uids of pages the rootline\n\t\tfor ($i=count($rootline)-1; $i>=0; $i--) {\n\t\t\t$pageUidsInRootline[] = $rootline[\"$i\"]['uid'];\n\t\t}\n\t\t// check if the root page is in the rootline of the current page\n\t\tforeach (t3lib_div::trimExplode(',',$this->settings['includeRootPages'],1) as $includeRootPageUid) {\n\t\t\tif (t3lib_div::inArray((array)$pageUidsInRootline,$includeRootPageUid))\n\t\t\t\t$result = TRUE;\n\t\t}\n\t\tforeach (t3lib_div::trimExplode(',',$this->settings['excludeRootPages'],1) as $excludeRootPageUid) {\n\t\t\tif (t3lib_div::inArray((array)$pageUidsInRootline,$excludeRootPageUid))\n\t\t\t\t$result = FALSE;\n\t\t}\n\t\tif (t3lib_div::inList($this->settings['includePages'],$currentPageUid)) {\n\t\t\t$result = TRUE;\n\t\t}\n\t\tif (t3lib_div::inList($this->settings['excludePages'],$currentPageUid)) {\n\t\t\t$result = FALSE;\n\t\t}\n\t\tif ( $GLOBALS['TSFE']->page['f3_contentparser_dont_parse'] == 1) {\n\t\t\t$result = FALSE;\n\t\t}\n\t\t// if ( $this->cObj->getFieldVal('f3_contentparser_dont_parse') == 1) {\n\t\t// \t$result = FALSE;\n\t\t// }\n\n\t\treturn $result;\n\t}", "public function contentNotGiven()\n {\n return empty($this->content);\n }", "public function seeMessageInQueueContainsText($queue, $text)\n {\n $msg = $this->getChannel()->basic_get($queue);\n if (!$msg) {\n $this->fail(\"Message was not received\");\n }\n if (!$msg instanceof AMQPMessage) {\n $this->fail(\"Received message is not format of AMQPMessage\");\n }\n $this->debugSection(\"Message\", $msg->body);\n $this->assertStringContainsString($text, $msg->body);\n }", "public function isAcceptable(string $text): bool\n {\n return ($this->getProhibitedWordsCount($text) == 0) ? true : false;\n }", "private function hasHTMLTags()\n {\n return !(strcmp($this->content, strip_tags($this->content)) == 0);\n }", "public function hasMessage(): bool\n {\n return $this->hasJson('message');\n }", "public function hasContent(){ return !empty($this->content); }", "public function testGetInvalidMessageByMessageText(){\n\t\t//create a new message\n\t\t$newMessage =new message (null, $this->VALID_MESSAGE_ID, $this->VALID_LISTING_Id, $this->VALID_ORG_ID, $this->VALID_MESSAGE_ID, $this->VALID_MESSAGE_TEXT);\n\t\t$newMessage->insert($this->getPDO());\n\n\t\t//grab the data from guzzle\n\t\t$response = $this->guzzle->get('http://bootcamp-coders.cnm.edu/~bread-basket/public_html/php/api/message/' . $newMessage-getMessage());\n\t\t$this->assertSame($response->getStatusCode(),200);\n\t\t$body = $response->getBody();\n\t\t$alertLevel = json_decode ($body);\n\t\t$this->assertSame(200, $alertLevel->status);\n\t}", "protected function _containsEmail($text) {\n\t\treturn preg_match('/[\\w!#$%&\\'*+\\/=?`{|}~^-]+(?:\\.[!#$%&\\'*+\\/=?`{|}~^-]+)*@(?:[A-Z0-9-]+\\.)+[A-Z]{2,6}/i', $text);\n\t}", "private function processBody($text) {\n $text = $this->processImages($text);\n $text = $this->processLinks($text);\n return $text->html();\n }", "public function isRTF() {\r\n return substr($this->contents, 2, 3) === \"rtf\";\r\n }", "public function assertEmailTextBodyContains(string $text, Email $email = null): void\n {\n $email = $this->verifyEmailObject($email, __FUNCTION__);\n $this->assertThat($email, new MimeConstraint\\EmailTextBodyContains($text));\n }", "public function is_true_body_empty()\n {\n return $this->get_true_body() === '' || $this->get_true_body() === null;\n }", "public function testBodyGenerateText()\n {\n /* @var $body \\Zend\\Mime\\Message */\n $this->message->setBody( '<b>foo-bar</b>' );\n $body = $this->message->getBody();\n\n $this->assertInstanceOf( 'Zend\\Mime\\Message', $body );\n $this->assertMimeMessages(\n array(\n 'text/html' => '<b>foo-bar</b>',\n 'text/plain' => 'foo-bar',\n ),\n $body\n );\n }" ]
[ "0.74811125", "0.73613584", "0.6431327", "0.634694", "0.614299", "0.6070325", "0.6069794", "0.6002103", "0.6002103", "0.5862571", "0.5849959", "0.58426076", "0.5829357", "0.5777618", "0.5728604", "0.5713777", "0.5702664", "0.56835735", "0.5682098", "0.5673549", "0.5609396", "0.55962646", "0.5577738", "0.5577738", "0.5541912", "0.5539917", "0.553922", "0.54688656", "0.54578406", "0.5431738", "0.54301476", "0.542599", "0.54185635", "0.54154783", "0.54144585", "0.53741163", "0.53699654", "0.5367419", "0.53639936", "0.5342007", "0.5335859", "0.5334176", "0.53253114", "0.53245676", "0.5318491", "0.5312378", "0.5297589", "0.5283916", "0.5262305", "0.52115405", "0.52097374", "0.5206406", "0.51974815", "0.5188471", "0.51657975", "0.51654416", "0.516176", "0.5149184", "0.514545", "0.51314807", "0.51293457", "0.5126777", "0.51082474", "0.5103494", "0.5096736", "0.5084836", "0.5084296", "0.5082898", "0.507992", "0.50771326", "0.50771326", "0.5068193", "0.50618035", "0.50611776", "0.50552136", "0.50518167", "0.50480354", "0.5038049", "0.5032841", "0.50321245", "0.50314", "0.5017421", "0.4996632", "0.49887037", "0.4981016", "0.49778616", "0.49648434", "0.4959725", "0.49501362", "0.49487647", "0.4948496", "0.49451417", "0.4930819", "0.49251568", "0.49204698", "0.49202648", "0.49155828", "0.4915353", "0.4915002", "0.49140772" ]
0.5527051
27
Fields to be shown on create/edit forms
protected function configureFormFields(FormMapper $formMapper) { $formMapper ->add('nombre', 'text', array('label' => 'Nombre del tipo')) ->add('estado', 'choice', array('choices' => array('1' => 'Activo', '0' => 'Inactivo'))) ->add('imagen', 'sonata_media_type', array( 'provider' => 'sonata.media.provider.image', 'context' => 'tarjetas' )) ->add('imagenes', 'sonata_type_collection', array('by_reference' => false), array('edit' => 'inline')) // ->add('imagenes', 'sonata_type_collection', array( // 'cascade_validation' => true, // ), array( // 'edit' => 'inline', // 'inline' => 'table', // 'link_parameters' => array('context' => 'default') // ) // ) //if no type is specified, SonataAdminBundle tries to guess it ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createFormFields() {\n\t}", "function extraFields() {\n\t\n\t\t$file_id = JRequest::getVar('id');\n\t\t$filename = JRequest::getVar('filename');\n\t\t\n\t\tif (!$filename) {\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$model = $this->getModel();\n\t\t$form = $model->getFieldForm($file_id, 'bulk');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\">';\n\t\techo '<legend>Edit '.$filename.'</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}", "function fields() {\n return array(\n 'title' => 'The title of the content',\n 'fieldname' => t('fieldname'),\n 'title' => t('title'),\n 'label' => t('Label'),\n 'data_type' => t('data type'),\n 'html_type' => t('html_type'),\n );\n }", "public function instance_fields() { \n\n\t\t$fields['name'] \t= array('description'=>_('Instance Name'),'type'=>'textbox'); \n\t\t$fields['host'] \t= array('description'=>_('Hostname'),'type'=>'textbox'); \n\t\t$fields['port']\t\t= array('description'=>_('Port'),'type'=>'textbox'); \n\t\t$fields['password']\t= array('description'=>_('Password'),'type'=>'textbox'); \n\n\t\treturn $fields; \n\n\t}", "public static function form_fields(){\n\n \treturn [\n [\n \t'id'=> 'description',\n \t'name'=> 'description', \n \t'desc'=> 'Description', \n \t'val'=>\tnull, \n \t'type'=> 'text',\n \t'maxlength'=> 255,\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'rate',\n \t'name'=> 'rate', \n \t'desc'=> 'Discount Rate', \n \t'val'=>\tnull, \n \t'type'=> 'number',\n \t'min'=> 0,\n \t'max'=> 100,\n \t'step'=> '0.01',\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'stat',\n \t'name'=> 'stat', \n \t'desc'=> 'isActive', \n \t'val'=>1, \n \t'type'=> 'checkbox',\n ],\n ];\n\n }", "public function get_edit_form_fields()\n\t{\n\t\t$creditsInputted = optional_param('credits', 0, PARAM_TEXT);\n\t\tif($creditsInputted == 0)\n\t\t{\n if(isset($this->id) && $this->id != -1)\n {\n $creditsInputted = $this->credits;\n }\n else\n {\n $creditsInputted = $this->get_default_credits();\n }\n\t\t}\n\t\treturn '<div class=\"inputContainer\"><div class=\"inputLeft\">'.\n '<label for=\"credits\">'.$this->get_credits_display_name(). \n ' : </label></div><div class=\"inputRight\"><input type=\"text\"'.\n 'name=\"credits\" id=\"credits\" value=\"'.$creditsInputted.'\"/></div></div>';\n\t}", "public function getFormCustomFields(){\n\t}", "protected function getCreateFormFields()\n {\n return $this->formFields();\n }", "function init_form_fields() {\n\n $this->form_fields = array(\n\n 'enabled' => array(\n 'title' => 'Активировать',\n 'type' => 'checkbox',\n 'description' => 'Активировать способ доставки КС2008',\n 'default' => 'yes'\n ),\n\n 'title' => array(\n 'title' => 'Заголовок',\n 'type' => 'text',\n 'description' => 'Заговок способа доствки КС2008',\n 'default' => 'Курьерская служба 2008 '\n ),\n\n 'description' => array(\n 'title' => 'Описание',\n 'type' => 'text',\n 'description' => 'Описание способа доставки КС2008',\n 'default' => 'Выберите для доставки через КС2008'\n ),\n\n );\n\n }", "public function addMetaFieldsToEditForm()\n\t{\n\t\t$interval = $this->getMetaFields('interval');\n\t\t$animation = $this->getMetaFields('animation');\n\n\t\t?>\n\t\t\t<tr class=\"form-field\">\n\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t<label for=\"interval\">Tijd tussen slides</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<input name=\"interval\" id=\"interval\" type=\"text\" value=\"<?php echo $interval;?>\" size=\"40\">\n\t\t\t\t\t<p class=\"description\">De tijd tussen slides in milliseconden (1000ms = 1s).</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr class=\"form-field\">\n\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t<label for=\"animation\">Animatie</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<select name=\"animation\" id=\"animation\">\n\t\t\t\t\t\t<option <?php selected($animation, 'slide'); ?> value=\"slide\">Slide</option>\n\t\t\t\t\t\t<option <?php selected($animation, 'fade'); ?> value=\"fade\">Fade</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<p class=\"description\">Selecteer de animatie die gebruikt wordt door de slideshow.</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php\n\t}", "public function buildShowFields()\n {\n $this->addField(\n SharpShowTextField::make('id')\n ->setLabel('Id:')\n )->addField(\n SharpShowTextField::make('name')\n ->setLabel('name:')\n )->addField(\n SharpShowTextField::make('url')\n ->setLabel('url:')\n )->addField(\n SharpShowTextField::make('vendor_id')\n ->setLabel('vendor_id')\n )->addField(\n SharpShowTextField::make('parent_id')\n ->setLabel('parent_id')\n )->addField(\n SharpShowTextField::make('created_at')\n ->setLabel('Created At:')\n )->addField(\n SharpShowTextField::make('updated_at')\n ->setLabel('Updated At:')\n )->addField(\n SharpShowEntityListField::make('products', 'product')\n ->hideFilterWithValue('category', function($instanceId) {\n return $instanceId;\n })\n ->showEntityState(false)\n ->showReorderButton(true)\n ->showCreateButton(false)\n );\n }", "public function getFrontendFields();", "abstract function buildShowFields(): void;", "public static function fields()\n {\n return [\n 'name' => 'text',\n 'lastname' => 'text',\n 'password' => 'password',\n 'email' => 'email',\n 'github_username' => 'text',\n ];\n }", "public function buildFormFields()\n {\n $this->addField(\n SharpFormTextField::make('title')\n ->setLabel('Title')\n )->addField(\n SharpFormUploadField::make('cover')\n ->setLabel('Cover')\n ->setFileFilterImages()\n ->setCropRatio('1:1')\n ->setStorageBasePath('data/service')\n )->addField(\n SharpFormNumberField::make('price')\n ->setLabel('Price')\n )->addField(\n SharpFormMarkdownField::make('description')->setToolbar([\n SharpFormMarkdownField::B, SharpFormMarkdownField::I,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::IMG,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::A,\n ])\n )->addField(\n SharpFormTagsField::make('tags',\n Tag::orderBy('label')->get()->pluck('label', 'id')->all()\n )->setLabel('Tags')\n ->setCreatable(true)\n ->setCreateAttribute('name')\n );\n }", "function field(){\n\t\t\t$this->aah->check_access();\n\n\t\t\t$nav_id = $this->aah->get_nav_id(__CLASS__.'/field');\n\t\t\t$read_access = $this->aah->check_privilege('read',$nav_id);\n\t\t\t$add_access = $this->aah->check_privilege('add',$nav_id);\n\n\t\t\tif($read_access)\n\t\t\t{\n\t\t\t\t$this->global_model->reinitialize_dao();\n\t\t\t\t$dao = $this->global_model->get_dao();\n\t\t\t\t$data['active_url'] = str_replace('::','/',__METHOD__);\n\t\t\t\t$data['dt2_rows'] = $dao->execute(0,\"SELECT * FROM ref_dt2 WHERE provinsi_id='\".$this->_SYS_PARAMS[1].\"'\")->result_array();\n\t\t\t\t$data['form_id'] = \"search-school-form\";\n\t\t\t\t$data['active_controller'] = $this->active_controller;\n\t\t\t\t$data['containsTable'] = true;\n\t\t\t\t$data['add_access'] = $add_access;\n\t\t\t\t$this->backoffice_template->render($this->active_controller.'/field/index',$data);\n\t\t\t}else{\n\t\t\t\t$this->error_403();\n\t\t\t}\n\t\t}", "protected function _fields()\n\t{\n\t\treturn array(\n\t\t\t\t'name',\n\t\t\t 'intro', 'sort_order',\n\t\t\t 'status', 'feature',\n\t\t);\n\t}", "public function init_form_fields(){\n \n\t\t$this->form_fields = array(\n\t\t\t'enabled' => array(\n\t\t\t\t'title' => 'Enable/Disable',\n\t\t\t\t'label' => 'Enable Vortex Gateway',\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'description' => '',\n\t\t\t\t'default' => 'no'\n\t\t\t),\n\t\t\t'title' => array(\n\t\t\t\t'title' => 'Title',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => 'This controls the title which the user sees during checkout.',\n\t\t\t\t'default' => 'Vortex Payment',\n\t\t\t\t'desc_tip' => true,\n\t\t\t),\n\t\t\t'description' => array(\n\t\t\t\t'title' => 'Description',\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'description' => 'This controls the description which the user sees during checkout.',\n\t\t\t\t'default' => 'Paga con Vortex Payment.',\n\t\t\t),\n\t\t\t'BID' => array(\n\t\t\t\t'title' => 'Business ID',\n\t\t\t\t'type' => 'text'\n\t\t\t)\n\n\t\t\t);\n \n\t \t}", "public function add_edit_form_fields() {\r\n\r\n\t\t?>\r\n\r\n\t\t<input type=\"hidden\" name=\"yz_edit_activity_nonce\" value=\"<?php echo wp_create_nonce( 'youzer-edit-activity' ); ?>\">\r\n\r\n\t\t<?php\r\n\r\n\t}", "public function form_fields() {\n\t\treturn apply_filters( \"appthemes_{$this->box_id}_metabox_fields\", $this->form() );\n\t}", "public function instance_fields() {\n\n\n\n }", "function getCategoryFields() {\n\t\t\n\t\t$model = $this->getModel();\n\t\t$category_id = JRequest::getVar('id');\n\t\t$form = $model->getFieldForm($category_id, 'category');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\" >';\n\t\techo '<legend>New Category</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "protected function fields()\n\t{\n\t\treturn array(\n\t\t\t# type will default to string, will be rendered as a normal text input\n\t\t\t'name' => array(\n\t\t\t\t'required' => true, # client is required to fill in this field\n\t\t\t),\n\n\t\t\t# use default submit button\n\t\t\t'submit' => true,\n\t\t);\n\t}", "public function xfields() {\n\t\t\n\t\t/* Load Model */\n\t\t$fields = $this->getModel ( 'field' );\n\t\t\n\t\t/* Get all rows */\n\t\t$fields->getAll ( 'form_id = \"' . $this->_getFormId () . '\"' );\n\t\t\n\t\tif (! count ( $fields->rows )) {\n\t\t\t$this->_redirect ( '_newField' );\n\t\t\treturn;\n\t\t}\n\t\t/* set the view file (optional) */\n\t\t$this->setView ( 'fields' );\n\t\t\n\t\t/* set last view into session */\n\t\t$this->session->returnto ( $this->getView () );\n\t}", "abstract protected function getFormIntroductionFields();", "public function fields()\n {\n return [\n Text::make('Name')\n ->value($this->model->name),\n ];\n }", "public function show()\n\t{\n\t\t// Set title\n\t\t$this->setTitle('K2_EXTRA_FIELDS');\n\n\t\t// Set user states\n\t\t$this->setUserStates();\n\n\t\t// Set pagination\n\t\t$this->setPagination();\n\n\t\t// Set rows\n\t\t$this->setRows();\n\n\t\t// Set filters\n\t\t$this->setFilters();\n\n\t\t// Set toolbar\n\t\t$this->setToolbar();\n\n\t\t// Set menu\n\t\t$this->setMenu();\n\n\t\t// Set Actions\n\t\t$this->setListActions();\n\n\t\t// Render\n\t\tparent::render();\n\t}", "public function extra_form_fields() {\n\t?>\n\t\t<tr valign=\"top\">\n\t\t\t<th scope=\"row\"><?php _e( 'Make slider featured randomly?', $this->textdomain ); ?></th>\n\t\t\t<td><input type=\"checkbox\" name=\"slider_featured\" value=\"1\" checked=\"checked\" /></td>\n\t\t</tr>\n\t<?php\n\t}", "public function getCMSFields()\n {\n $commentField = $this->AllowHtml ? HTMLEditorField::class : TextareaField::class;\n $fields = new FieldList(\n $this\n ->obj('Created')\n ->scaffoldFormField($this->fieldLabel('Created'))\n ->performReadonlyTransformation(),\n TextField::create('Name', $this->fieldLabel('Name')),\n $commentField::create('Comment', $this->fieldLabel('Comment')),\n EmailField::create('Email', $this->fieldLabel('Email')),\n TextField::create('URL', $this->fieldLabel('URL')),\n FieldGroup::create(array(\n CheckboxField::create('Moderated', $this->fieldLabel('Moderated')),\n CheckboxField::create('IsSpam', $this->fieldLabel('IsSpam')),\n ))\n ->setTitle(_t(__CLASS__ . '.OPTIONS', 'Options'))\n ->setDescription(_t(\n __CLASS__ . '.OPTION_DESCRIPTION',\n 'Unmoderated and spam comments will not be displayed until approved'\n ))\n );\n\n // Show member name if given\n if (($author = $this->Author()) && $author->exists()) {\n $fields->insertAfter(\n 'Name',\n TextField::create('AuthorMember', $this->fieldLabel('Author'), $author->Title)\n ->performReadonlyTransformation()\n );\n }\n\n // Show parent comment if given\n if (($parent = $this->ParentComment()) && $parent->exists()) {\n $fields->push(new HeaderField(\n 'ParentComment_Title',\n _t(__CLASS__ . '.ParentComment_Title', 'This comment is a reply to the below')\n ));\n // Created date\n // FIXME - the method setName in DatetimeField is not chainable, hence\n // the lack of chaining here\n $createdField = $parent\n ->obj('Created')\n ->scaffoldFormField($parent->fieldLabel('Created'));\n $createdField->setName('ParentComment_Created');\n $createdField->setValue($parent->Created);\n $createdField->performReadonlyTransformation();\n $fields->push($createdField);\n\n // Name (could be member or string value)\n $fields->push(\n $parent\n ->obj('AuthorName')\n ->scaffoldFormField($parent->fieldLabel('AuthorName'))\n ->setName('ParentComment_AuthorName')\n ->setValue($parent->getAuthorName())\n ->performReadonlyTransformation()\n );\n\n // Comment body\n $fields->push(\n $parent\n ->obj('EscapedComment')\n ->scaffoldFormField($parent->fieldLabel(self::class))\n ->setName('ParentComment_EscapedComment')\n ->setValue($parent->Comment)\n ->performReadonlyTransformation()\n );\n }\n\n $this->extend('updateCMSFields', $fields);\n return $fields;\n }", "protected function _readFormFields() {}", "public function set_fields() {\n $this->fields = apply_filters('wpucommentmetas_fields', $this->fields);\n foreach ($this->fields as $id => $field) {\n if (!is_array($field)) {\n $this->fields[$id] = array();\n }\n if (!isset($field['label'])) {\n $this->fields[$id]['label'] = ucfirst($id);\n }\n if (!isset($field['admin_label'])) {\n $this->fields[$id]['admin_label'] = $this->fields[$id]['label'];\n }\n if (!isset($field['type'])) {\n $this->fields[$id]['type'] = 'text';\n }\n if (!isset($field['help'])) {\n $this->fields[$id]['help'] = '';\n }\n if (!isset($field['required'])) {\n $this->fields[$id]['required'] = false;\n }\n if (!isset($field['admin_visible'])) {\n $this->fields[$id]['admin_visible'] = true;\n }\n if (!isset($field['admin_column'])) {\n $this->fields[$id]['admin_column'] = false;\n }\n if (!isset($field['admin_list_visible'])) {\n $this->fields[$id]['admin_list_visible'] = false;\n }\n if (!isset($field['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array(\n 'comment_form_logged_in_after',\n 'comment_form_after_fields'\n );\n }\n if (!is_array($this->fields[$id]['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array($this->fields[$id]['display_hooks']);\n }\n }\n }", "public function add_settings_fields()\n\t{\n\t\t$this->add_field(\n\t\t\t'section-info',\n\t\t\t'name',\n\t\t\t'Name',\n\t\t\t'print_field_name',\n\t\t\tarray()\n\t\t);\n\t}", "protected function getFieldsFromShowItem() {}", "public function set_fields() {\n\n\t\t$this->fields = Pngx__Meta__Fields::get_fields();\n\t}", "function fill_in_additional_detail_fields()\n {\n parent::fill_in_additional_detail_fields();\n $this->project_name = $this->_get_project_name($this->project_id);\n $this->resource_name = $this->getResourceName();\n }", "function edit_profile_field_form()\n {\n if ( ! Session::access('can_admin_members'))\n {\n return Cp::unauthorizedAccess();\n }\n\n $type = ($m_field_id = Request::input('m_field_id')) ? 'edit' : 'new';\n\n // Fetch language file\n // There are some lines in the publish administration language file\n // that we need.\n\n $total_fields = '';\n\n if ($type == 'new')\n {\n $total_fields = DB::table('member_fields')->count() + 1;\n }\n\n $query = DB::table('member_fields')\n ->where('m_field_id', $m_field_id)\n ->first();\n\n if (!$query) {\n\n $m_field_name='';\n $m_field_label='';\n $m_field_description='';\n $m_field_type='text';\n $m_field_list_items='';\n $m_field_ta_rows=8;\n $m_field_maxl='';\n $m_field_width='';\n $m_field_search='y';\n $m_field_required='n';\n $m_field_public='y';\n $m_field_reg='n';\n $m_field_order='';\n } else {\n foreach ($query as $key => $val) {\n $$key = $val;\n }\n }\n\n $r = <<<EOT\n\n <script type=\"text/javascript\">\n <!--\n\n function showhide_element(id)\n {\n if (id == 'text')\n {\n document.getElementById('text_block').style.display = \"block\";\n document.getElementById('textarea_block').style.display = \"none\";\n document.getElementById('select_block').style.display = \"none\";\n }\n else if (id == 'textarea')\n {\n document.getElementById('textarea_block').style.display = \"block\";\n document.getElementById('text_block').style.display = \"none\";\n document.getElementById('select_block').style.display = \"none\";\n }\n else\n {\n document.getElementById('select_block').style.display = \"block\";\n document.getElementById('text_block').style.display = \"none\";\n document.getElementById('textarea_block').style.display = \"none\";\n }\n }\n\n -->\n </script>\nEOT;\n\n $title = ($type == 'edit') ? 'members.edit_member_field' : 'members.create_member_field';\n\n $i = 0;\n\n // Form declaration\n\n $r .= Cp::formOpen(array('action' => 'C=Administration'.AMP.'M=members'.AMP.'P=update_profile_fields'.AMP.'U=1'));\n $r .= Cp::input_hidden('m_field_id', $m_field_id);\n $r .= Cp::input_hidden('cur_field_name', $m_field_name);\n\n $r .= Cp::table('tableBorder', '0', '10', '100%').\n '<tr>'.PHP_EOL.\n Cp::td('tableHeading', '', '2').__($title).'</td>'.PHP_EOL.\n '</tr>'.PHP_EOL;\n\n\n // ------------------------------------\n // Field name\n // ------------------------------------\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', Cp::required().NBS.__('members.fieldname')).Cp::quickDiv('littlePadding', __('members.fieldname_cont')), '40%');\n $r .= Cp::tableCell('', Cp::input_text('m_field_name', $m_field_name, '50', '60', 'input', '300px'), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Field label\n // ------------------------------------\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', Cp::required().NBS.__('members.fieldlabel')).Cp::quickDiv('littlePadding', __('members.for_profile_page')), '40%');\n $r .= Cp::tableCell('', Cp::input_text('m_field_label', $m_field_label, '50', '60', 'input', '300px'), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Field Description\n // ------------------------------------\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', __('members.field_description')).Cp::quickDiv('littlePadding', __('members.field_description_info')), '40%');\n $r .= Cp::tableCell('', Cp::input_textarea('m_field_description', $m_field_description, '4', 'textarea', '100%'), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Field order\n // ------------------------------------\n\n if ($type == 'new')\n $m_field_order = $total_fields;\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', __('admin.field_order')), '40%');\n $r .= Cp::tableCell('', Cp::input_text('m_field_order', $m_field_order, '4', '3', 'input', '30px'), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Field type\n // ------------------------------------\n\n $sel_1 = ''; $sel_2 = ''; $sel_3 = '';\n $text_js = ($type == 'edit') ? 'none' : 'block';\n $textarea_js = 'none';\n $select_js = 'none';\n $select_opt_js = 'none';\n\n switch ($m_field_type)\n {\n case 'text' : $sel_1 = 1; $text_js = 'block';\n break;\n case 'textarea' : $sel_2 = 1; $textarea_js = 'block';\n break;\n case 'select' : $sel_3 = 1; $select_js = 'block'; $select_opt_js = 'block';\n break;\n }\n\n // ------------------------------------\n // Create the pull-down menu\n // ------------------------------------\n\n $typemenu = \"<select name='m_field_type' class='select' onchange='showhide_element(this.options[this.selectedIndex].value);' >\".PHP_EOL;\n $typemenu .= Cp::input_select_option('text', __('admin.text_input'), $sel_1)\n .Cp::input_select_option('textarea', __('admin.textarea'), $sel_2)\n .Cp::input_select_option('select', __('admin.select_list'), $sel_3)\n .Cp::input_select_footer();\n\n\n // ------------------------------------\n // Field width\n // ------------------------------------\n\n if ($m_field_width == '') {\n $m_field_width = '100%';\n }\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', __('members.field_width')).Cp::quickDiv('littlePadding', __('members.field_width_cont')), '40%');\n $r .= Cp::tableCell('', Cp::input_text('m_field_width', $m_field_width, '8', '6', 'input', '60px'), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Max-length Field\n // ------------------------------------\n\n if ($m_field_maxl == '') $m_field_maxl = '100';\n\n $typopts = '<div id=\"text_block\" style=\"display: '.$text_js.'; padding:0; margin:5px 0 0 0;\">';\n $typopts .= Cp::quickDiv('defaultBold', __('members.max_length')).Cp::quickDiv('littlePadding', Cp::input_text('m_field_maxl', $m_field_maxl, '4', '3', 'input', '30px'));\n $typopts .= '</div>'.PHP_EOL;\n\n // ------------------------------------\n // Textarea Row Field\n // ------------------------------------\n\n if ($m_field_ta_rows == '') $m_field_ta_rows = '10';\n\n $typopts .= '<div id=\"textarea_block\" style=\"display: '.$textarea_js.'; padding:0; margin:5px 0 0 0;\">';\n $typopts .= Cp::quickDiv('defaultBold', __('members.text_area_rows')).Cp::quickDiv('littlePadding', Cp::input_text('m_field_ta_rows', $m_field_ta_rows, '4', '3', 'input', '30px'));\n $typopts .= '</div>'.PHP_EOL;\n\n // ------------------------------------\n // Select List Field\n // ------------------------------------\n\n $typopts .= '<div id=\"select_block\" style=\"display: '.$select_js.'; padding:0; margin:5px 0 0 0;\">';\n $typopts .= Cp::quickDiv('defaultBold', __('members.pull_down_items')).Cp::quickDiv('default', __('members.field_list_instructions')).Cp::input_textarea('m_field_list_items', $m_field_list_items, 10, 'textarea', '400px');\n $typopts .= '</div>'.PHP_EOL;\n\n\n // ------------------------------------\n // Generate the above items\n // ------------------------------------\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickDiv('littlePadding', Cp::quickSpan('defaultBold', __('admin.field_type'))).$typemenu, '50%', 'top');\n $r .= Cp::tableCell('', $typopts, '50%', 'top');\n $r .= '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Is field required?\n // ------------------------------------\n\n if ($m_field_required == '') $m_field_required = 'n';\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', __('members.is_field_required')), '40%');\n $r .= Cp::tableCell('', __('cp.yes').'&nbsp;'.Cp::input_radio('m_field_required', 'y', ($m_field_required == 'y') ? 1 : '').'&nbsp;'.__('cp.no').'&nbsp;'.Cp::input_radio('m_field_required', 'n', ($m_field_required == 'n') ? 1 : ''), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n\n // ------------------------------------\n // Is field public?\n // ------------------------------------\n\n if ($m_field_public == '') $m_field_public = 'y';\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', __('members.is_field_public')).Cp::quickDiv('littlePadding', __('members.is_field_public_cont')), '40%');\n $r .= Cp::tableCell('', __('cp.yes').'&nbsp;'.Cp::input_radio('m_field_public', 'y', ($m_field_public == 'y') ? 1 : '').'&nbsp;'.__('cp.no').'&nbsp;'.Cp::input_radio('m_field_public', 'n', ($m_field_public == 'n') ? 1 : ''), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Is field visible in reg page?\n // ------------------------------------\n\n if ($m_field_reg == '') $m_field_reg = 'n';\n\n $r .= '<tr>'.PHP_EOL;\n $r .= Cp::tableCell('', Cp::quickSpan('defaultBold', __('members.is_field_reg')).Cp::quickDiv('littlePadding', __('members.is_field_public_cont')), '40%');\n $r .= Cp::tableCell('', __('cp.yes').'&nbsp;'.Cp::input_radio('m_field_reg', 'y', ($m_field_reg == 'y') ? 1 : '').'&nbsp;'.__('cp.no').'&nbsp;'.Cp::input_radio('m_field_reg', 'n', ($m_field_reg == 'n') ? 1 : ''), '60%');\n $r .= '</tr>'.PHP_EOL;\n\n\n $r .= '</table>'.PHP_EOL;\n\n $r .= Cp::div('littlePadding');\n $r .= Cp::required(1).BR.BR;\n\n if ($type == 'edit')\n $r .= Cp::input_submit(__('members.update'));\n else\n $r .= Cp::input_submit(__('cp.submit'));\n\n $r .= '</div>'.PHP_EOL;\n\n $r .= '</form>'.PHP_EOL;\n\n Cp::$title = __('members.edit_member_field');\n Cp::$crumb = Cp::anchor(BASE.'?C=Administration'.AMP.'area=members_and_groups', __('admin.members_and_groups')).\n Cp::breadcrumbItem(Cp::anchor(BASE.'?C=Administration'.AMP.'M=members'.AMP.'P=profile_fields', __('members.custom_member_fields'))).\n Cp::breadcrumbItem(__('members.edit_member_field'));\n Cp::$body = $r;\n }", "public function fields()\n {\n return array_merge(\n parent::fields(),\n [\n 'storeId' => function ($model) {\n return (string)$model->storeId;\n },\n 'phone', 'badge', 'name', 'gender', 'birthday','channel','qrcodeUrl',\n 'isActivated' => function ($model) {\n $status = $model->isActivated ? 'ENABLE' : 'DISABLE';\n return $status;\n },\n 'accountId' => function ($model) {\n return (string) $model->accountId;\n },\n 'createdAt' => function ($model) {\n return MongodbUtil::MongoDate2String($model->createdAt, 'Y-m-d H:i:s');\n },\n ]\n );\n }", "function init_form_fields() {\r\n $this->form_fields = array(\r\n 'enabled' => array(\r\n 'title' => __('Enable/Disable', 'mondido'),\r\n 'type' => 'checkbox',\r\n 'label' => __('Enable mondido Payment Module.', 'mondido'),\r\n 'default' => 'no'),\r\n 'merchant_id' => array(\r\n 'title' => __('Merchant ID', 'mondido'),\r\n 'type' => 'text',\r\n 'description' => __('Merchant ID for Mondido')),\r\n 'secret' => array(\r\n 'title' => __('Secret', 'mondido'),\r\n 'type' => 'text',\r\n 'description' => __('Given secret code from Mondido', 'mondido'),\r\n ),\r\n 'test' => array(\r\n 'title' => __('Test', 'mondido'),\r\n 'type' => 'checkbox',\r\n 'label' => __('Set in testmode.', 'mondido'),\r\n 'default' => 'no')\r\n );\r\n }", "public function getCMSFields()\n {\n $fields = parent::getCMSFields();\n\n // Hide those fields because those values are not useful for standard users.\n $fields->removeByName('Location');\n $fields->removeByName('Region');\n $fields->removeByName('Bucket');\n $fields->removeByName('Key');\n $fields->removeByName('ETag');\n $fields->removeByName('Size');\n\n // Add a human friendly readonly size field\n $fields->addFieldToTab('Root.Main',\n ReadonlyField::create('FakeSize', 'Size', $this->SizeForHuman));\n\n // Display a few usefull bits of data in readonly mod.\n $fields->addFieldToTab('Root.Main',\n ReadonlyField::create('Type', 'Type'));\n $fields->addFieldToTab('Root.Main',\n DatetimeField_Readonly::create('LastModified', 'Last Modified'));\n\n\n return $fields;\n }", "function init_form_fields()\n {\n\n $this->form_fields = array(\n\n 'enabled' => array(\n 'title' => __('Enable'),\n 'type' => 'checkbox',\n 'description' => __('Enable this shipping.'),\n 'default' => 'yes'\n ),\n 'title' => array(\n 'title' => __('Title'),\n 'type' => 'text',\n 'description' => __('Title to be display on site'),\n 'default' => __('CDEK Shipping')\n ),\n 'priceSet' => array(\n 'title' => __('Delivery cost'),\n 'type' => 'text',\n 'description' => __('Default delivery cost'),\n 'default' => __('405')\n ),\n );\n }", "public static function input_fields()\n {\n }", "public function form()\n {\n\n $this->hidden('key', '字段名')->rules('required');\n $this->editor('val', '平台规则')->rules('required');\n }", "private function setupFieldsAttributes() {\n\n\t\tforeach ( $this->form as $field ) {\n\n\t\t\tif ( ! $field->hasAttribute( 'id' ) ) {\n\t\t\t\t$field->setAttribute( 'id', esc_attr( sanitize_title( $field->getName() ) ) );\n\t\t\t}\n\t\t}\n\n\t}", "public function init_form_fields() {\n\t\t$this->form_fields = array(\n\t\t\t'api_key' => array(\n\t\t\t\t'title' => __( 'API Key', PLUGIN_TXT ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Enter with your API Key. You can find this in \"User Profile\" drop-down (top right corner) > API Keys.', PLUGIN_TXT ),\n\t\t\t\t'desc_tip' => true,\n\t\t\t\t'default' => ''\n\t\t\t),\n\t\t\t'debug' => array(\n\t\t\t\t'title' => __( 'Debug Log', PLUGIN_TXT ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable logging', PLUGIN_TXT ),\n\t\t\t\t'default' => 'no',\n\t\t\t\t'description' => __( 'Log events such as API requests', PLUGIN_TXT ),\n\t\t\t),\n\t\t);\n\t}", "public function updateEditableFields() {\n\t\t$allowedFields = $this->config()->allowed_field_types;\n\t\tif ($allowedFields) {\n\t\t\t$fieldClasses = singleton('EditableFormField')->getEditableFieldClasses();\n\t\t\tforeach($fieldClasses as $fieldClass => $fieldTitle) {\n\t\t\t\tif (!in_array($fieldClass, $allowedFields)) {\n\t\t\t\t\tConfig::inst()->update($fieldClass, 'hidden', true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Explicitely allow fields, so subclasses show up\n\t\t\tforeach($allowedFields as $fieldClass) {\n\t\t\t\tConfig::inst()->update($fieldClass, 'hidden', false);\n\t\t\t}\n\t\t}\n\t}", "public function buildFields()\n {\n $this->addField('name', 'kuma_menu.menu.adminlist.field.name', true);\n }", "public function fields(){\n\t\treturn array();\n\t}", "public function getCMSFields() {\n $fields = parent::getCMSFields();\n\n\n $fields->addFIeldTOTab('Root.Main',new TextField('Title','Image Title'));\n $fields->addFIeldTOTab('Root.Main',new TextareaField('Description','Photo Description (Max 500 Charachters)'));\n $fields->addFIeldTOTab('Root.Main',new UploadField('Image','Photo'));\n\n return $fields;\n }", "protected function otherFields()\n {\n return [\n Image::make('โลโก้', 'logofile'),\n Image::make('ภาพหน้าร้าน', 'imagefile')\n ->hideFromIndex(),\n Textarea::make('รายละเอียดอื่นๆ', 'description')->hideFromIndex(),\n BelongsTo::make('ผู้ทำรายการ', 'user', 'App\\Nova\\User')\n ->onlyOnDetail(),\n ];\n }", "function _set_editable_fields()\n\t{\n\t\tif (empty($this->fields))\n\t\t{\n\t\t\t// pull the fields dynamically from the database\n\t\t\t$this->db->cache_on();\n\t\t\t$this->fields = $this->db->list_fields($this->primary_table);\n\t\t\t$this->db->cache_off();\n\t\t}\n\t}", "function add_specific_form_fields() {\n\t\treturn false;\n\t}", "function get_field_list()\r\n\t{\r\n\t\t$fields = array();\r\n\r\n\t\tif (Authority::can('edit', 'admin/item/definition'))\r\n\t\t{\r\n\t\t\t$id_definition = $this->input->post('id_item_definition');\r\n\r\n\t\t\t$fields = $this->extend_field_model->get_lang_list(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'parent' => 'item',\r\n\t\t\t\t\t'id_parent' => $id_definition\r\n\t\t\t\t),\r\n\t\t\t\tSettings::get_lang('default')\r\n\t\t\t);\r\n\r\n\t\t\t// Set type names\r\n\t\t\tforeach($fields as &$field)\r\n\t\t\t{\r\n\t\t\t\t$field['type_name'] = self::$_TYPE_NAMES[$field['type']];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t$this->template['id_item_definition'] = $id_definition;\r\n\t\t$this->template['fields'] = $fields;\r\n\r\n\t\t$this->output('item/definition/fields');\r\n\t}", "public function _editFieldView() {\n\n\t\t/* Call in Smarty to display template */\n\t\tbfLoad ( 'bfSmarty' );\n\n\t\t$tmp = bfSmarty::getInstance ( 'com_form' );\n\t\t$tmp->caching = false;\n\t\t$tmp->assignFromArray ( $this->_config );\n\n\t\t$disabled = bfHTML::yesnoRadioList ( 'disabled', '', $this->_config ['disabled'] );\n\t\t$tmp->assign ( 'DISABLED', $disabled );\n\t\t$tmp->assign ( 'CONFIG', $this->_config );\n\n\t\t/* Yes No Answers */\n\t\t$qs = array ('verify_brazil_cpf', 'verify_brazil_cnpj', 'filter_strtoupper', 'filter_strtolower', 'verify_isvalidvatnumber', 'verify_isexistingusername', 'verify_isnotexistingusername', 'verify_isinteger', 'verify_isvalidurl', 'verify_isvalidcreditcardnumber', 'verify_isvalidukpostcode', 'published', 'allowsetbyget', 'allowbyemail', 'filter_a2z', 'filter_StripTags', 'filter_StringTrim', 'filter_Alnum', 'filter_Digits', 'required', 'verify_isemailaddress', 'verify_isblank', 'verify_isnotblank', 'verify_isipaddress', 'verify_isvalidukninumber', 'verify_isvalidssn', 'verify_isvaliduszip' );\n\t\tforeach ( $qs as $q ) {\n\t\t\t$tmp->assign ( strtoupper ( $q ), bfHTML::yesnoRadioList ( $q, '', $this->_config [$q] ) );\n\t\t}\n\n\t\t$OPTIONS = array (bfHTML::makeOption ( '0', 'Public' ), bfHTML::makeOption ( '1', 'Registered' ), bfHTML::makeOption ( '2', 'Special' ) );\n\n\t\t$access = bfHTML::selectList2 ( $OPTIONS, 'access', '', 'value', 'text', $this->_config ['access'] );\n\t\t$tmp->assign ( 'ACCESS', $access );\n\n\t\t$params = bfHTML::yesnoRadioList ( 'params', '', $this->_config ['params'] );\n\t\t$tmp->assign ( 'PARAMS', $params );\n\n\t\t$OPTIONS = array ();\n\t\t$dir = new DirectoryIterator ( bfcompat::getAbsolutePath () . '/components/com_form/plugins/fields/datepicker/jscalendar-1.0/lang' );\n\t\tforeach ( $dir as $file ) {\n\t\t\tif ($file->isDot ())\n\t\t\t\tcontinue;\n\t\t\t\t// Do something with $file\n\t\t\t$OPTIONS [] = bfHTML::makeOption ( $file->getFilename (), $file->getFilename () );\n\t\t}\n\n\t\t$LANG = bfHTML::selectList2 ( $OPTIONS, 'lang', '', 'value', 'text', $this->_config ['lang'] );\n\t\t$tmp->assign ( 'LANG', $LANG );\n\n\t\t$OPTIONS = array (bfHTML::makeOption ( 'calendar-blue.css', 'calendar-blue.css' ), bfHTML::makeOption ( 'calendar-blue2.css', 'calendar-blue2.css' ), bfHTML::makeOption ( 'calendar-brown.css', 'calendar-brown.css' ), bfHTML::makeOption ( 'calendar-green.css', 'calendar-green.css' ), bfHTML::makeOption ( 'calendar-system.css', 'calendar-system.css' ), bfHTML::makeOption ( 'calendar-tas.css', 'calendar-tas.css' ), bfHTML::makeOption ( 'calendar-win2k-1.css', 'calendar-win2k-1.css' ), bfHTML::makeOption ( 'calendar-win2k-2.css', 'calendar-win2k-2.css' ), bfHTML::makeOption ( 'calendar-win2k-cold-1.css', 'calendar-win2k-cold-1.css' ), bfHTML::makeOption ( 'calendar-win2k-cold-2.css', 'calendar-win2k-cold-2.css' ) );\n\n\t\t$CSSFILE = bfHTML::selectList2 ( $OPTIONS, 'cssfile', '', 'value', 'text', $this->_config ['cssfile'] );\n\t\t$tmp->assign ( 'CSSFILE', $CSSFILE );\n\n\t\t$tmp->display ( dirname ( __FILE__ ) . DS . 'editView.tpl' );\n\t}", "public function backend($fields)\n {\n echo $this->form->text('Title');\n echo $this->form->date('Date');\n }", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function fields()\n {\n return [ \n ];\n }", "public function getFields() {\n\n $fields = array(\"consumer_id\" => array('required'=> true, 'type'=>'hidden', 'disableDecorator' => array('HtmlTag', 'Label', 'DtDdWrapper')),\n \"allergy\" => array('label'=>'Allergy', 'required'=> true),\n \"info\"=>array('label'=>'Info','required'=> false, 'attributes'=>array('rows'=>'4', 'cols'=>'8')));\n \n if( !empty( $this->_id ) ) {\n \n $fields['id'] = array('default'=>$this->_id, 'type'=>'hidden', 'required'=> true,\n 'disableDecorator' => array('HtmlTag', 'Label', 'DtDdWrapper')); \n }\n \n return $fields;\n }", "public function fields()\n {\n return [\n 'name' => 'name:Article name|type:string',\n 'content' => 'name:Content data|type:editor|required',\n 'file' => 'name:file|type:file',\n 'date' => 'name:datum|type:date',\n ];\n }", "public function fields()\n {\n return [\n Text::make('Sur-titre','first'),\n Text::make('Sous-titre','third'),\n Text::make('Titre','second'),\n ];\n }", "public function getFrontEndRequiredFields();", "public function actionAdd()\n\t{\n\t\t$formId = $this->_input->filterSingle('form_id', XenForo_Input::UINT);\n\t\t$type = $this->_input->filterSingle('type', XenForo_Input::STRING);\n\t\t\n\t\t$fieldModel = $this->_getFieldModel();\n\t\t$fieldTypes = $fieldModel->getCountByType();\n\t\t\n\t\t$options = array();\n\t\t$options[] = array(\n\t\t 'value' => 'user',\n\t\t 'label' => new XenForo_Phrase('field'),\n\t\t 'selected' => true\n\t\t);\n\t\t\n\t\t// if global fields exist, include in the types\n\t\tif (array_key_exists('global', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'global',\n\t\t\t 'label' => new XenForo_Phrase('global_field')\n\t\t\t);\n\t\t}\n\t\t\n\t\t// if template fields exist, include in the types\n\t\tif (array_key_exists('template', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'template',\n\t\t\t 'label' => new XenForo_Phrase('template_field') \n\t\t\t);\n\t\t}\n\t\t\n\t\t// if there are no options other than user, just send them to the add field page\n\t\tif (!$type && count($options) == 1)\n\t\t{\n\t\t\t$type = 'user';\n\t\t}\n\t\t\n\t\t// association a field to a form\n\t\tif ($formId && $type)\n\t\t{\n\t\t\t$default = array(\n\t\t\t\t'field_id' => null,\n\t\t\t\t'form_id' => $this->_input->filterSingle('form_id', XenForo_Input::UINT),\n\t\t\t\t'display_order' => $this->_getFieldModel()->getGreatestDisplayOrderByFormId($formId) + 10,\n\t\t\t\t'field_type' => 'textbox',\n\t\t\t\t'field_choices' => '',\n\t\t\t\t'match_type' => 'none',\n\t\t\t\t'match_regex' => '',\n\t\t\t\t'match_callback_class' => '',\n\t\t\t\t'match_callback_method' => '',\n\t\t\t\t'max_length' => 0,\n\t\t\t\t'min_length' => 0,\n\t\t\t\t'required' => 0,\n\t\t\t\t'type' => $type,\n\t\t\t\t'active' => 1,\n\t\t\t\t'pre_text' => '',\n\t\t\t\t'post_text' => ''\n\t\t\t);\n\t\t\t\n\t\t\tswitch ($type)\n\t\t\t{\n\t\t\t case 'global':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-global-field');\n\t\t }\n\t\t\t case 'template':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-template-field');\n\t\t }\n\t\t\t default:\n\t\t {\n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t\n\t\t// adding a global/template field\n\t\telse if (!$formId && $type)\n\t\t{\n\t\t $default = array(\n\t 'field_id' => null,\n\t 'field_type' => 'textbox',\n\t 'field_choices' => '',\n\t 'match_type' => 'none',\n\t 'match_regex' => '',\n\t 'match_callback_class' => '',\n\t 'match_callback_method' => '',\n\t 'max_length' => 0,\n\t\t \t'min_length' => 0,\n\t 'type' => $type,\n\t\t \t'pre_text' => '',\n\t\t \t'post_text' => ''\n\t\t );\n\t\t \n\t\t if ($type != 'global')\n\t\t {\n\t\t \t$default['display_order'] = 1;\n\t\t \t$default['required'] = 0;\n\t\t \t$default['active'] = 1;\n\t\t }\n\t\t \n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t}\n\t\t\n\t\t// association type\n\t\telse\n\t\t{\n\t\t\t$viewParams = array(\n\t\t\t\t'formId' => $formId,\n\t\t\t\t'options' => $options\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->responseView('KomuKu_SimpleForms_ViewAdmin_Field_AddType', 'kmkform__field_add_type', $viewParams);\n\t\t}\n\t}", "public function registerFields(){\n\t\t$this->registerFieldString('ApplicationName', 'App');\n\t\t$this->registerFieldString('type', 'Tipo');\n\t\t$this->registerFieldString('source', 'Fuente', false, false);\n\t\t$this->registerFieldInt('id_mdb_expmsg', 'ID de mensajes expresiones');\n\t\t$this->registerFieldString('desc_sol_comun', 'Descripción de la Solución Común', false, false);\n\t}", "public function getEditForm();", "public function createfield(){\n \treturn view('field.create');\n }", "public function create_fields() {\n\t\tif ( count( $this->sections ) > 0 ) {\n\t\t\tforeach ( $this->fields as $k => $v ) {\n\t\t\t\t$method = $this->determine_method( $v, 'form' );\n\t\t\t\t$name = $v['name'];\n\t\t\t\tif ( $v['type'] == 'info' ) { $name = ''; }\n\t\t\t\tadd_settings_field( $k, $name, $method, $this->token, $v['section'], array( 'key' => $k, 'data' => $v ) );\n\n\t\t\t\t// Let the API know that we have a colourpicker field.\n\t\t\t\tif ( $v['type'] == 'range' && $this->_has_range == false ) { $this->_has_range = true; }\n\t\t\t}\n\t\t}\n\t}", "public function onAddField()\n {\n return $this->makePartial('create_field_form');\n }", "abstract public function fields(AdminRequest $request);", "function show_new_record() {\r\n if ($this->allow_new) {\r\n #~ echo \"<p><a href='{$_SERVER['PHP_SELF']}?m={$this->module}&amp;act=new&amp;go=\".urlencode($GLOBALS['full_self_url']).\"'>Insert new row</a>\";\r\n echo '<form method=POST action=\"'.$_SERVER['PHP_SELF'].'\">';\r\n echo '<input type=hidden name=\"m\" value=\"'.$this->module.'\">';\r\n echo '<input type=hidden name=\"act\" value=\"new\">';\r\n echo '<input type=hidden name=\"go\" value=\"'.htmlentities($GLOBALS['full_self_url']).'\">'; # url to go after successful submitation\r\n # if i'm a detail, get master-detail field's value and pass it to new-form\r\n if ($this->logical_parent) {\r\n foreach ($this->properties as $colvar=>$col) {\r\n if ($col->parentkey) { # foreign key always int\r\n echo '<input type=hidden name=\"sugg_field['.$colvar.']\" value=\"'.htmlentities($col->parentkey_value).'\">';\r\n }\r\n }\r\n }\r\n echo '<p>'.lang('Add').' <input type=text name=\"num_row\" size=2 value=\"1\"> '.lang($this->unit).' <input type=submit value=\"'.lang('Go').'\">';\r\n echo '</form>';\r\n }\r\n }", "public function actionCreate(){\n $parents=CylTables::model()->findAll(\n array(\n 'condition'=>'isParent=\"1\" AND display_status = \"1\"',\n 'order'=>'menu_order'\n ));\n $model = new CylFields();\n $this->render('new-field', array('model' => $model,'parents' => $parents));\n }", "public function submission_form_fields() {\n\n\t\t$fields = $this->get_custom_fields();\n\n\t\tif ( ! empty( $fields ) ) {\n\n\t\t\tforeach ( $fields as $name => $field ) {\n\n\t\t\t\t/* Do not display core fields */\n\t\t\t\tif ( true === $field['args']['core'] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$this_field = new CustomField( $name, $field );\n\t\t\t\t$output = $this_field->get_output();\n\n\t\t\t\techo $output;\n\n\t\t\t}\n\n\t\t}\n\n\t}", "public function createComponentFields()\n {\n $this->component->createTextField(\n array(\n 'name' => 'teaser_text',\n 'fieldLabel' => 'Teaser Text',\n 'supportText' => 'Der Banner Text',\n 'allowBlank' => true\n )\n );\n\n $this->component->createTextField(\n array(\n 'name' => 'image_link',\n 'fieldLabel' => 'Image Link',\n 'supportText' => 'Banner-verlinkung',\n 'allowBlank' => true\n )\n );\n\n $this->component->createTextField(\n array(\n 'name' => 'image_title',\n 'fieldLabel' => 'Image Title-Tag',\n 'supportText' => 'Title Tag des Bildes. Wird im Browser bei mouseover als Tooltip angezeigt und hilft screenreadern bei der Orientierung',\n 'allowBlank' => true\n )\n );\n\n $this->component->createTextField(\n array(\n 'name' => 'image_alt_tag',\n 'fieldLabel' => 'Image Alt-Tag',\n 'supportText' => 'Der Alt-Text wird, wie der Name vermuten läßt, alternativ angezeigt. Also nur, wenn das Bild aus welchen Gründen auch immer, nicht zu sehen ist. Das kann verschiedene Gründe haben: Server-Problem, falschen Pfadangabe, Bilder per Browser deaktiviert, oder eben eine „Lesehilfe“ für Benutzer mit Sehschwäche oder Blindheit. Aus Sicht des W3C ist der Alt-Text daher auch eine „Pflicht-Angabe“. Der Browser kann das Bild in aller Regel auch ohne Alt-Text anzeigen, aber es ist dringend anzuraten, den Alt-Text zu setzen.',\n 'allowBlank' => true\n )\n );\n\n $this->component->createHiddenField([\n 'name' => 'image_thumbnail'\n ]);\n\n $this->component->createHiddenField(array(\n 'name' => 'media_widget_store',\n 'allowBlank' => true\n ));\n }", "public function db_fields() {\n\t\treturn array('tid', 'title', 'template');\n\t}", "protected function setDbalInputFieldsToRender() {}", "public static function get_fields()\n {\n }", "function init_form_fields() {\n\n \tinclude ( SUMO_SAGEPLUGINPATH . 'includes/sagepay-form-admin.php' );\n\n }", "public function add_edit_form(){\n\n $_id = $_GET['id']; \n $tblName = $this->get_tbl_name();\n\n $source = DB::table($tblName)->where('id',$_id)->get();\n\n $source_first = $source[0];\n\n // mhtml::dump($source_first);\n\n\n $struct = $this->struct;\n\n mhtml::startForm(\"edit\",\"backend_edit.php\");\n\n // loop througth fields\n foreach ($this->edit as $key => $field) {\n\n $kind = $struct[$field] ;\n if($kind == 'string') {$kind = 'text' ;} \n $value = $source_first[$field];\n\n mhtml::field($this->virtual_names[$field],$field,$kind,$value);\n\n }\n\n // add secret field for password\n if(isset($this->edit_secret)){\n if($this->edit_secret == true ){\n\n Logger::warn(\"we use one secret only on secret[0] in secret array in model\");\n $virtual_pass = $this->virtual_names[$this->secret[0]];\n mhtml::field($virtual_pass,$this->secret[0],'password');\n\n }\n }\n\n \n\n\n\n\n // mhtml::field('user name ','user_name','text',\"mohammed\");\n // mhtml::field('passwording','password','password');\n // mhtml::field('age','age','number');\n\n mhtml::field_id_model();\n\n mhtml::submitForm();\n\n mhtml::endForm();\n\n }", "public function getCMSFields()\n {\n $fields = parent::getCMSFields();\n $fields->replaceField('Country', new DropdownField('Country', 'based on a sale to ', EcommerceCountry::get_country_dropdown()));\n $fields->replaceField('Root.Main', new DropdownField('TaxType', 'Tax Type', singleton($this->ClassName)->dbObject('TaxType')->enumValues()));\n\n $fields->removeByName('DefaultCountry');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('DefaultCountryShown', 'Prices are based on sale to', $this->DefaultCountry));\n\n $fields->removeByName('DefaultRate');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('DefaultRateShown', 'Default rate', $this->DefaultRate));\n\n $fields->removeByName('CurrentRate');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('CurrentRateShown', 'Rate for current order', $this->CurrentRate));\n\n $fields->removeByName('RawTableValue');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('RawTableValueShown', 'Raw table value', $this->RawTableValue));\n\n $fields->removeByName('DebugString');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('DebugStringShown', 'Debug String', $this->DebugString));\n\n return $fields;\n }", "public function getCMSFields() {\n\t\t$fields = parent::getCMSFields();\n\n\t\t// define tabs\n\t\t$fields->findOrMakeTab('Root.Content.Form', _t('UserDefinedForm.FORM', 'Form'));\n\t\t$fields->findOrMakeTab('Root.Content.EmailRecipients', _t('UserDefinedForm.EMAILRECIPIENTS', 'Email Recipients'));\n\t\t$fields->findOrMakeTab('Root.Content.OnComplete', _t('UserDefinedForm.ONCOMPLETE', 'On Complete'));\n\t\t$fields->findOrMakeTab('Root.Content.Submissions', _t('UserDefinedForm.SUBMISSIONS', 'Submissions'));\n\t\t\n\t\t// field editor\n\t\t$fields->addFieldToTab(\"Root.Content.Form\", new FieldEditor(\"Fields\", 'Fields', \"\", $this ));\n\t\t\n\t\t// view the submissions\n\t\t$fields->addFieldToTab(\"Root.Content.Submissions\", new CheckboxField('DisableSaveSubmissions',_t('UserDefinedForm.SAVESUBMISSIONS',\"Disable Saving Submissions to Server\")));\n\t\t$fields->addFieldToTab(\"Root.Content.Submissions\", new SubmittedFormReportField( \"Reports\", _t('UserDefinedForm.RECEIVED', 'Received Submissions'), \"\", $this ) );\n\n\t\t// who do we email on submission\n\t\t$emailRecipients = new ComplexTableField(\n\t\t\t$this,\n\t \t'EmailRecipients',\n\t \t'UserDefinedForm_EmailRecipient',\n\t \tarray(\n\t\t\t\t'EmailAddress' => _t('UserDefinedForm.EMAILADDRESS', 'Email'),\n\t\t\t\t'EmailSubject' => _t('UserDefinedForm.EMAILSUBJECT', 'Subject'),\n\t\t\t\t'EmailFrom' => _t('UserDefinedForm.EMAILFROM', 'From')\n\t \t),\n\t \t'getCMSFields_forPopup',\n\t\t\t\"\\\"FormID\\\" = '$this->ID'\"\n\t\t);\n\t\t$emailRecipients->setAddTitle(_t('UserDefinedForm.AEMAILRECIPIENT', 'A Email Recipient'));\n\t\t\n\t\t$fields->addFieldToTab(\"Root.Content.EmailRecipients\", $emailRecipients);\n\t\n\t\t// text to show on complete\n\t\t$onCompleteFieldSet = new FieldSet(\n\t\t\tnew HtmlEditorField( \"OnCompleteMessage\", _t('UserDefinedForm.ONCOMPLETELABEL', 'Show on completion'),3,\"\",_t('UserDefinedForm.ONCOMPLETEMESSAGE', $this->OnCompleteMessage), $this )\n\t\t);\n\t\t\n\t\t$fields->addFieldsToTab(\"Root.Content.OnComplete\", $onCompleteFieldSet);\n\t\t\n\t\treturn $fields;\n\t}", "private function _setFieldNames() {\n $this->id = \"id\";\n $this->name = \"name\";\n $this->surveyId = \"survey_id\";\n $this->languageId = \"language_id\";\n $this->deleted = \"deleted\"; \n }", "public function buildFields()\n {\n $this->addField('name', 'media.adminlist.configurator.name', true);\n $this->addField('contentType', 'media.adminlist.configurator.type', true);\n $this->addField('updatedAt', 'media.adminlist.configurator.date', true);\n $this->addField('filesize', 'media.adminlist.configurator.filesize', true);\n }", "public function form()\r\n {\r\n $this->switch('field_select_create', Support::trans('main.select_create'))\r\n ->default(admin_setting('field_select_create'));\r\n }", "public function fields()\n\t{\n\t\t$fields = array(\n\t\t\t'tag_manager_head'\t=> array(\n\t\t\t\t'label'\t\t\t=> __( 'Tag Manager Head code', 'purple' ),\n\t\t\t\t'option'\t\t=> 'tag_manager_head',\n\t\t\t\t'type'\t\t\t=> 'textarea',\n\t\t\t),\n\t\t\t'tag_manager_body'\t=> array(\n\t\t\t\t'label'\t\t\t=> __( 'Tag Manager Body code', 'purple' ),\n\t\t\t\t'option'\t\t=> 'tag_manager_body',\n\t\t\t\t'type'\t\t\t=> 'textarea',\n\t\t\t),\n\t\t\t'analytics'\t=> array(\n\t\t\t\t'label'\t\t\t=> __( 'Analytics code', 'purple' ),\n\t\t\t\t'option'\t\t=> 'analytics',\n\t\t\t\t'type'\t\t\t=> 'textarea',\n\t\t\t),\n\t\t);\n\n\t\t/**\n\t\t * Filters the Google Tracking Options fields\n\t\t * @param array $fields\n\t\t *\n\t\t * @since Purple 1.0.0\n\t\t */\n\t\treturn apply_filters( 'purple_google_tracking_fields', $fields );\n\t}", "function init_form_fields() {\n\t\t\t\n\t\t\t$abs_path = str_replace('/wp-admin', '', getcwd());\n\t\t\n\t\t\t$this->form_fields = array(\n\t\t\t\t'enabled' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Activer/Désactiver:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'checkbox', \n\t\t\t\t\t\t\t\t'label' => __( 'Activer le module de paiement Atos.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => 'yes'\n\t\t\t\t\t\t\t), \n\t\t\t\t'title' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Nom:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Intitulé affiché à l\\'utilisateur lors de la commande.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __( 'Paiement sécurisé par carte bancaire', 'woothemes' )\n\t\t\t\t\t\t\t),\n\t\t\t\t'description' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Description:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'textarea', \n\t\t\t\t\t\t\t\t'description' => __( 'Description affichée à l\\'utilisateur lors de la commande.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('Payez en toute sécurité grâce à notre système de paiement Atos.', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'merchant_id' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Identifiant commerçant:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Identifiant commerçant fourni par votre banque. Ex: 014295303911112', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('014295303911112', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'pathfile' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Chemin du fichier pathfile:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Chemin absolu vers le fichier de configuration \"pathfile\" du kit de paiement, sans le / final', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __($abs_path . '/atos/param/pathfile', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'request_file' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Chemin du fichier request:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Chemin absolu vers le fichier exécutable \"request\" du kit de paiement, sans le / final', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __($abs_path . '/atos/bin/request', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'response_file' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Chemin du fichier response:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Chemin absolu vers le fichier exécutable \"response\" du kit de paiement, sans le / final', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __($abs_path . '/atos/bin/response', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'payment_means' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Cartes acceptées:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Moyens de paiement acceptés. Ex pour CB, Visa et Mastercard: CB,2,VISA,2,MASTERCARD,2', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('CB,2,VISA,2,MASTERCARD,2', 'woothemes')\n\t\t\t\t\t\t\t),\n\n\t\t\t\t'currency_code' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Devise:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'select', \n\t\t\t\t\t\t\t\t'description' => __( 'Veuillez sélectionner une devise pour les paiemenents.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => '978',\n\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t'840' => 'USD',\n\t\t\t\t\t\t\t\t\t'978' => 'EUR',\n\t\t\t\t\t\t\t\t\t'124' => 'CAD',\n\t\t\t\t\t\t\t\t\t'392' => 'JPY',\n\t\t\t\t\t\t\t\t\t'826' => 'GBP',\n\t\t\t\t\t\t\t\t\t'036' => 'AUD' \n\t\t\t\t\t\t\t\t ) \t\t\t\t\t\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\n\t\t\t\t'paybtn' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Texte bouton de paiement:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Texte affiché sur le bouton qui redirige vers le terminal de paiement.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('Régler la commande.', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'paymsg' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Message page de paiement:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'textarea', \n\t\t\t\t\t\t\t\t'description' => __( 'Message affiché sur la page de commande validée, avant passage sur le terminal de paiement.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('Merci pour votre commande. Veuillez cliquer sur le bouton ci-dessous pour effectuer le règlement.', 'woothemes')\n\t\t\t\t\t\t\t)\n\t\t\t\t/*'payreturn' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Texte bouton retour:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Texte affiché sur le bouton de retour ver la boutique.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('Retour', 'woothemes')\n\t\t\t\t\t\t\t)*/\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t);\n\t\t\n\t\t}", "public function defineFormFields()\n {\n return 'fields.yaml';\n }", "public function addMetaFields()\n\t{\n\t\tadd_action('slideshow_add_form_fields', [$this, 'addMetaFieldsToAddForm']);\n\t\tadd_action('slideshow_edit_form_fields', [$this, 'addMetaFieldsToEditForm']);\n\t}", "public function populateForm() {}", "function display_edit_field() {\n data_field_admin::check_lang_strings($this);\n parent::display_edit_field();\n }", "public function fieldsettingAction() {\r\n $this->_helper->viewRenderer(\"fieldsetting/list\");\r\n }", "function showInputFields(){\n \t$HTML = '';\n\n \t//name field\n\t\t\tif ($this->shownamefield) {\n\t\t\t\t$text = '<input id=\"wz_11\" type=\"text\" size=\"'. $this->fieldsize.'\" value=\"'. addslashes(_JNEWS_NAME).'\" class=\"inputbox\" name=\"name\" onblur=\"if(this.value==\\'\\') this.value=\\''. addslashes(_JNEWS_NAME).'\\';\" onfocus=\"if(this.value==\\''. addslashes(_JNEWS_NAME).'\\') this.value=\\'\\' ; \" />';\n\t\t\t\t$HTML .= jnews::printLine($this->linear, $text);\n\t\t\t} else {\n\t\t\t\t$text = '<input id=\"wz_11\" type=\"hidden\" value=\"\" name=\"name\" />';\n\t\t\t}\n\n\t\t //email field\n\t\t $text = '<input id=\"wz_12\" type=\"email\" size=\"' .$this->fieldsize .'\" value=\"\" class=\"inputbox\" name=\"email\" placeholder=\"'.addslashes(_JNEWS_YOUR_EMAIL_ADDRESS).'\"/>';\n\t\t //onblur=\"if(this.value==\\'\\') this.value=\\'' . addslashes(_JNEWS_EMAIL) .'\\';\" onfocus=\"if(this.value==\\'' . addslashes(_JNEWS_EMAIL) .'\\') this.value=\\'\\' ; \" \n\t\t $HTML .= jnews::printLine($this->linear, $text);\n\n\t\t\t//for field columns\n\t\t\tif($GLOBALS[JNEWS.'level'] > 2){//check if the version of jnews is pro\n\n\t\t\t\tif ($this->column1){//show column1 in the subscribers module\n\t\t\t\t\t$text = '<input id=\"wz_13\" type=\"text\" size=\"' .$this->fieldsize .'\" value=\"' . addslashes($GLOBALS[JNEWS.'column1_name']) .'\" class=\"inputbox\" name=\"column1\" onblur=\"if(this.value==\\'\\') this.value=\\'' . addslashes($GLOBALS[JNEWS.'column1_name']) .'\\';\" onfocus=\"if(this.value==\\'' . addslashes($GLOBALS[JNEWS.'column1_name']) .'\\') this.value=\\'\\' ; \" />';\n\t\t\t\t\t$HTML .= jnews::printLine($this->linear, $text);\n\t\t\t\t}\n\n\t\t\t if ($this->column2){//show column2 in the subscribers module\n\t\t\t\t $text = '<input id=\"wz_14\" type=\"text\" size=\"' .$this->fieldsize .'\" value=\"' . addslashes($GLOBALS[JNEWS.'column2_name']) .'\" class=\"inputbox\" name=\"column2\" onblur=\"if(this.value==\\'\\') this.value=\\'' . addslashes($GLOBALS[JNEWS.'column2_name']) .'\\';\" onfocus=\"if(this.value==\\'' . addslashes($GLOBALS[JNEWS.'column2_name']) .'\\') this.value=\\'\\' ; \" />';\n\t\t\t\t $HTML .= jnews::printLine($this->linear, $text);\n\t\t\t }\n\n\t\t\t if ($this->column3){//show column3 in the subscribers module\n\t\t\t\t $text = '<input id=\"wz_15\" type=\"text\" size=\"' .$this->fieldsize .'\" value=\"' . addslashes($GLOBALS[JNEWS.'column3_name']) .'\" class=\"inputbox\" name=\"column3\" onblur=\"if(this.value==\\'\\') this.value=\\'' . addslashes($GLOBALS[JNEWS.'column3_name']) .'\\';\" onfocus=\"if(this.value==\\'' . addslashes($GLOBALS[JNEWS.'column3_name']) .'\\') this.value=\\'\\' ; \" />';\n\t\t\t\t $HTML .= jnews::printLine($this->linear, $text);\n\t\t\t }\n\n\t\t\t if ($this->column4){//show column4 in the subscribers module\n\t\t\t\t $text = '<input id=\"wz_16\" type=\"text\" size=\"' .$this->fieldsize .'\" value=\"' . addslashes($GLOBALS[JNEWS.'column4_name']) .'\" class=\"inputbox\" name=\"column4\" onblur=\"if(this.value==\\'\\') this.value=\\'' . addslashes($GLOBALS[JNEWS.'column4_name']) .'\\';\" onfocus=\"if(this.value==\\'' . addslashes($GLOBALS[JNEWS.'column4_name']) .'\\') this.value=\\'\\' ; \" />';\n\t\t\t\t $HTML .= jnews::printLine($this->linear, $text);\n\t\t\t }\n\t\t\t if ($this->column5){//show column5 in the subscribers module\n\t\t\t\t $text = '<input id=\"wz_17\" type=\"text\" size=\"' .$this->fieldsize .'\" value=\"' . addslashes($GLOBALS[JNEWS.'column5_name']) .'\" class=\"inputbox\" name=\"column5\" onblur=\"if(this.value==\\'\\') this.value=\\'' . addslashes($GLOBALS[JNEWS.'column5_name']) .'\\';\" onfocus=\"if(this.value==\\'' . addslashes($GLOBALS[JNEWS.'column5_name']) .'\\') this.value=\\'\\' ; \" />';\n\t\t\t\t $HTML .= jnews::printLine($this->linear, $text);\n\t\t\t }\n\t\t\t}\n\n\t\t\treturn $HTML;\n }", "public function fields(Request $request)\n {\n $now = Carbon::now();\n return [\n ID::make()->sortable(),\n Text::make('Name','name'),\n Badge::make('Less than 7 days','deadline',function () use($now){\n return ($this->deadline->diffInDays($now) <= 7)? \"yes\": \"no\";\n })\n ->colors([\n 'yes' => 'red',\n 'no' => 'green',\n ])\n ->exceptOnForms(),\n Date::make('Deadline')\n ->sortable(),\n SearchableSelect::make('Company name','provider_id')\n ->resource(Provider::class)\n ->help(\"Need chose provider\")\n ->rules('required')\n ->hideFromIndex()\n ->hideWhenUpdating()\n ->hideFromDetail(),\n Badge::make('Type')\n ->colors([\n 'output' => 'LightSeaGreen',\n 'input' => 'gold'\n ])\n ->exceptOnForms(),\n Text::make('Status')\n ->exceptOnForms(),\n BelongsTo::make('Company','provider', Provider::class)\n ->exceptOnForms(),\n BelongsTo::make('Product','product', Product::class)\n ->exceptOnForms(),\n BelongsToMany::make('Orders','orders', Order::class)\n ->exceptOnForms(),\n RadioButton::make('Action')\n ->options([\n 'increment' => 'Increment',\n 'decrement' => 'Decrement',\n ]) ->hideWhenUpdating(),\n Number::make('Count','count')\n ->exceptOnForms()\n\n ];\n }", "public function indexFields()\n {\n return [\n Text::make('ID')\n ->value($this->model->id),\n\n Link::make('Booking')\n ->value('Booking #' . $this->model->booking_id)\n ->url('bookings/' . $this->model->booking_id),\n\n Link::make('Customer')\n ->value($this->model->customer->name)\n ->url('customers/' . $this->model->customer_id),\n\n Text::make('Amount')\n ->value('$'.$this->model->amount),\n ];\n }", "public function addFields()\n {\n // add field\n $this->addField(new DataObject([\n 'key' => 'css_class',\n 'type' => 'multiselect',\n 'values' => $this->cssClassRowModel->toOptionArray(),\n 'label' => __('CSS Class'),\n ]));\n\n // add save button\n $this->addField(new DataObject([\n 'key' => 'save',\n 'type' => 'note',\n 'label' => ' ',\n 'options' => [\n 'text' => $this->getButtonHtml(\n __('Save'),\n 'window.pageDesignerConfig.setSettings.bind(this)()',\n 'action-primary save-settings'\n ),\n ],\n ]));\n\n return $this;\n }", "function state_fields() {\n\tglobal $_STATE;\n\n\t$_STATE->fields = array( //pagename,DBname,load from DB?,write to DB?,required?,maxlength\n\t\t\t\"Name\"=>new FIELD(\"txtName\",\"name\",TRUE,TRUE,TRUE,64),\n\t\t\t\"Description\"=>new AREA_FIELD(\"txtDesc\",\"description\",TRUE,TRUE,TRUE,256),\n\t\t\t\"Inactive As Of\"=>new DATE_FIELD(\"txtInactive\",\"inactive_asof\",TRUE,TRUE,FALSE,0),\n\t\t\t);\n}", "private function _set_fields()\n {\n @$this->form_data->question_id = 0;\n\n $this->form_data->category_id = 0;\n $this->form_data->sub_category_id = 0;\n $this->form_data->sub_two_category_id = 0;\n $this->form_data->sub_three_category_id = 0;\n $this->form_data->sub_four_category_id = 0;\n\n $this->form_data->ques_text = '';\n $this->form_data->survey_weight = '';\n $this->form_data->ques_type = '';\n $this->form_data->qus_fixed = 0;\n $this->form_data->ques_expiry_date = '';\n\n\n $this->form_data->filter_question = '';\n $this->form_data->filter_category = 0;\n $this->form_data->filter_type = '';\n $this->form_data->filter_expired = '';\n }", "public function init_fields() {\n $fields = [];\n\n $fields['type'] = [\n 'type' => Controls_Manager::TEXT,\n 'label' => __('Text', 'chaman_addons')\n ];\n\n return $fields;\n }", "public function product_fields_callback()\n {\n $saved_fields = isset($this->options['product_fields']) ? $this->options['product_fields'] : self::DEFAULT_COLS;\n $this->view('params/fields', [\n 'saved_fields' => $saved_fields,\n 'fields' => $this->fields,\n ]);\n }" ]
[ "0.741264", "0.7242255", "0.7203603", "0.7001965", "0.6940099", "0.6921341", "0.6723752", "0.6698826", "0.66810036", "0.66768795", "0.6667922", "0.66665", "0.6602609", "0.6595206", "0.6575597", "0.65719944", "0.65646523", "0.6563076", "0.6535553", "0.6532271", "0.65213907", "0.6515778", "0.6509597", "0.6509597", "0.6509597", "0.6509597", "0.6509597", "0.6505474", "0.6502111", "0.64956194", "0.64913225", "0.6490579", "0.64887625", "0.6483952", "0.6467231", "0.6464585", "0.6454258", "0.6452377", "0.64516175", "0.6437314", "0.6411419", "0.64082617", "0.6407249", "0.63966453", "0.637364", "0.6365972", "0.63592726", "0.6356377", "0.6351924", "0.63484526", "0.6348184", "0.63472337", "0.633925", "0.63168246", "0.631297", "0.62985295", "0.6291975", "0.62762785", "0.62667763", "0.62598866", "0.6254685", "0.62538207", "0.6253465", "0.62516075", "0.62454206", "0.624475", "0.6239417", "0.62390286", "0.62194705", "0.6212808", "0.6211823", "0.62052137", "0.61979043", "0.61978835", "0.6195852", "0.6186272", "0.6183994", "0.6183042", "0.61759835", "0.61746264", "0.61743677", "0.6170712", "0.61681825", "0.61676437", "0.6164247", "0.6160299", "0.61602926", "0.6156351", "0.61491805", "0.6146219", "0.6145925", "0.6142851", "0.61427486", "0.6142412", "0.61399126", "0.61389565", "0.6133186", "0.6133153", "0.6120982", "0.61124253", "0.6110501" ]
0.0
-1
Fields to be shown on filter forms
protected function configureDatagridFilters(DatagridMapper $datagridMapper) { // $datagridMapper ->add('nombre') ->add('estado') ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function filterFields();", "public static function getUiFilterFields()\n\t{\n\t\treturn array();\n\t}", "protected function getFieldsFromShowItem() {}", "function get_filter_form(Table $table) {\n return $table->renderFilter();\n}", "private function filterFields() {\n\n // Initialize an associate array of our field name and value pairs.\n $values = array();\n\n // Initialize an associate array of our field name and filters pairs.\n $filters = array();\n\n // Populate the arrays.\n foreach ($this->fields as $field) {\n if ($field->getFilters()) {\n $values[$field->getName()] = $field->getValue();\n $filters[$field->getName()] = $field->getFilters();\n }\n }\n\n // Load an instance of GUMP to use to sanitize and filter our field values.\n $gump = new \\GUMP();\n\n // Sanitize the field values.\n $values = $gump->sanitize($values);\n\n // Pass the arrays to GUMP and let it do the heavy-lifting.\n $values = $gump->filter($values, $filters);\n\n // Set the values of all fields to their filtered values.\n foreach ($values as $name => $value) {\n $this->passValue($name, $value);\n }\n }", "function get_form_filter() {\n\n $val_ = new OrSysvalue();\n if (!is_null($var_)) {\n foreach ($val_->filter AS $id => $value) {\n //echo '$id [ ' . $id . ' ] = [ ' . $value . ' ] <br>' ;\n if ($id != 'filter_by') {\n if (!$this->filter_use[$id]) {\n $my_filter = new OrFieldHidden($id, 'val_filter[' . $id . ']');\n $my_filter->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_filter->get_tag();\n\n if ($val_->compare[$id] == 'BETWEEN' OR $val_->message[$id . '_II'] != '') {\n $my_filter = new OrFieldHidden($id . '_II', 'val_msg[' . $id . '_II]');\n $my_filter->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_filter->get_tag();\n }\n }\n $my_compare = new OrFieldHidden('val_compare_' . $id . '_', 'val_compare[' . $id . ']');\n $my_compare->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_compare->get_tag();\n }\n }\n }\n\n\n /* $my_table = new OrTable('table_query');\n $my_table->OP_[align_table]->set('center');\n $my_table->OP_[class_name]->set('tbl_body');\n $my_table->set_col(' ค้นหา ' . $this->get_control_filter() . ' เรียง ' . $this->get_control_order() . ' ' . $this->get_button_filter() . $my_filter_tag );\n $my_table->set_row(); */\n $my_table = (' ค้นหา ' . $this->get_control_filter() . ' เรียง ' . $this->get_control_order() . ' ' . $this->get_button_filter() . $my_filter_tag );\n return $my_table;\n }", "function theme_simplenews_filter_form($variables) {\n $form = $variables['form'];\n\n $output = '<div id=\"simplenews-admin-filter\">';\n $output .= drupal_render($form['filters']);\n $output .= '</div>';\n $output .= drupal_render_children($form);\n return $output;\n}", "function ShowFilterList() {\n\t\tglobal $deals_details;\n\t\tglobal $ReportLanguage;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\n\t\t// Field dealer\n\t\t$sExtWrk = \"\";\n\t\t$sWrk = \"\";\n\t\tewrpt_BuildDropDownFilter($deals_details->dealer, $sExtWrk, \"\");\n\t\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t\t$sFilterList .= $deals_details->dealer->FldCaption() . \"<br>\";\n\t\tif ($sExtWrk <> \"\")\n\t\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br>\";\n\t\tif ($sWrk <> \"\")\n\t\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br>\";\n\n\t\t// Field date_start\n\t\t$sExtWrk = \"\";\n\t\t$sWrk = \"\";\n\t\tewrpt_BuildDropDownFilter($deals_details->date_start, $sExtWrk, $deals_details->date_start->DateFilter);\n\t\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t\t$sFilterList .= $deals_details->date_start->FldCaption() . \"<br>\";\n\t\tif ($sExtWrk <> \"\")\n\t\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br>\";\n\t\tif ($sWrk <> \"\")\n\t\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br>\";\n\n\t\t// Field status\n\t\t$sExtWrk = \"\";\n\t\t$sWrk = \"\";\n\t\tewrpt_BuildDropDownFilter($deals_details->status, $sExtWrk, \"\");\n\t\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t\t$sFilterList .= $deals_details->status->FldCaption() . \"<br>\";\n\t\tif ($sExtWrk <> \"\")\n\t\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br>\";\n\t\tif ($sWrk <> \"\")\n\t\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br>\";\n\n\t\t// Show Filters\n\t\tif ($sFilterList <> \"\")\n\t\t\techo $ReportLanguage->Phrase(\"CurrentFilters\") . \"<br>$sFilterList\";\n\t}", "public function filter($fields)\n {\n }", "abstract function buildShowFields(): void;", "public function getSearchFields();", "public static function getFilterableFields(): array\n {\n return ['name', 'accessCode'];\n }", "function minorite_exposed_filters($variables) {\n return drupal_render_children($variables['form']);\n}", "function ShowFilterList() {\n\t\tglobal $dealers_reports;\n\t\tglobal $ReportLanguage;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\n\t\t// Field StartDate\n\t\t$sExtWrk = \"\";\n\t\t$sWrk = \"\";\n\t\tewrpt_BuildDropDownFilter($dealers_reports->StartDate, $sExtWrk, $dealers_reports->StartDate->DateFilter);\n\t\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t\t$sFilterList .= $dealers_reports->StartDate->FldCaption() . \"<br>\";\n\t\tif ($sExtWrk <> \"\")\n\t\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br>\";\n\t\tif ($sWrk <> \"\")\n\t\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br>\";\n\n\t\t// Show Filters\n\t\tif ($sFilterList <> \"\")\n\t\t\techo $ReportLanguage->Phrase(\"CurrentFilters\") . \"<br>$sFilterList\";\n\t}", "public function getFrontendFields();", "protected function getFiltersForm(){\n $table = ORM::getTable('word');\n $name = $table->getField('name');\n $value = $table->getField('value');\n\n $pseudo = new OrmTable('pseudo_languages');\n $pseudo->addField($name);\n $pseudo->addField($value);\n $form = UI::getFormForTable($pseudo, array(), UI::LAYOUT_BLOCK);\n $form['id'] = 'word_filters';\n $form['fields']['value']['tag'] = UI::TAG_INPUT;\n unset($form['fields']['value']['title']);\n unset($form['fields']['name']['title']);\n $form['fields']['name']['attributes']['onblur'] ='Word.filterTerms()';\n $form['fields']['name']['attributes']['placeholder'] = Word::get('admin','word_name_filter');\n $form['fields']['value']['attributes']['onblur'] = 'Word.filterTerms()';\n $form['fields']['value']['attributes']['placeholder'] = Word::get('admin','word_value_filter');\n return $form;\n }", "public function _report_filters_ui()\n\t{\n\t\t$filter = View::factory('actionable_filter');\n\t\t$filter->render(TRUE);\n\t}", "protected function initFilterFields(): void\n {\n $this->filterSliderFields = $this->filterSliderFields();\n $this->filterNumericFields = $this->filterNumericFields();\n $this->filterDropdownFields = $this->filterDropdownFields();\n }", "static function add_filters(): void {\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_group']);\r\n\r\n\t\tself::add_tab('Divisions');\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_divisions']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_name']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_notes']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_d_priority']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_roles']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_title']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_r_priority']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_voting']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_email']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_archival']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_aliases']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_alias']);\r\n\r\n\t\tself::add_tab('Layout');\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_show_emails']);\r\n\t}", "function acf_get_filters()\n{\n}", "function simplenews_issue_filter_form() {\n // Current filter selections in $session var; stored at form submission\n // Example: array('newsletter' => 'all')\n $session = isset($_SESSION['simplenews_issue_filter']) ? $_SESSION['simplenews_issue_filter'] : _simplenews_issue_filter_default();\n $filters = simplenews_issue_filters();\n\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only newsletters which'),\n );\n\n // Filter values are default\n $form['filters']['newsletter'] = array(\n '#type' => 'select',\n '#title' => $filters['newsletter']['title'],\n '#options' => $filters['newsletter']['options'],\n '#default_value' => $session['newsletter'],\n );\n $form['filters']['buttons']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Filter'),\n '#prefix' => '<span class=\"spacer\" />',\n );\n // Add Reset button if filter is in use\n if ($session != _simplenews_issue_filter_default()) {\n $form['filters']['buttons']['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset'),\n );\n }\n\n return $form;\n}", "private function filterOptions(){\n $request = new Request();\n\n $key = $request->query->get('key') ? $this->global_helper_service->cleanDataInput($request->query->get('key')) : '';\n $date_range = $request->query->get('date_range') ? $request->query->get('date_range') : '';\n\n $array_filters = array();\n\n $array_filters['key'] = array(\n 'type' => 'input',\n 'title' => 'Search',\n 'default_value' => $key\n );\n\n $array_filters['date_range'] = array(\n 'type' => 'date_picker',\n 'title' => 'Date Range',\n 'options' => '',\n 'default_value' => $date_range\n );\n\n return $this->admincp_service->handleElementFormFilter($array_filters);\n }", "function ewp_query_fields()\n {\n\n return apply_filters(\n 'ewp_query_fields_filter',\n array(\n 'post' => array(\n 'label' => __('WP Post object', 'extend-wp'),\n 'field-choices' => array(\n 'search_type' => array(\n 'label' => __('Search type', 'extend-wp'),\n 'case' => 'select',\n 'options' => array(\n 'search' => array('label' => __('Search text', 'extend-wp')),\n 'date_from' => array('label' => __('Publish date from', 'extend-wp')),\n 'date_to' => array('label' => __('Publish date to', 'extend-wp')),\n 'orderby' => array('label' => __('Order by', 'extend-wp')),\n 'order' => array('label' => __('Order', 'extend-wp')),\n ),\n 'label_class' => array('awm-needed'),\n )\n )\n ),\n 'meta' => array(\n 'label' => __('WP Meta', 'extend-wp'),\n 'field-choices' => array(\n 'meta_key' => array(\n 'label' => __('Meta key', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n 'label_class' => array('awm-needed'),\n ),\n 'meta_compare' => array(\n 'label' => __('Compare function', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n 'label_class' => array('awm-needed'),\n )\n ),\n ),\n 'taxonomy' => array(\n 'label' => __('WP taxonomy', 'extend-wp'),\n 'field-choices' => array(\n 'compare_type' => array(\n 'label' => __('Compare operator', 'extend-wp'),\n 'case' => 'select',\n 'options' => array(\n 'in' => array('label' => 'IN'),\n 'not_in' => array('label' => 'NOT IN'),\n ),\n 'label_class' => array('awm-needed'),\n ),\n ),\n )\n )\n );\n }", "public function getCMSFields() {\n $fieldSet = parent::getCMSFields();\n $fieldSet->renameField('ShowInSearch', 'Show in sitemap?');\n return $fieldSet;\n }", "function AdminListAddFilterFields($entityId, &$arFilterFields)\n\t{\n\t\t$arUserFields = $this->GetUserFields($entityId);\n\t\tforeach($arUserFields as $fieldName => $arUserField)\n\t\t{\n\t\t\tif($arUserField['SHOW_FILTER'] != 'N' && $arUserField['USER_TYPE']['BASE_TYPE'] != 'file')\n\t\t\t{\n\t\t\t\t$arFilterFields[] = 'find_' . $fieldName;\n\t\t\t\tif($arUserField['USER_TYPE']['BASE_TYPE'] == 'datetime')\n\t\t\t\t{\n\t\t\t\t\t$arFilterFields[] = 'find_' . $fieldName . '_from';\n\t\t\t\t\t$arFilterFields[] = 'find_' . $fieldName . '_to';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function displaySearchForm($filter)\t{\n trace('[CMD] '.__METHOD__);\n\n\t\t$formname = 'SearchForm';\n $tmplForm = $this->cObj->getSubpart($this->templateFile, '###'.strtoupper($formname).'###');\n\n\t\t$choicesArray = array();\n\t\t$disableArray = array();\n\t\t$hideArray = array();\n\n\t\t$formMarkerArray = $this->formHandler->prepareConfSubst($formname, $filter, $choicesArray, $disableArray, $hideArray);\n\n\t\t// HOOK: allow multiple hooks to manipulate formMarkerArray\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['pt_gsauserreg']['pi5_hooks']['displaySearchFormHook'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['pt_gsauserreg']['pi5_hooks']['displaySearchFormHook'] as $className) {\n\t\t\t\t$hookObj = &t3lib_div::getUserObj($className);\n\t\t\t\t$formMarkerArray = $hookObj->displaySearchFormHook($this, $formMarkerArray);\n\t\t\t}\n\t\t}\n\n return $this->cObj->substituteMarkerArray($tmplForm, $formMarkerArray);\n\t}", "function FilterForm()\n\t{\tob_start();\n\t\techo '<form class=\"akFilterForm\"><span>Filter</span><input type=\"text\" name=\"filter\" value=\"', $this->InputSafeString($this->filter), '\" /><input type=\"submit\" class=\"submit\" value=\"Get\" /><div class=\"clear\"></div></form>';\n\t\treturn ob_get_clean();\n\t}", "public function buildFilters()\n {\n $this->addFilter('name', new ORM\\StringFilterType('name'), 'kuma_menu.menu.adminlist.filter.name');\n }", "private function filters() {\n\n\n\t}", "private static function getFilterFields($filter = null)\n\t{\n\t\t$fields = $filter??static::getUiFilterFields();\n\t\t$fields = is_array($fields) ? $fields : array();\n\t\t$fields[] = array(\n\t\t\t\"id\" => self::FIELD_FOR_PRESET_ALL,\n\t\t\t\"name\" => Loc::getMessage('SENDER_CONNECTOR_BASE_FILTER'),\n\t\t\t'type' => 'checkbox',\n\t\t\t\"default\" => false,\n\t\t\t\"sender_segment_filter\" => false,\n\t\t);\n\n\t\treturn $fields;\n\t}", "function theme_simplenews_subscription_filter_form($variables) {\n $form = $variables['form'];\n\n $output = '<div id=\"simplenews-subscription-filter\">';\n $output .= drupal_render($form['filters']);\n $output .= '</div>';\n $output .= drupal_render_children($form);\n return $output;\n}", "public function displayFilterField($form)\n\t{\n\t\t// See: https://docs.joomla.org/Talk:Checkbox_form_field_type\n\t\t?>\n\t\t<input type=\"hidden\" name=\"jform[settings][chk_filter]\" value=\"0\">\n\t\t<div class=\"control-group\">\n\t\t\t<div class=\"control-label\"><?php echo $form->getLabel('fieldname'); ?></div>\n\t\t\t<div class=\"controls\"><?php echo $form->getInput('fieldname'); ?></div>\n\t\t</div>\n\t\t<div class=\"control-group\">\t\n\t\t\t<div class=\"control-label\"><?php echo $form->getLabel('chk_filter', 'settings'); ?></div>\n\t\t\t<div class=\"controls\"><?php echo $form->getInput('chk_filter', 'settings'); ?></div>\n\t\t</div>\n\t\t<?php \n\t\techo $form->getInput('field_id');\n\t}", "public function addFilterFormInput(): void;", "abstract protected function filterField(): string;", "public function filters(){\r\r\n\t\treturn CMap::mergeArray(parent::filters(),array(\r\r\n\t\t\t\r\r\n\t\t));\r\r\n\t}", "public function getFilteredDetails();", "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'rights', // perform access control for CRUD operations\n\t\t);\n\t}", "public function buildFilters()\n {\n $this->addFilter('name', new ORM\\StringFilterType('name'), 'media.adminlist.configurator.filter.name');\n $this->addFilter('contentType', new ORM\\StringFilterType('contentType'), 'media.adminlist.configurator.filter.type');\n $this->addFilter('updatedAt', new ORM\\NumberFilterType('updatedAt'), 'media.adminlist.configurator.filter.updated_at');\n $this->addFilter('filesize', new ORM\\NumberFilterType('filesize'), 'media.adminlist.configurator.filter.filesize');\n }", "public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n $filters = [];\n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->exemplar_id) AND ( (is_scalar($data->exemplar_id) AND $data->exemplar_id !== '') OR (is_array($data->exemplar_id) AND (!empty($data->exemplar_id)) )) )\n {\n\n $filters[] = new TFilter('exemplar_id', '=', $data->exemplar_id);// create the filter \n }\n\n if (isset($data->leitor_id) AND ( (is_scalar($data->leitor_id) AND $data->leitor_id !== '') OR (is_array($data->leitor_id) AND (!empty($data->leitor_id)) )) )\n {\n\n $filters[] = new TFilter('leitor_id', '=', $data->leitor_id);// create the filter \n }\n\n if (isset($data->dt_emprestimo) AND ( (is_scalar($data->dt_emprestimo) AND $data->dt_emprestimo !== '') OR (is_array($data->dt_emprestimo) AND (!empty($data->dt_emprestimo)) )) )\n {\n\n $filters[] = new TFilter('dt_emprestimo', '>=', $data->dt_emprestimo);// create the filter \n }\n\n if (isset($data->dt_emprestimo_final) AND ( (is_scalar($data->dt_emprestimo_final) AND $data->dt_emprestimo_final !== '') OR (is_array($data->dt_emprestimo_final) AND (!empty($data->dt_emprestimo_final)) )) )\n {\n\n $filters[] = new TFilter('dt_emprestimo', '<=', $data->dt_emprestimo_final);// create the filter \n }\n\n if (isset($data->dt_previsao) AND ( (is_scalar($data->dt_previsao) AND $data->dt_previsao !== '') OR (is_array($data->dt_previsao) AND (!empty($data->dt_previsao)) )) )\n {\n\n $filters[] = new TFilter('dt_previsao', '>=', $data->dt_previsao);// create the filter \n }\n\n if (isset($data->dt_prevista_final) AND ( (is_scalar($data->dt_prevista_final) AND $data->dt_prevista_final !== '') OR (is_array($data->dt_prevista_final) AND (!empty($data->dt_prevista_final)) )) )\n {\n\n $filters[] = new TFilter('dt_previsao', '<=', $data->dt_prevista_final);// create the filter \n }\n\n if (isset($data->dt_devolucao) AND ( (is_scalar($data->dt_devolucao) AND $data->dt_devolucao !== '') OR (is_array($data->dt_devolucao) AND (!empty($data->dt_devolucao)) )) )\n {\n\n $filters[] = new TFilter('dt_devolucao', '>=', $data->dt_devolucao);// create the filter \n }\n\n if (isset($data->dt_devolucao_final) AND ( (is_scalar($data->dt_devolucao_final) AND $data->dt_devolucao_final !== '') OR (is_array($data->dt_devolucao_final) AND (!empty($data->dt_devolucao_final)) )) )\n {\n\n $filters[] = new TFilter('dt_devolucao', '<=', $data->dt_devolucao_final);// create the filter \n }\n\n $param = array();\n $param['offset'] = 0;\n $param['first_page'] = 1;\n\n // fill the form with data again\n $this->form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n TSession::setValue(__CLASS__.'_filters', $filters);\n\n $this->onReload($param);\n }", "abstract protected function getFilters();", "public function filters()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'rights', // perform access control for CRUD operations\r\n\t\t);\r\n\t}", "public function getSearchFields()\n {\n //return $this->searchFields;\n return ['_all'];\n }", "public function getFieldsForFilter()\n {\n $options = [];\n foreach ($this->getFieldsForExport() as $field) {\n $options[] = [\n 'label' => $field,\n 'value' => $field\n ];\n }\n return [$this->getEntityTypeCode() => $options];\n }", "public function getFieldsForFilter()\n {\n $options = [];\n foreach ($this->getFieldsForExport() as $field) {\n $options[] = [\n 'label' => $field,\n 'value' => $field\n ];\n }\n return [$this->getEntityTypeCode() => $options];\n }", "protected function getFilterField(){\n $aField = parent::getFilterField();\n $oRequest = AMI::getSingleton('env/request');\n if(!$oRequest->get('category', 0)){\n $aField['disableSQL'] = TRUE;\n }\n return $aField;\n }", "public function getFormCustomFields(){\n\t}", "protected function filterSliderFields(): array\n {\n return [];\n }", "public function filters()\n {\n return array(\n 'accessControl', /// perform access control for CRUD operations\n array(\n 'application.filters.UserLoginFilter + index, AdminPositionCode, CrearPosition ',/*cuando no estas logeado*/\n ),\n array(\n 'application.filters.UserUpdateFilter + index, AdminPositionCode, CrearPosition',\n )\n );\n }", "function Page_FilterValidated() {\n\n\t\t// Example:\n\t\t//$this->MyField1->SearchValue = \"your search criteria\"; // Search value\n\n\t}", "function Page_FilterValidated() {\n\n\t\t// Example:\n\t\t//$this->MyField1->SearchValue = \"your search criteria\"; // Search value\n\n\t}", "public function actionSetFilter()\n {\n $filter = $this->module->filter;\n\n //make css class for checkbox\n foreach ($filter as $key => $property) {\n if (isset($property['class'])) {\n if (is_array($property['class'])) {\n $filter[$key]['class'] = implode(' ', $property['class']);\n }\n } else {\n $filter[$key]['class'] = '';\n }\n }\n\n //set value for js ajax variable\n $useAjax = $this->module->useAjax ? 'true' : 'false';\n\n return $this->renderPartial('filter-list', ['filter' => $filter, 'useAjax' => $useAjax]);\n }", "public function addFilterFields($fields=array()){\n \tif(empty($fields)) return ;\n\n \t$this->filterFields = !is_array($fields) ? explode(',',$fields) : $fields;\n \t\n }", "abstract public function showFieldSets();", "function Page_FilterValidated() {\n\n\t\t// Example:\n\t\t//global $MyTable;\n\t\t//$MyTable->MyField1->SearchValue = \"your search criteria\"; // Search value\n\n\t}", "function Page_FilterValidated() {\n\n\t\t// Example:\n\t\t//global $MyTable;\n\t\t//$MyTable->MyField1->SearchValue = \"your search criteria\"; // Search value\n\n\t}", "public function addFilters()\n {\n }", "public function genericSearchFields()\n {\n return ['url', 'content', 'title', 'arguments_json', 'language_info'];\n }", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "function _prepare_filter_data () {\n\t\t// Filter session array name\n\t\t$this->_filter_name\t= $_GET[\"object\"].\"_filter\";\n\t\t// Connect common used arrays\n\t\tif (file_exists(INCLUDE_PATH.\"common_code.php\")) {\n\t\t\tinclude (INCLUDE_PATH.\"common_code.php\");\n\t\t}\n\t\t// Fields in the filter\n\t\t$this->_fields_in_filter = array(\n\t\t\t\"engine\",\n\t\t\t\"text\",\n\t\t);\n\t}", "public function showFilters()\n\t{\n\t\t$data = array(\n\t\t\t'filters' => $this->profileService->getFilters(),\n\t\t\t'properties' => $this->profileService->getPropertiesForProfile($this->profile)->lists('option_id')\n\t\t);\n\n\t\treturn new FilterView($data);\n\t}", "abstract public function getFieldsSearchable();", "function path_admin_filter_form(&$form_state, $keys = '') {\n $form['#attributes'] = array('class' => 'search-form');\n $form['basic'] = array('#type' => 'fieldset',\n '#title' => t('Filter aliases')\n );\n $form['basic']['inline'] = array('#prefix' => '<div class=\"container-inline\">', '#suffix' => '</div>');\n $form['basic']['inline']['filter'] = array(\n '#type' => 'textfield',\n '#title' => '',\n '#default_value' => $keys,\n '#maxlength' => 128,\n '#size' => 25,\n );\n $form['basic']['inline']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Filter'),\n '#submit' => array('path_admin_filter_form_submit_filter'),\n );\n if ($keys) {\n $form['basic']['inline']['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset'),\n '#submit' => array('path_admin_filter_form_submit_reset'),\n );\n }\n return $form;\n}", "public function GetFilters ();", "protected function getSearchColumnsForFilter()\n {\n return sfConfig::get('app_ull_user_phone_book_search_columns', array(\n 'first_name',\n 'last_name',\n 'UllLocation->name',\n 'UllLocation->short_name',\n 'UllLocation->phone_base_no',\n 'UllDepartment->name',\n 'UllJobTitle->name',\n ));\n }", "public function filters()\n {\n return [\n 'first_name' => 'trim|escape',\n 'last_name' => 'trim|escape',\n 'email_address' => 'trim|escape',\n 'message' => 'trim|escape',\n 'business_name' => 'trim|escape'\n ];\n }", "function xh_listFilters()\r\n\t{\r\n\t}", "public function global_filter_field_expr()\n {\n\n // filtering $_GET\n if (is_array(ctx()->getRequest()->get()) && ! empty(ctx()->getRequest()->get()))\n {\n foreach (ctx()->getRequest()->get() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->get($key, $this->_clean_input_field_expr($val));\n }\n }\n\n }\n\n // filtering $_POST\n if (is_array(ctx()->getRequest()->post()) && ! empty(ctx()->getRequest()->post()))\n {\n foreach (ctx()->getRequest()->post() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->post($key, $this->_clean_input_field_expr($val));\n }\n }\n }\n\n // filtering $_COOKIE\n if (is_array(ctx()->getRequest()->cookie()) && ! empty(ctx()->getRequest()->cookie()))\n {\n foreach (ctx()->getRequest()->cookie() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->cookie($key, $this->_clean_input_field_expr($val));\n }\n\n }\n }\n\n\n // filtering $_REQUEST\n if (is_array(ctx()->getRequest()->request()) && ! empty(ctx()->getRequest()->request()))\n {\n foreach (ctx()->getRequest()->request() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->request($key, $this->_clean_input_field_expr($val));\n }\n }\n }\n\n }", "abstract protected function filterFieldvalue();", "public function filters()\n {\n return [\n \n ];\n }", "function tracks_filter_fields() {\n global $typenow, $wpdb;\n\tif ($typenow == 'track') {\n\t\t$astates = get_categories('type=track&hide_empty=0&hierarchical=0&taxonomy=track-state');\n\t\tif (count($astates) > 0) {\n?>\n\t<select name=\"track-state\">\n\t <option value=\"\">All States</option>\n\t <?php foreach($astates as $astate) { $s = ''; if ($_GET['track-state'] == $astate->term_id) { $s = ' SELECTED'; } ?>\n\t <option value=\"<?php echo $astate->term_id; ?>\"<?php echo $s; ?>><?php echo $astate->name; ?></option>\n\t <?php } ?>\n\t</select>\n<?php\n\t\t}\n\t\t$aspecialities = get_categories('type=track&hide_empty=0&hierarchical=0&taxonomy=track-speciality');\n\t\tif (count($aspecialities) > 0) {\n?>\n\t<select name=\"track-speciality\">\n\t <option value=\"\">All Specialities</option>\n\t <?php foreach($aspecialities as $aspeciality) { $s = ''; if ($_GET['track-speciality'] == $aspeciality->term_id) { $s = ' SELECTED'; } ?>\n\t <option value=\"<?php echo $aspeciality->term_id; ?>\"<?php echo $s; ?>><?php echo $aspeciality->name; ?></option>\n\t <?php } ?>\n\t</select>\n<?php\n\t\t}\n\t}\n}", "function getFilter()\r\n\t{\r\n\t\tglobal $mainframe;\r\n\t\t$tableModel \t=& $this->_table;\r\n\t\t$formModel\t\t=& $tableModel->getForm();\r\n\t\t$elName2 \t\t= $this->getFullName( false, false, false );\r\n\t\tif (!$formModel->hasElement( $elName2 )) {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t\t$db =& JFactory::getDBO();\r\n\t\t$groupModel\t\t=& $this->_group;\r\n\t\t$table\t\t\t\t=& $tableModel->getTable();\r\n\t\t$element\t\t\t=& $this->getElement();\r\n\t\t$origTable \t\t= $table->db_table_name;\r\n\t\t$fabrikDb \t\t=& $tableModel->getDb();\r\n\t\t$params\t\t\t=& $this->getParams( );\r\n\r\n\t\t$js \t\t\t\t\t= \"\";\r\n\t\t$elName \t\t= $this->getFullName( false, true, false );\r\n\t\t$dbElName\t\t= $this->getFullName( false, false, false );\r\n\r\n\t\t$ids \t\t\t\t= $tableModel->getColumnData( $elName2 );\r\n\t\t//for ids that are text with apostrophes in\r\n\t\tfor ($x=0;$x<count( $ids );$x++) {\r\n\t\t\t$ids[$x] = addSlashes( $ids[$x] );\r\n\t\t}\r\n\t\t$elLabel\t\t\t\t= $element->label;\r\n\t\t$elExactMatch \t= $element->filter_exact_match;\r\n\t\t$v \t\t\t\t= $elName . \"[value]\";\r\n\t\t$t \t\t\t\t= $elName . \"[type]\";\r\n\t\t$e \t\t\t\t= $elName . \"[match]\";\r\n\t\t$jt \t\t\t= $elName . \"[join_db_name]\";\r\n\t\t$jk \t\t\t= $elName . \"[join_key_column]\";\r\n\t\t$jv \t\t\t= $elName . \"[join_val_column]\";\r\n\t\t$origDate \t\t= $elName . \"[filterVal]\";\r\n\t\t$fullword \t\t= $elName . \"[full_words_only]\";\r\n\t\t//corect default got\r\n\t\t$default = $this->getDefaultFilterVal();\r\n\r\n\t\t$aThisFilter = array();\r\n\r\n\t\t//filter the drop downs lists if the table_view_own_details option is on\r\n\t\t//other wise the lists contain data the user should not be able to see\r\n\t\t// note, this should now use the prefilter data to filter the list\r\n\r\n\t\t/* check if the elements group id is on of the table join groups if it is then we swap over the table name*/\r\n\t\t$fromTable = $origTable;\r\n\t\t$joinStr = $tableModel->_buildQueryJoin();\r\n\r\n\t\tforeach ($tableModel->_aJoins as $aJoin) {\r\n\t\t\t/** not sure why the group id key wasnt found - but put here to remove error **/\r\n\t\t\tif (array_key_exists( 'group_id', $aJoin )) {\r\n\t\t\t\t\t\r\n\t\t\t\tif ($aJoin->group_id == $element->group_id && $aJoin->element_id == 0) {\r\n\t\t\t\t\t$fromTable = $aJoin->table_join;\r\n\t\t\t\t\t$elName = str_replace( $origTable . '.', $fromTable . '.', $elName);\r\n\t\t\t\t\t$v = $fromTable . '___' . $element->name . \"[value]\";\r\n\t\t\t\t\t$t = $fromTable . '___' . $element->name . \"[type]\";\r\n\t\t\t\t\t$e = $fromTable . '___' . $element->name . \"[match]\";\r\n\t\t\t\t\t$fullword = $elName . \"[full_words_only]\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* elname should be in format table.key add quotes:*/\r\n\t\t$dbElName = explode( \".\", $dbElName );\r\n\t\t$dbElName = \"`\" . $dbElName[0] . \"`.`\" . $dbElName[1] . \"`\";\r\n\r\n\t\t$tabletype = $params->get( 'my_table_data', 'username' );\r\n\r\n\t\t$sql = \"SELECT DISTINCT( $tabletype ) AS elText, id AS elVal FROM #__users \\n\";\r\n\t\t$sql .= \"WHERE id IN ('\" . implode( \"','\", $ids ) . \"')\"\r\n\t\t. \"\\n GROUP BY elText ASC\";\r\n\r\n\r\n\t\t$context = \"com_fabrik.table\" . $tableModel->_id . \".filter.\" . trim($elName);\r\n\t\t$default = $mainframe->getUserStateFromRequest( $context, trim($elName), $default );\r\n\r\n\r\n\t\tswitch ( $element->filter_type )\r\n\t\t{\r\n\t\t\tcase \"range\":\r\n\t\t\t\t$db->setQuery( $sql );\r\n\t\t\t\t$oDistinctData = $db->loadObjectList( );\r\n\t\t\t\t$aThisFilter[] = JHTML::_('select.option', '', JText::_( 'PLEASE SELECT' ) );\r\n\t\t\t\tif (is_array( $oDistinctData )) {\r\n\t\t\t\t\t$aThisFilter = array_merge( $aThisFilter, $oDistinctData );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$attribs = 'class=\"inputbox fabrik_filter\" size=\"1\" ';\r\n\t\t\t\t$default1 = (is_array($default)) ? $default['value'][0] : '';\r\n\t\t\t\t$return \t = JHTML::_('select.genericlist', $aThisFilter , $v.'[]', $attribs, \"elVal\", 'elText', $default1, $element->name . \"_filter_range_0\" );\r\n\t\t\t\t$default1 = (is_array($default)) ? $default['value'][1] : '';\r\n\t\t\t\t$return \t .= JHTML::_('select.genericlist', $aThisFilter , $v.'[]', $attribs, \"elVal\", 'elText', $default1 , $element->name . \"_filter_range_1\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"dropdown\":\r\n\t\t\t\t$db->setQuery( $sql );\r\n\t\t\t\t$oDistinctData = $db->loadObjectList();\r\n\t\t\t\t$aThisFilter[] = JHTML::_('select.option', '', JText::_( 'PLEASE SELECT' ) );\r\n\t\t\t\tif (is_array( $oDistinctData )) {\r\n\t\t\t\t\t$aThisFilter = array_merge( $aThisFilter, $oDistinctData );\r\n\t\t\t\t}\r\n\t\t\t\t$return \t = JHTML::_('select.genericlist', $aThisFilter , $v, 'class=\"inputbox fabrik_filter\" size=\"1\" ' , \"elVal\", 'elText', $default );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"field\":\r\n\r\n\t\t\t\t$default = ( is_array( $default ) && array_key_exists( 'value', $default) ) ? $default['value'] : '';\r\n\t\t\t\tif (get_magic_quotes_gpc()) {\r\n\t\t\t\t\t$default\t\t\t= stripslashes( $default );\r\n\t\t\t\t}\r\n\t\t\t\t$default = htmlspecialchars( $default );\r\n\t\t\t\t$return = \"<input type='text' name='$v' class=\\\"inputbox fabrik_filter\\\" value=\\\"$default\\\" $jsfilter />\";\r\n\t\t\t\tbreak;\r\n\t\t\t\t//moved to table options\r\n\t\t\t\t/*case \"search\":\r\n\t\t\t\t */\r\n\t\t}\r\n\t\t$return .= \"\\n<input type='hidden' name='$t' value='$element->filter_type' />\\n\";\r\n\t\t$return .= \"\\n<input type='hidden' name='$e' value='$elExactMatch' />\\n\";\r\n\t\t$return .= \"\\n<input type='hidden' name='$fullword' value='\" . $params->get('full_words_only', '0') . \"' />\\n\";\r\n\t\treturn $return;\r\n\t}", "public function buildShowFields()\n {\n $this->addField(\n SharpShowTextField::make('id')\n ->setLabel('Id:')\n )->addField(\n SharpShowTextField::make('name')\n ->setLabel('name:')\n )->addField(\n SharpShowTextField::make('url')\n ->setLabel('url:')\n )->addField(\n SharpShowTextField::make('vendor_id')\n ->setLabel('vendor_id')\n )->addField(\n SharpShowTextField::make('parent_id')\n ->setLabel('parent_id')\n )->addField(\n SharpShowTextField::make('created_at')\n ->setLabel('Created At:')\n )->addField(\n SharpShowTextField::make('updated_at')\n ->setLabel('Updated At:')\n )->addField(\n SharpShowEntityListField::make('products', 'product')\n ->hideFilterWithValue('category', function($instanceId) {\n return $instanceId;\n })\n ->showEntityState(false)\n ->showReorderButton(true)\n ->showCreateButton(false)\n );\n }", "public function onDisplayFilter(&$filter, $value = '', $formName = 'adminForm', $isSearchView = 0)\n\t{\n\t\tif (!in_array($filter->field_type, static::$field_types)) return;\n\n\t\t$db = Factory::getDbo();\n\t\t$_nowDate = 'UTC_TIMESTAMP()';\n\t\t$nullDate = $db->getNullDate();\n\n\t\t// Create order clause dynamically based on the field settings\n\t\t$order = $filter->parameters->get('orderby', 'alpha');\n\t\t$orderby = flexicontent_db::buildItemOrderBy(\n\t\t\t$filter->parameters,\n\t\t\t$order, $request_var = '', $config_param = '',\n\t\t\t$item_tbl_alias = 'ct', $relcat_tbl_alias = 'rel',\n\t\t\t$default_order = '', $default_order_dir = '', $sfx = '_form', $support_2nd_lvl = false\n\t\t);\n\n\t\t// WARNING: we can not use column alias in from, join, where, group by, can use in having (some DB e.g. mysql) and in order-by\n\t\t// partial SQL clauses\n\t\t$filter->filter_valuesselect = ' ct.id AS value, ct.title AS text';\n\t\t$filter->filter_valuesfrom = null; // use default\n\t\t$filter->filter_valuesjoin = ' JOIN #__content AS ct ON ct.id = fi.value_integer AND ct.state = 1 ' .\n\t\t\t' AND (ct.publish_up IS NULL OR ct.publish_up = ' . $db->Quote($nullDate) . ' OR ct.publish_up <= ' . $_nowDate . ')' .\n\t\t\t' AND (ct.publish_down IS NULL OR ct.publish_down = ' . $db->Quote($nullDate) . ' OR ct.publish_down >= ' . $_nowDate . ')';\n\t\t$filter->filter_valueswhere = null; // use default\n\t\t// full SQL clauses\n\t\t$filter->filter_groupby = ' GROUP BY fi.value_integer '; // * will be be appended with , fi.item_id\n\t\t$filter->filter_having = null; // use default\n\t\t$filter->filter_orderby = $orderby; // use field ordering setting\n\n\t\tFlexicontentFields::createFilter($filter, $value, $formName);\n\t}", "public function getFilters();", "function readfilter()\n\t{\n\t\t$field = $this->input->post(\"namafield\");\n\t\t$value = $this->input->post(\"valfilter\");\n\n\t\treturn array(\n\t\t\t\t\"field\" => $field,\n\t\t\t\t\"value\" => $value\n\t\t\t);\n\t}", "function FilterForm()\n\t{\tob_start();\n\t\techo \"<form class='akFilterForm' method='get' action='\", $_SERVER[\"SCRIPT_NAME\"], \"'>\\n<span>Male or Female</span>\\n<select name='morf'>\\n\";\n\t\tforeach (array(\"\"=>\"all\", \"M\"=>\"Male\", \"F\"=>\"Female\") as $option=>$text)\n\t\t{\techo \"<option value='\", $option, \"'\", $option == $_GET[\"morf\"] ? \" selected='selected'\" : \"\", \">\", $text, \"</option>\\n\";\n\t\t}\n\t\techo \"</select>\\n<span>Country</span>\\n<select name='ctry' id='ctry_select' onchange='MemberFilterCountryList();'>\\n<option value=''>all</option>\";\n\t\tforeach ($this->GetCountries(\"shortname\", true) as $option=>$text)\n\t\t{\techo \"<option value='\", $option, \"'\", $option == $_GET[\"ctry\"] ? \" selected='selected'\" : \"\", \">\", $this->InputSafeString($text), \"</option>\\n\";\n\t\t}\n\t\techo \"</select><span>Name (part)</span><input type='text' name='name' value='\", $this->InputSafeString($_GET[\"name\"]), \"' />\\n<input type='submit' class='submit' value='Apply Filter' />\\n<div class='clear'></div></form><div class='clear'></div>\";\n\t\treturn ob_get_clean();\n\t}", "public function filterFields($fields, $context = null)\n\t{\n\t\tif (!isset($fields->published, $fields->published_at)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$user = BackendAuth::getUser();\n\n\t\tif (!$user->hasAnyAccess(['jetminds.job.access_publish'])) {\n\t\t\t$fields->published->hidden = true;\n\t\t\t$fields->published_at->hidden = true;\n\t\t}\n\t\telse {\n\t\t\t$fields->published->hidden = false;\n\t\t\t$fields->published_at->hidden = false;\n\t\t}\n\t}", "public function getFilter(){ }", "public function filter() {\n\t $this->model->filter(array(\"status\"=>array(0,1)));\n\t if(Request::post(\"section\")){\n\t $section = new CmsSection(Request::post(\"section\"));\n\t foreach($section->tree() as $section) $section_ids[] = $section->primval;\n\t $this->model->filter(array(\"cms_section_id\"=>$section_ids));\n }\n\t parent::filter();\n\t}", "public function getfilterColumns()\n\t{\n\t\treturn array(\"name\",\"last_name\", \"country\");\n\t}", "public function addFilters() {\n\t\t// $this->subscriber->addFilter( 'mdm_syndication_post_fields', [$this, 'addCustomFields'] );\n\t}", "function getFields();", "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'amount' => array(\n\t\t\t\tarray('Num::filter_number')\n\t\t\t),\n\t\t\t'price' => array(\n\t\t\t\tarray('Num::filter_number')\n\t\t\t)\n\t\t);\n\t}", "private static function _getFilter() {}", "function render_filter_form(Table $table, $attributes = array()) {\n $form = get_filter_form($table);\n\n foreach ($attributes as $key => $value)\n if( method_exists($form, $key) )\n $form->{$key}($value);\n\n if( isset($attributes['group']) )\n $groups = $form->getGroup($attributes['group']);\n else\n $groups = $form->getGroups();\n\n $html = $form->openForm();\n\n array_walk($groups, function($value, $group) use(& $html, $form) {\n $html .= '<div class=\"'.$group.'\">';\n $html .= $form->render($group, false);\n $html .= '</div>';\n });\n\n $html .= FormBuilder\\get_element('button', ['value' => _(\"Search\"), 'type' => 'submit', 'class' => 'btn btn-success btn-search btn-flat'])\n ->render();\n\n $html .= $form->closeForm();\n\n return $html;\n}", "function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sSavedFilterList = \"\";\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id->AdvancedSearch->ToJson(), \",\"); // Field id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->fecha_tamizaje->AdvancedSearch->ToJson(), \",\"); // Field fecha_tamizaje\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_centro->AdvancedSearch->ToJson(), \",\"); // Field id_centro\n\t\t$sFilterList = ew_Concat($sFilterList, $this->apellidopaterno->AdvancedSearch->ToJson(), \",\"); // Field apellidopaterno\n\t\t$sFilterList = ew_Concat($sFilterList, $this->apellidomaterno->AdvancedSearch->ToJson(), \",\"); // Field apellidomaterno\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nombre->AdvancedSearch->ToJson(), \",\"); // Field nombre\n\t\t$sFilterList = ew_Concat($sFilterList, $this->ci->AdvancedSearch->ToJson(), \",\"); // Field ci\n\t\t$sFilterList = ew_Concat($sFilterList, $this->fecha_nacimiento->AdvancedSearch->ToJson(), \",\"); // Field fecha_nacimiento\n\t\t$sFilterList = ew_Concat($sFilterList, $this->dias->AdvancedSearch->ToJson(), \",\"); // Field dias\n\t\t$sFilterList = ew_Concat($sFilterList, $this->semanas->AdvancedSearch->ToJson(), \",\"); // Field semanas\n\t\t$sFilterList = ew_Concat($sFilterList, $this->meses->AdvancedSearch->ToJson(), \",\"); // Field meses\n\t\t$sFilterList = ew_Concat($sFilterList, $this->sexo->AdvancedSearch->ToJson(), \",\"); // Field sexo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->discapacidad->AdvancedSearch->ToJson(), \",\"); // Field discapacidad\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_tipodiscapacidad->AdvancedSearch->ToJson(), \",\"); // Field id_tipodiscapacidad\n\t\t$sFilterList = ew_Concat($sFilterList, $this->resultado->AdvancedSearch->ToJson(), \",\"); // Field resultado\n\t\t$sFilterList = ew_Concat($sFilterList, $this->resultadotamizaje->AdvancedSearch->ToJson(), \",\"); // Field resultadotamizaje\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tapon->AdvancedSearch->ToJson(), \",\"); // Field tapon\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipo->AdvancedSearch->ToJson(), \",\"); // Field tipo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->repetirprueba->AdvancedSearch->ToJson(), \",\"); // Field repetirprueba\n\t\t$sFilterList = ew_Concat($sFilterList, $this->observaciones->AdvancedSearch->ToJson(), \",\"); // Field observaciones\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_apoderado->AdvancedSearch->ToJson(), \",\"); // Field id_apoderado\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_referencia->AdvancedSearch->ToJson(), \",\"); // Field id_referencia\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "public function filters() {\n\t\treturn array(\n\t\t 'name' => array(array('trim')),\n\t\t);\n\t}", "private function setFilter()\n\t{\n\t\t// get filter values\n\t\t$this->filter['language'] = ($this->getParameter('language', 'array') != '') ? $this->getParameter('language', 'array') : BL::getWorkingLanguage();\n\t\t$this->filter['application'] = $this->getParameter('application');\n\t\t$this->filter['module'] = $this->getParameter('module');\n\t\t$this->filter['type'] = $this->getParameter('type', 'array');\n\t\t$this->filter['name'] = $this->getParameter('name');\n\t\t$this->filter['value'] = $this->getParameter('value');\n\n\t\t// build query for filter\n\t\t$this->filterQuery = BackendLocaleModel::buildURLQueryByFilter($this->filter);\n\t}", "function getFilterForm() {\r\n $filter_form = null;\r\n if ($this->aFields['is_filtered'] === true) {\r\n $formsPath = $this->aProperties['ws_data_dir'] . '/vmap/layer/' . $this->aFields['layer_id'] . '/forms';\r\n if (file_exists($formsPath . '/published.json')) {\r\n $filter_form = file_get_contents($formsPath . '/published.json');\r\n }\r\n }\r\n return $filter_form;\r\n }", "public function filterAction()\r\n {\r\n \t/*\r\n \t * form needs to include:\r\n \t * \r\n \t * user id\r\n \t * task category\r\n \t * client id\r\n \t * project id\r\n \t * start date\r\n \t * end date\r\n \t */\r\n $this->view->allUsers = $this->userService->getUserList();\r\n $task = new Task();\r\n $this->view->categories = $task->constraints['category']->getValues();\r\n $this->view->clients = $this->clientService->getClients();\r\n \t $this->view->projects = new ArrayObject();\r\n $this->renderView('timesheet/filter.php'); \t\r\n }", "public function defineFilters() {\n\t\treturn array(\n 'join' => array(\n 'car' => array(\n 'on' => array(\n '[car].id = [this].car_id'\n )\n )\n ),\n 'where' => array(\n 'id' => array(\n '[this].id = :id'\n )\n ),\n 'orderby' => array(\n 'date' => array(\n '[this].date :dir'\n )\n )\n );\n\t}", "function GetFilterList() {\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id->AdvancedSearch->ToJSON(), \",\"); // Field id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->name->AdvancedSearch->ToJSON(), \",\"); // Field name\n\t\t$sFilterList = ew_Concat($sFilterList, $this->_email->AdvancedSearch->ToJSON(), \",\"); // Field email\n\t\t$sFilterList = ew_Concat($sFilterList, $this->companyname->AdvancedSearch->ToJSON(), \",\"); // Field companyname\n\t\t$sFilterList = ew_Concat($sFilterList, $this->servicetime->AdvancedSearch->ToJSON(), \",\"); // Field servicetime\n\t\t$sFilterList = ew_Concat($sFilterList, $this->country->AdvancedSearch->ToJSON(), \",\"); // Field country\n\t\t$sFilterList = ew_Concat($sFilterList, $this->phone->AdvancedSearch->ToJSON(), \",\"); // Field phone\n\t\t$sFilterList = ew_Concat($sFilterList, $this->skype->AdvancedSearch->ToJSON(), \",\"); // Field skype\n\t\t$sFilterList = ew_Concat($sFilterList, $this->website->AdvancedSearch->ToJSON(), \",\"); // Field website\n\t\t$sFilterList = ew_Concat($sFilterList, $this->linkedin->AdvancedSearch->ToJSON(), \",\"); // Field linkedin\n\t\t$sFilterList = ew_Concat($sFilterList, $this->facebook->AdvancedSearch->ToJSON(), \",\"); // Field facebook\n\t\t$sFilterList = ew_Concat($sFilterList, $this->twitter->AdvancedSearch->ToJSON(), \",\"); // Field twitter\n\t\t$sFilterList = ew_Concat($sFilterList, $this->active_code->AdvancedSearch->ToJSON(), \",\"); // Field active_code\n\t\t$sFilterList = ew_Concat($sFilterList, $this->identification->AdvancedSearch->ToJSON(), \",\"); // Field identification\n\t\t$sFilterList = ew_Concat($sFilterList, $this->link_expired->AdvancedSearch->ToJSON(), \",\"); // Field link_expired\n\t\t$sFilterList = ew_Concat($sFilterList, $this->isactive->AdvancedSearch->ToJSON(), \",\"); // Field isactive\n\t\t$sFilterList = ew_Concat($sFilterList, $this->pio->AdvancedSearch->ToJSON(), \",\"); // Field pio\n\t\t$sFilterList = ew_Concat($sFilterList, $this->google->AdvancedSearch->ToJSON(), \",\"); // Field google\n\t\t$sFilterList = ew_Concat($sFilterList, $this->instagram->AdvancedSearch->ToJSON(), \",\"); // Field instagram\n\t\t$sFilterList = ew_Concat($sFilterList, $this->account_type->AdvancedSearch->ToJSON(), \",\"); // Field account_type\n\t\t$sFilterList = ew_Concat($sFilterList, $this->logo->AdvancedSearch->ToJSON(), \",\"); // Field logo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->profilepic->AdvancedSearch->ToJSON(), \",\"); // Field profilepic\n\t\t$sFilterList = ew_Concat($sFilterList, $this->mailref->AdvancedSearch->ToJSON(), \",\"); // Field mailref\n\t\t$sFilterList = ew_Concat($sFilterList, $this->deleted->AdvancedSearch->ToJSON(), \",\"); // Field deleted\n\t\t$sFilterList = ew_Concat($sFilterList, $this->deletefeedback->AdvancedSearch->ToJSON(), \",\"); // Field deletefeedback\n\t\t$sFilterList = ew_Concat($sFilterList, $this->account_id->AdvancedSearch->ToJSON(), \",\"); // Field account_id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->start_date->AdvancedSearch->ToJSON(), \",\"); // Field start_date\n\t\t$sFilterList = ew_Concat($sFilterList, $this->end_date->AdvancedSearch->ToJSON(), \",\"); // Field end_date\n\t\t$sFilterList = ew_Concat($sFilterList, $this->year_moth->AdvancedSearch->ToJSON(), \",\"); // Field year_moth\n\t\t$sFilterList = ew_Concat($sFilterList, $this->registerdate->AdvancedSearch->ToJSON(), \",\"); // Field registerdate\n\t\t$sFilterList = ew_Concat($sFilterList, $this->login_type->AdvancedSearch->ToJSON(), \",\"); // Field login_type\n\t\t$sFilterList = ew_Concat($sFilterList, $this->accountstatus->AdvancedSearch->ToJSON(), \",\"); // Field accountstatus\n\t\t$sFilterList = ew_Concat($sFilterList, $this->ispay->AdvancedSearch->ToJSON(), \",\"); // Field ispay\n\t\t$sFilterList = ew_Concat($sFilterList, $this->profilelink->AdvancedSearch->ToJSON(), \",\"); // Field profilelink\n\t\t$sFilterList = ew_Concat($sFilterList, $this->source->AdvancedSearch->ToJSON(), \",\"); // Field source\n\t\t$sFilterList = ew_Concat($sFilterList, $this->agree->AdvancedSearch->ToJSON(), \",\"); // Field agree\n\t\t$sFilterList = ew_Concat($sFilterList, $this->balance->AdvancedSearch->ToJSON(), \",\"); // Field balance\n\t\t$sFilterList = ew_Concat($sFilterList, $this->job_title->AdvancedSearch->ToJSON(), \",\"); // Field job_title\n\t\t$sFilterList = ew_Concat($sFilterList, $this->projects->AdvancedSearch->ToJSON(), \",\"); // Field projects\n\t\t$sFilterList = ew_Concat($sFilterList, $this->opportunities->AdvancedSearch->ToJSON(), \",\"); // Field opportunities\n\t\t$sFilterList = ew_Concat($sFilterList, $this->isconsaltant->AdvancedSearch->ToJSON(), \",\"); // Field isconsaltant\n\t\t$sFilterList = ew_Concat($sFilterList, $this->isagent->AdvancedSearch->ToJSON(), \",\"); // Field isagent\n\t\t$sFilterList = ew_Concat($sFilterList, $this->isinvestor->AdvancedSearch->ToJSON(), \",\"); // Field isinvestor\n\t\t$sFilterList = ew_Concat($sFilterList, $this->isbusinessman->AdvancedSearch->ToJSON(), \",\"); // Field isbusinessman\n\t\t$sFilterList = ew_Concat($sFilterList, $this->isprovider->AdvancedSearch->ToJSON(), \",\"); // Field isprovider\n\t\t$sFilterList = ew_Concat($sFilterList, $this->isproductowner->AdvancedSearch->ToJSON(), \",\"); // Field isproductowner\n\t\t$sFilterList = ew_Concat($sFilterList, $this->states->AdvancedSearch->ToJSON(), \",\"); // Field states\n\t\t$sFilterList = ew_Concat($sFilterList, $this->cities->AdvancedSearch->ToJSON(), \",\"); // Field cities\n\t\t$sFilterList = ew_Concat($sFilterList, $this->offers->AdvancedSearch->ToJSON(), \",\"); // Field offers\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\n\t\t// Return filter list in json\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "public function indexForFilter(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n }\n $query = $this->{$this->main_model}->find();\n $this->CommonQuery->build_common_query($query,$user,[]); \n $q_r = $query->all();\n $items = array();\n foreach($q_r as $i){\n array_push($items,array(\n 'id' => $i->id, \n 'text' => $i->name\n ));\n } \n\n $this->set(array(\n 'items' => $items,\n 'success' => true,\n '_serialize' => array('items','success')\n ));\n }", "function search_filters(array $options = array())\n{\n return get_view()->searchFilters($options);\n}", "public function getFilterForm() {\n\n return $this->filterForm;\n }", "function acf_enable_filters($filters = array())\n{\n}", "function field(){\n\t\t\t$this->aah->check_access();\n\n\t\t\t$nav_id = $this->aah->get_nav_id(__CLASS__.'/field');\n\t\t\t$read_access = $this->aah->check_privilege('read',$nav_id);\n\t\t\t$add_access = $this->aah->check_privilege('add',$nav_id);\n\n\t\t\tif($read_access)\n\t\t\t{\n\t\t\t\t$this->global_model->reinitialize_dao();\n\t\t\t\t$dao = $this->global_model->get_dao();\n\t\t\t\t$data['active_url'] = str_replace('::','/',__METHOD__);\n\t\t\t\t$data['dt2_rows'] = $dao->execute(0,\"SELECT * FROM ref_dt2 WHERE provinsi_id='\".$this->_SYS_PARAMS[1].\"'\")->result_array();\n\t\t\t\t$data['form_id'] = \"search-school-form\";\n\t\t\t\t$data['active_controller'] = $this->active_controller;\n\t\t\t\t$data['containsTable'] = true;\n\t\t\t\t$data['add_access'] = $add_access;\n\t\t\t\t$this->backoffice_template->render($this->active_controller.'/field/index',$data);\n\t\t\t}else{\n\t\t\t\t$this->error_403();\n\t\t\t}\n\t\t}" ]
[ "0.71406275", "0.7038401", "0.69285464", "0.68665934", "0.6833465", "0.68259025", "0.67834985", "0.6749078", "0.673389", "0.66995", "0.6689305", "0.668148", "0.666557", "0.6627469", "0.662126", "0.6595873", "0.6544579", "0.65440506", "0.65122986", "0.64389765", "0.6423477", "0.6417796", "0.64107275", "0.63984853", "0.6397954", "0.6387922", "0.638121", "0.63607556", "0.6350024", "0.6349881", "0.6348075", "0.6323919", "0.63218004", "0.6317399", "0.6313698", "0.62930864", "0.6290272", "0.6267761", "0.62653476", "0.6258727", "0.62544453", "0.62499344", "0.62435466", "0.62435466", "0.62412333", "0.6235092", "0.6234231", "0.62292945", "0.6212022", "0.6212022", "0.62098396", "0.6208031", "0.6201521", "0.6201222", "0.6201222", "0.6197418", "0.6196721", "0.6196041", "0.6196041", "0.6196041", "0.6196041", "0.6196041", "0.61924595", "0.6186391", "0.6184252", "0.6182141", "0.6173464", "0.6157524", "0.6154348", "0.61440647", "0.6142928", "0.6141007", "0.61336184", "0.6125666", "0.61241025", "0.6121658", "0.61164826", "0.6098112", "0.60887486", "0.60852456", "0.60720044", "0.60692996", "0.6063581", "0.605574", "0.60515946", "0.60376674", "0.6037409", "0.6030739", "0.6011159", "0.60061777", "0.6005997", "0.59937555", "0.59899056", "0.5988885", "0.59878665", "0.59869057", "0.5983861", "0.5975411", "0.5967962", "0.59524167", "0.59507346" ]
0.0
-1
Fields to be shown on lists
protected function configureListFields(ListMapper $listMapper) { // $listMapper ->addIdentifier('nombre') ->add('estado' , 'choice', array('choices' => array('1' => 'Activo', '0' => 'Inactivo'))) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function makeFieldList() {}", "public function getListFields();", "protected function getFieldsFromShowItem() {}", "public function getFieldsList(){\n return $this->_get(1);\n }", "function get_field_list()\r\n\t{\r\n\t\t$fields = array();\r\n\r\n\t\tif (Authority::can('edit', 'admin/item/definition'))\r\n\t\t{\r\n\t\t\t$id_definition = $this->input->post('id_item_definition');\r\n\r\n\t\t\t$fields = $this->extend_field_model->get_lang_list(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'parent' => 'item',\r\n\t\t\t\t\t'id_parent' => $id_definition\r\n\t\t\t\t),\r\n\t\t\t\tSettings::get_lang('default')\r\n\t\t\t);\r\n\r\n\t\t\t// Set type names\r\n\t\t\tforeach($fields as &$field)\r\n\t\t\t{\r\n\t\t\t\t$field['type_name'] = self::$_TYPE_NAMES[$field['type']];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t$this->template['id_item_definition'] = $id_definition;\r\n\t\t$this->template['fields'] = $fields;\r\n\r\n\t\t$this->output('item/definition/fields');\r\n\t}", "public function listFields()\n\t{\n\t\treturn array('id' => 'ID', 'title' => 'Title', 'estimated' => 'Estimated', 'status' => 'Status', 'getPercentageComplete' => 'Percentage Complete');\n\t}", "abstract function buildShowFields(): void;", "function get_field_list()\n\t{\n\t\t$fields = array();\n\n\n\t\t$this->xhr_output($fields);\n\t}", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "function fill_in_additional_list_fields()\r\n\t{\r\n\t}", "public function buildFields()\n {\n $this->addField('name', 'kuma_menu.menu.adminlist.field.name', true);\n }", "public function getFrontendFields();", "public function actionFieldList($id){\n\n $fields= Yii::app()->db->createCommand()\n //->select('*')\n ->select('field_name,field_length,field_type,field_input_type,is_unique,is_required,default_value')\n ->from('cyl_fields')\n ->where('table_id = '.$id)\n ->queryRow();\n\n $field_values = Yii::app()->db->createCommand()\n //->select('field_id,field_name,field_length,field_type,field_input_type,is_unique,is_required,incremental_start,default_value')\n ->select('*')\n ->from('cyl_fields')\n ->where('table_id = '.$id)\n ->queryAll();\n\n foreach ($fields as $key => $field){\n $field_title[] = $key;\n }\n $this->renderPartial('field-list',array('fields'=>$field_title,'fields_value' => $field_values,'id'=>$id));\n }", "function getFields();", "public function buildShowFields()\n {\n $this->addField(\n SharpShowTextField::make('id')\n ->setLabel('Id:')\n )->addField(\n SharpShowTextField::make('name')\n ->setLabel('name:')\n )->addField(\n SharpShowTextField::make('url')\n ->setLabel('url:')\n )->addField(\n SharpShowTextField::make('vendor_id')\n ->setLabel('vendor_id')\n )->addField(\n SharpShowTextField::make('parent_id')\n ->setLabel('parent_id')\n )->addField(\n SharpShowTextField::make('created_at')\n ->setLabel('Created At:')\n )->addField(\n SharpShowTextField::make('updated_at')\n ->setLabel('Updated At:')\n )->addField(\n SharpShowEntityListField::make('products', 'product')\n ->hideFilterWithValue('category', function($instanceId) {\n return $instanceId;\n })\n ->showEntityState(false)\n ->showReorderButton(true)\n ->showCreateButton(false)\n );\n }", "private function getAdditionalListFields(){\n $cols = '';\n\n foreach($this->main->dataset['data'] as $item){\n if($item['list'] && strlen($item['name']) > 0 &&\n ($item['name'] != 'name' && $item['name'] != 'sort' && $item['name'] != 'id' && $item['name'] != 'publish')\n ){\n $cols .= ', `'.DB::quote($item['name']).'`';\n };\n };\n\n return $cols;\n }", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "function show_list()\n\t{\n\t\t$out = $this->get_value_list();\n\t\treturn $out;\n\t}", "abstract public function showFieldSets();", "public function getFields() {}", "public function getFields() {}", "public function getFields() {}", "function get_fields( ) {\n\t\treturn $this->fields_list;\n\t\t}", "protected function _fields()\n\t{\n\t\treturn array(\n\t\t\t\t'name',\n\t\t\t 'intro', 'sort_order',\n\t\t\t 'status', 'feature',\n\t\t);\n\t}", "public function getFieldList()\n {\n $sObjectName = $this->getShopObjectName();\n\n if ($sObjectName) {\n $oShopObject = oxNew($sObjectName);\n } else {\n $oShopObject = oxNew('oxbase');\n $oShopObject->init($this->getTableName());\n }\n\n if ($oShopObject instanceof oxI18n) {\n $oShopObject->setLanguage(0);\n $oShopObject->setEnableMultilang(false);\n }\n\n $sViewName = $oShopObject->getViewName();\n $sFields = str_ireplace('`' . $sViewName . \"`.\", \"\", strtoupper($oShopObject->getSelectFields()));\n $sFields = str_ireplace(array(\" \", \"`\"), array(\"\", \"\"), $sFields);\n $this->_aFieldList = explode(\",\", $sFields);\n\n return $this->_aFieldList;\n }", "function GetFieldsList()\n\t{\n\t\tglobal $dal_info;\n\t\treturn array_keys( $dal_info[ $this->infoKey ] );\n\t}", "public function buildFields()\n {\n $this->addField('name', 'media.adminlist.configurator.name', true);\n $this->addField('contentType', 'media.adminlist.configurator.type', true);\n $this->addField('updatedAt', 'media.adminlist.configurator.date', true);\n $this->addField('filesize', 'media.adminlist.configurator.filesize', true);\n }", "public function listRegisterFields(){\n\t\t$this->registerFieldString('name_hld', 'Tipo');\n\t}", "static public function getFieldsList () {\n return self::_getInstance()->_fieldsList;\n }", "function listPage_tableField(){\n $this->data_view['tableField'] = array(\n array('name'=>'id','title'=>'Mã'),\n array('name'=>'image','title'=>'Hình','type'=>'image','linkDetail'=>true),\n array('name'=>'title','title'=>'Tên','linkDetail'=>true),\n array('name'=>'c_title','title'=>'Loại'),\n array('name'=>'price','title'=>'Giá','type'=>'number'),\n array('name'=>'price_promotion','title'=>'Giá giảm','type'=>'number','hidden'=>true),\n array('name'=>'views','title'=>'Lượt xem','type'=>'number'),\n array('name'=>'is_active','title'=>'Trạng thái','type'=>'status'),\n array('name'=>'is_stock','title'=>'Còn hàng','type'=>'status','hidden'=>true),\n array('name'=>'is_special','title'=>'Nổi bật','type'=>'status','hidden'=>true)\n );\n }", "function getFieldList($field_data = false, $type = 'list', $fs_data = false)\n {\n if ($field_data) {\n $txt = new Text($this->language, $this->translation_module_default);\n $result = array();\n $fs_count = 0;\n $prev_fs = 0;\n foreach ($field_data as $data) {\n switch ($type) {\n case 'grid_column':\n $result[] = array(\n 'header' => $txt->display($data['translation'] ? $data['translation'] : $data['field']),\n 'dataIndex' => $data['field'],\n 'sortable' => $data['sortable'] ? true : false,\n 'hidden' => $data['hidden'] ? true : false\n );\n break;\n case 'filters':\n switch ($data['type']) {\n case 1: // textfield\n $result[] = array(\n 'name' => $data['field'],\n 'field_title' => $txt->display($data['translation'] ? $data['translation'] : $data['field']),\n 'type' => 'textfield'\n );\n break;\n case 2: // combobox\n $result[] = array(\n 'name' => $data['field'],\n 'field_title' => $txt->display($data['translation'] ? $data['translation'] : $data['field']),\n 'type' => 'combobox',\n 'emptyText' => $this->getFieldRelationAllPhrase($data['relation_table']),\n 'ds_fields' => array(\n 'id',\n 'name'\n ),\n 'ds_data' => array(\n 0 => '***ASSOC_ARRAY***',\n 1 => $this->getFieldRelationList($data['relation_table'], true)\n )\n );\n break;\n case 3: // checkbox\n // todo ?\n break; \n case 5: // date\n $result[] = array(\n 'name' => $data['field'],\n 'field_title' => $txt->display($data['translation'] ? $data['translation'] : $data['field']),\n 'type' => 'textfield'\n );\n break;\n default:\n break;\n }\n break;\n case 'detail':\n switch ($data['type']) {\n case 1: // textfield\n $result[$data[\"fieldset_id\"]][] = array(\n 'type' => 'textfield',\n 'name' => $data['field'],\n 'tooltip' => $data['tooltip'],\n 'field_title' => $txt->display($data['translation'] ? $data['translation'] : $data['field'])\n );\n break;\n case 2: // combobox\n $result[$data[\"fieldset_id\"]][] = array(\n 'name' => $data['field'],\n 'tooltip' => $data['tooltip'],\n 'field_title' => $txt->display($data['translation'] ? $data['translation'] : $data['field']),\n 'type' => 'combobox',\n //'emptyText' => $this->getFieldRelationAllPhrase($data['relation_table']),\n 'ds_fields' => array(\n 'id',\n 'name'\n ),\n 'ds_data' => array(\n 0 => '***ASSOC_ARRAY***',\n 1 => $this->getFieldRelationList($data['relation_table'], false)\n )\n );\n break;\n case 3: // checkbox\n $result[$data[\"fieldset_id\"]][] = array(\n 'type' => 'checkbox',\n 'name' => $data['field'],\n 'tooltip' => $data['tooltip'],\n 'field_title' => $txt->display($data['translation'] ? $data['translation'] : $data['field'])\n );\n break;\n case 4: // file\n $result[$data[\"fieldset_id\"]][] = array(\n 'type' => 'pic',\n 'name' => $data['field']\n );\n break;\n case 5: // date\n $result[$data[\"fieldset_id\"]][] = array(\n 'type' => 'datefield',\n 'name' => $data['field'],\n 'tooltip' => $data['tooltip'],\n 'field_title' => $txt->display($data['translation'] ? $data['translation'] : $data['field'])\n );\n break;\n default:\n break;\n }\n break;\n default :\n $result[] = array('name' => $data[\"field\"]);\n break;\n }\n }\n\n if ($type == 'detail' && $fs_data) {\n $t_result = array();\n for ($i = 0; $i < sizeof($fs_data); $i++) {\n for ($j = 0; $j < sizeof($fs_data[$i]); $j++) {\n if (!array_key_exists($fs_data[$i][$j]['fieldset_id'], $result)) {\n $result[$fs_data[$i][$j]['fieldset_id']] = false;\n }\n $t_result[$i][$j] = $result[$fs_data[$i][$j]['fieldset_id']];\n }\n }\n $result = $t_result;\n }\n }\n return JsonEncoder::encode($result);\n }", "public function getCurrentDisplayFields(){\n\t\treturn array(\n\t\t\t'Number'=>'Number',\n\t\t\t'Title'=>'Title',\n\t\t\t'ParentName'=>'Flowchart Page'\n\t\t);\n\t}", "public function indexFields()\n {\n return [\n Text::make('ID')\n ->value($this->model->id),\n\n Link::make('Booking')\n ->value('Booking #' . $this->model->booking_id)\n ->url('bookings/' . $this->model->booking_id),\n\n Link::make('Customer')\n ->value($this->model->customer->name)\n ->url('customers/' . $this->model->customer_id),\n\n Text::make('Amount')\n ->value('$'.$this->model->amount),\n ];\n }", "protected function configureListFields(ListMapper $listMapper)\n {\n \t#Here you specify which fields are shown when all models are listed (the addIdentifier() method means that this field will link to the show/edit page of this particular model).\n $listMapper->addIdentifier('username')\n \t\t\t ->addIdentifier('email')\n \t\t\t ->add('roles')\n \t\t\t ->add('enabled')\n\t\t\t ;\n }", "public static function get_fields()\n {\n }", "public function fields()\n {\n $logisticCompany = LogisticCompany::all()->pluck('name', 'id');\n return [\n Repeater::make(__('Shipment'), 'shipment')\n ->addField([\n 'label' => __('Shipment Num'),\n 'placeholder' => __('Shipment Num'),\n 'name' => 'num',\n ])->addField([\n 'label' => __('Logistics company'),\n 'placeholder' => __('Logistics company'),\n 'name' => 'company',\n 'type' => 'select',\n 'options' => $logisticCompany,\n ])->rules('required'),\n ];\n }", "abstract public function fields();", "public function fields()\n {\n return [\n Text::make('Sur-titre','first'),\n Text::make('Sous-titre','third'),\n Text::make('Titre','second'),\n ];\n }", "public function fields()\n {\n return [ \n ];\n }", "abstract protected function displayList($list);", "public function getAllSearchableFieldsFor($listType) {\n \n }", "public function getCMSFields()\n {\n $commentField = $this->AllowHtml ? HTMLEditorField::class : TextareaField::class;\n $fields = new FieldList(\n $this\n ->obj('Created')\n ->scaffoldFormField($this->fieldLabel('Created'))\n ->performReadonlyTransformation(),\n TextField::create('Name', $this->fieldLabel('Name')),\n $commentField::create('Comment', $this->fieldLabel('Comment')),\n EmailField::create('Email', $this->fieldLabel('Email')),\n TextField::create('URL', $this->fieldLabel('URL')),\n FieldGroup::create(array(\n CheckboxField::create('Moderated', $this->fieldLabel('Moderated')),\n CheckboxField::create('IsSpam', $this->fieldLabel('IsSpam')),\n ))\n ->setTitle(_t(__CLASS__ . '.OPTIONS', 'Options'))\n ->setDescription(_t(\n __CLASS__ . '.OPTION_DESCRIPTION',\n 'Unmoderated and spam comments will not be displayed until approved'\n ))\n );\n\n // Show member name if given\n if (($author = $this->Author()) && $author->exists()) {\n $fields->insertAfter(\n 'Name',\n TextField::create('AuthorMember', $this->fieldLabel('Author'), $author->Title)\n ->performReadonlyTransformation()\n );\n }\n\n // Show parent comment if given\n if (($parent = $this->ParentComment()) && $parent->exists()) {\n $fields->push(new HeaderField(\n 'ParentComment_Title',\n _t(__CLASS__ . '.ParentComment_Title', 'This comment is a reply to the below')\n ));\n // Created date\n // FIXME - the method setName in DatetimeField is not chainable, hence\n // the lack of chaining here\n $createdField = $parent\n ->obj('Created')\n ->scaffoldFormField($parent->fieldLabel('Created'));\n $createdField->setName('ParentComment_Created');\n $createdField->setValue($parent->Created);\n $createdField->performReadonlyTransformation();\n $fields->push($createdField);\n\n // Name (could be member or string value)\n $fields->push(\n $parent\n ->obj('AuthorName')\n ->scaffoldFormField($parent->fieldLabel('AuthorName'))\n ->setName('ParentComment_AuthorName')\n ->setValue($parent->getAuthorName())\n ->performReadonlyTransformation()\n );\n\n // Comment body\n $fields->push(\n $parent\n ->obj('EscapedComment')\n ->scaffoldFormField($parent->fieldLabel(self::class))\n ->setName('ParentComment_EscapedComment')\n ->setValue($parent->Comment)\n ->performReadonlyTransformation()\n );\n }\n\n $this->extend('updateCMSFields', $fields);\n return $fields;\n }", "function list_field_views_data($field) {\n $data = field_views_field_default_views_data($field);\n foreach ($data as $table_name => $table_data) {\n foreach ($table_data as $field_name => $field_data) {\n if (isset($field_data['filter']) && $field_name != 'delta') {\n $data[$table_name][$field_name]['filter']['handler'] = 'views_handler_filter_field_list';\n }\n if (isset($field_data['argument']) && $field_name != 'delta') {\n if ($field['type'] == 'list_text') {\n $data[$table_name][$field_name]['argument']['handler'] = 'views_handler_argument_field_list_string';\n }\n else {\n $data[$table_name][$field_name]['argument']['handler'] = 'views_handler_argument_field_list';\n }\n }\n }\n }\n return $data;\n}", "function fields() {\n return array(\n 'title' => 'The title of the content',\n 'fieldname' => t('fieldname'),\n 'title' => t('title'),\n 'label' => t('Label'),\n 'data_type' => t('data type'),\n 'html_type' => t('html_type'),\n );\n }", "public function buildListLayout(): void\n {\n $this->addColumn('name', 3)\n ->addColumn('pseudo', 3)\n ->addColumn('role_id', 3)\n ->addColumn('created_at', 3);\n }", "public function fields(){\n\t\treturn array();\n\t}", "public function entryAdvancedList() {\n $content = [];\n\n $content['message'] = [\n '#markup' => $this->t('A more complex list of entries in the database. Only the entries with name = \"John\" and age older than 18 years are shown, the username of the person who created the entry is also shown.'),\n ];\n\n $headers = [\n $this->t('pid'),\n $this->t('uid'),\n $this->t('studentname'),\n $this->t('studentno'),\n $this->t('chapter'),\n\t $this->t('status'),\n ];\n\n $rows = [];\n foreach ($entries = $this->repository->advancedLoad() as $entry) {\n // Sanitize each entry.\n $rows[] = array_map('Drupal\\Component\\Utility\\Html::escape', $entries);\n }\n $content['table'] = [\n '#type' => 'table',\n '#header' => $headers,\n '#rows' => $rows,\n '#attributes' => ['id' => 'dbtng-example-advanced-list'],\n '#empty' => $this->t('No entries available.'),\n ];\n // Don't cache this page.\n //$content['#cache']['max-age'] = 0;\n return $content;\n }", "function FieldTitleList ( ) { return $this->_FieldTitleList; }", "public function getAllFields();", "public function getDisplayFields(){\n\t\tif(is_array($this->display_fields) && sizeof($this->display_fields) > 0){\n\t\t\t$Fields = array();\n\t\t\tforeach($this->display_fields as $field_name){\n\t\t\t\t$Fields[$field_name] = $this->{$field_name};\n\t\t\t}\n\t\t\t\n\t\t\treturn $Fields;\n\t\t}\n\t\t\n\t\treturn $this->Fields;\n\t}", "protected function initList()\n {\n $this->lang = true;\n $this->addRowAction('edit');\n $this->addRowAction('delete');\n\n $this->fields_list = [\n GamificationsReward::$definition['primary'] => [\n 'title' => $this->l('ID'),\n 'width' => 20,\n 'type' => 'text',\n ],\n 'name' => [\n 'title' => $this->l('Reward name'),\n 'type' => 'text',\n ],\n 'reward_type' => [\n 'title' => $this->l('Reward type'),\n 'type' => 'select',\n 'list' => GamificationsReward::getRewardsTranslations(),\n 'filter_key' => 'a!reward_type',\n ],\n ];\n }", "public function renderListContent() {}", "abstract function fields();", "function FieldNameList ( ) { return $this->_FieldNameList; }", "public function getFieldList()\n {\n return $this->_fieldList;\n }", "public function fieldsList($mode) {\n $output = [];\n $entities = [];\n $includeNotConfigured = ($mode === 'all');\n $this->collector->getEntities($entities);\n\n $output['filter'] = $this->formBuilder()->getForm(GdprFieldFilterForm::class);\n $output['#attached']['library'][] = 'gdpr_fields/field-list';\n\n foreach ($entities as $entityType => $bundles) {\n $output[$entityType] = [\n '#type' => 'details',\n '#title' => $entityType,\n '#open' => TRUE,\n ];\n\n if (\\count($bundles) > 1) {\n foreach ($bundles as $bundle_id) {\n $output[$entityType][$bundle_id] = [\n '#type' => 'details',\n '#title' => $bundle_id,\n '#open' => TRUE,\n ];\n $output[$entityType][$bundle_id]['fields'] = $this->buildFieldTable($entityType, $bundle_id, $includeNotConfigured);\n }\n }\n else {\n // Don't add another collapsible wrapper around single bundle entities.\n $bundle_id = \\reset($bundles);\n $output[$entityType][$bundle_id]['fields'] = $this->buildFieldTable($entityType, $bundle_id, $includeNotConfigured);\n }\n }\n\n return $output;\n }", "private function exampleFields()\n {\n }", "abstract public function getFields();", "abstract public function getFields();", "public function fetchFields();", "public function listFields()\n {\n return array_keys($this->fields);\n }", "public function listDisplayElements();", "static function stdRec_addFieldList($fldList, $flags=0) {\n $fldList[] = 'rKd:KidId';\n $fldList[] = 'rKd:EarliestYearSemester';\n $fldList[] = 'rKd:LatestYearSemester';\n $fldList[] = 'rKd:FirstName';\n $fldList[] = 'rKd:LastName';\n $fldList[] = 'rKd:NickName';\n $fldList[] = 'rKd:Grade'; // adjusted for GradeSchoolYear\n $fldList[] = 'rKd:GradeSchoolYear';\n $fldList[] = 'rKd:NotesForCoach';\n $fldList[] = 'rKd:NotesForSiteLeader';\n $fldList[] = 'rKd:PhotoReleaseStatus';\n return $fldList;\n}", "public function\n\t\tget_display_fields()\n\t{\n\t\tif (!isset($this->display_fields)) {\n\t\t\t$this->display_fields = array();\n\t\t\t\n\t\t\t$sxe = $this->get_simple_xml_element();\n\t\t\t\n\t\t\tforeach ($sxe->table->display->field as $field) {\n\t\t\t\t#print_r($field);\n\t\t\t\t\n\t\t\t\t$display_field['name'] = (string)$field['name'];\n\t\t\t\t\n\t\t\t\tforeach (explode(' ', 'title filter') as $attribute_name) {\n\t\t\t\t\tif (isset($field[$attribute_name])) {\n\t\t\t\t\t\t$display_field[$attribute_name] = (string)$field[$attribute_name];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->display_fields[] = $display_field;\n\t\t\t}\n\t\t\t\n\t\t\tif (count($this->display_fields) < 1) {\n\t\t\t\t$this->display_fields = array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'id'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t#print_r($this->display_fields);\n\t\t\n\t\treturn $this->display_fields;\n\t}", "public function fields() : DeepList {\n return $this->_fields;\n }", "abstract protected function getFields();", "public function get_display_fields() {\n return $this->displayable_fields;\n }", "function get_fields()\n\t{\n\t\trequire_code('ocf_members');\n\n\t\t$indexes=collapse_2d_complexity('i_fields','i_name',$GLOBALS['FORUM_DB']->query_select('db_meta_indices',array('i_fields','i_name'),array('i_table'=>'f_member_custom_fields'),'ORDER BY i_name'));\n\n\t\t$fields=array();\n\t\tif (has_specific_permission(get_member(),'view_profiles'))\n\t\t{\n\t\t\t$rows=ocf_get_all_custom_fields_match(NULL,1,1);\n\t\t\trequire_code('fields');\n\t\t\tforeach ($rows as $row)\n\t\t\t{\n\t\t\t\tif (!array_key_exists('field_'.strval($row['id']),$indexes)) continue;\n\n\t\t\t\t$ob=get_fields_hook($row['cf_type']);\n\t\t\t\t$temp=$ob->get_search_inputter($row);\n\t\t\t\tif (is_null($temp))\n\t\t\t\t{\n\t\t\t\t\t$type='_TEXT';\n\t\t\t\t\t$special=make_string_tempcode(get_param('option_'.strval($row['id']),''));\n\t\t\t\t\t$display=$row['trans_name'];\n\t\t\t\t\t$fields[]=array('NAME'=>strval($row['id']),'DISPLAY'=>$display,'TYPE'=>$type,'SPECIAL'=>$special);\n\t\t\t\t} else $fields=array_merge($fields,$temp);\n\t\t\t}\n\n\t\t\t$age_range=get_param('option__age_range',get_param('option__age_range_from','').'-'.get_param('option__age_range_to',''));\n\t\t\t$fields[]=array('NAME'=>'_age_range','DISPLAY'=>do_lang_tempcode('AGE_RANGE'),'TYPE'=>'_TEXT','SPECIAL'=>$age_range);\n\t\t}\n\n\t\t$map=has_specific_permission(get_member(),'see_hidden_groups')?array():array('g_hidden'=>0);\n\t\t$group_count=$GLOBALS['FORUM_DB']->query_value('f_groups','COUNT(*)');\n\t\tif ($group_count>300) $map['g_is_private_club']=0;\n\t\tif ($map==array()) $map=NULL;\n\t\t$rows=$GLOBALS['FORUM_DB']->query_select('f_groups',array('id','g_name'),$map,'ORDER BY g_order');\n\t\t$groups=form_input_list_entry('',true,'---');\n\t\t$default_group=get_param('option__user_group','');\n\t\t$group_titles=array();\n\t\tforeach ($rows as $row)\n\t\t{\n\t\t\t$row['text_original']=get_translated_text($row['g_name'],$GLOBALS['FORUM_DB']);\n\n\t\t\tif ($row['id']==db_get_first_id()) continue;\n\t\t\t$groups->attach(form_input_list_entry(strval($row['id']),strval($row['id'])==$default_group,$row['text_original']));\n\t\t\t$group_titles[$row['id']]=$row['text_original'];\n\t\t}\n\t\tif (strpos($default_group,',')!==false)\n\t\t{\n\t\t\t$bits=explode(',',$default_group);\n\t\t\t$combination=new ocp_tempcode();\n\t\t\tforeach ($bits as $bit)\n\t\t\t{\n\t\t\t\tif (!$combination->is_empty()) $combination->attach(do_lang_tempcode('LIST_SEP'));\n\t\t\t\t$combination->attach(escape_html(@$group_titles[intval($bit)]));\n\t\t\t}\n\t\t\t$groups->attach(form_input_list_entry(strval($default_group),true,do_lang_tempcode('USERGROUP_SEARCH_COMBO',escape_html($combination))));\n\t\t}\n\t\t$fields[]=array('NAME'=>'_user_group','DISPLAY'=>do_lang_tempcode('GROUP'),'TYPE'=>'_LIST','SPECIAL'=>$groups);\n\t\tif (has_specific_permission(get_member(),'see_hidden_groups'))\n// $fields[]=array('NAME'=>'_photo_thumb_url','DISPLAY'=>do_lang('PHOTO'),'TYPE'=>'','SPECIAL'=>'','CHECKED'=>false);\n\t\t{\n\t\t\t//$fields[]=array('NAME'=>'_emails_only','DISPLAY'=>do_lang_tempcode('EMAILS_ONLY'),'TYPE'=>'_TICK','SPECIAL'=>'');\tCSV export better now\n\t\t}\n\n\t\treturn $fields;\n\t}", "public function fields()\n\t{\n\t\tif (isset($this->fields))\n\t\t{\n\t\t\treturn $this->fields;\n\t\t}\n\n\t\t$this->fields = $this->ci->db->list_fields('groups');\n\t\treturn $this->fields;\n\t}", "public function fields()\n {\n $series = [];\n for ($i = 1; $i <= 110; $i++) {\n $name = \"第${i}集\";\n $series[$name] = $name;\n }\n return [\n Select::make('剧集', 'name')\n ->options($series)\n ->withMeta([\n 'value' => '第1集',\n 'extraAttributes' => [\n 'placeholder' => '第几集...'],\n ]),\n Text::make(\"播放地址\", 'url', )->withMeta(['extraAttributes' => [\n 'placeholder' => '目前仅支持m3u8播放地址'],\n ]),\n Select::make(\"是否完成求片处理\", 'fixed')->options([\n 0 => '否',\n 1 => '是',\n ])\n ->withMeta(['value' => 0])\n ->displayUsingLabels(),\n ];\n }", "public function build_wcff_fields_lister($_fields) {\r\n \t$it = 1; \t\r\n \t$wccpf_options = wcff()->option->get_options();\r\n \t$supported_locale = isset($wccpf_options[\"supported_lang\"]) ? $wccpf_options[\"supported_lang\"] : array();\r\n \t$is_multilingual = isset($wccpf_options[\"enable_multilingual\"]) ? $wccpf_options[\"enable_multilingual\"] : \"no\";\r\n \t\r\n \tob_start();\r\n \t\r\n \tforeach ($_fields as $key => $field) :\r\n \t\t$field_toggle = isset( $field[\"is_enable\"] ) ? 'data-is_enable=\"'.( $field[\"is_enable\"] ? \"true\" : \"false\" ).'\"' : ''; ?>\r\n \t\t\r\n \t\t<div class=\"wcff-meta-row\" data-key=\"<?php echo esc_attr($key); ?>\" data-type=\"<?php echo $field[\"type\"]; ?>\" data-unremovable=\"<?php echo (isset($field[\"is_unremovable\"]) && $field[\"is_unremovable\"] ? \"true\" : \"false\"); ?>\" <?php echo $field_toggle; ?>>\r\n\t\t\t\t<table class=\"wcff_table\">\r\n\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td class=\"field-order wcff-sortable\">\r\n\t\t\t\t\t\t\t\t<span class=\"wcff-field-order-number wcff-field-order\"><?php echo $it++; ?></span>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td class=\"field-label\">\r\n \t\t\t\t\t\t\t<label class=\"wcff-field-label\" data-key=\"<?php echo esc_attr($key); ?>\"><?php echo esc_html($field[\"label\"]); ?></label>\r\n \t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t<?php if($is_multilingual == \"yes\" && count($supported_locale) > 0) : ?>\r\n \t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\t<button class=\"wcff-factory-multilingual-label-btn\" title=\"Open Multilingual Panel\"><img src=\"<?php echo (esc_url(wcff()->info[\"assets\"] .\"/img/translate.png\")); ?>\"/></button>\r\n \t\t\t\t\t\t\t\t<div class=\"wcff-factory-locale-label-dialog\"> \t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\t<?php \r\n \t\t\t\t\t\t\t\t\t$locales = wcff()->locale->get_locales();\r\n \t\t\t\t\t\t\t\t\tforeach ($supported_locale as $code) : ?> \t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\t\t<div class=\"wcff-locale-block\" data-param=\"label\">';\r\n \t\t\t\t\t\t\t\t\t\t<label><?php _e( 'Label for', 'wc-fields-factory' ); ?> <?php echo $locales[$code]; ?></label>\r\n \t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"wcff-field-type-meta-label-<?php echo $code; ?>\" class=\"wcff-field-type-meta-label-<?php echo $code; ?>\" value=\"\" />\r\n \t\t\t\t\t\t\t\t\t</div> \t\t\t \t\t\t\t\t\r\n \t\t\t \t\t\t\t\t<?php endforeach; ?>\r\n \t\t\t\t\t\t\t\t</div>\r\n \t\t\t\t\t\t\t<?php endif; ?>\r\n \t\t\t\t\t\t</td>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<td class=\"field-type\">\r\n\t\t\t\t\t\t\t\t<label class=\"wcff-field-type\"><span style=\"background: url(<?php echo esc_url(wcff()->info[\"assets\"] .'/img/'.$field[\"type\"].'.png'); ?>) no-repeat left;\"></span><?php echo $field[\"type\"]; ?></label>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td class=\"field-actions\">\r\n\t\t\t\t\t\t\t\t<div class=\"wcff-meta-option\">\r\n\t\t\t\t\t\t\t\t\t<?php $checked = \"checked\"; \r\n\t\t\t\t\t\t\t\t\tif (isset($field[\"is_enable\"])) {\r\n\t\t\t\t\t\t\t\t\t\t$checked = $field[\"is_enable\"] ? \"checked\" : \"\"; \r\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t?> \t\t\r\n \t\t\t\t\t\t\t\t<label class=\"wcff-switch\" data-key=\"<?php echo esc_attr($key); ?>\" title=\"Disable this field\"> <input class=\"wcff-toggle-check\" type=\"checkbox\" <?php echo $checked; ?>> <span class=\"slider round\"></span> </label>\r\n \t\t\t\t\t\t\t\t<a href=\"#\" class=\"wcff-field-clone button\" data-key=\"<?php echo esc_attr($key); ?>\" title=\"Clone this Field\"><img src=\"<?php echo esc_url(wcff()->info[\"assets\"] .'/img/clone.png'); ?>\" /></a>\r\n \t\t\t\t\t\t\t\t<?php if (!isset($field[\"is_unremovable\"]) || !$field[\"is_unremovable\"]) : ?> \r\n \t\t\t\t\t\t\t\t<a href=\"#\" data-key=\"<?php echo esc_attr ($key); ?>\" class=\"wcff-field-delete button\" title=\"Delete this field\">x</a>\r\n \t\t\t\t\t\t\t\t<?php endif; ?>\r\n \t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t</tbody>\r\n\t\t\t\t</table>\r\n\t\t\t\t<input type=\"hidden\" name=\"<?php echo esc_attr($key); ?>_order\" class=\"wcff-field-order-index\" value=\"<?php echo $field[\"order\"]; ?>\" />\r\n\t\t\t</div>\r\n \t<?php \r\n \tendforeach;\r\n \t\r\n \treturn ob_get_clean();\r\n }", "public function set_fields() {\n $this->fields = apply_filters('wpucommentmetas_fields', $this->fields);\n foreach ($this->fields as $id => $field) {\n if (!is_array($field)) {\n $this->fields[$id] = array();\n }\n if (!isset($field['label'])) {\n $this->fields[$id]['label'] = ucfirst($id);\n }\n if (!isset($field['admin_label'])) {\n $this->fields[$id]['admin_label'] = $this->fields[$id]['label'];\n }\n if (!isset($field['type'])) {\n $this->fields[$id]['type'] = 'text';\n }\n if (!isset($field['help'])) {\n $this->fields[$id]['help'] = '';\n }\n if (!isset($field['required'])) {\n $this->fields[$id]['required'] = false;\n }\n if (!isset($field['admin_visible'])) {\n $this->fields[$id]['admin_visible'] = true;\n }\n if (!isset($field['admin_column'])) {\n $this->fields[$id]['admin_column'] = false;\n }\n if (!isset($field['admin_list_visible'])) {\n $this->fields[$id]['admin_list_visible'] = false;\n }\n if (!isset($field['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array(\n 'comment_form_logged_in_after',\n 'comment_form_after_fields'\n );\n }\n if (!is_array($this->fields[$id]['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array($this->fields[$id]['display_hooks']);\n }\n }\n }", "public static function getFields() {\n return array(\n new TextField( array(\n 'name' => 'name',\n 'public' => array(\n 'title' => 'Title',\n 'description' => 'The name of the link that the\n element will describe',\n ),\n ) ),\n new TextField( array(\n 'name' => 'blurb',\n 'public' => array(\n 'title' => 'Blurb',\n 'description' => 'Short blurb that can be displayed about\n the nature of the link',\n ),\n ) ),\n new TextField( array(\n 'name' => 'image',\n 'public' => array(\n 'title' => 'Image',\n 'description' => 'The image to be dispalyed on the front.',\n ),\n ) ),\n new TextField( array(\n 'name' => 'link',\n 'public' => array(\n 'title' => 'Link',\n 'description' => 'The actual link clicking the element will\n result in.',\n ),\n ) ),\n );\n }", "public function fieldsettingAction() {\r\n $this->_helper->viewRenderer(\"fieldsetting/list\");\r\n }", "public function print_output() {\r\n foreach($this->customFields as $customField){\r\n if(get_post_meta( get_the_ID(), $customField['name'] , true )): ?>\r\n <li class=\"details-item\">\r\n <strong><?php echo __($customField['title'] , 'ex-list'); ?></strong> <?php echo get_post_meta( get_the_ID(), $customField['name'] , true ); ?>\r\n\t\t\t\t</li>\r\n <?php\r\n endif;\r\n }\r\n }", "abstract protected function fields();", "abstract protected function fields();", "public function xfields() {\n\t\t\n\t\t/* Load Model */\n\t\t$fields = $this->getModel ( 'field' );\n\t\t\n\t\t/* Get all rows */\n\t\t$fields->getAll ( 'form_id = \"' . $this->_getFormId () . '\"' );\n\t\t\n\t\tif (! count ( $fields->rows )) {\n\t\t\t$this->_redirect ( '_newField' );\n\t\t\treturn;\n\t\t}\n\t\t/* set the view file (optional) */\n\t\t$this->setView ( 'fields' );\n\t\t\n\t\t/* set last view into session */\n\t\t$this->session->returnto ( $this->getView () );\n\t}", "public static function getFieldMasterList()\n {\n return [\n 'form_fields' => [\n // LA fields\n 'transaction_type',\n 'type_of_plate',\n 'vin',\n 'vehicle_type',\n 'model_year',\n 'mortgage_fee',\n 'street_address',\n 'zip',\n 'county',\n 'city_limits',\n 'number_of_passengers',\n 'empty_weight',\n 'trailer_weight',\n 'carrying_capacity',\n 'gvw',\n 'gvwr',\n 'sales_price',\n 'rebate_discount',\n 'trade_in_value',\n 'sales_tax_credit',\n 'taxable_value',\n 'date_of_sale',\n\n // TX Fields\n // transaction type -- present\n 'new_or_used',\n // vin -- present\n // model_year -- present\n // dealer_address -- present\n // zip -- present\n 'resident_county',\n 'processing_county',\n // empty_weight -- present\n // trailer_weight -- present\n // carrying_capacity -- present\n // 'gvw', -- present\n // 'gvwr', -- present\n 'inspection_type',\n 'freight',\n 'miscellaneous_fee',\n 'fuel_type',\n // date_of_sale -- present\n\n // Arkansas Fields.\n // transaction type -- present.\n // vin -- present\n // 'vehicle_type',-- present\n // 'model_year',-- present\n // dealer_address -- present\n // zip -- present\n // empty_weight -- present\n // trailer_weight -- present\n // carrying_capacity -- present\n // 'gvw', -- present\n // 'gvwr', -- present\n 'number_of_axles',\n 'accessories',\n 'warranty'\n // rebate_discount -- present\n // trade_in_value -- present\n // taxable_value -- present\n // date_of_sale -- present\n ],\n 'calculator_options' => [\n // Louisiana\n 'no_fees',\n 'temp_tag',\n 'farm_use',\n 'did_pull_a_trailer',\n 'exempt_from_sales_tax',\n 'include_late_fees',\n\n // Texas\n // 'no_fees', -- present\n // 'temp_tag', -- present\n 'is_trade_in_leased',\n 'farm_ranch',\n 'member_of_military',\n 'off_highway_use',\n 'rebuilt_salvage',\n // exempt_from_sales_tax -- present\n // did_pull_a_trailer -- present\n 'include_inspection_fee',\n 'include_vit_tax',\n // include_late_fees -- present\n\n // Arkansas\n // 'no_fees', -- present\n // 'temp_tag', -- present\n // exempt_from_sales_tax -- present\n 'transfer_plate',\n 'vehicle_financed',\n // farm_use -- present\n 'off_road_motorcycle',\n 'add_accessories',\n 'add_warranty',\n // include_late_fees -- present\n ]\n ];\n }", "protected function initFieldNames()\n {\n $this->field_names = new FieldList(['collections.collections_id', 'title', 'inv_no', '`status`'], ['collections_id', 'title', 'inv_no', '`status`']);\n }", "protected function get_registered_fields()\n {\n }", "public function instance_fields() { \n\n\t\t$fields['name'] \t= array('description'=>_('Instance Name'),'type'=>'textbox'); \n\t\t$fields['host'] \t= array('description'=>_('Hostname'),'type'=>'textbox'); \n\t\t$fields['port']\t\t= array('description'=>_('Port'),'type'=>'textbox'); \n\t\t$fields['password']\t= array('description'=>_('Password'),'type'=>'textbox'); \n\n\t\treturn $fields; \n\n\t}", "protected function setupListOperation()\n {\n CRUD::column('key')->label('ID key')->type('text');\n CRUD::column('name')->label('Nom')->type('text')->limit(200);\n }", "protected function setupListOperation()\n {\n $this->crud->addColumns([\n [\n 'name' => 'name',\n 'label' => 'Название',\n ],\n [\n 'name' => 'description',\n 'label' => 'Описание',\n\n ],\n [\n 'name' => 'price',\n 'label' => 'Цена',\n ],\n [\n 'name' => 'time_start',\n 'label' => 'Дата начало',\n 'type' => \"date\",\n ],\n [\n 'name' => 'time_finish',\n 'label' => 'Дата финиша',\n 'type' => \"date\",\n ],\n [\n 'name' => 'car_id',\n 'label' => 'Автомобиль',\n 'type' => 'select',\n 'entity' => 'car',\n 'attribute' => 'register_id',\n 'model' => 'App\\Models\\Car',\n ],\n [\n 'name' => 'employee_id',\n 'label' => 'Сотрудник',\n 'type' => 'select',\n 'entity' => 'employee',\n 'attribute' => 'full_name',\n 'model' => 'App\\Models\\Employee',\n ],\n ]);\n }", "public function include_fields()\n {\n }", "private function getFields()\n {\n return [\n [\n \"field_type\" => \"text\",\n \"field_name\" => \"first_name\",\n \"field_editable\" => rand(0,1000) % 2 === 0 ? true : false,\n \"field_values\" => null,\n ],\n [\n \"field_type\" => \"text\",\n \"field_name\" => \"last_name\",\n \"field_editable\" => rand(0,1000) % 2 === 0 ? true : false,\n \"field_values\" => null,\n ],\n [\n \"field_type\" => \"checkbox\",\n \"field_name\" => \"happy\",\n \"field_editable\" => rand(0,1000) % 2 === 0 ? true : false,\n \"field_values\" => null,\n ],\n [\n \"field_type\" => \"select\",\n \"field_name\" => \"character\",\n \"field_editable\" => rand(0,1000) % 2 === 0 ? true : false,\n \"field_values\" => [\n [\"value\" => \"biff\", \"label\" => \"Biff\"],\n [\"value\" => \"marty\", \"label\" => \"Marty\"],\n [\"value\" => \"doc\", \"label\" => \"Doc Brown\"],\n [\"value\" => \"jennifer\", \"label\" => \"Jennifer\"],\n [\"value\" => \"needles\", \"label\" => \"Needles\"],\n ]\n ],\n [\n \"field_type\" => \"checkbox\",\n \"field_name\" => \"kids\",\n \"field_editable\" => rand(0,1000) % 2 === 0 ? true : false,\n \"field_values\" => null,\n ],\n ];\n }", "public function buildFields() {\n }", "function getListEntry()\n {\n $fields = goService::getListEntry();\n $fields['Message'] = _(\"Spamassassin\");\n#$fields['AllowEdit'] = true;\n return($fields);\n }", "function field(){\n\t\t\t$this->aah->check_access();\n\n\t\t\t$nav_id = $this->aah->get_nav_id(__CLASS__.'/field');\n\t\t\t$read_access = $this->aah->check_privilege('read',$nav_id);\n\t\t\t$add_access = $this->aah->check_privilege('add',$nav_id);\n\n\t\t\tif($read_access)\n\t\t\t{\n\t\t\t\t$this->global_model->reinitialize_dao();\n\t\t\t\t$dao = $this->global_model->get_dao();\n\t\t\t\t$data['active_url'] = str_replace('::','/',__METHOD__);\n\t\t\t\t$data['dt2_rows'] = $dao->execute(0,\"SELECT * FROM ref_dt2 WHERE provinsi_id='\".$this->_SYS_PARAMS[1].\"'\")->result_array();\n\t\t\t\t$data['form_id'] = \"search-school-form\";\n\t\t\t\t$data['active_controller'] = $this->active_controller;\n\t\t\t\t$data['containsTable'] = true;\n\t\t\t\t$data['add_access'] = $add_access;\n\t\t\t\t$this->backoffice_template->render($this->active_controller.'/field/index',$data);\n\t\t\t}else{\n\t\t\t\t$this->error_403();\n\t\t\t}\n\t\t}", "public function setDispFields()\n {\n $backendUser = $this->getBackendUser();\n // Getting from session:\n $dispFields = $backendUser->getModuleData('list/displayFields');\n // If fields has been inputted, then set those as the value and push it to session variable:\n if (is_array($this->displayFields)) {\n reset($this->displayFields);\n $tKey = key($this->displayFields);\n $dispFields[$tKey] = $this->displayFields[$tKey];\n $backendUser->pushModuleData('list/displayFields', $dispFields);\n }\n // Setting result:\n $this->setFields = $dispFields;\n }", "public function getDetailFields()\n {\n // Create Details List:\n \n $details = ArrayList::create();\n \n // Define Details List:\n \n foreach ($this->owner->getDetailFieldsConfig() as $name => $spec) {\n \n if ($spec) {\n \n if (!is_array($spec)) {\n $spec = ['text' => $spec];\n }\n \n foreach ($spec as $item => $value) {\n \n $args = [];\n \n if (is_array($value)) {\n $args = $value;\n $value = array_shift($args);\n }\n \n $spec[$item] = $this->owner->processDetailFieldValue($value, $args);\n \n }\n \n $text = isset($spec['text']) ? $spec['text'] : null;\n \n if ($text) {\n \n if (isset($spec['show']) && !$this->owner->{$spec['show']}) {\n continue;\n }\n \n $details->push(\n ArrayData::create([\n 'Name' => isset($spec['name']) ? $spec['name'] : $name,\n 'Icon' => isset($spec['icon']) ? $spec['icon'] : null,\n 'Text' => $text\n ])\n );\n \n }\n \n }\n \n }\n \n // Answer Details List:\n \n return $details;\n }", "function list_fields()\n\t{\n\t\t$field_names = array();\n\t\twhile ($field = mysqli_fetch_field($this->result_id))\n\t\t{\n\t\t\t$field_names[] = $field->name;\n\t\t}\n\n\t\treturn $field_names;\n\t}" ]
[ "0.7493804", "0.74926674", "0.73992157", "0.73517346", "0.72574997", "0.712018", "0.708437", "0.7078778", "0.7065264", "0.7065264", "0.7065264", "0.7065264", "0.7065264", "0.7033627", "0.6852073", "0.67660683", "0.6677723", "0.6668185", "0.66652226", "0.6654396", "0.6633424", "0.6633424", "0.6633424", "0.6633424", "0.6633424", "0.6633424", "0.6630761", "0.66267246", "0.662065", "0.662065", "0.662065", "0.6608244", "0.66029966", "0.6576639", "0.6551501", "0.6551048", "0.6539429", "0.6536604", "0.6510474", "0.65092295", "0.64890873", "0.6487866", "0.64752144", "0.6470919", "0.6469833", "0.6462147", "0.6446772", "0.6424632", "0.6415609", "0.64127105", "0.64116657", "0.6411391", "0.6410975", "0.6397894", "0.639439", "0.63859415", "0.63827056", "0.63696796", "0.6364661", "0.6323034", "0.6318313", "0.6298181", "0.62663734", "0.6261293", "0.6261113", "0.6232035", "0.62313944", "0.62313944", "0.6229992", "0.6229258", "0.62273836", "0.62247825", "0.6220308", "0.6219667", "0.62162143", "0.6212507", "0.62113047", "0.62024766", "0.61993134", "0.6179093", "0.61777043", "0.6170855", "0.6166197", "0.6155578", "0.61457735", "0.61457735", "0.6145281", "0.6138707", "0.61380786", "0.61359525", "0.6134009", "0.61281073", "0.6128013", "0.61271", "0.61245805", "0.6113321", "0.6113318", "0.6107464", "0.61023575", "0.60999876", "0.6093176" ]
0.0
-1
Site Control News Administration v2.0
function show_recent_main_menu($db) { global $content,$action,$SID,$bluebdr,$greenbdr,$yellowbdr; echo "<p>&raquo; <a href=\"main.php?SID=$SID&action=$action&do=sadd\">Add a news article</a></p>\n"; // check for empty database if (!$db->Exists("SELECT * FROM news WHERE IsFeature != 0")) { echo "<p>There are currently no news articles in the database.</p>\n"; return; } else { // output header, not to be included in for loop // Search Box echo "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"3\" bordercolor=\"$bluebdr\" align=\"center\">\n"; echo " <tr>\n"; echo " <td bgcolor=\"$bluebdr\" class=\"whitemain\" height=\"23\">Search The News Archives</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td class=\"trrow1\" valign=\"top\" bordercolor=\"#FFFFFF\" class=\"main\">\n"; echo "<form action=\"main.php\">"; echo "<input type=\"hidden\" name=\"SID\" value=\"$SID\">\n"; echo "<input type=\"hidden\" name=\"action\" value=\"$action\">\n"; echo "<input type=\"hidden\" name=\"do\" value=\"search\">\n"; echo "<br><p>Enter keyword &nbsp;<input type=\"text\" name=\"search\" value=\"$search\" size=\"20\"> <input type=\"submit\" value=\"Search\"></form></p>\n"; echo " </td>\n"; echo " </tr>\n"; echo "</table><br>\n"; echo "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"$greenbdr\" align=\"center\">\n"; echo "<tr>\n"; echo " <td bgcolor=\"$greenbdr\" class=\"whitemain\" height=\"23\">&nbsp;10 Most Recent News Article List</td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td bgcolor=\"#FFFFFF\" valign=\"top\" bordercolor=\"#FFFFFF\" class=\"main\" colspan=\"2\">\n"; echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"3\">\n"; echo " <tr>\n"; echo " <td>\n"; // query database $db->Query("SELECT * FROM news WHERE IsFeature != 1 ORDER BY id DESC LIMIT 10"); for ($x=0; $x<$db->rows; $x++) { $db->GetRow($x); // setup variables $t = htmlentities(stripslashes($db->data['title'])); $id = htmlentities(stripslashes($db->data['id'])); $fe = $db->data['IsFeature']; if($x % 2) { echo "<tr bgcolor=\"#F5F6F6\">\n"; } else { echo "<tr bgcolor=\"#EEEFEF\">\n"; } // output echo " <td align=\"left\">$id</td>\n"; if($fe != "1") { echo " <td align=\"left\">$t</td>\n"; } else { echo " <td align=\"left\"><b><font color=\"red\">$t</font></b></td>\n"; } echo " <td align=\"right\"><a href=\"main.php?SID=$SID&action=$action&do=sedit&id=" . $db->data['id'] . "\"><img src=\"/images/icons/icon_edit.gif\" border=\"0\" alt=\"Edit\"></a><a href=\"main.php?SID=$SID&action=$action&do=sdel&id=" . $db->data['id'] . "\"><img src=\"/images/icons/icon_delete.gif\" border=\"0\" alt=\"Delete\"></a></td>\n"; echo "</tr>\n"; } echo "</table>\n"; echo " </td>\n"; echo "</tr>\n"; echo "</table><br>\n"; // News by Month Box echo "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"3\" bordercolor=\"$yellowbdr\" align=\"center\">\n"; echo " <tr>\n"; echo " <td bgcolor=\"$yellowbdr\" class=\"whitemain\" height=\"23\">News Articles by Month</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td class=\"trrow1\" valign=\"top\" bordercolor=\"#FFFFFF\" class=\"main\">\n"; $yearrow = $db->QueryRow("SELECT year(`added`) AS theyear FROM news GROUP BY theyear"); for ($y=0; $y<$db->rows; $y++) { $db->GetRow($y); $ty = $db->data['theyear']; $tm = $db->data['themonth']; $mi = $db->data['monthid']; echo "$ty&nbsp;&nbsp;"; echo "<a href=\"main.php?SID=$SID&action=$action&do=months&theyear=$ty&themonth=1&monthname=January\">Jan</a>|"; echo "<a href=\"main.php?SID=$SID&action=$action&do=months&theyear=$ty&themonth=2&monthname=February&ccl_mode=5\">Feb</a>|"; echo "<a href=\"main.php?SID=$SID&action=$action&do=months&theyear=$ty&themonth=3&monthname=March&ccl_mode=5\">Mar</a>|"; echo "<a href=\"main.php?SID=$SID&action=$action&do=months&theyear=$ty&themonth=4&monthname=April&ccl_mode=5\">Apr</a>|"; echo "<a href=\"main.php?SID=$SID&action=$action&do=months&theyear=$ty&themonth=5&monthname=May&ccl_mode=5\">May</a>|"; echo "<a href=\"main.php?SID=$SID&action=$action&do=months&theyear=$ty&themonth=6&monthname=June&ccl_mode=5\">Jun</a>|"; echo "<a href=\"main.php?SID=$SID&action=$action&do=months&theyear=$ty&themonth=7&monthname=July&ccl_mode=5\">Jul</a>|"; echo "<a href=\"main.php?SID=$SID&action=$action&do=months&theyear=$ty&themonth=8&monthname=August&ccl_mode=5\">Aug</a>|"; echo "<a href=\"main.php?SID=$SID&action=$action&do=months&theyear=$ty&themonth=9&monthname=September&ccl_mode=5\">Sep</a>|"; echo "<a href=\"main.php?SID=$SID&action=$action&do=months&theyear=$ty&themonth=10&monthname=October&ccl_mode=5\">Oct</a>|"; echo "<a href=\"main.php?SID=$SID&action=$action&do=months&theyear=$ty&themonth=11&monthname=November&ccl_mode=5\">Nov</a>|"; echo "<a href=\"main.php?SID=$SID&action=$action&do=months&theyear=$ty&themonth=12&monthname=December&ccl_mode=5\">Dec</a>"; echo "<br>"; } echo " </td>\n"; echo " </tr>\n"; echo "</table><br>\n"; echo "<p>&raquo; <a href=\"main.php?SID=$SID&action=$action&do=menu\">view all news articles</a></p>\n"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getSystemNews() {}", "public function working_mom_news(){\r\n\t\t\r\n\t\t/* Get model */\r\n\t\t$itemsModel = $this->getModel('items');\r\n\t\t$itemsModel->set('category', $this->get('category'));\r\n\t\t\r\n\t\t/* Get data */\r\n\t\t$latestNews = $itemsModel->getLatest('news', 0, 4);\r\n\t\t\r\n\t\t/* Display data */\r\n\t\tinclude(BLUPATH_TEMPLATES . '/site/modules/working_mom_news.php');\r\n\t\t\r\n\t}", "public function news();", "public function addNews(){\n $this->assign('typeList', $this->get_type_list());\n $this->display();\n }", "private function getDashboardNews(){\n $this->dashboard->findDashboardNewsData();\n }", "public function actionAdmin()\n {\n $searchModel = new NewsSearch();\n $dataProvider = $searchModel->searchNewsadmin(Yii::$app->request->queryParams);\n $dataProvider->sort->defaultOrder = ['id'=>'DESC'];\n \n return $this->render('admin', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "private function yoast_news() {\n\t\t$extra_links = '<li class=\"facebook\"><a href=\"https://www.facebook.com/yoast\">' . __( 'Like Yoast on Facebook', 'helpscout-docs-api' ) . '</a></li>';\n\t\t$extra_links .= '<li class=\"twitter\"><a href=\"https://twitter.com/yoast\">' . __( 'Follow Yoast on Twitter', 'helpscout-docs-api' ) . '</a></li>';\n\t\t$extra_links .= '<li class=\"email\"><a href=\"https://yoast.com/newsletter/\">' . __( 'Subscribe by email', 'helpscout-docs-api' ) . '</a></li>';\n\n\t\t$this->rss_news( 'https://yoast.com/feed/', __( 'Latest news from Yoast', 'helpscout-docs-api' ), $extra_links );\n\t}", "function _adminnews() {\r\n#echo dump($_GET);\r\n\t\tglobal $conf,$lang,$member;\r\n\t\t$u = $conf['site']['url'] . \"admin/news\";\r\n\t\t$r = '<a href=\\'' . $u . '\\'>&lt;--</a><br /><br />';\r\n\t\t#// wysiwyg = wysiwyg('textarea') //\r\n\t\tif ( isset ( $_GET['editpage'] ) )\r\n\t\t\t{\r\n\t\t\t\tif ( isset ( $_POST['opage'] ) && isset ( $_POST['page'] ) && isset ( $_POST['content'] ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$_POST['content'] = preg_replace(\"#\\\\\\\"#\",\"\\\"\",$_POST['content']);\r\n\t\t\t\t\t\t$w = $conf['database']['db'] -> query ( \"UPDATE `{$conf['database']['pref']}news` SET `name`='\" . secure($_POST['page']) . \"', `text`='\" . ($_POST['content']) . \"' WHERE `name`='\" . secure($_POST['opage']) . \"'\");\r\n\t\t\t\t\t\tif ($w)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$r .= $lang['news']['editedpage'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$r .= $lang['news']['noteditedpage'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$w = $conf['database']['db'] -> query ( \"SELECT `name`,`text` FROM `{$conf['database']['pref']}news` WHERE `name`='{$_GET['editpage']}'\" );\r\n\t\t\t\t\t\t$w = $conf['database']['db'] -> fetch ( $w, 'array' );\r\n\t\t\t\t\t\t$w = $w[0];\r\n\t\t\t\t\t\t$r .= \"<form method='post' action='{$u}editpage/{$_GET['editpage']}'><table><tr><td>{$lang['news']['title']}</td><td><input type='hidden' name='opage' value='{$w['name']}'><input type='text' name='page' value='{$w['name']}'></td></tr><tr><td>{$lang['news']['content']}</td><td><textarea id='ncontent' name='content' rows='25' cols='50'>{$w['text']}</textarea></td></tr><tr><td></td><td><input type='submit' value='{$lang['news']['save']}'></td></tr></form></table>\" . wysiwyg('ncontent');\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\telseif ( isset ( $_GET['newpage'] ) )\r\n\t\t\t{\r\n\t\t\t\tif ( isset ( $_POST['page'] ) && isset ( $_POST['content'] ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$_POST['content'] = preg_replace(\"#\\\\\\\"#\",\"\\\"\",$_POST['content']);\r\n\t\t\t\t\t\t$w = $conf['database']['db'] -> query ( \"INSERT INTO `{$conf['database']['pref']}news` ( `id`,`by`,`datetime`,`name`,`text` ) \\n VALUES ( NULL, '\" . (isset($member['realname']) ? $member['realname'] : 'Admin') . \"', CURRENT_TIMESTAMP, '{$_POST['page']}','{$_POST['content']}' );\");\r\n\t\t\t\t\t\tif ($w)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$r .= $lang['news']['createdpage'];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$r .= $lang['news']['notcreatedpage'];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$r .= \"<form method='post' action='{$u}newpage'><table><tr><td>{$lang['news']['title']}</td><td><input type='text' name='page'></td></tr><tr><td>{$lang['news']['content']}</td><td><textarea id='content' name='content' rows='25' cols='50'></textarea></td></tr><tr><td></td><td><input type='submit' value='{$lang['news']['save']}'></td></tr></form></table>\" . wysiwyg('content');\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\telseif ( isset ( $_GET['deletepage'] ) )\r\n\t\t\t{\r\n\t\t\t\t$_GET['deletepage'] = secure($_GET['deletepage']);\r\n\t\t\t\t$w = $conf['database']['db'] -> query ( \"DELETE FROM `{$conf['database']['pref']}news` WHERE `name`='{$_GET['deletepage']}';\");\r\n\t\t\t\tif ($w)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$r .= $lang['news']['deletedpage'];\r\n\t\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$r .= $lang['news']['notdeletedpage'];\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\telse\r\n\t\t\t{\r\n\t\t\t\t$w = $conf['database']['db'] -> query ( \"SELECT `name` FROM `{$conf['database']['pref']}news`\" );\r\n\t\t\t\t$w = $conf['database']['db'] -> fetch ( $w, 'array' );\r\n\r\n\t\t\t\t$r .= '<table>';\r\n\t\t\t\tif ( $w!=\"the table is empty!\" )\r\n\t\t\t\t{\r\n \t\t\t\tfor($i=0; $i<sizeof($w); $i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$r .= \"<tr><td>{$w[$i]['name']}</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><a href='{$u}editpage/{$w[$i]['name']}'>{$lang['news']['edit']}</a></td><td>&nbsp;&nbsp;</td><td><a href='{$u}deletepage/{$w[$i]['name']}' onclick=\\\"return confirm('\" . sprintf($lang['news']['suredelpage'],$w[$i]['name']) . \"');\\\">{$lang['news']['del']}</a></td></tr>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$r .= '</table>';\r\n\t\t\t\t$r .= \"<br /><a href='{$u}newpage'>{$lang['news']['newpage']}</a>\";\r\n\t\t\t}\r\n\t\treturn $r;\r\n}", "public function actionNews()\n {\n $title = '微站设置/图文设置';\n //title of webpage,you can find title in /web/pub/top.php eg:wechat demo\n $keywords = 'wechat demo';\n //title of webpage,you can find title in /web/pub/top.php eg:''\n $description = '';\n return $this -> render('news',[\n 'title' => $title,//title of webpage,you can find title in the head of /web/pub/top.php\n 'keywords' => $keywords,//keywords of webpage,you can find keywords in the head of /web/pub/top.php\n 'description' => $description//description of webpage,you can find description in the head of /web/pub/top.php\n ]);\n }", "public function adminPanel() {\n $posts = $this->postManager->getPosts();\n $comments = $this->commentManager->getFlaggedComments();\n $view = new View(\"Administration\");\n $view->generate(array('posts' => $posts, 'comments' => $comments));\n }", "function jr_news_add_pages() {\r\n add_options_page('News', 'News', 'administrator', 'news', 'news_options_page');\r\n}", "function wp_dashboard_events_news()\n {\n }", "function index()\n{\n $this->load->module('site_security');\n $this->site_security->_make_sure_is_admin();\n\n $data['query'] = $this->get('date');\n \n $data['flash'] = $this->session->flashdata('delete');\n $data['headline'] = 'Blog';\n $data['view_module'] = 'blog';\n $data['view_file'] = 'manage';\n $this->load->module('templates');\n $this->templates->admin($data);\n}", "public function action_index()\n {\n /* SEO対策 */\n $keyword = \"ガンダム,フルブ,コンボ,exvsfb,ダメージ計算,ダメージ\";\n $description = \"最近の更新履歴\";\n $title = \"NEWS | \".HP_NAME;\n\n $this->template->meta_keyword = $keyword;\n $this->template->meta_description = $description;\n $this->template->title = $title;\n\n $this->template->content = View::forge('exvsfb/news/index');\n }", "public function home()\n\t{\n\t\t$this->sidebar_template = 'news';\n\t\t$this->news = R::dispense('news', 5);\n\t\t$this->render();\n\t}", "public function news_and_events(){\n\n\t\t$this->data['nae'] = $this->file_maintenance_model->newsAndEventsList();\n\n\t\t$this->load->view('app/administrator/file_maintenance/news_and_events',$this->data);\n\n\t}", "public function platformNews() {\n\t\t$blog = new News();\n $list = array();\n\t\t$list['NewsCategoriesType'] = NEWS_PLATFORM;\n\t\t$list['infoBox'] = MainHelper::loadInfoBox('News', 'index', true);\n\t\t$blogTotal = $news->getNewsTotal();\n\t\t$pager = $this->appendPagination($list, $news, $newsTotal, MainHelper::site_url('news/platforms/page'));\n\t\t$list['recentNews'] = $news->getLatestNews($pager->limit);\n $list['platforms'] = $news->getCategoriesByType(NEWS_PLATFORM);\n\n $data['title'] = $this->__('Platform News');\n $data['body_class'] = 'platform_news';\n $data['selected_menu'] = 'news';\n $data['left'] = PlayerHelper::playerLeftSide();\n $data['right'] = PlayerHelper::playerRightSide();\n $data['content'] = $this->renderBlock('news/platformNews', $list);\n $data['footer'] = MainHelper::bottomMenu();\n $data['header'] = MainHelper::topMenu();\n $this->render3Cols($data);\n }", "public function showChangePageAction(){\n $need = array(\"newsid\" => \"文章ID不能为空\");\n $row = hasRequired($_GET, $need);\n if ($row !== true) {\n $this->error($row);\n } else {\n $want = array(\"newsid\" => \"news_id\");\n $other = \"\";\n $data = getdata(I(\"get.\",\"\",\"htmlspecialchars\"),$want,$other);\n }\n $result = D('News') -> findById($data);\n if($result!=0 && $result) {\n // dump($result);\n $menulist = D('Menu') -> getList();\n $this -> assign(\"menulist\",$menulist);\n $this -> assign(\"articleinfo\",$result);\n $this->display();\n }else{\n $this->error(\"获取数据失败\");\n }\n }", "public function updateNews(){\n $id = intval($_GET['id']);\n $info = D('News')->where('id='.$id)->find();\n $this->assign('info', $info);\n $this->assign('typeList', $this->get_type_list());\n $this->display();\n }", "public function index() {\n // load mete data\n $metaData = array();\n $metaData['title'] = \"News\";\n $metaData['description'] = \"News\";\n $this->view->meta = $metaData;\n //$this->view->left_layout = \"left_view\";\n $this->view->newsList = $this->model->getNewsList();\n $this->view->Loadview('news', 'news');\n }", "function _worx_news_node_info() {\n $items = array(\n 'news' => array(\n 'name' => t('News'),\n 'module' => 'features',\n 'description' => t('Create News articles to keep your visitors up to date with all the new information you have to share with them.'),\n 'has_title' => '1',\n 'title_label' => t('Headline'),\n 'has_body' => '1',\n 'body_label' => t('Article'),\n 'min_word_count' => '0',\n 'help' => '',\n ),\n );\n return $items;\n}", "public function newsAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$id = (int)$this->getRequest()->getParam('id');\n\t\t\t$this->view->news = $db->fetchAll($db->select()->from('inwestycje_news')->order('data DESC')->where('id_inwest = ?', $id));\n\t\t\t$this->view->inwestycja = $db->fetchRow($db->select()->from('inwestycje')->where('id = ?', $id));\n\t\t}", "public function actionNewsAndEvents() {\n $baner_image = \\common\\models\\BanerImages::findOne(1);\n $meta_tags = \\common\\models\\MetaTags::find()->where(['id' => 6])->one();\n $events = \\common\\models\\NewsEvents::find()->where(['status' => 1])->all();\n \\Yii::$app->view->registerMetaTag(['name' => 'keywords', 'content' => $meta_tags->meta_keyword]);\n \\Yii::$app->view->registerMetaTag(['name' => 'description', 'content' => $meta_tags->meta_description]);\n return $this->render('news', [\n 'events' => $events,\n 'meta_tags' => $meta_tags,\n 'baner_image' => $baner_image,\n ]);\n }", "function News()\n{\n\t$this->type_moi = \"news\";\n}", "protected function _getNews()\n {\n return Mage::registry('current_study_news');\n }", "public function updateNews()\r\n\t{\r\n\t\t$this->newsScraper->all();\r\n\t}", "public function register_dashboard_news() {\n\t\t\tif ( apply_filters( 'oceanwp_news_enabled', false ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\twp_add_dashboard_widget( 'owp_dashboard_news', __( 'OceanWP Overview', 'ocean-extra' ), array( $this, 'dashboard_news_widget' ) );\n\n\t\t\t// Move our widget to top.\n\t\t\tglobal $wp_meta_boxes;\n\n\t\t\t$dashboard = $wp_meta_boxes['dashboard']['normal']['core'];\n\t\t\t$widget = array(\n\t\t\t\t'owp_dashboard_news' => $dashboard['owp_dashboard_news'],\n\t\t\t);\n\n\t\t\t$wp_meta_boxes['dashboard']['normal']['core'] = array_merge( $widget, $dashboard );\n\t\t}", "function newsarticle () {\n return NewsArticleModule::getInstance();\n}", "public function getNewsListAction(){\n if(I(\"get.status\") == -1) {\n $data[\"status\"] = -1;\n }else{\n $want = array(\"menuid\" => \"menu_id\", \"title\" => \"title\");\n $other = array(\"status\");\n $data = getdata(I(\"post.\", \"\", \"htmlspecialchars\"), $want, $other);\n }\n $page = $_REQUEST[\"p\"] ? $_REQUEST[\"p\"] : 1;\n $pageSize = 5;\n $result = D('News') -> getList($data,$page,$pageSize);\n $count = D('News') -> getAllCount($data);\n $Page= new \\Think\\Page($count,5);// 实例化分页类 传入总记录数和每页显示的记录数(25)\n $Page = setPage($Page);\n $Page->lastSuffix = false;\n $show = bootstrap_page_style($Page->show());\n $menulist = D('Menu') -> getList();\n $positionlist = D('Position')->getList();\n if(is_numeric($data[\"menu_id\"])){\n $this -> assign(\"menuid\",$data[\"menu_id\"]);\n }\n $this -> assign(\"positionlist\",$positionlist);\n $this -> assign(\"menulist\",$menulist);\n $this -> assign(\"page\",$show);\n $this -> assign(\"newslist\",$result);\n $this -> display();\n }", "function page_news() {\r\n\t\tglobal $_GET, $_POST, $actual_user_showname, $actual_user_id;\r\n\t\t\r\n\t\t$out = \"\";\r\n\t\t$action = \"\";\r\n\t\t$id = 0;\r\n\t\t$text = \"\";\r\n\t\t$title = \"\";\r\n\r\n\t\tif(isset($_GET['action']) || isset($_POST['action'])) {\r\n\t\t\tif(isset($_GET['action']))\r\n\t\t\t\t$action = $_GET['action'];\r\n\t\t\telse\r\n\t\t\t\t$action = $_POST['action'];\r\n\t\t\r\n\t\t\tif(isset($_GET['id']))\r\n\t\t\t\t$id = $_GET['id'];\r\n\t\t\telseif(isset($_POST['id']))\r\n\t\t\t\t$id = $_POST['id'];\r\n\t\t\r\n\t\r\n\t\t\tif(isset($_GET['text']) || isset($_POST['text'])) {\r\n\t\t\t\tif(isset($_GET['text']))\r\n\t\t\t\t\t$text = $_GET['text'];\r\n\t\t\t\telse\r\n\t\t\t\t\t$text = $_POST['text'];\r\n\t\t\t}\r\n\r\n\t\t\tif(isset($_GET['title']) || isset($_POST['title'])) {\r\n\t\t\t\tif(isset($_GET['title']))\r\n\t\t\t\t\t$title = $_GET['title'];\r\n\t\t\t\t\telse\r\n\t\t\t\t\t$title = $_POST['title'];\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// delete the selected entrie\r\n\t\t\t//\r\n\t\t\tif($action == \"delete\") {\r\n\t\t\t\tif(isset($_GET['sure']) || isset($_POST['sure'])) {\r\n\t\t\t\t\tif(isset($_GET['sure']))\r\n\t\t\t\t\t\t$sure = $_GET['sure'];\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$sure = $_POST['sure'];\r\n\t\t\t\t\r\n\t\t\t\t\tif($sure == 1)\r\n\t\t\t\t\t\tdb_result(\"DELETE FROM \" . DB_PREFIX . \"news WHERE id=\" . $id);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$result = db_result(\"SELECT * FROM \" . DB_PREFIX . \"news WHERE id=\" . $id);\r\n\t\t\t\t\t$row = mysql_fetch_object($result);\r\n\t\t\t\t\t$out .= \"Den News Eintrag &quot;\" . $row->title . \"&quot; wirklich löschen?<br />\r\n\t\t\t\t<a href=\\\"admin.php?page=news&amp;action=delete&amp;id=\" . $id . \"&amp;sure=1\\\" title=\\\"Wirklich Löschen\\\">ja</a> &nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t<a href=\\\"admin.php?page=news\\\" title=\\\"Nicht Löschen\\\">nein</a>\";\r\n\t\t\t\t\r\n\t\t\t\t\treturn $out;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// add a new entrie\r\n\t\t\t//\r\n\t\t\telseif($action == \"new\") {\r\n\t\t\t\tif($text != \"\" && $title != \"\")\r\n\t\t\t\t\tdb_result(\"INSERT INTO \".DB_PREFIX.\"news (title, text, date, userid) VALUES ('\".$title.\"', '\".$text.\"', '\".mktime().\"', '$actual_user_id')\");\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// update the selected entrie\r\n\t\t\t//\r\n\t\t\telseif($action == \"update\") { \r\n\t\t\t\tif($text != \"\" && $title != \"\" && $id != 0)\r\n\t\t\t\t\tdb_result(\"UPDATE \".DB_PREFIX.\"news SET title= '\".$title.\"', text= '\".$text.\"' WHERE id=\".$id);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//\r\n\t\t// don't show the add new form if it is sure that the user wants to edit a news entrie\r\n\t\t//\r\n\t\tif($action != \"edit\") {\r\n\t\t\t$out .= \"\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"news\\\" />\r\n\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"new\\\" />\r\n\t\t\tTitel: <input type=\\\"text\\\" name=\\\"title\\\" maxlength=\\\"60\\\" value=\\\"\\\" /><br />\r\n\t\t\t<textarea cols=\\\"60\\\" rows=\\\"6\\\" name=\\\"text\\\"></textarea><br />\r\n\t\t\tEingelogt als \" . $actual_user_showname . \" &nbsp;<input type=\\\"submit\\\" value=\\\"Senden\\\" /><br />\r\n\t\t</form>\";\r\n\t\t}\r\n\t\t\t$out .= \"\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"news\\\" />\r\n\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"update\\\" />\r\n\t\t\t<table>\\r\\n\";\r\n\t\t//\r\n\t\t// write all news entries\r\n\t\t//\r\n\t\t$result = db_result(\"SELECT * FROM \".DB_PREFIX.\"news ORDER BY date DESC\");\r\n\t\twhile($row = mysql_fetch_object($result)) {\r\n\t\t\t//\r\n\t\t\t// show an editform for the selected entrie\r\n\t\t\t//\r\n\t\t\tif($id == $row->id && $action == \"edit\") {\r\n\t\t\t\t$out .= \"\\t\\t\\t\\t<tr>\r\n\t\t\t\t\t<td colspan=\\\"2\\\" id=\\\"newsid\" . $row->id . \"\\\">\r\n\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"id\\\" value=\\\"\".$row->id.\"\\\" />\r\n\t\t\t\t\t\t<input type=\\\"submit\\\" value=\\\"Speichern\\\" />\r\n\t\t\t\t\t\t&nbsp;<a href=\\\"admin.php?page=news&amp;action=delete&amp;id=\".$row->id.\"\\\" title=\\\"Löschen\\\">Löschen</a>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"title\\\" value=\\\"\".$row->title.\"\\\" />\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\".date(\"d.m.Y H:i:s\", $row->date).\"\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=\\\"2\\\">\r\n\t\t\t\t\t\t<textarea name=\\\"text\\\" cols=\\\"60\\\" rows=\\\"6\\\">\".$row->text.\"</textarea>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=\\\"2\\\">\r\n\t\t\t\t\t\t\" . getUserByID($row->userid) . \"\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\";\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// show only the entrie\r\n\t\t\t//\r\n\t\t\telse {\r\n\t\t\t\t$out .= \"\\t\\t\\t\\t<tr>\r\n\t\t\t\t\t<td colspan=\\\"2\\\">\r\n\t\t\t\t\t\t<a id=\\\"newsid\".$row->id.\"\\\" ></a>\r\n\t\t\t\t\t\t<a href=\\\"admin.php?page=news&amp;action=edit&amp;id=\".$row->id.\"#newsid\".$row->id.\"\\\" title=\\\"Bearbeiten\\\">Bearbeiten</a>\r\n\t\t\t\t\t\t&nbsp;<a href=\\\"admin.php?page=news&amp;action=delete&amp;id=\".$row->id.\"\\\" title=\\\"Löschen\\\">Löschen</a>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<b>\".$row->title.\"</b>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\".date(\"d.m.Y H:i:s\", $row->date).\"\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=\\\"2\\\">\r\n\t\t\t\t\t\t\".nl2br($row->text).\"\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=\\\"2\\\">\r\n\t\t\t\t\t\t\".getUserByID($row->userid).\"\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$out .= \"\\t\\t\\t</table>\r\n\t\t</form>\\r\\n\";\r\n\t\r\n\t\treturn $out;\r\n\t}", "public function indexAction()\n {\n $this->tag->setTitle(__('Admin panel'));\n $this->siteDesc = __('Admin panel');\n }", "public function index(){\r\r\n $news =$this->New->last();\r\r\n $this->render('news.index', compact('news'));\r\r\n }", "function adminDefault() {\n\t\t\n\t\t// load intro and options\n\t\t$this->content = new BlogPostIntro();\n\t\t$this->content->loadContent($GLOBALS['objPage']->id);\n\t\t\n\t\t// load confirmation\n\t\t$this->confirm = new CmsContent();\n\t\t$this->confirm->loadContent($GLOBALS['objPage']->id, 'confirm');\n\t\t\n\t\t// load no access message\n\t\t$this->noaccess = new CmsContent();\n\t\t$this->noaccess->loadContent($GLOBALS['objPage']->id, 'noaccess');\n\t\t\n\t\tif ($GLOBALS['confModule']['blog_post']['editor_full']) {\n\t\t\t$this->content->initAdmin('full',2);\n\t\t\t$this->confirm->initAdmin('full',2);\n\t\t\t$this->noaccess->initAdmin('full',2);\n\t\t} else {\n\t\t\t$this->content->initAdmin('Default',1);\n\t\t\t$this->confirm->initAdmin('Default',1);\n\t\t\t$this->noaccess->initAdmin('Default',1);\n\t\t}\n\t\t\n\t\t$this->data = new ContentBlogPost();\n\t\t$this->data->loadPostsList(true);\n\t\t\n\t\t// only if on page\n\t\t$GLOBALS['objCms']->initSubmitting(1,2); // save and save and close\n\n\t\t$this->baseLink = CMS_WWW_URI.'admin/special.php?module=blog';\n\t\t$this->setView('admin');\n\t\t\n\t}", "function ___action () {\r\n\r\n // first, get all news items (for sorting and such)\r\n $all = $this->db->query ( array (\r\n 'select' => 'id,type1,label,m_p_date,m_p_who',\r\n 'type' => __NEWS,\r\n 'sort_by' => 'm_p_date DESC',\r\n 'return' => 'topics'\r\n ) ) ;\r\n\r\n $all_dates = array () ;\r\n\r\n foreach ( $all as $idx => $item )\r\n if ( isset ( $item['m_p_date'] ) )\r\n $all_dates[$item['id']] = $item['m_p_date'] ;\r\n\r\n\r\n\r\n\r\n\r\n // Get the view facets of the archive\r\n $year = $this->glob->breakdown->id ;\r\n $month = $this->glob->breakdown->selector ;\r\n $week = $this->glob->breakdown->specific ;\r\n $day = $this->glob->breakdown->atom ;\r\n \r\n \r\n $view = 'all' ;\r\n $path = array ( 'news' => 'News', 'news/archive' => 'Archive' ) ;\r\n\r\n $from = date( XS_DATE, mktime ( 0, 0, 0, 1, 1, 2000 ) ) ;\r\n\r\n // observe DATE limit!! When PHP (and your computer system) support yearly\r\n // numbers over 2030, change this value to something nice and high!!!!!!!!\r\n $to = date( XS_DATE, mktime ( 0, 0, 0, 0, 0, 2030 ) ) ;\r\n \r\n \r\n if ( $year != '' ) {\r\n\r\n // yearly view\r\n $view = 'year' ;\r\n\r\n $from = date( XS_DATE, mktime ( 0, 0, 0, 1, 1, $year ) ) ;\r\n $to = date( XS_DATE, mktime ( 0, 0, 0, 13, 0, $year ) ) ;\r\n\r\n // Let's create an array that will be our breadcrumb\r\n $path['news/archive/'.$year] = $year ;\r\n\r\n } \r\n \r\n if ( $month != '' ) {\r\n\r\n // monthly view\r\n $view = 'month' ;\r\n\r\n $from = date( XS_DATE, mktime ( 0, 0, 0, $month, 1, $year ) ) ;\r\n $to = date( XS_DATE, mktime ( 0, 0, 0, $month + 1, 0, $year ) ) ;\r\n\r\n // Let's create an array that will be our breadcrumb\r\n $path[\"news/archive/$year/$month\"] = $month ;\r\n\r\n } \r\n \r\n if ( $week != '' ) {\r\n\r\n // weekly view\r\n $view = 'week' ;\r\n\r\n $from = date( XS_DATE, mktime ( 0, 0, 0, $month, 1, $year ) ) ;\r\n $to = date( XS_DATE, mktime ( 0, 0, 0, $month + 1, 0, $year ) ) ;\r\n\r\n // Let's create an array that will be our breadcrumb\r\n $path[\"news/archive/$year/$month/$week\"] = $week ;\r\n\r\n } \r\n \r\n if ( $day != '' ) {\r\n\r\n // daily view\r\n $view = 'day' ;\r\n\r\n $from = date( XS_DATE, mktime ( 0, 0, 0, $month, $day, $year ) ) ;\r\n $to = date( XS_DATE, mktime ( 23, 59, 59, $month, $day, $year ) ) ;\r\n\r\n // Let's create an array that will be our breadcrumb\r\n $path[\"news/archive/$year/$month/$day\"] = $day ;\r\n\r\n } \r\n \r\n $this->glob->stack->add ( 'xs_facets', $path ) ;\r\n\r\n\r\n $result = $this->db->query ( array (\r\n 'select' => 'id,type1,label,m_p_date,m_p_who',\r\n 'type' => __NEWS,\r\n 'sort_by' => 'm_p_date DESC',\r\n 'between' => \"m_p_date BETWEEN CAST('$from' as DATETIME) AND CAST('$to' as DATETIME)\",\r\n 'return' => 'topics'\r\n ) ) ;\r\n\r\n\r\n $index = array () ;\r\n\r\n foreach ( $result as $idx => $item ) {\r\n if ( isset ( $item['m_p_date'] ) ) {\r\n $d = new DateTime( $item['m_p_date'] ) ;\r\n switch ( $view ) {\r\n case 'all': $index[$d->format('Y')] = $item['label'] ; break ;\r\n case 'year': $index[$d->format('Y')][$d->format('m')][$d->format('W')][$d->format('d')] = $item['label'] ; break ;\r\n case 'month': $index[$d->format('Y')][$d->format('m')][$d->format('W')][$d->format('d')][$item['id']] = $item['label'] ; break ;\r\n case 'week': $index[$d->format('Y')][$d->format('m')][$d->format('W')][$d->format('d')][$item['id']] = $item['label'] ; break ;\r\n case 'day': $index[$d->format('Y')][$d->format('m')][$d->format('W')][$d->format('d')][$item['id']] = $item['label'] ; break ;\r\n }\r\n \r\n }\r\n }\r\n\r\n switch ( $view ) {\r\n case 'week':\r\n case 'day':\r\n $this->glob->stack->add ( 'xs_news', $result ) ;\r\n break ;\r\n default: break ;\r\n }\r\n\r\n $this->log ( 'READ', '['.$this->glob->request->q.']' ) ;\r\n $this->glob->stack->add ( 'xs_news_archive', $index ) ;\r\n\r\n }", "public function news()\n {\n $result = $this->dtbs->list('news');\n $data['info'] = $result;\n $this->load->view('back/news/anasehife',$data);\n }", "function index_post() {\n $data = array(\n 'NewsID' => $this->post('NewsID'),\n 'CategoryID' => $this->post('CategoryID'),\n 'NewsTitle' => $this->post('NewsTitle'),\n 'PostDate' => $this->post('PostDate'),\n 'NewsHTML' => $this->post('NewsHTML'),\n 'ViewCount' => $this->post('ViewCount'),\n 'Visible' => $this->post('Visible')\n );\n $insert = $this->db->insert('CMS_News', $data);\n if ($insert) {\n $this->response($data, 200);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function admin_page()\n {\n }", "public function admin_page()\n {\n }", "public function view_news_category($args)\n {\n $this->registry->template->Title = \"HiiFan News Portal :: Admin Home Page : View News Category\";\n $categoryListArray = $this->registry->model->run(\"getAllCategoryList\", $args);\n $this->registry->template->PresentPage = $args['start_page'];\n $this->registry->template->CategoryListArray = $categoryListArray;\n $this->registry->template->show(\"view_news_category\");\n }", "public function News() {\n parent::__construct();\n $this->urlReturn = get_class($this);\n $this->load->model('news_categories_model', 'news_categories');\n $this->load->model('news_model');\n }", "function createOld() {\n\t $my\t= JFactory::getUser();\n\n\t $Itemid = $GLOBALS[JNEWS.'itemidAca'];\n\t if(!empty($Itemid)){\n\t\t $item = '&Itemid=' . $Itemid ;\n\t }else{\n\t\t $item = '';\n\t }\n\n\t $this->_addCSS();\n\n\t $hidden = '';\n\t $htmlOK = false;\n\t $HTML = '';\n\t $formname = 'modjnewsForm'.$this->num;\n\t //check if subscription listing is not empty\n\t //if not empty print the module\n\t //else just print the message\n\t \t$HTML .= '<div id=\"jnews_module'.$this->num.'\">';\n\t\t\t\t\t\tswitch( $this->effect ) {\n\t\t\t\t\t\t case 'default':\n\t\t\t\t\t\t $HTML .= '';\n\t\t\t\t\t\t break;\n\t\t\t\t\t\t case 'mootools-slide':\n\t\t\t\t\t\t\t\t$HTML .= $this->_addMootoolsSlide();\n\t\t\t\t\t\t break;\n\t\t\t\t\t\t case 'mootools-modal':\n\t\t\t \t \t$HTML .= $this->_addMootoolsModal();\n\t\t\t\t\t\t break;\n\t\t\t\t\t\t default:\n\t\t\t\t\t\t $HTML .= '';\n\t\t\t\t\t\t}\n\n\t\tif (!empty($this->lists)) {\n\t\t \t$subscriber = '';\n\t\t if ($my->id >0) {\t//login\n\t\t\t $loggedin = true;\n\t\t\t $subscriber = $this->_getSubscriberInfo($my->id);\n\t\t\t if(empty($subscriber)) $loggedin = false;\n\t\t } else {\t//logout\n\t\t\t $loggedin = false;\n\t\t }\n\n\t\t if (!$loggedin && $GLOBALS[JNEWS.'allow_unregistered']) {\n\t\t\t $HTML .= $this->_printscript();\n\t\t }\n\n\t\t if ( !$GLOBALS[JNEWS.'disabletooltip'] ) {\n\t\t\t\tif( version_compare( JVERSION,'3.0.0','<' ) ) {\n\t\t\t\t\tJHTML::_('behavior.tooltip');\n\t\t\t\t} else {\n\t\t\t\t\tJHtml::_('behavior.tooltip');\n\t\t\t\t}\n\t\t }\n\n\t\t $linkForm = 'option='.JNEWS_OPTION;\n\t\t\t$linkForm = jNews_Tools::completeLink( $linkForm, false, false );\n\n\t\t $HTML .= '<form action=\"'.$linkForm.'\" method=\"post\" name=\"modjnewsForm'.$this->num.'\">';\n\n\t\t //pretext\n\t\t if (!empty($this->introtext)) {\n\t\t\t $text = '<span class=\"pretext\">'. $this->introtext .'</span>';\n\t\t\t $HTML .= jnews::printLine($this->linear, $text);\n\t\t }\n\n\t\t //subscription list///889\n\t\t $HTML .= $this->_showSubcriptionListOld($subscriber, $loggedin, $item);\n\n\t\t if ( !$loggedin ) {\n\t\t\t if ($GLOBALS[JNEWS.'allow_unregistered']) {\n\t\t\t \t$HTML .= $this->showInputFields();\n\t\t\t } else {\t//required registered\n\t\t\t\t $HTML .= $this->NeedToRegister();\n\t\t\t \t$htmlOK = false;\n\t\t\t }\n\n\t\t\t $HTML .= $this->showReceiveHTML($subscriber);\n\n\t\t\t $HTML .= $this->showTerms($subscriber);\n\n\t\t\t //for captcha\n\t\t\t if($GLOBALS[JNEWS.'level'] > 1){//check the version is plus or pro\n\t\t\t\t if(empty($esc) && $this->enable_captcha){//check if $esc has been initialized\n\t\t\t\t\t $code = jNews_Captcha::generateCode('5');\n\t\t\t\t\t $HTML .= $this->_showCaptcha($code);\n\t\t\t\t\t $hidden .= $this->_showCaptchaHidden($code);\n\t\t\t\t }\n\t\t\t }\n\n\t\t\t $HTML .= $this->_showButton(false);\n\n\t\t } else {\t//login\n\t\t\t\t\t$HTML .= $this->forLoggedIn($Itemid);\n\t\t }\n\n\t\t if (!empty($this->posttext)) {\n\t\t\t $text = '<span class=\"postext\">'. $this->posttext .'</span>';\n\t\t\t $HTML .= jnews::printLine($this->linear, $text);\n\t\t }\n\n\t\t\t\tif( version_compare( JVERSION,'3.0.0','<' ) ) {\n\t\t\t\t\t$HTML .= JHTML::_( 'form.token' );\n\t\t\t\t} else {\n\t\t\t\t\t$HTML .= JHtml::_( 'form.token' );\n\t\t\t\t}\n\n\t\t $HTML .= $hidden . '</form>';\n\t } else {\t// no listing\n\t\t $HTML .= '<p class=\"jnews-nolist\">'. _JNEWS_LIST_NOT_AVAIL .'</p>';\n\t }\n\n\t if($this->effect != 'mootools-slide'){\n\t\t \t$HTML .= '<div style=\"display:none; width:50px;\" id=\"message'.$this->num.'\"></div>';\n\t\t \t$HTML .= '<div style=\"display:none; width:50px; padding-top:5px; height:100%\" id=\"ajax_loading'.$this->num.'\"><!--<img alt=\"loader\" src=\"'.JURI::base().'components/'.JNEWS_OPTION.'/images/16/ajax-loader.gif\"/>'._JNEWS_PLEASE_WAIT.'--></div>';\n\t }\n\n\t $HTML .= '';\n\n\t switch ($this->effect) {\n\t\t\t\t\tcase 'mootools-slide':\n\t\t\t\t\t\t$HTML .= '</div></div>';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mootools-modal':\n\t\t\t\t\t\t$HTML .= '</div></div></div>';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'default':\n\t\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t }\n\n\t\t$HTML .= '</div>';\n\t\t$HTML .= '<div style=\"display:none\" ><a href=\"http://www.joobi.co\">Joomla Extensions</a> powered by Joobi</div>';\n\t return $HTML;\n\n\t}", "public function index()\n {\n return view(\"admin.​news​.index\");\n }", "public function showAction() {\n $news = $this->newsRepository->findByUid($GLOBALS['TSFE']->id);\n $this->view->assign('news', $news)\n ->assign('settings', $this->settings);\n }", "public function GetSliderNews() {\n $model = new News(Database::instance());\n $slider = $model->GetSliderPosts();\n $recent = $model->GetRecentPosts();\n\n $this->data['slider'] = $slider;\n $this->data['recent'] = $recent;\n\n $this->loadView('home', $this->data);\n $this->getLogInfo();\n }", "public function latestNews()\n\t{\n\t\tif (!\\Session::has('Name')){\n\t\t\treturn redirect('/administration');\n\t\t}\n\t\t\n\t\treturn view('admin.informative.latestNews');\n\t}", "function b_news_bigstory_show() {\n\tinclude_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php';\n include_once XOOPS_ROOT_PATH.\"/modules/news/class/class.newsstory.php\";\n $myts =& MyTextSanitizer::getInstance();\n\t$restricted=getmoduleoption('restrictindex');\n\t$dateformat=getmoduleoption('dateformat');\n\t$infotips=getmoduleoption('infotips');\n\n\t$block = array();\n $onestory = new NewsStory();\n\t$stories = $onestory->getBigStory(1,0,$restricted,0,1, true, 'counter');\n\tif(count($stories)==0) {\n\t\t$block['message'] = _MB_NEWS_NOTYET;\n\t} else {\n\t\tforeach ( $stories as $key => $story ) {\n\t\t\t$htmltitle='';\n\t\t\tif($infotips>0) {\n\t\t\t\t$block['infotips'] = xoops_substr(strip_tags($story->hometext()),0,$infotips);\n\t\t\t\t$htmltitle=' title=\"'.$block['infotips'].'\"';\n\t\t\t}\n\t\t\t$block['htmltitle']=$htmltitle;\n\t\t\t$block['message'] = _MB_NEWS_TMRSI;\n\t\t\t$block['story_title'] = $story->title('Show');\n\t\t\t$block['story_id'] = $story->storyid();\n\t\t\t$block['story_date'] = formatTimestamp($story->published(), $dateformat);\n\t\t\t$block['story_hits'] = $story->counter();\n $block['story_rating'] = $story->rating();\n $block['story_votes'] = $story->votes();\n $block['story_author']= $story->uname();\n $block['story_text']= $story->hometext();\n $block['story_topic_title']= $story->topic_title();\n $block['story_topic_color']= '#'.$myts->displayTarea($story->topic_color);\n\t\t}\n\t}\n\treturn $block;\n}", "public function index()\r\n {\r\n if(!$this->checkAccess(self::MODULE_NAME, 'R'))\r\n abort(401, 'Unauthorized action.');\r\n\r\n return view('master.news.index');\r\n }", "function flueba_add_news_widget() {\n\twp_add_dashboard_widget(\n\t\t'flueba_news_widget',\n\t\t'News Homepage',\n\t\t'flueba_news_widget_function'\n\t);\t\n}", "public function supports_news() {\n return true;\n }", "public function main($news_id = NULL) {\n //Instanciate the view to create a nice view\n $newsview = new View_model('news');\n\n //we are going to watch al newsitems\n if (userLoggedIn()){\n $newsview->assign('unseen', $this->countUnseenNewsItems());\n }\n $newsview->assign('content', $this->showAllNews($news_id));\n\n return $newsview->render(FALSE);\n }", "public function index()\n {\n return view('admin.news.index');\n }", "public function index()\n {\n return view('admin.news.index');\n }", "function news_submenu_page(){\n\tadd_submenu_page(\n\t\t'edit.php?post_type=news',\n\t\t'Order news',\n\t\t'Order News',\n\t\t'order_posts',\n\t\t'order-posts-page',\n\t\t'post_order_submenu_page' );\n}", "public function show_news()\n {\n // Define breadcrumbs\n $breadcrumbs['breadcrumbs'] = array(\n // Main page\n array(\n 'href' => site_url(),\n 'title' => 'Página inicial',\n 'name' => 'Home'\n ),\n\n // Vote page\n array(\n 'href' => site_url('site/categories/show_news/'),\n 'title' => 'Novidades',\n 'name' => 'Novidades'\n )\n );\n\n # Get all activated products\n $products = new Item();\n $products->where(array('status' => 1, 'type' => 2));\n\n # Any order was set up?\n if( $this->input->get('order') )\n {\n //order by price\n if($this->input->get('order') == 'price_asc') {\n $products->order_by(\"production_price\", \"ASC\");\n }else{\n $products->order_by(\"production_price\", \"DESC\");\n }\n }else{\n $products->order_by(\"create_date\", \"DESC\");\n }\n\n # Any filter was set up and the user is logged in?\n if( $this->input->get('filter') and $this->session->userdata('id') ) {\n # The filter is the \"favorites\" filter?\n if($filter == 'favorites') $products->where_related('item_votes', 'user_id', $this->session->userdata('id') );\n }\n\n // Define view variable\n $data = array(\n 'products' => $products->get(),\n 'breadcrumbs' => $this->load->view('site/common/breadcrumbs', $breadcrumbs, true)\n );\n\n # Load the correctly view at the template\n $this->template->load('site', 'site/category_news', $data);\n }", "function index_put() {\n $id = $this->put('NewsID');\n $data = array(\n 'NewsID' => $this->post('NewsID'),\n 'CategoryID' => $this->post('CategoryID'),\n 'NewsTitle' => $this->post('NewsTitle'),\n 'PostDate' => $this->post('PostDate'),\n 'NewsHTML' => $this->post('NewsHTML'),\n 'ViewCount' => $this->post('ViewCount'),\n 'Visible' => $this->post('Visible')\n );\n $this->db->where('NewsID', $id);\n $update = $this->db->update('CMS_News', $data);\n if ($update) {\n $this->response($data, 200);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "function renderJEventsNews()\n\t{\n\n\t\t$cache = Factory::getCache(JEV_COM_COMPONENT, 'view');\n\t\t$cache->setLifeTime(86400);\n\t\t// In Joomla 1.7 caching of feeds doesn't work!\n\t\t$cache->setCaching(true);\n\n\t\t$app = Factory::getApplication();\n\t\tif (!isset($app->registeredurlparams))\n\t\t{\n\t\t\t$app->registeredurlparams = new stdClass();\n\t\t}\n\n\t\t$cache->get($this, 'renderJEventsNewsCached');\n\n\t}", "public function newslist()\n {\n $this -> load -> model('news_model');\n $news_result = $this -> news_model -> get_all_news();\n $data = array(\n 'list' => $news_result,\n );\n $this->load->view('home/newslist', $data);\n }", "public static function editNews($news_data)\n {\n }", "function index() {\n $entries = $this->db->select('title, posted_on, entry')->where('front_page', true)->get('blogs')->result();\n $data = array(\n 'newsItems' => $this->load->view('site/news', null, true),\n 'content' => $this->load->view('site/mainContent', array('entries' => $entries), true));\n $this->load->view('pageTemplate', $data);\n }", "public function show(news $news)\n {\n //\n }", "public function add_news()\n {\n $this->registry->template->Title = \"HiiFan News Portal :: Admin Home Page : Add News\";\n $categoryListArray = $this->registry->model->run(\"getCategoryList\");\n $this->registry->template->CategoryListArray = $categoryListArray;\n\n if ($this->isPostBack()) {\n\n $postArray = $this->requestPost();\n\n /* *********************** Start: Validation of the Data from Post *********************** */\n\n foreach($postArray as $key=>$value)\n {\n if($key != \"btnSubmit\")\n {\n if($this->registry->validation->isEmpty($postArray[$key]))\n {\n $_SESSION['error'][] = ucwords(str_replace(\"_\", \" \", $key)) . \" cannot be left blank\";\n }\n }\n }\n\n\n if (count($_SESSION['error']) == 0) {\n $dateTimeValue = time();\n /* *********************** Start: Formation of the POST Array for Submission *********************** */\n $postData = array('news_category_id' => ucwords($postArray['news_category']),\n 'news_content_type' => ucwords($postArray['news_content_type']),\n 'news_subject' => ucwords($postArray['news_subject']),\n 'news_description' => ucwords($postArray['news_description']),\n 'news_content_type' => ucwords($postArray['news_content_type']),\n 'news_meta_title' => ucwords($postArray['news_meta_title']),\n 'news_meta_description' => ucwords($postArray['news_meta_description']),\n 'news_meta_keyword' => ucwords($postArray['news_meta_keyword']),\n 'news_date' => ucwords($dateTimeValue),\n 'news_added_by' => ucwords($postArray['news_meta_keyword']),\n 'is_social_allowed' => ucwords($postArray['is_social_allowed']),\n 'news_status' => \"active\"\n );\n\n /* *********************** End: Formation of the POST Array for Submission *********************** */\n $this->registry->model->run(addNews, $postData);\n $_SESSION['success'] = \"News Added Successfully\";\n appController::cacheTopStories();\n appController::cacheNews();\n appController::cacheNewsCount();\n General::redirect($_SERVER['HTTP_REFERER']);\n exit;\n\n } else {\n\n $this->registry->template->PostRetain = $postArray;\n }\n }\n\n $this->registry->template->show(\"add_news\");\n\n }", "public function Index() {\n $content = new CMContent();\n $modules = new CMModules();\n $controllers = $modules->AvailableControllers();\n $this->views->SetTitle('Sida')\n ->AddInclude(__DIR__ . '/index.tpl.php', array(\n 'content' => null,\n ), 'primary')\n ->AddInclude(__DIR__ . '/../adminsidebar.tpl.php', array('is_authenticated'=>$this->user['isAuthenticated'], \n 'user'=>$this->user,'controllers'=>$controllers,'contents'=>$content->ListAll(array('type'=>'post', 'order-by'=>'title', 'order-order'=>'DESC')),), 'sidebar');\n }", "function cw_post_type_news() {\n $supports = array(\n 'title', // post title\n 'editor', // post content\n 'author', // post author\n 'thumbnail', // featured images\n 'excerpt', // post excerpt\n 'custom-fields', // custom fields\n 'comments', // post comments\n 'revisions', // post revisions\n 'post-formats', // post formats\n );\n $labels = array(\n 'name' => _x('news', 'plural'),\n 'singular_name' => _x('news', 'singular'),\n 'menu_name' => _x('news', 'admin menu'),\n 'name_admin_bar' => _x('news', 'admin bar'),\n 'add_new' => _x('Add New', 'add new'),\n 'add_new_item' => __('Add New news'),\n 'new_item' => __('New news'),\n 'edit_item' => __('Edit news'),\n 'view_item' => __('View news'),\n 'all_items' => __('All news'),\n 'search_items' => __('Search news'),\n 'not_found' => __('No news found.'),\n );\n $args = array(\n 'supports' => $supports,\n 'labels' => $labels,\n 'public' => true,\n 'query_var' => true,\n 'rewrite' => array('slug' => 'news'),\n 'has_archive' => true,\n 'hierarchical' => false,\n );\n register_post_type('news', $args);\n }", "public function index()\n {\n //\n $newss=news::latest()->paginate(4);\n return view('adminblog.index',['newss'=>$newss]);\n }", "public function index()\n {\n $news = CMSNews::all();\n return view('admin.pages.cms.cms-news', [\n 'news' => $news, \n ]);\n }", "function employee_news() {\n $default = array(\n\t\t'name' => '员工通知',\n\t\t'slug' => 'employee_news'\n\t);\n\n $labels = array(\n 'name' => $default['name'],\n 'singular_name' => $default['name'],\n 'add_new' => '添加新'.$default['name'],\n 'add_new_item' => '添加新'.$default['name'],\n 'edit_item' => '编辑'.$default['name'].'信息',\n 'new_item' => '添加新'.$default['name'],\n 'all_items' => '全部'.$default['name'],\n 'view_item' => '浏览该'.$default['name'],\n 'search_items' => '查找'.$default['name'],\n 'not_found' => '没有发现',\n 'not_found_in_trash' => '垃圾箱中没有',\n 'parent_item_colon' => '',\n 'menu_name' => $default['name']\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n\t//Provide a callback function that will be called when setting up the meta boxes for the edit form. Do remove_meta_box() and add_meta_box() calls in the callback.\n\t//'register_meta_box_cb' => '',\n\t//'with_front' => bool Should the permastruct be prepended with the front base. (example: if your permalink structure is /blog/, then your links will be: false->/news/, true->/blog/news/). Defaults to true\n 'rewrite' => array( 'slug' => $default['slug'] ),\n 'capability_type' => 'post',\n 'has_archive' => true,\n 'hierarchical' => false,\n 'menu_position' => 70,\n 'supports' => array( 'title', 'editor','thumbnail', 'excerpt' )\n );\n\n register_post_type( $default['slug'], $args );\n}", "public function showChangelog()\n {\n $news_view = ee('Model')->get('MemberNewsView')\n ->filter('member_id', ee()->session->userdata('member_id'))\n ->first();\n\n if (! $news_view) {\n $news_view = ee('Model')->make(\n 'MemberNewsView',\n ['member_id' => ee()->session->userdata('member_id')]\n );\n }\n\n $news_view->version = APP_VER;\n $news_view->save();\n\n ee()->functions->redirect(\n ee()->cp->makeChangelogLinkForVersion(APP_VER)\n );\n }", "public function __construct()\n {\n parent::__construct();\n $this->init('oxnews');\n }", "public function indexAction()\n {\n $slug = $this->params('slug');\n $module = $this->params('module');\n\n // Get Module Config\n $config = Pi::service('registry')->config->read($module);\n\n // Check deactivate view\n if ($config['admin_deactivate_view']) {\n $this->getResponse()->setStatusCode(404);\n $this->terminate(__('Page not found.'), '', 'error-404');\n $this->view()->setLayout('layout-simple');\n return;\n }\n\n // Get topic list\n $topicList = Pi::registry('topicList', 'news')->read();\n\n // Get author list\n $authorList = Pi::registry('authorList', 'news')->read();\n\n // Find story\n $story = $this->getModel('story')->find($slug, 'slug');\n if ($slug != $story['slug']) {\n return $this->redirect()->toRoute('', ['slug' => $story['slug']])->setStatusCode(301);\n }\n $story = Pi::api('story', 'news')->canonizeStory($story, $topicList, $authorList);\n\n // Check status\n if (!$story || $story['status'] != 1 || !in_array($story['type'], ['text', 'article', 'magazine', 'image', 'gallery', 'media', 'download'])) {\n $this->getResponse()->setStatusCode(404);\n $this->terminate(__('The story not found.'), '', 'error-404');\n $this->view()->setLayout('layout-simple');\n return;\n }\n\n // Check time_publish\n if ($story['time_publish'] > time()) {\n $this->getResponse()->setStatusCode(401);\n $this->terminate(__('The Story not publish.'), '', 'error-404');\n $this->view()->setLayout('layout-simple');\n return;\n }\n\n // Update Hits\n if ($config['story_all_hits']) {\n $this->getModel('story')->increment('hits', ['id' => $story['id']]);\n $this->getModel('link')->increment('hits', ['story' => $story['id']]);\n } else {\n if (!isset($_SESSION['hits_news'][$story['id']])) {\n if (!isset($_SESSION['hits_news'])) {\n $_SESSION['hits_news'] = [];\n }\n\n $_SESSION['hits_news'][$story['id']] = false;\n }\n\n if (!$_SESSION['hits_news'][$story['id']]) {\n $this->getModel('story')->increment('hits', ['id' => $story['id']]);\n $this->getModel('link')->increment('hits', ['story' => $story['id']]);\n $_SESSION['hits_news'][$story['id']] = true;\n }\n }\n\n // Links\n $link = Pi::api('story', 'news')->Link($story['id'], [$story['topic_main']]);\n $this->view()->assign('link', $link);\n\n // Related\n if ($config['show_related']) {\n $related = Pi::api('story', 'news')->Related($story['id'], $story['topic_main']);\n $this->view()->assign('relateds', $related);\n }\n\n // Attached\n if ($config['show_attach'] && $story['attach']) {\n $attach = Pi::api('story', 'news')->AttachList($story['id']);\n $this->view()->assign('attach', $attach);\n }\n\n // Attribute\n if ($config['show_attribute'] && $story['attribute']) {\n $attribute = Pi::api('attribute', 'news')->Story($story['id'], $story['topic_main']);\n $this->view()->assign('attribute', $attribute);\n }\n\n // Tag\n if ($config['show_tag'] && Pi::service('module')->isActive('tag')) {\n $tag = Pi::service('tag')->get($module, $story['id'], '');\n $this->view()->assign('tag', $tag);\n }\n\n // Author\n if ($config['show_author']) {\n $author = Pi::api('author', 'news')->getStorySingle($story['id']);\n $this->view()->assign('authors', $author);\n }\n\n // Set vote\n if ($config['vote_bar'] && Pi::service('module')->isActive('vote')) {\n $vote['point'] = $story['point'];\n $vote['count'] = $story['count'];\n $vote['item'] = $story['id'];\n $vote['table'] = 'story';\n $vote['module'] = $module;\n $vote['type'] = 'star';\n $this->view()->assign('vote', $vote);\n }\n\n // favourite\n if ($config['favourite_bar'] && Pi::service('module')->isActive('favourite')) {\n $favourite['is'] = Pi::api('favourite', 'favourite')->loadFavourite($module, 'story', $story['id']);\n $favourite['item'] = $story['id'];\n $favourite['table'] = 'story';\n $favourite['module'] = $module;\n $this->view()->assign('favourite', $favourite);\n\n $configFavourite = Pi::service('registry')->config->read('favourite');\n if ($configFavourite['favourite_list']) {\n $favouriteList = Pi::api('favourite', 'favourite')->listItemFavourite('news', 'story', $story['id']);\n $this->view()->assign('favouriteList', $favouriteList);\n }\n }\n\n // Set template\n switch ($story['type']) {\n case 'download':\n $template = 'story-download';\n break;\n\n case 'media':\n $template = 'story-media';\n break;\n\n case 'gallery':\n $template = 'story-gallery';\n break;\n\n case 'image':\n $template = 'story-image';\n break;\n\n case 'magazine':\n $template = 'story-magazine';\n break;\n\n case 'article':\n $template = 'story-article';\n break;\n\n case 'text':\n default:\n $template = 'story-text';\n break;\n }\n\n // Save statistics\n if (Pi::service('module')->isActive('statistics')) {\n Pi::api('log', 'statistics')->save('news', 'story', $story['id']);\n }\n\n // Set view\n $this->view()->headTitle($story['seo_title']);\n $this->view()->headdescription($story['seo_description'], 'set');\n $this->view()->headkeywords($story['seo_keywords'], 'set');\n $this->view()->setTemplate($template);\n $this->view()->assign('story', $story);\n $this->view()->assign('config', $config);\n }", "public function index()\n {\n if (! Gate::allows('news_access')) {\n return abort(401);\n }\n\n\n if (request('show_deleted') == 1) {\n if (! Gate::allows('news_delete')) {\n return abort(401);\n }\n $news = News::onlyTrashed()->get();\n } else {\n $news = News::all();\n }\n\n return view('admin.news.index', compact('news'));\n }", "public function admin_menu() {\n\t\t$intrusion_count = (int) Mute_Screamer::instance()->get_option( 'new_intrusions_count' );\n\t\t$intrusions_menu_title = sprintf( __( 'Intrusions %s', 'mute-screamer' ), \"<span class='update-plugins count-$intrusion_count' title='$intrusion_count'><span class='update-count'>\" . number_format_i18n( $intrusion_count ) . '</span></span>' );\n\t\tadd_dashboard_page( __( 'Mute Screamer Intrusions', 'mute-screamer' ), $intrusions_menu_title, 'activate_plugins', 'mscr_intrusions', array( $this, 'intrusions' ) );\n\t\tadd_options_page( __( 'Mute Screamer Configuration', 'mute-screamer' ), __( 'Mute Screamer', 'mute-screamer' ), 'activate_plugins', 'mscr_options', array( $this, 'options' ) );\n\n\t\t// Modify the Dashboard menu updates count\n\t\t$this->set_update_badge();\n\t}", "function ll_team_news_section() {\n\techo '<article class=\"entry\">';\n\techo '<h2>Latest</h2>';\n\t$rows = get_field( 'team_news_entries' );\n\tif ( $rows ) {\n\t\techo '<div class=\"home-news\">';\n\t\tforeach ( $rows as $row ) {\n\t\t\techo '<section><div class=\"news-widget\">' . $row['team_news_entry'] . '</div></section>';\n\t\t}\n\t\techo '</div>';\n\t}\n}", "public function admin_index() {\n\n\t\t\t/*get all data from table \"modules\"*/\n\t\t\t$modules=$this->Module->find(\"all\");\n\n\t\t\t/*set variables of page*/\n\t\t\t$this->set(\"title\", \"Gestion\");\n\t\t\t$this->set(\"legend\", \"Modules manager\");\n\t\t\t$this->set(\"modules\", $modules);\n\t\t\t}", "public function index()\n {\n //\n $list_news = News::orderBy('id', 'desc')\n ->select('id','title','abstract','date_end','state')\n ->get();\n \n return view('news_admin',['list_news' => $list_news,'news_id' => 0]);\n }", "function enh_latest_news_html($mod_id, $nl_url, $ModName) {\n\n// get vars\n $prefix = pnConfigGetVar('prefix');\t\t\n list($dbconn) = pnDBGetConn();\n\t $pntable =& pnDBGetTables();\n\t\n $bgcolor1 = \"#0056A7\";\n\t $bgcolor2 = \"#d8e1ea\";\n\n\t $language = pnConfigGetVar('language');\n\n// name the lang file the same as this file\n\t include(\"modules/$ModName/modules/lang/$language/enhnews.php\");\n\n// get the module setting from the database\n\t $modsql = \"SELECT mod_qty, mod_data FROM $prefix\"._nl_modules.\" WHERE mod_id = '$mod_id'\";\n\t\t$result = $dbconn->Execute($modsql);\n\t if ($dbconn->ErrorNo() != 0) {\n\t\t echo _DBREADERROR;\n\t }\n if (!$result->EOF) {\n\t list($mod_qty, $mod_data) = $result->fields;\n } else {\n\t\t // take care od errors?\n\t\t}\n// clear the output variable\n// title of the page to show up\n\t $output = \"<b>\"._ENHLATESTARTICLES.\":</b><br><br>\\n\";\n\n// query the database and generate your output in the amount of mod_qty\n\t $sql = \"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_informant, pn_time \n\t\t FROM $pntable[stories] \n\t\t WHERE pn_ihome = '0' ORDER BY pn_time DESC limit 0,$mod_qty\";\n\n\t\t$result = $dbconn->Execute($sql);\n\t if ($dbconn->ErrorNo() != 0) {\n\t\t echo _DBREADERROR;\n\t }\n\t\t\t\t\t\t\n while(!$result->EOF) {\n\t\t list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_informant, $pn_time) = $result->fields;\n\t\t\t\t$result->MoveNext(); \n\t $output .= \"<table border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"100%\\\"><tr><td bgcolor=\\\"$bgcolor1\\\">\\n\";\n\t $output .= \"<table border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"1\\\" width=\\\"100%\\\"><tr><td bgcolor=\\\"$bgcolor2\\\">\\n\";\n\t $output .= \"<table border=\\\"0\\\" cellpadding=\\\"4\\\" cellspacing=\\\"0\\\" width=\\\"100%\\\"><tr><td bgcolor=\\\"$bgcolor2\\\">\\n\";\n\t $output .= \"<img src=\\\"$nl_url/modules/$ModName/modules/images/enhnews/off.gif\\\" border=\\\"0\\\"></td><td width=\\\"100%\\\" bgcolor=\\\"$bgcolor2\\\"><b>&nbsp;<a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\"><font style=\\\"FONT-SIZE: 13px\\\"><b>$pn_title</b></a></font></b></td></tr>\\n\";\n\t $output .= \"<tr><td colspan=\\\"2\\\" bgcolor=\\\"$bgcolor2\\\"><br>\\n\";\n\t $output .= \"<table border=\\\"0\\\" width=\\\"98%\\\" bgcolor=\\\"$bgcolor2\\\" align=\\\"center\\\"><tr><td>\\n\";\n \t $output .= \"<font style=\\\"FONT-SIZE: 11px\\\">$pn_hometext</font>\\n\";\n \t $output .= \"</td></tr></table>\\n\";\n\t $output .= \"</td></tr></table><br>\\n\";\n\t $output .= \"</td></tr><tr><td bgcolor=\\\"$bgcolor2\\\" align=\\\"left\\\">\\n\";\n $output .= \"&nbsp\";\n\t $output .= \"<font style=\\\"FONT-SIZE: 10px\\\"><b>\"._POSTEDBY.\": $pn_informant \"._ON.\" $pn_time</font><br>\";\n\t if ($pn_bodytext) {\n\t\t $output .= \"<div align=\\\"right\\\"><font style=\\\"FONT-SIZE: 11px\\\"><a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\">\"._READMORE.\"</a></font>&nbsp;&nbsp;</div>\\n\";\n\t\t }\n\t $output .= \"<img src=\\\"$nl_url/modules/$ModName/modules/images/enhnews/pixel.gif\\\" border=\\\"0\\\" height=\\\"2\\\">\";\n\t $output .= \"</td></tr></table>\\n\";\n\t $output .= \"</td></tr></table><br>\\n\";\n }\n\n// strip the slashes out all at once\n\t $output = stripslashes($output);\n\n// send the output to the system (it must be output and not another variable name)\n\t return $output;\n}", "public function show(News $news)\n {\n //\n }", "public function show(News $news)\n {\n //\n }", "public function show(News $news)\n {\n //\n }", "public function show(News $news)\n {\n //\n }", "function show_news_fullview()\n {\n $awp_news_settings = get_option('awp_news_settings'); \n $awp_news = $this->getAllNewsForfullView();\n ob_start();\n if(empty($awp_news_settings))\n \t{ \n \t\techo awp_messagelist('newsconfigure-display-page'); //News are not configured.\n \t}else if(empty($awp_news[allnews]))\n\t { \n\t \techo awp_messagelist('news-display-page'); //News are not found.\n\t }else { include $awp_news['templatefile']; }\n\t \n\t \n $show_news = ob_get_clean();\n return $show_news;\n }", "function superAdministration() \n {\n echo \"<div class='newFahrt'>\";\n \n $this->eventNavigation();\n echo \"<h2>Event Management</h2>\";\n echo \"<p>Hier können Events angelegt und verwaltet werden</p>\";\n\n \n $this->listAllEvents();\n\n if (isset($_SESSION['eventid'])) {\n $this->showManageCountdowns($_SESSION['eventid']);\n $this->showInviteCodes($_SESSION['eventid']);\n $this->showEventMembers($_SESSION['eventid']);\n }\n echo \"</div>\"; // newFahrt END\n }", "function Newsletter()\n{\n global $xoopsDB;\n include_once XOOPS_ROOT_PATH.\"/class/xoopsformloader.php\";\n xoops_cp_header();\n adminmenu(5);\n echo \"<br />\";\n\t$sform = new XoopsThemeForm(_AM_NEWS_NEWSLETTER, \"newsletterform\", XOOPS_URL.'/modules/news/admin/index.php', 'post');\n\t$dates_tray = new XoopsFormElementTray(_AM_NEWS_NEWSLETTER_BETWEEN);\n\t$date1 = new XoopsFormTextDateSelect('', 'date1',15,time());\n\t$date2 = new XoopsFormTextDateSelect(_AM_NEWS_EXPORT_AND, 'date2',15,time());\n\t$dates_tray->addElement($date1);\n\t$dates_tray->addElement($date2);\n\t$sform->addElement($dates_tray);\n\n\t$topiclist=new XoopsFormSelect(_AM_NEWS_PRUNE_TOPICS, 'export_topics','',5,true);\n\t$topics_arr=array();\n\t$xt = new NewsTopic();\n\t$allTopics = $xt->getAllTopics(false);\t\t\t\t// The webmaster can see everything\n\t$topic_tree = new XoopsObjectTree($allTopics, 'topic_id', 'topic_pid');\n\t$topics_arr = $topic_tree->getAllChild(0);\n\tif(count($topics_arr)) {\n\t\tforeach ($topics_arr as $onetopic) {\n\t\t\t$topiclist->addOption($onetopic->topic_id(),$onetopic->topic_title());\n\t\t}\n\t}\n\t$topiclist->setDescription(_AM_NEWS_EXPORT_PRUNE_DSC);\n\t$sform->addElement($topiclist,false);\n\t$sform->addElement(new XoopsFormHidden('op', 'launchnewsletter'), false);\n\t$sform->addElement(new XoopsFormRadioYN(_AM_NEWS_REMOVE_BR, 'removebr',1),false);\n\t$button_tray = new XoopsFormElementTray('' ,'');\n\t$submit_btn = new XoopsFormButton('', 'post', _SUBMIT, 'submit');\n\t$button_tray->addElement($submit_btn);\n\t$sform->addElement($button_tray);\n\t$sform->display();\n}", "function _ec_news_node_info() {\n $items = array(\n 'news' => array(\n 'name' => t('News'),\n 'module' => 'features',\n 'description' => '',\n 'has_title' => '1',\n 'title_label' => t('Title'),\n 'has_body' => '1',\n 'body_label' => t('Body'),\n 'min_word_count' => '0',\n 'help' => '',\n ),\n 'news_feed' => array(\n 'name' => t('News Feed'),\n 'module' => 'features',\n 'description' => t('Feed which generates nodes of type \"news\". It is created by the \"master\" importer and contains a link to the remote news feed at the Master Template.'),\n 'has_title' => '1',\n 'title_label' => t('Title'),\n 'has_body' => '0',\n 'body_label' => '',\n 'min_word_count' => '0',\n 'help' => '',\n ),\n );\n return $items;\n}", "public function getName()\n {\n return 'sonata_news';\n }", "public function index()\n\t{\n\t\t$news = $this->news->all();\n\n\t\treturn View::make('admin.news.index', compact('news'));\n\t}", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => News::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function action_home()\n\t{\n\t\tglobal $txt, $context, $settings;\n\n\t\t// We need a little help\n\t\trequire_once(SUBSDIR . '/Membergroups.subs.php');\n\n\t\t// You have to be able to do at least one of the below to see this page.\n\t\tisAllowedTo(array('admin_forum', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_boards', 'manage_smileys', 'manage_attachments'));\n\n\t\t// Find all of this forum's administrators...\n\t\tif (listMembergroupMembers_Href($context['administrators'], 1, 32) && allowedTo('manage_membergroups'))\n\t\t{\n\t\t\t// Add a 'more'-link if there are more than 32.\n\t\t\t$context['more_admins_link'] = '<a href=\"' . getUrl('moderate', ['action' => 'moderate', 'area' => 'viewgroups', 'sa' => 'members', 'group' => 1]) . '\">' . $txt['more'] . '</a>';\n\t\t}\n\n\t\t// This makes it easier to get the latest news with your time format.\n\t\t$context['time_format'] = urlencode($this->user->time_format);\n\t\t$context['forum_version'] = FORUM_VERSION;\n\n\t\t// Get a list of current server versions.\n\t\t$context['current_versions'] = getServerVersions($this->_checkFor);\n\t\t$context['can_admin'] = allowedTo('admin_forum');\n\t\t$context['sub_template'] = 'admin';\n\t\t$context['page_title'] = $txt['admin_center'];\n\t\t$context[$context['admin_menu_name']]['tab_data'] = array(\n\t\t\t'title' => $txt['admin_center'],\n\t\t\t'help' => '',\n\t\t\t'description' => '\n\t\t\t\t<span class=\"bbc_strong\">' . $txt['hello_guest'] . ' ' . $context['user']['name'] . '!</span>\n\t\t\t\t' . sprintf($txt['admin_main_welcome'], $txt['admin_control_panel']),\n\t\t);\n\n\t\t// Load in the admin quick tasks\n\t\t$context['quick_admin_tasks'] = getQuickAdminTasks();\n\t}", "public function index()\n {\n abort_if(Gate::denies('user_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n $newsupdates = Newsupdate::paginate(10);\n return view('admin.newsupdate.index',[\n 'newsupdates'=> $newsupdates\n ]);\n }", "public function news()\n {\n $this->form_validation->set_rules('title', 'Titre', 'required');\n \t$this->form_validation->set_rules('content', 'Contenu', 'required');\n\n if ($this->form_validation->run() === FALSE)\n {\n $news = $this->admin_model->get_news();\n \n $data['news'] = $news; \n $data['title'] = 'Annonce'; \n $this->load->view('layouts/header');\n $this->load->view('admin/news', $data);\n $this->load->view('layouts/footer');\n }\n else\n {\n $insert_news = $this->admin_model->insert_news();\n $news = $this->admin_model->get_news();\n \n $data['news'] = $news;\n $data['title'] = 'Administrateur';\n $this->load->view('layouts/header');\n $this->load->view('admin/news', $data);\n $this->load->view('layouts/footer');\n }\n }", "public function list_news(){\n\t\t\t$recordPerPage = 15;\n\t\t\t//----\n\t\t\t//phan trang\t\n\t\t\t//tinh tong so ban ghi\n\t\t\t$total = $this->model_total();\t\t\t\n\t\t\t//tinh tong so trang\n\t\t\t$numPage = ceil($total/$recordPerPage);//ham ceil de lay tran\n\t\t\t//lay bien p truyen tu url -> bien nay the hien la dang o may\n\t\t\t$p = isset($_GET[\"p\"])&&is_numeric($_GET[\"p\"])? $_GET[\"p\"]-1:0;\n\t\t\t$fromRecord = $p*$recordPerPage;\t\t\t\n\t\t\t//----\n\t\t\t//goi ham model_get() trong class newsModel de lay du lieu\n\t\t\t$data = $this->model_get($fromRecord,$recordPerPage);\n\t\t\t$this->renderHTML(\"views/backend/list_news.php\", array(\"data\"=>$data,\"numPage\"=>$numPage));\n\t\t}", "public function newsBlock($config) {\n $newscontroller = new News_controller();\n\n $blockView = new View_Model('news_block');\n if (userLoggedIn()) {\n $blockView->assign('loggedin', TRUE);\n $blockView->assign('unseen', $newscontroller->countUnseenNewsItems());\n }\n\n //Add aloso the title\n $blockView->assign('title', $config['title']);\n\n return $blockView->render(FALSE);\n }", "public function main()\n {\n auth_admin();\n $this->session->set_userdata(\"referrer\", current_url());\n $this->global_libs->print_header();\n\n\n $s_news = $this->uri->segment(4);\n $pg = $this->uri->segment(5);\n $per_page = 25;\n $uri_segment = 5;\n $no = 0;\n $path = $this->path . '/main/a/';\n $list_admin_arr = array();\n $folder = $this->folder;\n $menu_title = $this->title;\n $file_app = $this->ctrl;\n $path_app = $this->path;\n $path_uri = $this->path_uri;\n $template = $this->template;\n $breadcrumbs = array();\n $add_btn = site_url($path_uri . '/add');\n $is_superadmin = $this->is_superadmin;\n $list_data = array();\n $wtype = $wseries = '';\n $search_query = '';\n\n $breadcrumbs = $this->global_libs->getBreadcrumbs($file_app);\n\n $breadcrumbs[] = array(\n 'text' => $menu_title,\n 'href' => '#',\n 'class' => 'class=\"current\"'\n );\n\n if (strlen($s_news) > 1) {\n $s_news = substr($s_news, 1);\n\n } else {\n $s_news = \"\";\n\n }\n $total_records = $this->News_model->TotalNews(myUrlDecode($s_news));\n\n\n if ($s_news) {\n $dis_urut = \"none\";\n $path = str_replace(\"/a/\", \"/a\" . $s_news . \"/\", $path);\n ($search_query == '' ? $search_query .= $s_news : $search_query .= ' + ' . $s_news);\n }\n\n\n if (!$pg) {\n $lmt = 0;\n $pg = 1;\n } else {\n $lmt = $pg;\n }\n $no = $lmt;\n\n $query = $this->News_model->GetAllNews(myUrlDecode($s_news), $lmt, $per_page);\n\n foreach ($query->result_array() as $buff) {\n $no++;\n $id = $buff['id_news'];\n $ref_publish = ($buff['ref_publish'] == 1) ? 'publish' : 'Not Publish';\n $title = $buff['title'];\n $news = word_limiter(strip_tags($buff['content']), 5);\n $type = $buff['type'];\n $new = ($buff['is_new'] == 1) ? 'Yes' : 'No';\n $create_date = $buff['create_date'];\n\n $edit_href = site_url($path_uri . '/edit/' . $id);\n $list_data[] = array(\n 'no' => $no,\n 'id' => $id,\n 'ref_publish' => $ref_publish,\n 'type' => $type,\n 'title' => $title,\n 'news' => $news,\n 'edit_href' => $edit_href,\n 'ref_stat' => $new,\n 'create_date' => $create_date,\n );\n }\n\n // paging\n $paging = global_paging($total_records, $per_page, $path, $uri_segment);\n if (!$paging) {\n $paging = '<ul class=\"pagination\"><li class=\"current\"><a>1</a></li></ul>';\n }\n //end of paging\n\n $error_msg = alert_box($this->session->flashdata('error_msg'), 'error');\n $success_msg = alert_box($this->session->flashdata('success_msg'), 'success');\n $info_msg = alert_box($this->session->flashdata('info_msg'), 'warning');\n\n if ($search_query != '') {\n $search_query = '<h5>Search Query: ' . $search_query . '</h5>';\n }\n\n $data = array(\n 'base_url' => base_url(),\n 'current_url' => current_url(),\n 'menu_title' => $menu_title,\n 's_news' => $s_news,\n 'list_data' => $list_data,\n 'breadcrumbs' => $breadcrumbs,\n 'pagination' => $paging,\n 'error_msg' => $error_msg,\n 'success_msg' => $success_msg,\n 'info_msg' => $info_msg,\n 'file_app' => $file_app,\n 'path_app' => $path_app,\n 'add_btn' => $add_btn,\n 'q_total' => $total_records,\n 'search_query' => $search_query,\n );\n $this->parser->parse($template . '/list_' . $file_app . '.html', $data);\n $this->global_libs->print_footer();\n }", "public function options_page_init(){\n\t\t\tadd_options_page(__('Breaking News options', 'text-domain'), __('Breaking News', 'text-domain'), 'manage_options', 'breakingnews', [ $this, 'options_page_content']);\n\t\t}", "public function gameNews() {\n\t\t$game = $this->getGame();\n\t\tif (!$game) {\n DooUriRouter::redirect(Doo::conf()->APP_URL);\n return FALSE;\n }\n\t\t$list = array();\n\t\t$blog = new News();\n\t\t$list['NewsCategoriesType'] = NEWS_GAMES;\n\t\t$list['infoBox'] = MainHelper::loadInfoBox('News', 'index', true);\n\t\t$list['game'] = $game;\n\n\t\t$blogTotal = $news->getTotalByType($game->ID_GAME, GAME);\n\t\t$pager = $this->appendPagination($list, $news, $newsTotal, $game->NEWS_URL.'/page');\n\t\t$list['gameNews'] = $news->getNewsByType($game->ID_GAME, GAME, $pager->limit);\n\n $data['title'] = $this->__('Game News');\n $data['body_class'] = 'game_news';\n $data['selected_menu'] = 'news';\n $data['left'] = PlayerHelper::playerLeftSide();\n $data['right'] = PlayerHelper::playerRightSide();\n $data['content'] = $this->renderBlock('news/gameNews', $list);\n $data['footer'] = MainHelper::bottomMenu();\n $data['header'] = MainHelper::topMenu();\n $this->render3Cols($data);\n }", "function Newsletters()\n\t{\n\t\t$this->PopupWindows[] = 'sendpreviewdisplay';\n\t\t$this->PopupWindows[] = 'checkspamdisplay';\n\t\t$this->PopupWindows[] = 'viewcompatibility';\n\t\t$this->LoadLanguageFile();\n\t}", "public function admin()\n{\n return View('News/Admin');\n}", "private function fixNewsList()\r\n {\r\n /** @var Page $page */\r\n $page = Page::getByPath('/news');\r\n if (!is_object($page) || $page->isError()) {\r\n return;\r\n }\r\n\r\n // getBlocks is part of the Collection class\r\n $blocks = $page->getBlocks($this->request->request->get('niNewsListArea'));\r\n\r\n /** @var \\Concrete\\Core\\Block\\Block $block */\r\n foreach ($blocks as $block) {\r\n if ($block->getBlockTypeHandle() == 'page_list') {\r\n // We 'detach' it from the page type defaults\r\n // by duplicating it and then removing the aliased block.\r\n $newBlock = $block->duplicate($page);\r\n $block->deleteBlock();\r\n\r\n // Make sure the block record is refreshed, otherwise the Edit dialog will show outdated info.\r\n // There is no API method for this yet. See https://github.com/concrete5/concrete5/pull/6851.\r\n $this->db->executeQuery('UPDATE Blocks SET btCachedBlockRecord = NULL WHERE bID = ?', [\r\n $newBlock->getBlockID(),\r\n ]);\r\n\r\n // Make sure the parentID is updated with the /news collection id.\r\n // This will make sure the option \"Beneath this page\" is selected in the page list\r\n $this->db\r\n ->executeQuery('UPDATE btPageList SET cThis = 1, cParentID = ? WHERE bID = ?', [\r\n $page->getCollectionID(),\r\n $newBlock->getBlockID(),\r\n ]);\r\n }\r\n }\r\n }", "function network_admin_menu()\n {\n }", "public function indexAction() {\n // $params = [\n // 'id' => 2,\n // ];\n // $data=$db->column('SELECT email FROM users WHERE id = :id', $params);\n // debug($data);\n $result = $this -> model -> getNews();\n $vars = [\n 'news' => $result,\n ];\n $this -> view -> render('Главная страница', $vars );\n }", "function enh_latest_news_text($mod_id, $nl_url, $ModName) {\n\n// get vars\n $prefix = pnConfigGetVar('prefix');\t\t\n list($dbconn) = pnDBGetConn();\n\t $pntable =& pnDBGetTables();\n\n $language = pnConfigGetVar('language');\n\n// name the lang file the same as this file\n include(\"modules/$ModName/modules/lang/$language/enhnews.php\");\n\n// get the module setting from the database\n\t $modsql = \"SELECT mod_qty, mod_data FROM $prefix\"._nl_modules.\" WHERE mod_id = '$mod_id'\";\n\t\t$result = $dbconn->Execute($modsql);\n\t if ($dbconn->ErrorNo() != 0) {\n\t\t echo _DBREADERROR;\n\t }\n if (!$result->EOF) {\n\t list($mod_qty, $mod_data) = $result->fields;\n } else {\n\t\t // take care od errors?\n\t\t}\n\n// clear the output variable\n// title of the page to show up\n\t $output =\"\"._ENHLATESTARTICLES.\":\\n\\n\";\n\n// query the database and generate your output in the amount of mod_qty\n\t $sql = \"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_informant, pn_time \n\t\t FROM $pntable[stories] \n\t\t WHERE pn_ihome = '0' ORDER BY pn_time DESC limit 0,$mod_qty\";\n\n\t\t$result = $dbconn->Execute($sql);\n\t if ($dbconn->ErrorNo() != 0) {\n\t\t echo _DBREADERROR;\n\t }\n\t\t\t\t\t\t\n while(!$result->EOF) {\n\t\t list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_informant, $pn_time) = $result->fields;\n\t\t\t\t$result->MoveNext(); \n\t\t $output .= \"$pn_title\\n\";\n\t\t $output .= \"$pn_hometext\\n\";\n\t\t if ($pn_bodytext) {\n\t\t\t $output .= \"\"._READMORE.\": $nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\n\";\n\t\t\t }\n\t\t $output .= \"\\n\";\n\t\t}\n\n// strip the slashes out all at once\n\t $output = stripslashes($output);\n\n// send the output to the system (it must be output and not another variable name)\n\t return $output;\n}", "function NewsWidget() {\n\t\tparent::__construct(\n\t \t\t'news_widget', // Base ID\n\t\t\t'News Widget', // Name\n\t\t\tarray( 'description' => __( 'Display latest news post'), ) // Args\n\t\t);\n\t}" ]
[ "0.7459822", "0.73091364", "0.7065309", "0.6864271", "0.6859785", "0.67275065", "0.6614624", "0.6610831", "0.660238", "0.6589509", "0.65859634", "0.6584562", "0.6551275", "0.6534468", "0.65261954", "0.6493918", "0.6487693", "0.6477595", "0.64645976", "0.64360064", "0.6405073", "0.64015394", "0.6400083", "0.6393445", "0.6384749", "0.63716805", "0.636964", "0.6363288", "0.6361151", "0.63558584", "0.6347311", "0.63431513", "0.63325137", "0.6330744", "0.62982017", "0.6292057", "0.62845445", "0.62845445", "0.6282697", "0.6278291", "0.6273477", "0.62682813", "0.62363523", "0.6215814", "0.62104225", "0.62097526", "0.6198406", "0.6184264", "0.61614114", "0.61586314", "0.6158553", "0.6158553", "0.61521786", "0.6139631", "0.61357707", "0.6133677", "0.61286896", "0.61280864", "0.61243415", "0.6087847", "0.6086612", "0.60859495", "0.60778785", "0.60774064", "0.60726637", "0.60716707", "0.6070191", "0.605076", "0.6049725", "0.6047444", "0.60331446", "0.60107946", "0.6009753", "0.60089207", "0.6007639", "0.6003906", "0.6003906", "0.6003906", "0.6003906", "0.600301", "0.6002733", "0.59935254", "0.599299", "0.5989833", "0.5966457", "0.59643674", "0.5949849", "0.5942047", "0.59394556", "0.5938746", "0.59330195", "0.5932921", "0.5931707", "0.5922769", "0.5920926", "0.5920443", "0.59143376", "0.5913289", "0.5911686", "0.59088093", "0.59009457" ]
0.0
-1
====================== Query Scopes ======================
public function scopePath($query, $path) { $slugs = collect(explode('/', $path)); $pages = self::whereIn($this->getTable().'.slug', $slugs)->get(); $target_slug = $slugs->pop(); $page = $pages->where('slug', $target_slug)->filter(function ($page) use ($slugs, $pages) { $parent_id = $page->parent_id; $parent_slugs = collect(); while (!is_null($parent_id)) { if ($pages->whereIn('id', $parent_id)->isEmpty()) { return false; } $parent = $pages->where($this->getKeyName(), $parent_id)->first(); $parent_slugs->prepend($parent->slug); $parent_id = $parent->parent_id; } return $parent_slugs->toJson() == $slugs->toJson(); })->sortBy('order')->first(); if (!$page) { throw (new ModelNotFoundException)->setModel(get_class($this->model)); } return $query->where($this->getKeyName(), $page->getKey()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getQueryScope()\n {\n return $this->getQuery();\n }", "public function getQueryScope()\n {\n return $this->query_scope;\n }", "public function getScope();", "public function getScope();", "public function scopeSearch($query){\n if (request()->has('search_query') && !empty(request()->search_query) && request()->has('search_columns') && !empty(request()->search_columns) ) {\n \t$query = $this->getQuery($query , request()->search_columns , request()->search_query );\n }else{\n \tif (request()->has('search_query') && !empty(request()->search_query)) {\n \t\t$query = $this->getQuery($query , $this->fillable , request()->search_query );\n \t}\n }\n\n \n \n \n \n \n return $query;\n }", "public function scopeQuery($query)\n {\n // $query->where();\n }", "public function scopeScope($query)\n {\n $query->where($this->getTable().'.company_id', '=', auth()->user()->company()->id);\n\n return $query;\n }", "abstract public function getScope();", "protected function _scope()\n\t{\n\t\treturn $this->_meta['scope'];\n\t}", "public function scopeMy($query)\n {\n return $query->where('created_by', auth()->user()->id);\n }", "public function getScopes();", "public function getScopes();", "public function getScopes();", "public function scopeListByRole($query)\n {\n if (Auth::user() && Auth::user()->isAdmin()) {\n return;\n }\n\n if (Auth::user() && Auth::user()->isClient()) {\n return $query->whereIn('scope', [\n self::PUBLIC_SCOPE,\n self::CLIENT_SCOPE,\n ]);\n }\n\n if (Auth::user() && Auth::user()->isCreator()) {\n return $query->whereIn('scope', [\n self::PUBLIC_SCOPE,\n self::CLIENT_SCOPE,\n ]);\n }\n\n// return $query->whereIn('scope', [\n /// 9999,\n// ]);\n return $query->whereIn('scope', [\n self::PUBLIC_SCOPE,\n ]);\n }", "protected function scopes()\n {\n return [\n 'period' => new FilterPriodScope(),\n 'status' => new FilterStatusScope()\n ];\n }", "public function scopeRead($query){\n return $query->where('read',true)->where('active',false);\n }", "public function scopePublished($query){\n $query->where('RDate','<=',Carbon::now()->format('Y-m-d'))->where('EXDate','>=',Carbon::now()->format('Y-m-d'));\n }", "public function scopeRelated($query, $plannings)\n\t{\n\t\treturn $query->whereIn('id',$plannings);\n\t}", "public function getScopes(): array;", "public function getScopes(): array;", "public function scopeFull($query) {\n\n\t\treturn $query->join('clients', 'clients.client_id', '=', 'orders.client_id')\n\t\t ->join('states', 'states.state_id' , '=', 'orders.state');\n\t}", "public function scopes()\n\t{\n\t\t$_arScopes = parent::scopes();\n\n\t\tif ( $this->hasAttribute( 'user_id' ) && ! Yii::app()->user->isGuest )\n\t\t{\n\t\t\t$_arScopes['mine'] = array(\n\t\t\t\t'condition' => 'user_id = :user_id',\n\t\t\t\t'params' => array( ':user_id' => Yii::app()->user->id ),\n\t\t\t);\n\t\t}\n\n\t\t//\tActive scopes...\n\t\tif ( $this->hasAttribute( 'active_ind' ) )\n\t\t{\n\t\t\t$_arScopes['active'] = array(\n\t\t\t\t'condition' => 'active_ind = 1 and delete_ind = 0',\n\t\t\t);\n\n\t\t\t$_arScopes['inactive'] = array(\n\t\t\t\t'condition' => 'active_ind = 0 and delete_ind = 0',\n\t\t\t);\n\t\t}\n\n\t\t//\tActive scopes...\n\t\tif ( $this->hasAttribute( 'delete_ind' ) )\n\t\t{\n\t\t\t$_arScopes['deleted'] = array(\n\t\t\t\t'condition' => 'delete_ind = 1',\n\t\t\t);\n\t\t}\n\n\t\treturn $_arScopes;\n\t}", "public function scopeList($query){\n return $query->Join('permissao_sistema', 'cao_usuario.co_usuario', '=', 'permissao_sistema.co_usuario')\n ->Where('co_sistema',1)\n ->Where('in_ativo','S')\n ->WhereIn('co_tipo_usuario',[0, 1, 2])\n ->get(['cao_usuario.co_usuario', 'no_usuario']);\n }", "private function scopes() {\n\n \t global $cfg;\n\n if (is_array($cfg->scopes) && sizeof($cfg->scopes) > 0) {\n $this->scope = implode(',', $cfg->scopes);\n } else {\n\n $scopes = array(\n 'incoming-webhook',\n 'commands',\n 'bot',\n 'channels:read',\n 'channels:history',\n 'channels:write',\n 'chat:write:bot',\n 'chat:write:user',\n 'emoji:read',\n 'im:write',\n 'im:history',\n 'reactions:read',\n 'reactions:write',\n 'team:read',\n 'users:read',\n 'users.profile:read',\n );\n\n $this->scope = implode(',', $scopes);\n }\n }", "public function scopes() {\n return array(\n # Importance\n 'main' =>array('condition'=>'importance='.self::IP_MAIN ),\n 'casual' =>array('condition'=>'importance='.self::IP_CASUAL),\n # Status\n 'new' =>array( 'condition'=>'status='.self::ST_NEW ),\n 'playing' =>array( 'condition'=>'status='.self::ST_OK ),\n 'abandoned'=>array( 'condition'=>'status='.self::ST_ABANDONED),\n );\n }", "public function getScopes() {\n //sql to return all user objects\n $sql = \"select * from scope\";\n $result = mysqli_query($this->plink, $sql);\n $scopes = array();\n while ($rows = mysqli_fetch_assoc($result)) {\n $scopes[] = $this->scope($rows);\n }\n return $scopes;\n }", "public function scopePublished($query)\n {\n return $query->where(\"status\", \"=\", \"1\");\n }", "public function scopes() {\n return array(\n 'withRelated' => array(\n 'with' => array(\n 'quest' => array(\n 'alias' => 'characterQuestsQuest' . self::getScopeCounter(),\n 'scopes' => 'withRelated'\n ),\n ),\n 'order' => $this->getTableAlias(true) . \".`id` DESC\"\n ),\n );\n }", "public function newQueryWithoutScopes();", "public function scopes()\n \t{\n \t\t$dogs = Dog::all();\n \t\treturn view('exam.scopes',compact('dogs'));\t\n \t}", "public function scopeOfAuthenticatedUser($query)\n {\n $query->whereUserId(Auth::id());\n }", "public function scopeMine($query)\n {\n //return $query->where('shop_id', Auth::user()->merchantId());\n }", "public function scopeSupportingDocs($query)\n {\n return $query->where('type', 3);\n }", "public function scopeActive($query)\n {\n $query->where('status', static::PUBLISHED);\n }", "public function scopeOwned($query, $userId=null) {\n\t\tif(is_null($userId)) {\n\t\t\t$userId = user('id');\n\t\t}\n\t\treturn $query->where('user_id', $userId);\n\t}", "public function testQueryScope()\n {\n\n PostWithMultipleSlugsAndPrimary::create([\n 'title' => 'A Post Title A'\n ]);\n\n $post = PostWithMultipleSlugsAndPrimary::create([\n 'title' => 'A Post Title B'\n ]);\n\n PostWithMultipleSlugsAndPrimary::create([\n 'title' => 'A Post Title C'\n ]);\n\n $this->assertEquals($post->id, PostWithMultipleSlugsAndPrimary::whereSlug('a-post-title-b')->first()->id);\n\n }", "public function scopeVisible($query)\n {\n return $query->where('is_visible', 1);\n }", "public function scopeActive($query)\n {\n return $query->where(['status'=>1]);\n }", "public function scopeIsprivate($query)\n\t{\n\t\treturn $query->where('isprivate',1);\n\t}", "public function scopePublished($query){ \n \t$query->where('published_at','<=',Carbon::now());\n }", "public function scopeFilter($query)\n {\n $request = request();\n\n if ($request->has('clinic_type_id')) {\n $query->where('clinic_type_id', $request->clinic_type_id);\n }\n\n if ($request->has('sort_by')) {\n $column = $request->sort_by;\n $order = $request->has('order') ? $request->order : 'ASC';\n $query->orderBy($column, $order);\n }\n\n if ($request->has('search')) {\n $keyword = $request->search;\n $query->where('name', 'like', '%'.$keyword.'%')\n ->orWhereHas('clinicType', function ($query) use ($keyword) {\n $query->where('name', 'like', '%'.$keyword.'%');\n });\n }\n }", "public function scopeOfActive($query)\n {\n return $query->where('is_active',true )->where('is_approve',true);\n }", "public function scopePublic($query)\n {\n return $query->where('is_public', true);\n }", "public function scopeFilter($query, $request)\n {\n // filter id\n if ($request->has('id')) {\n $query->where('id',$request->get('id'));\n }\n // filter title\n if ($request->has('title')) {\n $query->where('title', 'like', \"%{$request->get('title')}%\");\n }\n // filter category\n if ($request->has('category')) {\n $query->whereHas('category', function ($query) use($request) {\n $query->where('name', 'like', \"%{$request->get('category')}%\");\n });\n }\n // filter status\n if ($request->has('status')) {\n $query->where('is_publish',$request->get('status'));\n }\n // filter created_at\n if ($request->has('created_at_from')) {\n $query->where('created_at', '>=', Carbon::parse($request->get('created_at_from')));\n }\n if ($request->has('created_at_to')) {\n $query->where('created_at', '<=', Carbon::parse($request->get('created_at_to')));\n }\n return $query;\n }", "public function scopeVisible($query)\n {\n return $query->whereVisible('1');\n }", "public function scopePublic($query)\n {\n return $this->where('is_public', true);\n }", "public function scopeMyselections($query)\n {\n $user = auth()->user();\n if($user->is_admin){\n return $query->orderBy('created_at', 'desc');\n } else {\n return $query->where('user_id', $user->id)->orderBy('created_at', 'desc');\n }\n }", "public function scopeActive($query){\n return $query->where('active',1);\n }", "protected function scope()\n {\n $this->scope = (object) array_merge(\n (array) $this->rook->getScope(),\n (array) $this->bishop->getScope()\n );\n }", "public function scopeUser($query, $request){\n if(trim($request->user) != \"\"){\n $query->where('cuenta', 'LIKE', \"%$request->user%\");\n }\n # si esta el user y el estado\n if($request->user != \"\" && $request->estado != \"\"){\n $query->where('cuenta', 'LIKE', \"%$request->user%\")\n ->where('estado', $request->estado);\n }\n #si esta user y estasdo\n if($request->user != \"\" && $request->estado != \"\" && $request->assigned_to){\n $query->where('cuenta', 'LIKE', \"%$request->user%\")\n ->where('assigned_to', $request->assigned_to)\n ->where('estado', $request->estado);\n }\n # si esta estado\n if($request->estado != \"\" && $request->user == \"\"){\n $query->where('estado', \"=\", $request->estado);\n }\n # si esta asignado\n if($request->assigned_to && $request->user == \"\"){\n $query->where('assigned_to', $request->assigned_to);\n }\n # si esta asignado y estado\n if($request->assigned_to && $request->estado && $request->user == \"\"){\n $query->where('estado', \"=\", $request->estado)\n ->where('assigned_to', $request->assigned_to);\n }\n # si esta asignado, estado y user\n if($request->assigned_to && $request->estado && $request->user != \"\"){\n $query->where('estado', \"=\", $request->estado)\n ->where('assigned_to', $request->assigned_to)\n ->where('cuenta', 'LIKE', \"%$request->user%\");\n }\n # Si esta vacio y agrega ?clientes\n if($request->user != \" \" && $request->clientes){\n $query->where('cliente', \"=\", 1);\n }\n # si clientes y asiggned\n if($request->clientes && $request->assigned_to && !$request->user && !$request->estado){\n $query->where('cliente', \"=\", 1)\n ->where('assigned_to', $request->assigned_to);\n }\n # si clientes, assigned y estado\n if($request->clientes && $request->assigned_to && $request->estado && !$request->user){\n $query->where('cliente', \"=\", 1)\n ->where('assigned_to', $request->assigned_to)\n ->where('estado', \"=\", $request->estado);\n }\n # si tiene clientes y estado\n if($request->clientes && !$request->assigned_to && $request->estado && !$request->user){\n $query->where('cliente', \"=\", 1)\n ->where('estado', \"=\", $request->estado);\n }\n # si tiene clientes y usuario\n if($request->clientes && !$request->assigned_to && !$request->estado && $request->user){\n $query->where('cliente', \"=\", 1)\n ->where('cuenta', 'LIKE', \"%$request->user%\");\n }\n # si clientes, assigned, estado y usuario\n if($request->clientes && $request->assigned_to && $request->estado && $request->user){\n $query->where('cliente', \"=\", 1)\n ->where('assigned_to', $request->assigned_to)\n ->where('estado', \"=\", $request->estado)\n ->where('cuenta', 'LIKE', \"%$request->user%\");\n }\n }", "public function scopeActive($query)\n {\n $query->where('active', 1);\n }", "protected function constructScopes() {}", "public function get_scope_locations()\n { \n response_json(lookup_scope_locations(get_post('scope')));\n }", "public function scopeKnown($query){\n\n return $query->where('known', 1);\n\n }", "function scopeActiveWithPlacesRelated($query)\n {\n return $query\n ->select('name', 'image', 'slug', 'anons', 'publish_date')\n ->where('status', 1)\n ->orderBy('created_at', 'desc')\n ->limit(8)\n ->get();\n }", "public function scopeOnline($query)\n {\n $fet = $query->whereNotNull('video')\n ->where('video','<>','')\n ->whereNotNull('poster')\n ->where('poster','<>','')\n ->whereNotNull('background')\n ->where('background','<>','');\n\n return $fet; \n }", "public function scopeForOwner($query)\n {\n return $query;\n }", "public function defaultScope()\n {\n return array('order' => 'loanId DESC');\n }", "public function scopeGetActive($query) {\n\t\t\n\t\treturn $query->where('status', '<>', 9);\n\t}", "public function scopeActive($query)\n {\n return $query->where('status','active');\n }", "public function scopeActive($query)\n {\n return $query->where('status', 1);\n }", "public function scopeActive($query)\n {\n return $query->where('status', 1);\n }", "public function scopeActive($query)\n {\n return $query->where('status', 1);\n }", "public function scopeActive($query)\n {\n return $query->where('status', 1);\n }", "public function scopeActive($query)\n {\n return $query->where('status', 1);\n }", "public function scopeActive($query)\n {\n return $query->where('status', 1);\n }", "public function scopeActive($query)\n {\n return $query->where('status', 1);\n }", "public function scopeActive($query)\n {\n return $query->where('status', 1);\n }", "public function scopeIsActive($q){\r\n return $q->where('is_active','yes');\r\n }", "public function scopeApp($query)\r\n {\r\n return $query->where('app_id', \\Auth::user()->app_id);\r\n }", "public function scopeApp($query)\r\n {\r\n return $query->where('app_id', \\Auth::user()->app_id);\r\n }", "public function scopeActive($query)\n {\n return $query->where(['status' => 1]);\n }", "public function scopeActive($query) {\n return $query->where($this->table . '.visible', 1);\n }", "public function scopeUserListings($query, $user) {\n return $query->where('user_id', $user->id);\n }", "public function scopeWorking($query)\n {\n return $query->where('working',1)->where('active',1);\n }", "public function _query()\n {\n }", "public function defaultScope()\n { \n \t// Dont do the scope check for logging in and for admin pages \n \t// **ATTENTION: This will need to be changed in the future\n\n \t// admin page can only show tutor\n \tif ('admin' == Yii::app()->controller->getAction()->getId())\n\t return array( \n\t 'condition'=>'(type=\"tutor\")', \n\t ); \n\n\n\t\tif (null == Yii::app()->user->id) \n\t\t\treturn array();\n\t\telse if ('view' == Yii::app()->controller->getAction()->getId())\n\t\t\treturn array();\n\t\telse \n\t return array( \n\t 'condition'=>'(id='.Yii::app()->user->id.')', \n\t ); \n\n }", "public function scopePublished($query)\n\t{\n\t\t$query->where('published_at', '<=', Carbon::now());\n\t}", "public function scopeActive($query)\n\t{\n\t\t$query->where('display', (int) true);\n\t}", "public function scopeFilter($query, $request)\n {\n // filter id\n if ($request->has('id')) {\n $query->where('id',$request->get('id'));\n }\n // filter first_name\n if ($request->has('first_name')) {\n $query->where('first_name', 'like', \"%{$request->get('first_name')}%\")\n ->orWhere('last_name', 'like', \"%{$request->get('first_name')}%\");\n }\n // filter first_name\n if ($request->has('last_name')) {\n $query->where('first_name', 'like', \"%{$request->get('last_name')}%\")\n ->orWhere('last_name', 'like', \"%{$request->get('last_name')}%\");\n }\n // filter status\n if ($request->has('status')) {\n $query->where('is_active',$request->get('status'));\n }\n // filter created_at\n if ($request->has('created_at_from')) {\n $query->where('created_at', '>=', Carbon::parse($request->get('created_at_from')));\n }\n if ($request->has('created_at_to')) {\n $query->where('created_at', '<=', Carbon::parse($request->get('created_at_to')));\n }\n return $query;\n }", "public function scopeWinners($query)\n {\n $query->whereNotNull('position')->orderBy('position');\n }", "public function scopeByUser($query, $user_id)\n {\n return $query->where('user_id', $user_id);\n }", "public function scopeActive($query)\n {\n $query->where('is_active', true);\n }", "public function scopeActive($query) {\n $query->where('active', '=', 1);\n }", "public function scopeActive($query)\n {\n return $query->where('status', 'Open');\n }", "public function scopeFullActive($query) {\n\n\t\treturn $query->join('clients', 'clients.client_id', '=', 'orders.client_id')\n\t\t ->join('states', 'states.state_id' , '=', 'orders.state')\n\t\t\t\t\t ->where('deleted', '!=', 1);\n\t}", "public function scopeClients($query)\n {\n return $query->where('type', 1);\n }", "public function scopeSelection($query){\n return $query -> select('id','abbr','name','direction','active');\n }", "public function scopes()\n {\n return [\n 'category' => new CategoryScope(),\n ];\n }", "private function initScopes()\n {\n $this->scopes = new Collections\\ArrayCollection();\n }", "public function scopeDeveloper($query)\n {\n return $query->where('slug', 'developer');\n \n }", "public function scopeMine($query)\n {\n return $query->whereUserId(auth()->user()->id);\n }", "public function scopeuserbyid($query,$id){\n return $query->where('id',$id)->get();\n }", "public function newQueryWithoutScope($scope);", "public function scopeInFuture($query){\n return $query->where('end','>=', date('Y-m-d H:i:s'));\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }" ]
[ "0.7794624", "0.7449051", "0.6734174", "0.6734174", "0.67137265", "0.670079", "0.66816324", "0.66428673", "0.64159036", "0.6387481", "0.6367222", "0.6367222", "0.6367222", "0.63250124", "0.63200176", "0.63183504", "0.6297847", "0.62931883", "0.6274175", "0.6274175", "0.6273523", "0.6270206", "0.6256483", "0.6243073", "0.62196434", "0.6214855", "0.6162011", "0.6156992", "0.61435884", "0.61156374", "0.6108148", "0.6094862", "0.6093549", "0.6088372", "0.60864455", "0.60848004", "0.6061806", "0.60614383", "0.60586107", "0.60528773", "0.6050046", "0.6045831", "0.60457456", "0.6044939", "0.6034051", "0.6017904", "0.60174", "0.6015598", "0.60035855", "0.6001757", "0.60001934", "0.5996249", "0.59925956", "0.5981796", "0.59756196", "0.5974997", "0.59748834", "0.5964155", "0.5955073", "0.59497714", "0.59448427", "0.59448427", "0.59448427", "0.59448427", "0.59448427", "0.59448427", "0.59448427", "0.59448427", "0.59326774", "0.5931123", "0.5931123", "0.59251595", "0.59195036", "0.5917778", "0.59175676", "0.59175193", "0.5916103", "0.5908879", "0.5905843", "0.59027207", "0.59026235", "0.5898945", "0.5891534", "0.58914155", "0.5890825", "0.5888508", "0.58770895", "0.58721304", "0.5871207", "0.5862727", "0.58614016", "0.5859134", "0.5849883", "0.58416885", "0.584063", "0.58276564", "0.58276564", "0.58276564", "0.58276564", "0.58276564", "0.58276564" ]
0.0
-1
Get the value of the indicator at a given interval number
public function get(int $intervalNum, OrderTime $orderTime): float;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getIndicator() ;", "abstract protected function get_interval();", "public function getIntervalValue()\r\n {\r\n return $this->interval_value;\r\n }", "public function getInterval() {}", "protected function getInterval() {\n return new Interval($this->configuration['number'], $this->configuration['unit']);\n }", "public function getIndicatorElement() {\n\t\treturn $this->indicator;\n\t}", "public function getInterval()\n {\n return $this->readOneof(10);\n }", "public function getInterval()\n {\n\n }", "public function getInterval()\n {\n return 1;\n }", "public function getInterval()\n {\n return $this->interval;\n }", "public function getInterval()\n {\n return $this->interval;\n }", "function getIntraIntervalDetails($params = array()) {\n\t$number = range(5, 60, 5);\n\t$min = 0;\n\n\t// get date value\n\t$is_midnight = false;\n\t$midnight_date = '';\n\t$midnight_interval = '';\n\n\tif (isset($params['date'])) {\n\t\t$cur_datetime = Carbon::createFromTimestamp(strtotime($params['date']));\n\t\t$dte = $cur_datetime->format('Y-m-d');\n\t} else {\n\t\t$cur_datetime = Carbon::now()->subMinutes(5);\n\t\t$dte = $cur_datetime->format('Y-m-d');\n\n\t\t$est_hour_value = $cur_datetime->hour + 1;\n\t\tif ($est_hour_value == 24) {\n\t\t\t$midnight_date = Carbon::now()->format('Y-m-d');\n\t\t\t$midnight_interval = '00:00:00';\n\t\t\t$is_midnight = true;\n\t\t}\n\n\t}\n\n\t// get hour value\n\tif (!isset($params['hour'])) {\n\t\t$cur_hour = $cur_datetime->hour;\n\t\t$hour = $cur_hour + 1;\n\t} else {\n\t\t$hour = $params['hour'];\n\t}\n\n\t// get min value\n\tif (!isset($params['min'])) {\n\t\t$cur_min = $cur_datetime->minute;\n\t\t$min_value = 1;\n\t\tforeach ($number as $max_value) {\n\t\t\tif ($cur_min >= $min_value && $cur_min <= $max_value) {\n\t\t\t\t$min = $max_value;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$min_value = $max_value + 1;\n\t\t}\n\t} else {\n\t\t$min = $params['min'];\n\t}\n\n\tif ($min == 60) {\n\t\t$min = 0;\n\t}\n\n\t$prev_hour = $hour - 1;\n\t$prev_date = $dte;\n\tif ($min != 0) {\n\t\t$min = str_pad($min, 2, \"0\", STR_PAD_LEFT);\n\t\t$interval = str_pad($prev_hour, 2, \"0\", STR_PAD_LEFT) . ':' . $min . ':00';\n\n\t\t$prev_min = $min - 5;\n\t} else {\n\t\t$min = str_pad($min, 2, \"0\", STR_PAD_LEFT);\n\t\t$interval = str_pad($hour, 2, \"0\", STR_PAD_LEFT) . ':' . $min . ':00';\n\t\t$prev_min = 55;\n\t\t$prev_date = $cur_datetime::yesterday()->format('Y-m-d');\n\t}\n\t$prev_intrainterval = str_pad($prev_hour, 2, \"0\", STR_PAD_LEFT) . ':' . str_pad($prev_min, 2, \"0\", STR_PAD_LEFT) . ':00';\n\n\t## for previous previous intra interval\n\t$prev_prev_hour = $prev_hour;\n\t$prev_prev_date = $prev_date;\n\n\tif ($prev_min != 0) {\n\t\t$prev_prev_min = $prev_min - 5;\n\t} else {\n\t\t$prev_prev_hour = $prev_hour - 1;\n\t\t$prev_prev_min = 55;\n\t}\n\t$prev_prev_intrainterval = str_pad($prev_prev_hour, 2, \"0\", STR_PAD_LEFT) . ':' . str_pad($prev_prev_min, 2, \"0\", STR_PAD_LEFT) . ':00';\n\n\t// create prev, prev, current intra interval values\n\t// if the current date time is midnight, return the real date and 00:00:00 interval\n\t$intra_intervals = array();\n\tif ($is_midnight) {\n\t\t$intra_intervals[] = $midnight_date . ' ' . $midnight_interval;\n\t} else {\n\t\t$intra_intervals[] = $dte . ' ' . $interval;\n\t}\n\n\t$intra_intervals[] = $prev_date . ' ' . $prev_intrainterval;\n\t$intra_intervals[] = $prev_prev_date . ' ' . $prev_prev_intrainterval;\n\n\treturn array(\n\t\t'date' => $dte,\n\t\t'min' => $min,\n\t\t'hour' => $hour,\n\t\t'intra_interval' => $interval,\n\t\t'prev_hour' => $prev_hour,\n\t\t'prev_intrainterval' => $prev_intrainterval,\n\t\t'intra_intervals' => $intra_intervals,\n\t);\n\n}", "public function getInterval()\n {\n return $this->_interval;\n }", "public function &getValue();", "function _getNowValues($interval){\n if (($result = Cacher::getCache(\"NowRain_ID_\".$this->sensId.\"_Interval_\".$interval, 7)) == false){\n $result = $this->connection->fetchQueryResultLine(\"SELECT sum(count) as rain FROM \".$this->table.\" WHERE sens_id=\".$this->sensId.\" AND timestamp>(select (current_timestamp - INTERVAL '\".$interval.\"'))\");\n Cacher::setCache(\"NowRain_ID_\".$this->sensId.\"_Interval_\".$interval, $result);\n }\n return $result['rain'];\n }", "public function getIndicator()\n {\n if (array_key_exists(\"indicator\", $this->_propDict)) {\n return $this->_propDict[\"indicator\"];\n } else {\n return null;\n }\n }", "function getInterval() {return $this->_interval;}", "function intervalo($num, $val, $val2){\n switch($num){\n case 1:\n if(intval($val2[0]) < intval($val)){\n $aux = \"valAlto\";\n }else{\n if(intval($val2[1]) > intval($val)){\n $aux = \"valBajo\";\n }else{\n $aux = \"valNormal\";\n }\n }\n\n break;\n \n case 2:\n\n if(intval($val2[0]) < intval($val)){\n $aux = \"valAlto\";\n }else{\n if(intval($val2[1]) > intval($val)){\n $aux = \"valBajo\";\n }else{\n $aux = \"valNormal\";\n }\n }\n\n break;\n \n case 3:\n\n if(intval($val2[0]) < intval($val)){\n $aux = \"valAlto\";\n }else{\n if(intval($val2[1]) > intval($val)){\n $aux = \"valBajo\";\n }else{\n $aux = \"valNormal\";\n }\n }\n\n break;\n }\n return $aux;\n}", "public function getInterval(){\n\t\treturn $this->test_interval;\n\t}", "abstract public function getValue();", "abstract public function getValue();", "abstract public function getValue();", "public function getIntervalo()\n {\n return $this->intervalo;\n }", "public function getNValue() {}", "function compute_rsi () {\n\n if (empty($this->rsi_gains) OR $this->value == $this->prev_value) {\n array_push($this->rsi_gains, 0);\n array_push($this->rsi_losses, 0);\n\n } elseif ($this->value > $this->prev_value) {\n array_push($this->rsi_gains, $this->value - $this->prev_value);\n array_push($this->rsi_losses, 0);\n\n } else {\n array_push($this->rsi_losses, $this->prev_value - $this->value);\n array_push($this->rsi_gains, 0);\n }\n\n if (count($this->rsi_gains) > $this->period) {\n array_shift($this->rsi_gains);\n array_shift($this->rsi_losses);\n }\n\n $gain_avg = array_sum($this->rsi_gains) / count($this->rsi_gains);\n $loss_avg = array_sum($this->rsi_losses) / count($this->rsi_gains);\n\n if ($loss_avg > 0) {\n $this->rsi = round(100-(100/(1+($gain_avg/$loss_avg))),3);\n\n } else {\n $this->rsi = 100;\n }\n }", "abstract protected function getValue();", "public function getValue(int $indexX, int $indexY): int;", "public function interval($value) {\n return $this->setProperty('interval', $value);\n }", "public function pointValue($level);", "public function interval(int|float $value, int|float $min, int|float $max, int|float $default_value) : int|float\n\t{\n\t\treturn $this->handlers->map($value, function ($value) use ($min, $max, $default_value) {\n\t\t\treturn $this->handlers->get('interval')->filter($value, $min, $max, $default_value);\n\t\t});\n\t}", "public function value(): int;", "public function getIntensity() {}", "public function sensorReadingMapValue($sensor)\n {\n $reading = 0;\n //echo $reading;\n $sensormap = SensorMap::where('sensorID', '=', $sensor->sensorID)->first();\n\n if(!$sensormap){\n $sensormap = DatasetMap::where('sensorID', '=', $sensor->sensorID)->first();\n }\n $point = $sensormap->point;\n //var_dump($sensordata);\n switch($point){\n case \"temp1\":\n $reading = $sensor->temp1;\n break;\n case \"temp2\":\n $reading = $sensor->temp2;\n break;\n case \"temp3\":\n $reading = $sensor->temp3;\n break;\n case \"temp4\":\n $reading = $sensor->temp4;\n break;\n case \"temp5\":\n $reading = $sensor->temp5;\n break;\n }\n\n\n return $reading;\n }", "function OutputRange($int){\n $intervals = array(4,14,32,45);\n $elements = count($intervals);\n for($i=0; $i<$elements-1; $i++){\n if($intervals[$i]<$int && $int<=$intervals[$i+1]){\n return $intervals[$i].'-'.$intervals[$i+1];\n }\n }\n return $intervals[$elements-1].'+';\n}", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "function get_range_value( $type, $level, $direction, $levels ) {\n $val = null;\n if ( ! empty( $levels[ $level ][ $type ] ) ) {\n $val = $levels[ $level ][ $type ];\n }\n elseif ( $level > 0 && $level < count( $levels ) ) {\n if ( $type === 'min' ) {\n $type = 'max';\n } else {\n $type = 'min';\n }\n\n if ( $direction === 'up' ) {\n $level = $level + 1;\n } else {\n $level = $level - 1;\n }\n\n $val = $this->get_range_value( $type, $level, $direction, $levels );\n }\n\n return $val;\n }", "public function getNextInterval(): int\n {\n return $this->nextInterval;\n }", "function value($r) \r\n{ \r\n if ($r == 'I') \r\n return 1; \r\n if ($r == 'V') \r\n return 5; \r\n if ($r == 'X') \r\n return 10; \r\n if ($r == 'L') \r\n return 50; \r\n if ($r == 'C') \r\n return 100; \r\n if ($r == 'D') \r\n return 500; \r\n if ($r == 'M') \r\n return 1000; \r\n \t//else echo \"error\";\r\n return 0; \r\n}", "static function getRange()\n {\n return static::$range;\n }", "abstract protected function calculateValue();", "public function getInt($i);", "public function testCompareReturnsIntIfXIsEqualToInclusiveUpperBound()\n {\n $x = 2;\n \n $interval = (new Interval())\n ->setLower(1)\n ->setUpper(1 + 1)\n ->setIsUpperInclusive(true);\n \n $this->assertEquals(0, $interval->compare($x));\n \n return;\n }", "public\tfunction\tgetValue($offset)\n\t\t{\n\t\t\tif(!array_key_exists($offset, $this->_values)) {\n\t\t\t\treturn\t$this->_values[$offset];\n\t\t\t}\n\t\t}", "public function getRangeUnit(): string;", "public function calculate()\n {\n $nationalInsurance = 0.0;\n $nationalInsurance += $this->calculateBand('basic');\n $nationalInsurance += $this->calculateBand('higher');\n return $nationalInsurance;\n }", "public function getValue($index) {}", "public abstract function getValue($value);", "static public function getIvaTaxValue()\n {\n $tax = 1;\n $query = \"SELECT\n class.title,\n rate.`name`,\n round((rate.rate/100)+1,2) as value\n FROM\n oc_tax_class AS class\n INNER JOIN oc_tax_rule AS rule ON class.tax_class_id = rule.tax_class_id\n INNER JOIN oc_tax_rate AS rate ON rule.tax_rate_id = rate.tax_rate_id\";\n $results = DB::select(DB::raw($query));\n foreach ($results as $res){\n if(strtoupper($res->title)==\"IVA\"){\n $tax = $res->value;\n }\n }\n return $tax;\n }", "public function floorValue($key)\n\t{\n\t\treturn $this->floor($key)->value;\n\t}", "public function getCurrentVal() {}", "public function getIndicatorByFactor($factor)\n {\n $indicator = DB::select('select al_i.name from al_indicators as al_i inner join al_factor as al_f on al_i.al_factor_id = al_f.al_factor_id where al_f.name =\"' . $factor . '\"');\n return $indicator;\n }", "protected function getValueOfN()\n {\n $lat = $this->latitude;\n\n $sinLat = sin(\\deg2rad($lat));\n\n $base = 1 - $this->getValueOfSquareEccentricity() * pow($sinLat, 2);\n\n return OOW_EARTH_MAJOR_RADIUS / \\sqrt($base);\n }", "public function getValue()\n {\n return 1;\n }", "public function calculateNextValue() {}", "public function get_ri($indicator_name, $percentage)\n {\n \n $risk_infection = 'unavailable';\n $risk_hospital = 'unavailable';\n $risk_death = 'unavailable';\n\n $risk_index_infection = 'unavailable';\n $risk_index_hospital = 'unavailable';\n $risk_index_death = 'unavailable';\n\n\n //***** indicators ranking conditions selector *********\n switch ($indicator_name) {\n case 'Gender':\n if($percentage >= 50){\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n elseif ($percentage < 50) {\n $risk_infection = 2;\n $risk_hospital = 1;\n $risk_death = 1;\n }\n $infection_min = 1;\n $infection_max = 2;\n $hospital_min = 1;\n $hospital_max = 2;\n $death_min = 1;\n $death_max = 2;\n break;\n case 'Educational Attainment':\n if($percentage >= 50){\n $risk_infection = 2;\n $risk_hospital = 'unavailable' ;\n $risk_death = 'unavailable';\n }\n elseif ($percentage < 50) {\n $risk_infection = 1;\n $risk_hospital = 'unavailable';\n $risk_death = 'unavailable';\n }\n\n $infection_min = 1;\n $infection_max = 2;\n break;\n case 'Un Employment':\n if($percentage >= 50){\n $risk_infection = 2;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n elseif ($percentage < 50) {\n $risk_infection = 1;\n $risk_hospital = 1;\n $risk_death = 1;\n }\n\n $infection_min = 1;\n $infection_max = 2;\n $hospital_min = 1;\n $hospital_max = 2;\n $death_min = 1;\n $death_max = 2;\n break;\n case 'Informal Employment':\n if($percentage >= 50){\n $risk_infection = 2;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n elseif ($percentage < 50) {\n $risk_infection = 1;\n $risk_hospital = 1;\n $risk_death = 1;\n }\n\n $infection_min = 1;\n $infection_max = 2;\n $hospital_min = 1;\n $hospital_max = 2;\n $death_min = 1;\n $death_max = 2;\n break;\n case 'Income':\n if($percentage >= 50){\n $risk_infection = 2;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n elseif ($percentage < 50) {\n $risk_infection = 1;\n $risk_hospital = 1;\n $risk_death = 1;\n }\n\n $infection_min = 1;\n $infection_max = 2;\n $hospital_min = 1;\n $hospital_max = 2;\n $death_min = 1;\n $death_max = 2;\n break;\n case 'HH Size':\n if($percentage <= 3){\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n elseif ($percentage <= 6) {\n $risk_infection = 2;\n $risk_hospital = 1;\n $risk_death = 1;\n }\n elseif ($percentage >= 7) {\n $risk_infection = 3;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n\n $infection_min = 1;\n $infection_max = 3;\n $hospital_min = 1;\n $hospital_max = 2;\n $death_min = 1;\n $death_max = 2;\n break;\n case 'Informal Settlement':\n if($percentage >= 50){\n $risk_infection = 2;\n $risk_hospital = 1;\n $risk_death = 1;\n }\n elseif ($percentage < 50) {\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n\n $infection_min = 1;\n $infection_max = 2;\n $hospital_min = 1;\n $hospital_max = 2;\n $death_min = 1;\n $death_max = 2;\n break;\n case 'Population density':\n if($percentage < 5165){\n $risk_infection = 1;\n $risk_hospital = 'unavailable' ;\n $risk_death = 'unavailable';\n }\n elseif ($percentage >= 5165) {\n $risk_infection = 2;\n $risk_hospital = 'unavailable';\n $risk_death = 'unavailable';\n }\n\n $infection_min = 1;\n $infection_max = 2;\n break;\n case 'Access to Radio':\n if($percentage >= 50){\n $risk_infection = 2;\n $risk_hospital = 'unavailable' ;\n $risk_death = 'unavailable';\n }\n elseif ($percentage < 50) {\n $risk_infection = 1;\n $risk_hospital = 'unavailable';\n $risk_death = 'unavailable';\n }\n\n $infection_min = 1;\n $infection_max = 2;\n break;\n case 'Access to TV':\n if($percentage >= 50){\n $risk_infection = 2;\n $risk_hospital = 'unavailable' ;\n $risk_death = 'unavailable';\n }\n elseif ($percentage < 50) {\n $risk_infection = 1;\n $risk_hospital = 'unavailable';\n $risk_death = 'unavailable';\n }\n\n $infection_min = 1;\n $infection_max = 2;\n break;\n case 'Access to Mobile':\n if($percentage >= 50){\n $risk_infection = 1;\n $risk_hospital = 'unavailable' ;\n $risk_death = 'unavailable';\n }\n elseif ($percentage < 50) {\n $risk_infection = 2;\n $risk_hospital = 'unavailable';\n $risk_death = 'unavailable';\n }\n\n $infection_min = 1;\n $infection_max = 2;\n break;\n case 'Water Source':\n if($percentage >= 50){\n $risk_infection = 2;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n elseif ($percentage < 50) {\n $risk_infection = 1;\n $risk_hospital = 1;\n $risk_death = 1;\n }\n\n $infection_min = 1;\n $infection_max = 2;\n $hospital_min = 1;\n $hospital_max = 2;\n $death_min = 1;\n $death_max = 2;\n break;\n case 'Hand Washing':\n if($percentage >= 50){\n $risk_infection = 2;\n $risk_hospital = 'unavailable' ;\n $risk_death = 'unavailable';\n }\n elseif ($percentage < 50) {\n $risk_infection = 1;\n $risk_hospital = 'unavailable';\n $risk_death = 'unavailable';\n }\n\n $infection_min = 1;\n $infection_max = 2;\n break;\n case 'Soap and Detergents':\n if($percentage >= 50){\n $risk_infection = 2;\n $risk_hospital = 'unavailable' ;\n $risk_death = 'unavailable';\n }\n elseif ($percentage < 50) {\n $risk_infection = 1;\n $risk_hospital = 'unavailable';\n $risk_death = 'unavailable';\n }\n\n $infection_min = 1;\n $infection_max = 2;\n break;\n case 'Sanitation':\n if($percentage >= 50){\n $risk_infection = 2;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n elseif ($percentage < 50) {\n $risk_infection = 1;\n $risk_hospital = 1;\n $risk_death = 1;\n }\n\n $infection_min = 1;\n $infection_max = 2;\n $hospital_min = 1;\n $hospital_max = 2;\n $death_min = 1;\n $death_max = 2;\n break;\n case 'Cooking':\n if($percentage >= 50){\n $risk_infection = 2;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n elseif ($percentage < 50) {\n $risk_infection = 1;\n $risk_hospital = 1;\n $risk_death = 1;\n }\n\n $infection_min = 1;\n $infection_max = 2;\n $hospital_min = 1;\n $hospital_max = 2;\n $death_min = 1;\n $death_max = 2;\n break;\n case 'Solid Fuel':\n if($percentage >= 50){\n $risk_infection = 2;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n elseif ($percentage < 50) {\n $risk_infection = 1;\n $risk_hospital = 1;\n $risk_death = 1;\n }\n\n $infection_min = 1;\n $infection_max = 2;\n $hospital_min = 1;\n $hospital_max = 2;\n $death_min = 1;\n $death_max = 2;\n break;\n case 'Disability':\n if($percentage >= 50){\n $risk_infection = 3;\n $risk_hospital = 'unavailable' ;\n $risk_death = 'unavailable';\n }\n elseif ($percentage >= 21) {\n $risk_infection = 2;\n $risk_hospital = 'unavailable';\n $risk_death = 'unavailable';\n }\n elseif ($percentage < 21) {\n $risk_infection = 1;\n $risk_hospital = 'unavailable';\n $risk_death = 'unavailable';\n }\n\n $infection_min = 1;\n $infection_max = 3;\n break;\n case 'Age':\n if($percentage >= 50){\n $risk_infection = 2;\n $risk_hospital = 3;\n $risk_death = 3;\n }\n elseif ($percentage < 50) {\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n\n $infection_min = 1;\n $infection_max = 2;\n $hospital_min = 1;\n $hospital_max = 3;\n $death_min = 1;\n $death_max = 3;\n break;\n case 'Malnutrition':\n if($percentage >= 50){\n $risk_infection = 3;\n $risk_hospital = 1 ;\n $risk_death = 1;\n }\n elseif ($percentage >= 21) {\n $risk_infection = 2;\n $risk_hospital = 3;\n $risk_death = 3;\n }\n elseif ($percentage < 21) {\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n\n $infection_min = 1;\n $infection_max = 3;\n $hospital_min = 1;\n $hospital_max = 3;\n $death_min = 1;\n $death_max = 3;\n break;\n case 'Khat':\n if($percentage >= 50){\n $risk_infection = 3;\n $risk_hospital = 1 ;\n $risk_death = 1;\n }\n elseif ($percentage >= 21) {\n $risk_infection = 2;\n $risk_hospital = 3;\n $risk_death = 3;\n }\n elseif ($percentage < 21) {\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n\n $infection_min = 1;\n $infection_max = 3;\n $hospital_min = 1;\n $hospital_max = 3;\n $death_min = 1;\n $death_max = 3;\n break;\n case 'Smoking':\n if($percentage >= 50){\n $risk_infection = 3;\n $risk_hospital = 1 ;\n $risk_death = 1;\n }\n elseif ($percentage >= 21) {\n $risk_infection = 2;\n $risk_hospital = 3;\n $risk_death = 3;\n }\n elseif ($percentage < 21) {\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n\n $infection_min = 1;\n $infection_max = 3;\n $hospital_min = 1;\n $hospital_max = 3;\n $death_min = 1;\n $death_max = 3;\n break;\n case 'Alcohol':\n if($percentage >= 50){\n $risk_infection = 3;\n $risk_hospital = 1 ;\n $risk_death = 1;\n }\n elseif ($percentage >= 21) {\n $risk_infection = 2;\n $risk_hospital = 3;\n $risk_death = 3;\n }\n elseif ($percentage < 21) {\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n\n $infection_min = 1;\n $infection_max = 3;\n $hospital_min = 1;\n $hospital_max = 3;\n $death_min = 1;\n $death_max = 3;\n break;\n case 'BMI':\n if($percentage >= 50){\n $risk_infection = 3;\n $risk_hospital = 1 ;\n $risk_death = 1;\n }\n elseif ($percentage >= 21) {\n $risk_infection = 2;\n $risk_hospital = 3;\n $risk_death = 3;\n }\n elseif ($percentage < 21) {\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n\n $infection_min = 1;\n $infection_max = 3;\n $hospital_min = 1;\n $hospital_max = 3;\n $death_min = 1;\n $death_max = 3;\n break;\n case 'HIV':\n if($percentage >= 50){\n $risk_infection = 3;\n $risk_hospital = 1 ;\n $risk_death = 1;\n }\n elseif ($percentage >= 21) {\n $risk_infection = 2;\n $risk_hospital = 3;\n $risk_death = 3;\n }\n elseif ($percentage < 21) {\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n\n $infection_min = 1;\n $infection_max = 3;\n $hospital_min = 1;\n $hospital_max = 3;\n $death_min = 1;\n $death_max = 3;\n break;\n case 'DM':\n if($percentage >= 50){\n $risk_infection = 3;\n $risk_hospital = 1 ;\n $risk_death = 1;\n }\n elseif ($percentage >= 21) {\n $risk_infection = 2;\n $risk_hospital = 3;\n $risk_death = 3;\n }\n elseif ($percentage < 21) {\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n\n $infection_min = 1;\n $infection_max = 3;\n $hospital_min = 1;\n $hospital_max = 3;\n $death_min = 1;\n $death_max = 3;\n break;\n case 'HTN':\n if($percentage >= 50){\n $risk_infection = 3;\n $risk_hospital = 1 ;\n $risk_death = 1;\n }\n elseif ($percentage >= 21) {\n $risk_infection = 2;\n $risk_hospital = 3;\n $risk_death = 3;\n }\n elseif ($percentage < 21) {\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n\n $infection_min = 1;\n $infection_max = 3;\n $hospital_min = 1;\n $hospital_max = 3;\n $death_min = 1;\n $death_max = 3;\n break;\n case 'TB':\n if($percentage >= 50){\n $risk_infection = 3;\n $risk_hospital = 1 ;\n $risk_death = 1;\n }\n elseif ($percentage >= 21) {\n $risk_infection = 2;\n $risk_hospital = 3;\n $risk_death = 3;\n }\n elseif ($percentage < 21) {\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n\n $infection_min = 1;\n $infection_max = 3;\n $hospital_min = 1;\n $hospital_max = 3;\n $death_min = 1;\n $death_max = 3;\n break;\n case 'CVD':\n if($percentage >= 50){\n $risk_infection = 3;\n $risk_hospital = 1 ;\n $risk_death = 1;\n }\n elseif ($percentage >= 21) {\n $risk_infection = 2;\n $risk_hospital = 3;\n $risk_death = 3;\n }\n elseif ($percentage < 21) {\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n\n $infection_min = 1;\n $infection_max = 3;\n $hospital_min = 1;\n $hospital_max = 3;\n $death_min = 1;\n $death_max = 3;\n break;\n case 'Asthma':\n if($percentage >= 50){\n $risk_infection = 3;\n $risk_hospital = 1 ;\n $risk_death = 1;\n }\n elseif ($percentage >= 21) {\n $risk_infection = 2;\n $risk_hospital = 3;\n $risk_death = 3;\n }\n elseif ($percentage < 21) {\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n\n $infection_min = 1;\n $infection_max = 3;\n $hospital_min = 1;\n $hospital_max = 3;\n $death_min = 1;\n $death_max = 3;\n break;\n case 'Cancer':\n if($percentage >= 50){\n $risk_infection = 3;\n $risk_hospital = 1 ;\n $risk_death = 1;\n }\n elseif ($percentage >= 21) {\n $risk_infection = 2;\n $risk_hospital = 3;\n $risk_death = 3;\n }\n elseif ($percentage < 21) {\n $risk_infection = 1;\n $risk_hospital = 2;\n $risk_death = 2;\n }\n\n $infection_min = 1;\n $infection_max = 3;\n $hospital_min = 1;\n $hospital_max = 3;\n $death_min = 1;\n $death_max = 3;\n break;\n\n default:\n break;\n }\n\n\n //(score - min)/(max-min)\n \n //********* calculate risk index for infecton, hospitalizaton and death\n\n if($risk_infection != 'unavailable'){\n $risk_index_infection = ($risk_infection - $infection_min) / ($infection_max - $infection_min);\n }\n\n if($risk_hospital != 'unavailable') {\n $risk_index_hospital = ($risk_hospital - $hospital_min) / ($hospital_max - $hospital_min);\n }\n\n if($risk_death != 'unavailable') {\n $risk_index_death = ($risk_death - $death_min) / ($death_max - $death_min);\n }\n\n $ri = array(\n 'risk_index_infection' => $risk_index_infection, \n 'risk_index_hospital' => $risk_index_hospital, \n 'risk_index_death' => $risk_index_death\n );\n\n //** return calculated risk index value for the indicator\n return $ri;\n }", "function intRate($type=null){\n\t\tglobal $driver;\n if($type==2){\n return 11.1;\n }else{\n $sql =\t\"SELECT interestrate FROM settings\"; //Retrieve the interest rate\n if($results\t= $driver->perform_request($sql)):\n $row\t= $driver->load_data($results,MYSQL_ASSOC);\n $interest = ($row['interestrate']>0)?($row['interestrate']):20;\n else:\n die('<p class=\"error\">Interest rate Error: '.mysql_error().'</p>');\n endif;\n return $interest; //The interest rate\n }\n}", "public function getRange() {\n\n }", "public function getCurrentVal()\n {\n return $this->data[$this->currentValKey];\n }", "public function setIndicator($val)\n {\n $this->_propDict[\"indicator\"] = $val;\n return $this;\n }", "public function getNumberWithinSeries()\n\t{\n\t\treturn $this->numberWithinSeries;\n\t}", "public function getIntervalField()\r\n {\r\n return $this->interval_field;\r\n }", "public function getIntegral()\n {\n return $this->integral;\n }", "public function getRange(): string;", "public function getOffset($value);", "function getstatval($oper, $val){\n\t\tswitch ($oper) {\n\t\t\tcase '+': return $val;\n\t\t\tcase '-': return 0 - $val; \n\t\t\tcase 'x': return $val / 100; // Remember this numbers are stored as int in the database \n\t\t\tcase '/': return 100 / $val; // I hope the floating point precision is good enough\n\t\t}\n\t}", "function v1_get_id_insarpixel($dd_sar_id, $number) {\n\t\n\t// If parameters are empty\n\tif (empty($dd_sar_id) || empty($number)) {\n\t\treturn NULL;\n\t}\n\t\n\t// Connect to DB\n\tinclude \"php/include/db_connect.php\";\n\t\n\t// Create SQL query\n\t$sql=\"SELECT dd_srd_id FROM dd_srd WHERE dd_sar_id='\".mysql_real_escape_string($dd_sar_id).\"' AND dd_srd_numb='\".mysql_real_escape_string($number).\"'\";\n\t\n\t// Query DB\n\t$result=mysql_query($sql) or die(mysql_error());\n\t\n\t// Get result\n\t$row=mysql_fetch_array($result);\n\t\n\treturn $row['dd_srd_id'];\n\t\n}", "public function testCompareReturnsIntIfXIsEqualToInclusiveLowerBound()\n {\n $x = 1;\n \n $interval = (new Interval())\n ->setIsLowerInclusive(true)\n ->setLower(1)\n ->setUpper(1 + 1);\n \n $this->assertEquals(0, $interval->compare($x));\n \n return;\n }", "public function getValueForTier($intTier)\n {\n do {\n if (isset($this->arrTiers[$intTier])) {\n return $this->arrTiers[$intTier];\n }\n\n $intTier -= 1;\n\n } while ($intTier > 0);\n\n return $this->arrTiers[min(array_keys($this->arrTiers))];\n }", "function GetNamedInterval($id = null) {\r\n\r\n\t# if $id name is null\r\n\tif ($id === null) {\r\n\r\n\t\t# return the latest interval\r\n\t\tforeach($this->intervals as $id =>$val) ;\r\n\t\t$ret = \"$id = $val\";\r\n\r\n\t# else if there is a $id name\r\n\t} elseif (array_key_exists($id, $this->intervals))\r\n\r\n\t\t# return the named interval\r\n\t\t$ret = \"$id = {$this->intervals[$id]}\";\r\n\r\n\t# else return 'no value'\r\n\telse $ret = \"$id = no value\";\r\n\r\n\treturn $ret;\r\n# end function\r\n}", "private function calculateCurrentValue() {\n return ($this->lastIncrementId - $this->meta->getActiveProfile()->getStartValue())\n * $this->meta->getActiveProfile()->getStep() + $this->meta->getActiveProfile()->getStartValue();\n }", "protected function getValue($event){\n $value = parent::getValue($event);\n if( $value == null ){\n return 1;\n }\n return $value;\n }", "public function getIndicatorByFactor($factor)\n {\n\n $api = new APIServiceRepository();\n $indicadores = $api->getIndicatorByFactor($factor); // $Liquidez\n if (empty($indicadores)) {\n return $this->sendError('Indicadore segun factor no encontrado');\n } else {\n $indicadorPorFactor = array();\n for ($i = 0; $i < count($indicadores); $i++) {\n array_push($indicadorPorFactor, $indicadores[$i]->name);\n }\n $data = [\n 'factor' => $factor,\n 'indicadores' => $indicadorPorFactor,\n ];\n return $this->sendResponse($data, '');\n }\n }", "public function ads_get_value($limit, $offset) {\n $sql = \"select * from advertisement LIMIT \" . $limit . \" OFFSET \" . $offset . \" \";\n $data = $this->db->query($sql, $limit, $offset);\n return $data->result();\n }", "public function get_inst_id_from_numeric_value($class_tag, $atri, $value) {\n\t\t$class_tag = $this->conn->quote($class_tag);\n\t\t//$value = $this->conn->quote($value);\n\n\t\t$atri_info = $this->get_attr_info($atri);\n\t\t$atri_id = $atri_info['id'];\n\n\t\t$sql = \"SELECT i.id\n\t\t\t\tFROM omp_instances i\n\t\t\t\t, omp_classes c\n\t\t\t\t, omp_values v\n\t\t\t\tWHERE \n\t\t\t\t i.class_id = c.id\n\t\t\t\tAND c.tag=$class_tag\n\t\t\t\tAND v.inst_id = i.id\n\t\t\t\tAND v.atri_id = $atri_id\n\t\t\t\tAND v.num_val = $value\n\t\t\t\t\";\n\n\t\t$row = $this->conn->fetchAssoc($sql);\n\n\t\tif ($row) {\n\t\t\treturn $row['id'];\n\t\t}\n\t\treturn -1;\n\t}", "public function testCompareReturnsIntIfXIsAboveInterval()\n {\n $x = 999;\n \n $interval = (new Interval())->setLower(-INF)->setUpper(0);\n \n $this->assertEquals(1, $interval->compare($x));\n \n return;\n }", "public function getValueForTier($intTier)\n {\n do {\n if (isset($this->arrTiers[$intTier])) {\n return $this->arrTiers[$intTier];\n }\n\n --$intTier;\n\n } while ($intTier > 0);\n\n return $this->arrTiers[min(array_keys($this->arrTiers))];\n }", "public function getNumber();", "public function testCompareReturnsIntIfXIsInsideInterval()\n {\n $x = 0;\n \n $interval = (new Interval())->setLower(-999)->setUpper(+999);\n \n $this->assertEquals(0, $interval->compare($x));\n \n return;\n }", "public function get($i);", "public function get($i);" ]
[ "0.6653696", "0.6224163", "0.6212928", "0.5986658", "0.57582295", "0.5484392", "0.5458628", "0.54008573", "0.5382212", "0.5361484", "0.5361484", "0.53599954", "0.5264917", "0.52592784", "0.525829", "0.52316433", "0.52116144", "0.5200677", "0.5187746", "0.51394314", "0.51394314", "0.5138719", "0.5129719", "0.51184857", "0.5094024", "0.5053126", "0.5043664", "0.5029834", "0.5018749", "0.50156367", "0.49858505", "0.49746448", "0.4973768", "0.49623457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.49481457", "0.490724", "0.4902159", "0.48811564", "0.4861004", "0.4843512", "0.4826303", "0.48245192", "0.47987005", "0.47836205", "0.47651988", "0.47618625", "0.47539392", "0.4746832", "0.47317424", "0.4727451", "0.46980265", "0.46967542", "0.46902585", "0.46886852", "0.46711352", "0.46554023", "0.46537375", "0.4650696", "0.46494502", "0.4628895", "0.4625649", "0.46241", "0.46129858", "0.46083435", "0.45815587", "0.45810825", "0.45807585", "0.4580731", "0.45765227", "0.45751902", "0.45731843", "0.45583218", "0.4554138", "0.4553066", "0.4546306", "0.4544966", "0.45428297", "0.45392478", "0.45348936", "0.45348936" ]
0.53646356
9
Record a message to the logger, if one exists.
public function record ($msg, $type = '', $channel = '', $has_html = false) { if (isset ($this->logs->logger)) { if (! $channel) { $channel = $this->default_channel; } if (! $type) { $type = $this->default_type; } $this->logs->logger->record ($msg, $type, $channel); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function appendLog($message);", "function log($message) {\n\t\tif (isset($this->logger)) {\n\t\t\tcall_user_func(array($this->logger, 'log'), $message);\n\t\t}\n\t}", "private function record(int $level, ?string $message, $context = null): void\n\t{\n\t\tif(static::$context)\n\t\t{\n\t\t\t$context = $context ? (array)$context + static::$context : static::$context;\n\t\t}\n\n\t\t$record = new Record($level, $message, $context, $this->channel);\n\n\t\t/* @var $handler \\Exo\\Logger\\Handler */\n\t\tforeach(self::$handlers as $handler)\n\t\t{\n\t\t\tif($handler->isHandling($record) && $handler->write($record) === true) // interrupt\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "protected function _log($message)\n {\n $this->_log->save(get_class($this), 'test', $message);\n }", "abstract public function log( $message );", "public function addRecord($level, $message, array $context = array())\n {\n if (!$this->handlers) {\n $this->pushHandler(new RotatingFileHandler($this->getStreamName(), 30, static::DEBUG));\n } \n /*\n if ($level == self::DEBUG) {\n if (!$this->config->ENABLE_DEBUG)\n return false;\n }\n */\n return parent::addRecord($level, $message, $context);\n }", "public function add($message = ''){\r\n\t\tif ($this->options['active'])\r\n\t\t\t$this->profiler->record($message);\r\n\t}", "function record_message($message) {\n global $messages;\n array_push($messages, $message);\n}", "public function log (string $msg) : void {\n\t\t$this->logs [] = $msg;\n\t}", "protected static function _log($level, &$message)\n {\n if ($level < 0)\n return;\n\n if ($level <= static::$level) {\n $message = sprintf(\"[%s %s %s] %s: %s\",\n static::$name,\n date('c'),\n static::$reqid,\n static::level_to_string($level),\n $message\n );\n static::$messages[] = $message;\n if (static::$syslog) {\n syslog($level, $message);\n }\n if (!is_null(static::$fd)) {\n fwrite(static::$fd, $message . \"\\n\");\n }\n }\n }", "public function log ( $msg )\n {\n if ( $this->file_handle == null) {\n $this->openFile();\n }\n\n fwrite($this->file_handle, \"[\" . date(\"H:i:s\") . \"] \" . $msg . \"\\n\");\n }", "public function log($message, $level);", "public function log($message)\n {\n if ($this->config->get($this->code.'_logging') != true) {\n return;\n }\n $log = new Log('bookey.log');\n $log->write($message);\n }", "public function log($message) {\n }", "public function log($message) {\n }", "public function log($message) {\n }", "public function log($message)\n {\n if ($this->logger instanceof LoggerInterface) {\n $this->logger->debug($message);\n } elseif ($logger = $this->logger) {\n $logger($message);\n }\n }", "public function log($message)\n {\n $log = new Log('retargeting.log');\n $log->write($message);\n }", "function record ($p_sMess) {\r\n\t\t\t$sDefaultFile = 'errors.log';\r\n\t\t\t$sFileTime = @date('Ymd');\r\n\t\t\t$sPath = $sFileTime . '_' . $sDefaultFile;\r\n\t\t\t$rFile = @fopen($sPath, 'a');\r\n\t\t\tif ($rFile !== FALSE) {\r\n\t\t\t\t$sTime = @date(DATE_ISO8601);\r\n\t\t\t\tif (isset($_SERVER['REMOTE_ADDR'])) {\r\n\t\t\t\t\t$sTime .= ' - from ' . $_SERVER['REMOTE_ADDR'];\r\n\t\t\t\t\tif (isset($_SERVER['REMOTE_PORT'])) {\r\n\t\t\t\t\t\t$sTime .= ':' . $_SERVER['REMOTE_PORT'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$sTime .= ' - ' . session_id();\r\n\t\t\t\tif (fwrite($rFile, $sTime . ' : ' . $p_sMess . \"\\n\") !== FALSE) {\r\n\t\t\t\t\tif (fclose($rFile) === FALSE) {\r\n\t\t\t\t\t\terror_log('Impossible to close the log file ' . $sPath . '', 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\terror_log('Impossible to write in the log file ' . $sPath . '!', 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\terror_log('Impossible to modify the log file ' . $sPath . '', 0);\r\n\t\t\t}\r\n\t\t}", "protected function write_to_log( $message = '' ) {\r\n\t\t$file = $this->get_file();\r\n\t\t$file .= $message;\r\n\t\t@file_put_contents( $this->file, $file );\r\n\t}", "abstract protected function log(LogMessage $message);", "public static function log($message = '') {\n self::_log($message);\n }", "public function log($message) {\n global $CFG;\n\n // End of line character (in case it's wrong)\n $eol = \"\\r\\n\";\n\n // Forget if if debugging not enabled.\n if (empty($CFG->debugging)) {\n return;\n }\n\n $filename = $CFG->dirroot . '/log/debug';\n $preamble = date('Y-m-d H:i | ') . $_SERVER['REMOTE_ADDR'];\n if (isset($_SESSION['purchaseid'])) {\n $purchaseid = $_SESSION['purchaseid'];\n $preamble .= '| ID:' . $purchaseid . $eol;\n }\n file_put_contents($filename, $preamble . $message . $eol, LOCK_EX | FILE_APPEND);\n }", "public function rec($message, $level = \\Alice\\Daemon\\Daemon::LOG_L_APP, $options = \\Alice\\Daemon\\Daemon::LOG_O_SHOWTIME) {\n if (is_array($message) || is_object($message)) {\n $message = print_r($message, true);\n }\n rec(sprintf(\"[want: %s] %s\", $this->getID(), $message), $level, $options);\n }", "public function log( $message = '' ) {\r\n\t\t$message = date( 'Y-n-d H:i:s' ) . ' - ' . $message . \"\\r\\n\";\r\n\t\t$this->write_to_log( $message );\r\n\r\n\t}", "public function write($message);", "public function record($aMessage, $aLogLevel)\n {\n if ($this->getLogThreshold() >= $aLogLevel) {\n $decorator = $this->getDecorator();\n if ($this->hasError === false) {\n $this->getBuffer()->writeLine(\"<div style='border:1px solid #065F1A;text-align:left;padding:4px;margin:4px;border-radius:4px;'>\");\n }\n $this->getBuffer()->writeLine($this->getDecorator()\n ->decorate($aMessage));\n $this->hasError = true;\n }\n }", "public function addRecord($level, $message, array $context = []): ?bool\n {\n $debug = $this->scopeConfig->getValue('dr_settings/config/debug', ScopeInterface::SCOPE_STORE);\n if ($debug) {\n return parent::addRecord($level, $message, $context);\n }\n return null;\n }", "private static function log($message)\n\t{\n\t}", "public function log(string $message): void\n {\n $filePointer = fopen($this->file, \"a\");\n\n $logMsg = date('Y-m-d H:i:s') . \"\\t\\t\" . $message . \"\\n\";\n\n //rewind($filePointer);\n fwrite($filePointer, $logMsg);\n fclose($filePointer);\n }", "public function writeMessage($message);", "public function log($message)\n {\n $view_log = new Logger('SMS Logs');\n\n $view_log->pushHandler(new StreamHandler(storage_path() . '/logs/smslog.log', Logger::INFO));\n\n $view_log->addInfo($message);\n }", "public function addMessage($message);", "function logger($fileName, $msg, $path=NULL)\n\t{\n\t\t// Set default path if path is not specified\n\t\tif($this->isNull($path))\n\t\t{\n\t\t\t$path = C_DB_PATH;\n\t\t}\n\t\t\n\t\t// Check valid file name and fix spaces in string \n\t\t$fileName = trim($fileName);\n\t\tif($this->isNull($fileName))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Get file path to write\n\t\t$file = $path . $fileName;\n\t\tif (!file_exists($path))\n\t\t{\n\t\t\t$this->makeDir($path, \"/\");\n\t\t}\n\t\t\n\t\t// a+ : append type\n\t\tif ($log = fopen($file, 'a+'))\n\t\t{\n\t\t\tfwrite($log, $msg . \"\\r\\n\");\t\n\t\t\tfclose($log);\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function createdLogEntryCallsGivenLogger()\n {\n $this->mockLogger->expects($this->once())\n ->method('log')\n ->with($this->logEntry);\n $this->logEntry->log();\n }", "public function log($message, $priority = 'info')\n {\n // nothing\n }", "public static function SaveLog( $message='' ) {\n\t\tself::$_log = '#' . date('Y-m-d H:i:s') . '#' . $message . \"\\n\";\n\t}", "public function log($msg)\n {\n }", "public function log($message) {\n\n // End of line character (in case it's wrong)\n $eol = \"\\r\\n\";\n\n // Forget if if debugging not enabled.\n if (empty($_ENV['debugging'])) {\n return;\n }\n\n $filename = $_ENV['dirroot'] . '/log/debug';\n $preamble = date('Y-m-d H:i | ') . $_SERVER['REMOTE_ADDR'];\n if (Session::exists('purchaseid')) {\n $purchaseid = Session::read('purchaseid');\n $preamble .= '| ID:' . $purchaseid . $eol;\n }\n file_put_contents($filename, $preamble . $message . $eol, LOCK_EX | FILE_APPEND);\n }", "private function log_it($msg) {\n $this->log_msg_queue .= date('m/d/y H:i:s : ', time()) . $msg . PHP_EOL;\n }", "public function addRecord($level, $message, array $context = array())\n {\n if (! $this->handlers) {\n $this->pushHandler(new Nothing());\n }\n\n $dateTime = new \\DateTime('now', $this->timezone);\n\n $record = array(\n 'message' => (string)$message,\n 'context' => $context,\n 'level' => $level,\n 'level_name' => self::getLevelName($level),\n 'channel' => $this->name,\n 'datetime' => $dateTime,\n 'extra' => array(),\n );\n\n // check, if any handler will handle this message\n $handlerKey = null;\n\n foreach ($this->handlers as $key => $handler) {\n if ($handler->isHandling($record)) {\n $handlerKey = $key;\n break;\n }\n }\n\n if ($handlerKey === null) {\n // no handler found\n return false;\n }\n\n // found at least one handler, so process message and dispatch it\n foreach ($this->processors as $processor) {\n $record = $processor->process($record);\n }\n\n while (isset($this->handlers[$handlerKey]) &&\n $this->handlers[$handlerKey]->handle($record) === false\n ) {\n $handlerKey++;\n }\n\n return true;\n }", "protected function logMessage($message, $level) {\n if (!is_string($message)) {\n $message = print_r($message, true);\n }\n $formatted_message = '*' . $this->level_value[$level] . '* ' . \"\\t\" . date('Y/m/d - H:i:s') . ': ' . $message . \"\\r\\n\";\n return (bool) file_put_contents($this->getFilename(), $formatted_message, FILE_APPEND);\n }", "public function addRecord($level, $message, array $context = array())\n {\n parent::addRecord($level, $message, $context);\n }", "public function logMessage(LogMessage $message) {\n if (!$this->isLoggable($message)) {\n return;\n }\n\n if ($this->useBuffer($message)) {\n $this->actionBuffer[] = $message;\n } else {\n $this->log($message);\n }\n }", "public function record($message = ''){\r\n\t\t$end = explode(' ', microtime());\r\n\t\t$cpu_time = ($end[1]+$end[0]) - $this->previousEndTime;\t\r\n\t\t\r\n\t\t$this->stat[] = array('time' => time(), \r\n\t\t\t\t\t\t\t\t\t\t 'info' => $message, \r\n\t\t\t\t\t\t\t\t\t\t 'memory_usage' => memory_get_usage($this->real_usage),\r\n\t\t\t\t\t\t\t\t\t\t 'execution_time' => $cpu_time\r\n\t\t\t\t\t\t\t\t\t\t );\r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\t$this->previousEndTime=$end[1]+$end[0];\r\n\t}", "private function log($message, $invoice_id = null)\n {\n $enabled = Mage::getStoreConfig(Yellow_Bitcoin_Model_Log::DATABASE_ENABLED_CONFIG_PATH);\n if ($enabled) {\n Mage::getModel(\"bitcoin/log\")->logMessage($message, $invoice_id);\n }\n Mage::log($message, Zend_Log::ERR, \"yellow.log\");\n return true;\n }", "private function log($message, $invoice_id = null)\n {\n $enabled = Mage::getStoreConfig(Yellow_Bitcoin_Model_Log::DATABASE_ENABLED_CONFIG_PATH);\n if ($enabled) {\n Mage::getModel(\"bitcoin/log\")->logMessage($message, $invoice_id);\n }\n Mage::log($message, Zend_Log::ERR, \"yellow.log\");\n return true;\n }", "private function send_log() {\n MessageLogger::add_log($this->log);\n $this->log = \"\";\n }", "public function log($msg) {\n $msg = sprintf(\"{%s} - %s\", get_class($this), $msg);\n $this->logger->log($msg);\n }", "public function log($message)\n {\n $file = $this->_homePath . DIRECTORY_SEPARATOR . 'streamwatch.log';\n $message = date('Y-m-d H:i:s') . ' -- ' . $message . \"\\n\";\n file_put_contents($file, $message, FILE_APPEND);\n }", "public function add($reference, $message)\n {\n global $conf;\n // Log message to file - TODO: Temporary solution until database created and tested. Also serves as backup to database\n if ($this->log == 'amm') {\n $logfile = $conf->amm_log_file;\n } else {\n $logfile = 'error.log';\n }\n file_put_contents($logfile, '['.gmdate('d/m/y H:i:s').\"] $reference \\\"\".$message.\"\\\"\\n\", FILE_APPEND | LOCK_EX);\n\n unset($reference, $message, $logfile);\n\n return true;\n }", "protected function log( $msg, $level = 0 ) {\n\t\t\tif ( !$this->get_option( 'log' ) )\n\t\t\t\treturn;\n\t\t\t$msg = date( 'H:i:s' ) . \": $msg\";\n\t\t\t$msg .= \"\\n\";\n\t\t\t$log = $this->plugin_dir . '/log.txt';\n\t\t\t$fh = fopen( $log, 'a' );\n\t\t\tif ( !$fh ) {\n\t\t\t\ttrigger_error( sprintf(\n\t\t\t\t\t__( \"Logfile %s is not writable..\", 'better-related' ),\n\t\t\t\t\t$log\n\t\t\t\t) );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !$this->get_option( 'log' ) )\n\t\t\t\treturn;\n\t\t\t$loglevel = $this->get_option( 'loglevel' );\n\t\t\tif ( $loglevel != 'all' && $loglevel != $level && $level != 'global' )\n\t\t\t\treturn;\n\t\t\tfwrite( $fh, $msg );\n\t\t\tfclose( $fh );\n\t\t}", "public function addLog($message)\n {\n if ($this->isLogEnabled()) {\n if (is_array($message)) {\n $message = print_r($message, true);\n }\n Mage::log($message, Zend_Log::DEBUG, 'cloudpayments.log', true);\n }\n return true;\n }", "public function message($message): void\n {\n $this->messages[] = $message;\n }", "public function log($msg)\n {\n file_put_contents($this->logFile, $this->shopName.\" \".date('c').\" \".print_r($msg, true).\"\\n\", FILE_APPEND | LOCK_EX);\n }", "public function add_log($message) {\n\t\t$log_option_name = $this->get_logger_option_name();\n\t\t$log_limit = $this->get_logger_limit();\n\t\t$log = $this->get_log();\n\t\t$log[] = $message;\n\t\twhile (count($log) > 0 && count($log) > $log_limit) {\n\t\t\tarray_shift($log);\n\t\t}\n\t\tupdate_option($log_option_name, $log);\n\t}", "public function log($level, $message, array $context = array()) {\n\n\t\tif (!$this->is_enabled()) return false;\n\n\t\t$message = date(\"Y-m-d H:i:s\").' ['.Updraft_Log_Levels::to_text($level).'] : '.$this->interpolate($message, $context);\n\t\t$this->add_log($message);\n\t}", "public function writeLine($message);", "function logger($message)\n{\n $debug_arr = debug_backtrace();\n $prepend = 'line ' . $debug_arr[0]['line'] . ' ('. basename($debug_arr[0]['file']) .') ' . print_r($message, true) . PHP_EOL;\n append_message($prepend);\n}", "public function log($msg){\n\t\tif($this->debugLevel >= self::LOG_INFO){\n\t\t\t$this->_log($msg, self::LOG_INFO);\n\t\t}\n\t}", "private function log($message)\n {\n Log::info($message);\n $this->info($message);\n }", "public function actionWriteMessage() {\n\t\ttry {\n\t\t\treturn $this->getService('SupportMessage')->add();\n\t\t} catch (Exception $e) {\n\t\t\treturn $this->sendError('You reached some error');\n\t\t}\n\t}", "public function record(string $command, bool $hit = false): void\n {\n $this->recorder->addRecord($command, $this, $hit);\n }", "protected function addLogMessage($msg)\n {\n return true;\n }", "public function log($level, $message, array $context = array())\n {\n if (is_string($level) && defined(__CLASS__ . '::' . strtoupper($level))) {\n $level = constant(__CLASS__ . '::' . strtoupper($level));\n }\n\n $this->addRecord($level, $message, $context);\n }", "public function lwrite($message) {\n\t\t// if file pointer doesn't exist, then open log file\n\t\tif (!$this->fp) {\n\t\t\t$this->lopen();\n\t\t}\n\t\t// define script name\n\t\t$script_name = pathinfo($_SERVER['PHP_SELF'], PATHINFO_FILENAME);\n\t\t// define current time\n\t\t$time = date('H:i:s');\n\t\t// write current time, script name and message to the log file\n\t\tfwrite($this->fp, \"$time ($script_name) $message\". $this->nl);\n\t}", "function logger($message)\n\t\t{\n\t\t\t$requester=$_SERVER['REMOTE_ADDR'];\n\t\t\t$log = new Logging();\n\t\t\t$log->logfile('./'.$this->aps->id.'.log');\n\t\t\t$log->logwrite($requester.\":\".$message);\n\t\t\t$log->logclose();\n\t\t}", "public static function log($level, $msg, $method = null)\n\t\t{\n\n\t\t\tstatic::$log or static::_init();\n\t\t\tif (static::$handler)\n\t\t\t{\n\t\t\t\tfputs(static::$handler, static::$levels[$level].' --> '.date('H:i:s').' ['.$method.'] : '.$msg.PHP_EOL);\n\t\t\t\treturn true; \n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public function lwrite($message){\n // if file pointer doesn't exist, then open log file\n if (!$this->fp) $this->lopen();\n // define script name\n $script_name = pathinfo($_SERVER['PHP_SELF'], PATHINFO_FILENAME);\n // define current time\n $time = date('H:i:s');\n // write current time, script name and message to the log file\n fwrite($this->fp, \"$time ($script_name) $message\\n\");\n }", "public function lwrite($message){\n // if file pointer doesn't exist, then open log file\n if (!$this->fp) $this->lopen();\n // define script name\n $script_name = pathinfo($_SERVER['PHP_SELF'], PATHINFO_FILENAME);\n // define current time\n $time = date('H:i:s');\n // write current time, script name and message to the log file\n fwrite($this->fp, \"$time ($script_name) $message\\n\");\n }", "public function WriteLog($msg)\n {\n $this->parent_logger_instance->WriteLog($msg);\n }", "protected function addMessage($content) {\n if ($this->file === null) {\n if (!file_exists($this->config->getValue('log', 'path', './'))) {\n mkdir($this->config->getValue('log', 'path', './'), 0755, true);\n }\n $path = $this->config->getValue('log', 'path', './').$this->section.'.log';\n $this->file = fopen($path, 'a');\n }\n fwrite($this->file, $content.\"\\n\");\n }", "public function log($msg)\n {\n $this->file->filePutContents($this->logFile, $this->config->x_shop_name.\" \".date('c').\" \".var_export($msg, true).\"\\n\", FILE_APPEND | LOCK_EX);\n }", "function _log($message) {\n file_put_contents(\n LOG_FILE, \n $message,\n FILE_APPEND\n );\n}", "public static function logMessage(LoggerMessage $message)\n\t{\n\t\tif (!isset($_SESSION[__CLASS__]))\n\t\t\t$_SESSION[__CLASS__] = array();\n\n\t\t// Add the message to the session, to be show in the future\n\t\tarray_push($_SESSION[__CLASS__], serialize($message));\n\t}", "function LogMessage($message)\n{\n $logFile=\"../../atxtrails-logs/atxtrails.log\";\n $date=date('Y-m-d H:i:s.u');\n \n $message=\"[$date] $message\\n\";\n \n if (is_writable($logFile))\n {\n if (!file_put_contents($logFile, $message, FILE_APPEND | LOCK_EX))\n {\n return false;\n }\n else\n {\n return true;\n }\n }\n else\n {\n return false;\n } \n}", "public function lwrite($message){\n // if file pointer doesn't exist, then open log file\n if (!$this->fp) $this->lopen();\n // define script name\n $script_name = pathinfo($_SERVER['PHP_SELF'], PATHINFO_FILENAME);\n // define current time\n $time = date('m-d-y H:i:s');\n // write current time, script name and message to the log file\n fwrite($this->fp, \"$time ($script_name) $message\\n\");\n }", "function logMessage($level, $message)\n{\n // fwrite($file, \"[$level] $message\" . PHP_EOL);\n // fclose($file);\n\n $backtrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 2)[0];\n $file = fopen('app.log', \"a\");\n fwrite($file, \"[$level] \" . date(DATE_ISO8601) . \" \" . $backtrace[\"file\"] . \":\" . $backtrace[\"line\"] .\n \" $message\" . PHP_EOL);\n fclose($file);\n}", "public function write( $message, $suffix=NULL )\n\t{\n\t\tif ( static::$severity === LOG_DEBUG )\n\t\t{\n\t\t\tstatic::debug( $message, $suffix );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstatic::log( $message, $suffix );\n\t\t}\n\t}", "public function log($message) {\n fwrite(STDOUT, $message . \"\\n\");\n }", "public function write(string $message);", "function inbound_record_log( $title = '', $message = '', $rule_id = 0, $job_id = '', $type = null ) {\n\tglobal $inbound_automation_logs;\n\t$inbound_automation_logs->add( $title, $message, $rule_id, $job_id, $type );\n\n}", "protected function _log($message, $locale) {\n\t}", "public function addEntry($log_message) {\n //Check if the message is empty, if so return false\n if (!isset($log_message) || trim($log_message) !== '') {\n //Open a handle for the file\n $file_handle = fopen($this->filename, 'a');\n\n //Prepend the date to the log message and add a line break\n $log_message = \"[\" . date('Y-m-d H:i:s') . \"] \" . trim($log_message) . \"\\n\";\n\n if (fwrite($file_handle, $log_message) == false) {\n throw new exception(\"Cannot write to file $this->filename\");\n } else {\n fclose($file_handle);\n return true;\n }\n } else {\n throw new exception(\"Log message cannot be empty\");\n }\n }", "public function log($message, $level = null)\n {\n if (empty($this->_filename)) {\n Mage::log(\n 'The Paymentsense log is not initialised. The Magento system log (this log) will be used instead.',\n Zend_Log::ERR,\n '',\n true\n );\n $message = 'Paymentsense: ' . $message;\n }\n\n Mage::log($message, $level, $this->_filename, true);\n }", "public function createRecord(\n $loggerNamespace,\n $loggerClass,\n $loggerMethod,\n $namespace,\n $class,\n $method,\n $level,\n $filename,\n $lineno,\n $msg,\n array $args,\n \\Exception $exception = null\n );", "function _log($message)\n{\n\tfwrite($GLOBALS['logfile'], date(\"Y-m-d H:i:s :: \", time()) . $message . \"\\n\");\n}", "protected function log(string $level, $message): void\n {\n if (!is_string($message)) {\n $message = print_r($message, true);\n }\n\n $text = '[' . date($this->timeFormat, time()) . '][' . strtoupper($level) .\n '] - [' . request()->ip() . '] --> ' . $message . PHP_EOL;\n\n $this->save($text);\n }", "public static function log($msg){\n\t\tself::createLogExist();\n\n\t\t$fichier = fopen('log/log.txt', 'r+');\n\t\tfputs($fichier, $msg);\n\t}", "function logger($path, $status, $message) {\n $logMsg = \"[\" . timestamp() . \"] : \" . $status . \" : \" . $message . \"\\n\";\n file_put_contents($path, $logMsg, FILE_APPEND | LOCK_EX);\n}", "public function addLog($data);", "function logMsg( $msg, $priority ) {\n\t\tif ( owa_coreAPI::getSetting('base', 'error_log_level') <= $priority ) {\n\t\t\n\t\t\t$dt = date(\"H:i:s Y-m-d\"); \n\t\t\t$pid = getmypid();\n\t\t\tforeach ( $this->loggers as $logger ) {\n\t\t\t\t\n\t\t\t\t$message = sprintf(\"%s %s [%s] %s \\n\", $dt, $pid, $logger->name, $msg);\n\t\t\t\t$logger->append( $message );\n\t\t\t}\n\t\t}\n\t}", "public static function write($message)\n {\n $name = date('d-m-Y') . '.log';\n $logDir = ROOT . \"Logs/\";\n\n //Creates logs dir\n if (!file_exists($logDir)) {\n mkdir($logDir, 0655, true);\n }\n //Creates lof file\n if (!file_exists($name)) {\n touch($logDir . $name);\n }\n\n file_put_contents(\n $logDir . $name,\n '[' . date('d-m-Y H:i:s') .'] ' . $message . \"\\n\",\n FILE_APPEND\n );\n }", "public function log($level, $message, array $context = array())\n {\n if ($this->getLogLevelPriority() >= $this->getPriority($level)) {\n $logRecord = new LogRecord($level, $message, $context);\n $this->processRecord($logRecord);\n }\n }", "function dev_write_log( $handle, $message ) {\n\t$log = new WPAS_Logger( $handle );\n\t$log->add( $message );\n}", "public function log($message, $command='') {\n $this->_log($message, $command, true, true);\n }", "function write($message);", "private function log($message, $level = Loggable::LEVEL_INFO)\n {\n if (isset($this->logger)) {\n $this->logger->write($message, $level);\n }\n }", "private function _log($text) {\n $date = date('d-m-Y H:i:s');\n $message = \"[{$date}]: $text \\n\";\n\n file_put_contents($this->_logFile, $message, FILE_APPEND);\n return true;\n }", "public function Log($message) {\n\t\t$callers = debug_backtrace();\n\t\t$this->Write($callers[1]['function'], $message);\n\t}" ]
[ "0.59936213", "0.5981724", "0.59504676", "0.59161144", "0.5884699", "0.5725842", "0.5704736", "0.5685513", "0.5667462", "0.5650035", "0.56418097", "0.56056434", "0.5573309", "0.5560849", "0.5560849", "0.5560849", "0.5552861", "0.55510676", "0.55105335", "0.5505345", "0.547781", "0.5448464", "0.54479605", "0.5444728", "0.5424874", "0.5420107", "0.54086566", "0.54069144", "0.53934747", "0.53882843", "0.5386718", "0.5382438", "0.53555614", "0.53533167", "0.5268793", "0.52625084", "0.5259396", "0.5244511", "0.52432126", "0.52353454", "0.5228559", "0.522762", "0.5226335", "0.5215684", "0.52136606", "0.5207569", "0.5207569", "0.5200757", "0.51993644", "0.5198009", "0.5197567", "0.5195886", "0.5189546", "0.51893395", "0.51770836", "0.51681644", "0.5166814", "0.51640636", "0.51622796", "0.5156739", "0.51106715", "0.5109448", "0.5107204", "0.5101787", "0.5098326", "0.5095146", "0.50905114", "0.508852", "0.50869715", "0.50869715", "0.50833696", "0.50792605", "0.5073142", "0.5072799", "0.507069", "0.5058014", "0.505219", "0.5046196", "0.5045567", "0.50446194", "0.5041369", "0.5039381", "0.5037694", "0.5023801", "0.50171447", "0.5012637", "0.5010693", "0.50090927", "0.5003873", "0.50018734", "0.49932197", "0.49904612", "0.49884346", "0.49762213", "0.4973237", "0.4972203", "0.49653414", "0.49644858", "0.49636766", "0.49619263" ]
0.6059651
0
Record additional information. Uses the last message's filter.
public function record_more ($msg, $has_html = false) { if (isset ($this->logs->logger)) { $this->logs->logger->record_more ($msg, $has_html); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRecordLog() {\n \t$msg = '';\n \t$defaultFilterFields = array( 'id', 'modify_user_id' ,'modify_time', 'create_user_id', 'create_time','check_user_id','check_time');\n \t$addFilterFields = !empty($this->filterFields) ? $this->filterFields : array();\n \t$filterFields = array_merge($defaultFilterFields,$addFilterFields);\n \tforeach ( $this->getAttributes() as $key => $val ) {\n \t\tif ( ! $this->getIsNewRecord() && $val == $this->beforeSaveInfo[$key] ) {\n \t\t\tcontinue;\n \t\t}\n// \t\t$label = $this->getAttributeLabel($key);\n $label = get_class($this) . ':'.$key; //by shenll\n \t\tif (in_array($key, $filterFields)) {\n \t\t\tcontinue;\n \t\t}else {\n \t\t\tif ( $this->getIsNewRecord() ) {\n \t\t\t\t$msg .= MHelper::formatInsertFieldLog($label, $val);\n \t\t\t} else {\n \t\t\t\t$msg .= MHelper::formatUpdateFieldLog($label, $this->beforeSaveInfo[$key], $val);\n \t\t\t}\n \t\t}\n \t}\n //\treturn $msg;\n \t$this->addLogMsg($msg);\n }", "public function add($message = ''){\r\n\t\tif ($this->options['active'])\r\n\t\t\t$this->profiler->record($message);\r\n\t}", "protected function getLastLogEntryMessage() {}", "private function writeAutoFilterInfo(): void\n {\n $record = 0x009D; // Record identifier\n $length = 0x0002; // Bytes to follow\n\n $rangeBounds = Coordinate::rangeBoundaries($this->phpSheet->getAutoFilter()->getRange());\n $iNumFilters = 1 + $rangeBounds[1][0] - $rangeBounds[0][0];\n\n $header = pack('vv', $record, $length);\n $data = pack('v', $iNumFilters);\n $this->append($header . $data);\n }", "public function addRecord($level, $message, array $context = array())\n {\n parent::addRecord($level, $message, $context);\n }", "public function afterFilter()\n\t{\n\n\t}", "function record_message($message) {\n global $messages;\n array_push($messages, $message);\n}", "function roomify_conversations_add_further_info_field() {\n field_info_cache_clear();\n\n if (field_read_field('conversation_further_info') === FALSE) {\n $field = array(\n 'field_name' => 'conversation_further_info',\n 'type' => 'text_long',\n 'cardinality' => 1,\n 'locked' => 1,\n 'settings' => array(\n 'max_length' => 255,\n 'profile2_private' => FALSE,\n ),\n );\n field_create_field($field);\n }\n\n field_cache_clear();\n\n if (field_read_instance('roomify_conversation', 'conversation_further_info', 'standard') === FALSE) {\n $instance = array(\n 'field_name' => 'conversation_further_info',\n 'entity_type' => 'roomify_conversation',\n 'label' => 'Further info',\n 'bundle' => 'standard',\n 'required' => FALSE,\n 'widget' => array(\n 'type' => 'text_textarea',\n 'weight' => 6,\n ),\n );\n field_create_instance($instance);\n }\n}", "public static function trackMessages() {\n\t\tadd_filter( 'wp_new_user_notification_email' , array( self::class, 'track_wp_new_user_notification_email' ), 10, 3 );\n\t\t# Email sent to the user with the password reset link\n\t\tadd_filter( 'retrieve_password_message' , array( self::class, 'track_retrieve_password_message' ), 10, 4 );\n\t\t# Email sent to the user (via WooCommerce Account) with the password reset link\n\t\tadd_action( 'woocommerce_reset_password_notification' , array( self::class, 'track_wc_retrieve_password_message' ), 9, 2 );\n\t\t\n\t\t# Helper function to retrieve the password-reset key\n\t\tadd_filter( 'retrieve_password_key' , array( self::class, 'store_password_key' ), 10, 3 );\n\t}", "private final function logLastWSRequest($my_request) {\n\t\t\n\t\tprint \"\\nWSDL End-point: \".$this->options['wdsl_endpoint']; \n\t\tprint \"\\nRequest Header: \\n\".$this->__getLastRequestHeaders();\n\t\tprint \"\\nRequest: \\n\". $my_request .\"\\n\";\n\t}", "function rec($log_item)\n\t{\n\t\t$this->items[] = $log_item;\n\t}", "public function alm_filters_updated(){\n\t \tif( isset( $_GET[\"filter_updated\"] ) ) {\n\t\t \t$this->alm_filters_add_admin_notice('<i class=\"fa fa-check-square\" style=\"color: #46b450\";></i>&nbsp; '.__('Filter successfully updated.', 'ajax-load-more-filters'), 'success');\n\t\t }\n\t }", "protected function recordLastTransactionID()\n {\n }", "public function logData() {\n\t\t/* Implement in subclasses */\n\t}", "public function pushRecord()\r\n {\r\n\r\n }", "function profile($key, $message = NULL)\n {\n // Do nothing if disabled\n if ( ( $this->enabled != true ) || ( isset($this->done) && $this->done == true ) ) \n {\n return;\n }\n\n if ( isset($this->messages[$key]) )\n {\n $item = $this->messages[$key];\n unset($this->messages[$key]);\n $this->fDebug->add(\"Reusing $key with $message; $item[message]\", 8);\n if ( !isset($item['message']) || strlen($item['message']) == 0 || $item['message'] == NULL )\n {\n $item['message'] = $message;\n }\n } else {\n // Weird bug causes use of $this->fDebug to cause an exception\n fDebug::getInstance()->add(\"Adding $key; $message\", 8);\n $item = array(\"message\" => $message, \"timestamps\" => array());\n }\n $item['timestamps'][] = $this->timestamp();\n\n switch($this->outputMethod)\n {\n case 'syslog':\n if ( sizeof($item['timestamps']) % 2 == 0 )\n {\n $i = sizeof($item['timestamps']) - 2;\n $delta = number_format($item['timestamps'][$i + 1] - $item['timestamps'][$i], $this->precision);\n $d = debug_backtrace();\n $source = $d[1]['class'] . '->' . $d[1]['function'] . '()';\n $this->syslog->logMessage(sprintf('%ss %s [Line %d]: %s', $delta, $source, $d[0]['line'], $item['message']), $this->logSeverity);\n\n if ( $delta >= $this->outputThreshold && $this->logSeverity !== $this->overThresholdLogSeverity )\n {\n $this->syslog->logMessage(sprintf('%ss %s [Line %d]: %s', $delta, $source, $d[0]['line'], $item['message']), $this->overThresholdLogSeverity);\n }\n }\n break;\n }\n $this->messages[$key] = $item;\n }", "public function additional($msg, $type): void\n {\n $enabledLogging = $this->scopeConfig->getValue(\n 'settings/checkoutcom_configuration/additional_logging_enabled',\n ScopeInterface::SCOPE_WEBSITE\n );\n\n $loggingOptions = explode(\n ',',\n $this->scopeConfig->getValue(\n 'settings/checkoutcom_configuration/additional_logging',\n ScopeInterface::SCOPE_WEBSITE\n ) ?? ''\n );\n\n if ($enabledLogging && in_array($type, $loggingOptions)) {\n $this->write($msg);\n }\n }", "public function record($message = ''){\r\n\t\t$end = explode(' ', microtime());\r\n\t\t$cpu_time = ($end[1]+$end[0]) - $this->previousEndTime;\t\r\n\t\t\r\n\t\t$this->stat[] = array('time' => time(), \r\n\t\t\t\t\t\t\t\t\t\t 'info' => $message, \r\n\t\t\t\t\t\t\t\t\t\t 'memory_usage' => memory_get_usage($this->real_usage),\r\n\t\t\t\t\t\t\t\t\t\t 'execution_time' => $cpu_time\r\n\t\t\t\t\t\t\t\t\t\t );\r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\t$this->previousEndTime=$end[1]+$end[0];\r\n\t}", "public function add()\n {\n foreach ($this->filters as $filter) {\n call_user_func_array($this->addCallback, $filter);\n }\n }", "public function onPaymentCollected(FilterOrderEvent $event)\n {\n $order = $event->getOrder();\n $id = null;\n\n try {\n $id = $this->pheanstalkQueue->appendSendOrder($order, $order->getInEdit());\n $this->stateLog($order->getId());\n $message = 'Order added to beanstalk queue (initial add).';\n } catch (OrderAlreadyInQueueException $e) {\n $message = $e->getMessage();\n }\n\n $this->logger->debug($message, [\n 'job_id' => $id,\n 'order_id' => $order->getId(),\n 'queue' => 'orders2ax',\n ]);\n }", "public function recordAction() {\n\t\t \t\t\t\t\n\t\t\n\t}", "public function getAdditionalMsgFields()\n {\n // TODO: Implement getAdditionalMsgFields() method.\n }", "public function addFilter($filter) {\n $this->filters[] = $filter;\n $this->rewind();\n }", "public function afterSave() \n {\n LogProduct::log($this);\n }", "public function _post_filter()\n {\n }", "function log_record_add($rec, $sort, $type, $record) {\n $pid = $type.':'.$rec.'.'.$sort;\n if (strlen($record) > 0) {\n lr_set($pid, $record);\n } else {\n lr_clear($pid);\n }\n}", "public function appendFilter($filter)\n {\n return $this->addFilter($filter, self::CHAIN_APPEND);\n }", "function add($message) { return; }", "function addMessage($message)\r\n{\r\n\t$name = ($message['action']) ? '*'.$message['name'] : $message['name'];\r\n\t$text = $message['text'];\r\n\t$time = $message['time'];\r\n\r\n\tif(strlen($name) == 0)\r\n\t\treturn;\r\n\r\n\t$line = $time.'||'.$name.'||'.$text;\r\n\r\n\t// Pull the current file contents\r\n $fileContents = file(LACE_FILE);\r\n\t$size = count($fileContents);\r\n\r\n if ($size >= LACE_FILE_MAX_SIZE)\r\n {\r\n\t // Push the oldest entries out\r\n\t // and put the new one in\r\n\t for ($i = 0; $i <= $size - LACE_FILE_MAX_SIZE; $i++)\r\n\t\t array_shift($fileContents);\r\n\r\n\t $fileContents[] = $line;\r\n \t$fileContents = implode(\"\\n\", array_map('trim', $fileContents)).\"\\n\";\r\n\r\n \t// Write it to file\r\n \tfile_put_contents(LACE_FILE, trim($fileContents));\r\n }\r\n else\r\n {\r\n // No need to push anything off the stack,\r\n // just write to file\r\n \t$file = fopen(LACE_FILE, 'a');\r\n fwrite($file, $line.\"\\n\");\r\n fclose($file);\r\n }\r\n\r\n // Add to the log\r\n logMessage($line);\r\n}", "function on_add_extra()\r\n\t{\r\n\t}", "public function saveInfoAfterRequest()\n {\n if (!$this->_waitingToSaveInfo) {\n $this->_waitingToSaveInfo = true;\n\n // If the request is already over, trigger this immediately\n if (in_array($this->state, [\n Application::STATE_AFTER_REQUEST,\n Application::STATE_SENDING_RESPONSE,\n Application::STATE_END,\n ], true)) {\n $this->saveInfoAfterRequestHandler();\n } else {\n Craft::$app->on(WebApplication::EVENT_AFTER_REQUEST, [$this, 'saveInfoAfterRequestHandler']);\n }\n }\n }", "private function _seen()\n {\n $nick = str_replace(array(\"!seen \", \"!seen\"), \"\", $this->_data->message);\n \n if (trim($nick) == '')\n return;\n \n $dbh = $this->_connectToDb();\n \n $stmt = $dbh->query(\"SELECT * FROM log_table WHERE channel = '\". $this->_data->channel .\"' AND LOWER(nick) = '\". strtolower(trim($nick)) .\"' ORDER BY id DESC LIMIT 1\");\n \n $row = $stmt->fetch(PDO::FETCH_OBJ);\n\n if (isset($row->when)) {\n $this->_message($this->_data->nick.': I last saw '. trim($nick) .' at '. $row->when .' saying \"'. trim($row->said) .'\"'); \n }\n else {\n $this->_message($this->_data->nick.': I\\'ve never seen '. trim($nick));\n }\n \n \n }", "protected function saveData()\n {\n $this->beforeSave();\n\n $changed = $this->setReceptionCode(\n $this->formData[$this->receptionCodeItem],\n $this->loader->getCurrentUser()->getUserId()\n );\n\n $this->afterSave($changed);\n\n $this->accesslog->logChange($this->request, null, $this->formData);\n }", "protected function saveData()\n {\n $this->beforeSave();\n\n $changed = $this->setReceptionCode(\n $this->formData[$this->receptionCodeItem],\n $this->loader->getCurrentUser()->getUserId()\n );\n\n $this->afterSave($changed);\n\n $this->accesslog->logChange($this->request, null, $this->formData);\n }", "function AddToHistory($arParams, $Provider, $Event) {\n\t\tif (ToLower($Provider)!='_log') {\n\t\t\t$arFields = array(\n\t\t\t\t'RECEIVER' => $arParams['TO'],\n\t\t\t\t'SENDER' => $arParams['SENDER'],\n\t\t\t\t'MESSAGE' => $arParams['MESSAGE'],\n\t\t\t\t'PROVIDER' => $Provider,\n\t\t\t\t'EVENT' => $Event,\n\t\t\t\t'DATETIME' => date('Y-m-d H:i:s'),\n\t\t\t);\n\t\t\tCWD_SMS_History::Add($arFields);\n\t\t}\n\t}", "public function addFilters() {\n\t\t// $this->subscriber->addFilter( 'mdm_syndication_post_fields', [$this, 'addCustomFields'] );\n\t}", "abstract public function info(string $message, array $extra_data = []);", "private final function logLastWSResponse() {\t\n\t\t\n\t\tprint \"\\n\\nResponse Header: \\n\". $this->__getLastResponseHeaders();\n\t\tprint \"\\nResponse: \\n\". $this->__getLastResponse().\"\\n\";\t\t\n\t}", "public function addFilter(DFilter $filter) {\n\t\t$this->filters[] = $filter;\n\t}", "public function addRecord($level, $message, array $context = array())\n {\n if (!$this->handlers) {\n $this->pushHandler(new RotatingFileHandler($this->getStreamName(), 30, static::DEBUG));\n } \n /*\n if ($level == self::DEBUG) {\n if (!$this->config->ENABLE_DEBUG)\n return false;\n }\n */\n return parent::addRecord($level, $message, $context);\n }", "public function addLog ( $keys, $received, $sent, $base_string, $notes, $user_id = null ) { }", "public function addFilter()\n\t{\n\t\treturn $this->addTextFilter();\n\t}", "public function addLog($data);", "public function _add_incident_filters()\n\t{\n\t\t$params = Event::$data;\n\t\t$params = array_merge($params, $this->params);\n\t\tEvent::$data = $params;\n\t}", "public function appendRule( $filter )\n {\n $this->rules[] = $filter;\n $this->clearCache();\n }", "public function record ($msg, $type = '', $channel = '', $has_html = false)\n {\n if (isset ($this->logs->logger))\n {\n if (! $channel)\n {\n $channel = $this->default_channel;\n }\n if (! $type)\n {\n $type = $this->default_type;\n }\n $this->logs->logger->record ($msg, $type, $channel);\n }\n }", "public function updated_message() {\n\t\t$tab = Template::current_tab();\n\n\t\t// Show updated notice.\n\t\tadd_action( 'beehive_admin_top_notices', function () use ( $tab ) {\n\t\t\tswitch ( $tab ) {\n\t\t\t\tcase 'tracking':\n\t\t\t\t\t$this->notice( __( 'Tracking ID updated successfully.', 'ga_trans' ), 'success', true );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->notice( __( 'Changes were saved successfully.', 'ga_trans' ), 'success', true );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} );\n\t}", "private function saveRecord(): void\r\n {\r\n $this->order->add_meta_data('_moloni_sent', $this->document_id);\r\n $this->order->save();\r\n }", "function logrec($aid,$e,$msg,$src='') {\n\t// into the new record array[errors]\n\tglobal $logfile;\n\n\n\t$ts = date('H:i');\n\n\techo \"<p class='red'>$aid: $msg</p>\";\n\tfile_put_contents($logfile,\n\t\tsprintf(\"%6s %4s %1s %s\\n\",$ts,$aid,$e,$msg),FILE_APPEND);\n\tif (!empty($src)) {\n\t\tfile_put_contents($logfile,\n\t\tsprintf(\"%12s %s\\n\",'',$src),FILE_APPEND);\n\t}\n\treturn \"($e) $msg \". NL;\n}", "public function addFeedback($msg)\n {\n array_push($this->_feedback, $msg);\n }", "public function extraInfo();", "function after_filter($action, $args) {\n }", "function track_log_entries($type=array()) {\r\n $args = func_get_args();\r\n $mkt_id ='';\r\n //if one of the arguments is marketing ID, then we need to filter by it\r\n foreach($args as $arg){\r\n if(isset($arg['EMAIL_MARKETING_ID_VALUE'])){\r\n $mkt_id = $arg['EMAIL_MARKETING_ID_VALUE'];\r\n }\r\n }\r\n\t\tif (empty($type)) \r\n\t\t\t$type[0]='targeted';\r\n\t\t$this->load_relationship('log_entries');\r\n\t\t$query_array = $this->log_entries->getQuery(true);\r\n\t\t$query_array['select'] =\"SELECT campaign_log.* \";\r\n\t\t$query_array['where'] = $query_array['where']. \" AND activity_type='{$type[0]}' AND archived=0\";\r\n //add filtering by marketing id, if it exists\r\n if (!empty($mkt_id)) $query_array['where'] = $query_array['where']. \" AND marketing_id ='$mkt_id' \";\r\n\t\treturn (implode(\" \",$query_array));\r\n\t}", "function onSave($new)\n\t{\n\t\t// We may have cached the message in the default language.\n\t\t$this->clearCache();\n\t}", "public function add_friend()\n {\n return \"$this->username added a new friend\";\n }", "public function info(string $message, array $extra_data = []);", "function addCheckLog($message){\n global $checkLogQ;\n $length = 4;\n // If checkLogQ size is smaller than 4 add the message\n if(count($checkLogQ)<$length){\n $checkLogQ[] = $message;\n }\n // If checkLogQ size is bigger than 4 - Remove the oldest message and add the new one\n else{\n array_shift($checkLogQ);\n $checkLogQ[] = $message;\n }\n }", "private function _writeMessage()\n {\n if (!is_callable($this->fetchData)) {\n return;\n }\n\n $message = '';\n $message .= sprintf('id: %s', $this->id++ . PHP_EOL);\n $message .= sprintf('retry: %s', $this->retryTime * 1000 . PHP_EOL);\n $message .= sprintf('data: %s', call_user_func($this->fetchData) . PHP_EOL);\n\n if (!empty($this->eventName)) {\n $message .= sprintf('event: %s', $this->eventName . PHP_EOL);\n }\n\n echo $message . PHP_EOL;\n }", "function add() {\n $this->wireframe->print_button = false;\n \n if(!AssignmentFilter::canAdd($this->logged_user)) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n \n \t$filter_data = $this->request->post('filter');\n \tif(!is_array($filter_data)) {\n \t $filter_data = array(\n \t 'user_filter' => USER_FILTER_LOGGED_USER,\n \t 'objects_per_page' => 30,\n \t );\n \t} // if\n \t$this->smarty->assign('filter_data', $filter_data);\n \t\n \tif($this->request->isSubmitted()) {\n \t $this->active_filter = new AssignmentFilter();\n \t $this->active_filter->setAttributes($filter_data);\n \t \n \t $save = $this->active_filter->save();\n \t if($save && !is_error($save)) {\n \t flash_success(\"Filter ':name' has been created\", array('name' => $this->active_filter->getName()));\n \t $this->redirectToUrl($this->active_filter->getUrl());\n \t } else {\n \t $this->smarty->assign('errors', $save);\n \t } // if\n \t} // if\n }", "public function getLastsend();", "private function logAdd($meal, $participant)\n {\n if (is_object($this->getDoorman()->isKitchenStaff()) === false) {\n return;\n }\n\n $logger = $this->get('monolog.logger.balance');\n $logger->addInfo(\n 'admin added {profile} to {meal} (Participant: {participantId})',\n array(\n 'participantId' => $participant->getId(),\n 'profile' => $participant->getProfile(),\n 'meal' => $meal,\n )\n );\n }", "public function info($message)\n {\n $flash = $this->flashtype['info'];\n $flash['message'] = $message;\n $this->add($flash);\n }", "function onNewRecord($record, $oldRecord);", "protected function addFieldMessage(string $field, string $message, $type = self::MESSAGE_INFO) {\n\t\tif (!isset($this->fieldMessages[$field][$type])) {\n\t\t\t$this->fieldMessages[$field][$type] = [];\n\t\t}\n\t\t$this->fieldMessages[$field][$type][] = $message;\n\t}", "private function send_log() {\n MessageLogger::add_log($this->log);\n $this->log = \"\";\n }", "public function toInfo() {\n\n\t\t# Set message type\n\t\t$type = \"error\";\n\t\tif($this->type == \"success\" || $this->type == \"notice\")\n\t\t\t$type = $this->type;\n\n\t\t# Add message\n\t\tInfo::add($this->getMessage(), $type);\n\n\t}", "public function onAfterWrite() {\r\n\t\tparent::onAfterWrite();\r\n\t\t$this->zlog('Write');\r\n\t}", "protected function addLogMessageFilter($filterClass)\n {\n if (!is_string($filterClass)) {\n return;\n }\n\n if (!class_exists($filterClass)) {\n return;\n }\n\n if (!is_subclass_of($filterClass, LogMsgFilterable::class)) {\n return;\n }\n\n $this->logMessageFilters[$filterClass] = new $filterClass();\n }", "protected function LastLevel() {\n\t\tif($this->slevel == $this->maxlevel) {\n\t\t\t$data = BuildPostdata();\n\t\t\t$this->Send($data);\n\t\t}\t\n\t}", "public function afterSave()\n\t{\n\t\t$userActionLog = new UserActionHistory();\n\t\treturn $userActionLog->saveActionLog($this->tableName(), $this->id, $this->isNewRecord);\n\t}", "function appendInfo($info) {\n\t\t\t$this->responseVar['info'] .= $info.\"\\n<br>\\n\";\n\t\t}", "public function appendMessage(\\Phalcon\\Messages\\MessageInterface $message): ModelInterface;", "public function addFilters()\n {\n }", "public function appendLog($message);", "public static function getAfterFilterName()\n {\n return self::$afterFilterName;\n }", "public function rec($message, $level = \\Alice\\Daemon\\Daemon::LOG_L_APP, $options = \\Alice\\Daemon\\Daemon::LOG_O_SHOWTIME) {\n if (is_array($message) || is_object($message)) {\n $message = print_r($message, true);\n }\n rec(sprintf(\"[want: %s] %s\", $this->getID(), $message), $level, $options);\n }", "function current_filter()\n {\n }", "function WriteAuditTrailOnAdd(&$rs) {\n\t\tglobal $mst_vendor;\n\t\t$table = 'mst_vendor';\n\n\t\t// Get key value\n\t\t$key = \"\";\n\t\tif ($key <> \"\") $key .= EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$key .= $rs['kode'];\n\n\t\t// Write Audit Trail\n\t\t$filePfx = \"log\";\n\t\t$curDate = date(\"Y/m/d\");\n\t\t$curTime = date(\"H:i:s\");\n\t\t$id = ew_ScriptName();\n\t $curUser = CurrentUserName();\n\t\t$action = \"A\";\n\t\t$oldvalue = \"\";\n\t\tforeach (array_keys($rs) as $fldname) {\n\t\t\tif ($mst_vendor->fields[$fldname]->FldDataType <> EW_DATATYPE_BLOB) { // Ignore Blob Field\n\t\t\t\t$newvalue = ($mst_vendor->fields[$fldname]->FldDataType == EW_DATATYPE_MEMO) ? \"<MEMO>\" : $rs[$fldname]; // Memo Field\n\t\t\t\tew_WriteAuditTrail($filePfx, $curDate, $curTime, $id, $curUser, $action, $table, $fldname, $key, $oldvalue, $newvalue);\n\t\t\t}\n\t\t}\n\t}", "public function log_query()\n\t{\n\t\t$query = $this->get_query();\n\n\t\tif ( ! $query ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! is_array( $query ) && ! is_object( $query ) ) {\n\t\t\t$query = [ $query ];\n\t\t}\n\n\t\t$log = new Charcoal_Log;\n\t\t$log->event_type = $this->event_type;\n\t\t$log->data = $query;\n\t\t$log->save();\n\t}", "protected function LogInfo( $message, $args ) {\n\t\t$this->Log( 0003, $message, $args );\n\t}", "public function add_information() \r\n {}", "public function add_information() \r\n {}", "function insert_feedback_filter( $data, $postarr ) {\n\t\tif ( $data['post_type'] == 'feedback' && $postarr['post_type'] == 'feedback' ) {\n\t\t\t$data['post_author'] = 0;\n\t\t}\n\n\t\treturn $data;\n\t}", "public function process(\\Phalcon\\Logger\\Item $item): void;", "public function addFilterItem(FilterItem $filter_item)\n\t{\n\t\t$this->items[] = $filter_item;\n\t}", "function inbound_record_log( $title = '', $message = '', $rule_id = 0, $job_id = '', $type = null ) {\n\tglobal $inbound_automation_logs;\n\t$inbound_automation_logs->add( $title, $message, $rule_id, $job_id, $type );\n\n}", "public function SetLastRecord($record){$this->_lastrecord = $record;}", "protected function logAndUpdate($type, $status, $item, $msg)\n\t{\n\t\tif ($status === 'reject') {\n\t\t\t$msg .= '. Rejecting from queue';\n\t\t}\n\t\t$this->logger->{$type}(\"Job {$item['id']}: $msg\");\n\t\t$this->engine->{$status}($item);\n\t}", "public function ___added(Saveable $item) {\n\t\t$this->log(\"Added\", $item);\n\t}", "function NSLogf() {\n\t\tglobal $db;\n\t\t$args = func_get_args();\n\t\t$db->Execute(sprintf(\"INSERT INTO `nslog_messages` (`message`, `timestamp`) VALUES('%s', NOW())\", $db->prepare_input(array_pop(sNSLog($args)))));\n\t}", "protected function logRespondentCommunication()\n {\n $currentUserId = $this->loader->getCurrentUser()->getUserId();\n $changeDate = new \\MUtil_Db_Expr_CurrentTimestamp();\n\n $logData['grco_id_to'] = $this->respondent->getId();\n\n if (! is_int($this->by)) {\n $this->by = $currentUserId;\n }\n\n $logData['grco_id_by'] = $this->by;\n $logData['grco_organization'] = $this->organizationId;\n $logData['grco_id_token'] = $this->token->getTokenId();\n\n $logData['grco_method'] = 'email';\n $logData['grco_topic'] = substr($this->applyFields($this->subject), 0, 120);\n\n $to = array();\n foreach($this->to as $name=> $address) {\n $to[] = $name . '<'.$address.'>';\n }\n\n $logData['grco_address'] = substr(join(',', $to), 0, 120);\n $logData['grco_sender'] = substr($this->from, 0, 120);\n\n $logData['grco_id_message'] = $this->templateId ? $this->templateId : null;\n $logData['grco_id_job'] = $this->mailjob ? $this->mailjob : null;\n\n $logData['grco_changed'] = $changeDate;\n $logData['grco_changed_by'] = $this->by;\n $logData['grco_created'] = $changeDate;\n $logData['grco_created_by'] = $this->by;\n\n $this->db->insert('gems__log_respondent_communications', $logData);\n }", "public function toLogEntry();", "private static function addLog($msg) {\n\t\tself::$log[] = '\"'.formatTimestamp(time()).' - '.$msg.'\"';\n\t}", "public function additional(array $data);", "function _flashdata_mark()\n\t{\n\t\tforeach ($this->userdata as $name => $value)\n\t\t{\n\t\t\t$parts = explode(':new:', $name);\n\t\t\tif (is_array($parts) && count($parts) === 2)\n\t\t\t{\n\t\t\t\t$new_name = $this->flashdata_key.':old:'.$parts[1];\n\t\t\t\t$this->userdata[$new_name] = $value;\n\t\t\t\tunset($this->userdata[$name]);\n\t\t\t}\n\t\t}\n\t}", "public function listen() {\n add_filter( \"the_content\", array($this, \"theContent\"));\n add_filter( \"the_title\", array($this, \"theTitle\"));\n }", "public function add_info($info)\r\n { \r\n }", "public function add(Message $flash);", "private function record(int $level, ?string $message, $context = null): void\n\t{\n\t\tif(static::$context)\n\t\t{\n\t\t\t$context = $context ? (array)$context + static::$context : static::$context;\n\t\t}\n\n\t\t$record = new Record($level, $message, $context, $this->channel);\n\n\t\t/* @var $handler \\Exo\\Logger\\Handler */\n\t\tforeach(self::$handlers as $handler)\n\t\t{\n\t\t\tif($handler->isHandling($record) && $handler->write($record) === true) // interrupt\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public function after(string $message): Message\n {\n $this->after = $this->filter($message);\n return $this;\n }" ]
[ "0.57129973", "0.5501935", "0.54812205", "0.5173954", "0.5129478", "0.51133686", "0.50712025", "0.5030754", "0.5009038", "0.49852344", "0.49771228", "0.4919003", "0.49178067", "0.49093303", "0.48895374", "0.48845634", "0.48815194", "0.48763818", "0.4864585", "0.48245263", "0.48038617", "0.47801042", "0.4774636", "0.47705352", "0.47647795", "0.4758844", "0.4749199", "0.47455004", "0.47411877", "0.4739685", "0.47392562", "0.47349384", "0.47347015", "0.47347015", "0.47298056", "0.47051373", "0.46948105", "0.46828878", "0.46668804", "0.46507952", "0.46361136", "0.46188614", "0.4600948", "0.45856562", "0.4580871", "0.45800322", "0.45739225", "0.45739198", "0.4567256", "0.45661378", "0.45607227", "0.45553386", "0.45521435", "0.45458364", "0.45332807", "0.45255002", "0.45145842", "0.45122668", "0.4505219", "0.44987318", "0.44942507", "0.44932738", "0.44917655", "0.44897702", "0.44884357", "0.44874164", "0.44826886", "0.44787768", "0.4469427", "0.4463492", "0.44617632", "0.4459885", "0.44545695", "0.44517165", "0.444813", "0.4446424", "0.44417295", "0.44395882", "0.44335636", "0.44224468", "0.44121093", "0.44121093", "0.44094136", "0.44065285", "0.44011235", "0.439915", "0.4397718", "0.43965498", "0.4386881", "0.43807203", "0.43684667", "0.4368007", "0.43656456", "0.43633994", "0.436134", "0.43574968", "0.43563405", "0.43539733", "0.43538818", "0.43533462" ]
0.5086193
6
/ get product category from the database
function uploadProductForm( $retire_id, $product_id, $action_id, $category_id ){ if($action_id == 1){ $get_product_category = $this->connection->prepare (" SELECT product_id, category_name FROM pro_category WHERE product_id=? " ); $get_product_category->bind_param("i",$category_id); $send_id = 11; }else{ $get_product_category = $this->connection->prepare (" SELECT product_id, category_name FROM pro_category " ); $send_id = 7; } $get_product_category->execute(); $get_product_category->bind_result( $product_category_id, $category_name ); //create a form to be able to submit the product if($action_id>0){ $heading = "<h3>Update the product</h3>"; }else{ $heading = "<h3>Upload the product</h3>"; } echo "<form id='upload_product_holder' action='object.php' method='post' enctype='multipart/form-data' class='upload_holder' style='display:block;'>". $heading. "<label class='label'> Choose Product Category </label>". //create a select to select category name options "<select name='product_category_id' class='text_inpu more_height'>"; //loop through each category while ( $get_product_category->fetch() ){ //create product category names options to choose which category a product belongs to. echo "<option value='".$product_category_id."'>".$category_name."<option/>"; } //close select options created echo "</select>"; /*get product info if action is admin update*/ if($action_id==1){ $get_product = $this->connection->prepare (" SELECT product_name, brand_id , product_description, product_color, weight, price FROM product WHERE product_id = ? " ); $get_product->bind_param("i",$product_id); $get_product->execute(); $get_product->bind_result( $product_name, $product_brand_id, $product_description, $product_color, $weight, $price ); while($get_product->fetch()){} }else{ $product_name = ""; $product_brand_id = ""; $product_description = ""; $product_color = ""; $weight = ""; $price = ""; } /* * get the brand name created in the database * To determine which brand a product belongs to */ if($action_id==1){ $get_product_brand = $this->connection->prepare(" SELECT brand_id, brand_name FROM brand WHERE brand_id=? "); $get_product_brand->bind_param("i",$product_brand_id); }else{ $get_product_brand = $this->connection->prepare(" SELECT brand_id, brand_name FROM brand "); } $get_product_brand->execute(); $get_product_brand->bind_result( $brand_id, $brand_name ); //create a select input to create brand name options echo "<label class='label'> Choose Brand Name </label>". "<select name='product_brand_name' class='text_inpu more_height'>"; while ( $get_product_brand->fetch() ){ $product_brand_name = $brand_id; //create options to choose brand name echo "<option value='".$product_brand_name."'>".$brand_name."<option/>"; } //close the select input echo "</select>"; echo "</select>". "<label class='label'> Product Name </label>". "<input type='text' name='product_name' value='".$product_name."' class='text_inpu' />". "<label class='label'> Product description </label>". "<textarea type='text' name='product_description' value='".$product_description."' class='text_inpu textarea' maxlength='240' >".$product_description."</textarea>". "<label class='label'> Product color ( Separated by comma ) </label>". "<input type='text' name='product_color' value='".$product_color."' class='text_inpu' />". "<label class='label'> Product photo </label>". "<input type='file' name='product_photo[]' multiple class='text_inpu' />". "<label class='label'> Product size/weight available ( Separated by comma )</label>". "<input type='text' name='product_weight' value='".$weight."' class='text_inpu' />". "<label class='label'> Product Prices by size/weight above ( Separated by comma ) </label>". "<input type='number' name='product_price' value='".$price."' class='text_inpu' />". "<input type='hidden' name='product_match' value='0' />". "<input type='hidden' name='update_product_id' value='".$product_id."' />"; /* * get the product type from the database */ $get_product_type = $this->connection->prepare(" SELECT type_id, type_name FROM pro_type " ); $get_product_type->execute(); $get_product_type->bind_result( $type_id, $type_name ); /* *Create a type select input to create options to choose */ echo "<label class='label'> Choose Product Type </label>". "<select name='product_type_id' class='text_inpu more_height'>"; while ( $get_product_type->fetch() ){ $product_type_id = $type_id; echo "<option value='".$product_type_id."'>".$type_name."<option/>"; } echo "</select>"; echo "<label class='label'>Gender</label>". "<select name='gender' class='text_inpu more_height'>". "<option value='1'>"."Unisex"."</option>". "<option value='2'>"."Women"."</option>". "<option value='3'>"."men"."</option>". "</select>". "<input type='hidden' name='send_id' value='".$send_id."' />". "<input type='hidden' name='action_id' value='".$action_id."' />". "<input type='submit' name='upload_product' value='submit' class='submit_btn ' />". "</form>"; //close connection $this->connection->close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCategory() {\n $productModel = new productModel();\n $categories = $productModel->getCategoryList();\n $this->JsonCall($categories);\n }", "public function getCategory()\n\t\t{\n\t\t\t$sql = \"SELECT id_category,name_cate FROM tbl_category_products\";\n\t\t\t$pre = $this->pdo->prepare($sql);\n\t\t\t$pre->execute();\n\n\t\t\treturn $pre->fetchAll(PDO::FETCH_ASSOC);\n\t\t}", "public function get_category(){\n\t\t$this->load->model('seller/product_model');\n\t\t$category = $this->product_model->get_category();\n\t\treturn $category;\n\t}", "public function getProduct_category () {\n\t$preValue = $this->preGetValue(\"product_category\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->getClass()->getFieldDefinition(\"product_category\")->preGetData($this);\n\treturn $data;\n}", "function getCategory() {\n\t\t$categoryId = JRequest::getInt('category_id', 0) ;\n\t\t$sql = 'SELECT * FROM #__eb_categories WHERE id='.$categoryId;\n\t\t$this->_db->setQuery($sql) ;\n\t\treturn $this->_db->loadObject();\t\t\t\n\t}", "public function getCategory();", "public function getCategory();", "public function getCategory() {}", "public function getCategory($id){\n $category = Product::find($id)->category_id;\n return $category;\n }", "public function getCat()\n {\n $query = $this->db->get('categories');\n\n return $query->result();\n }", "public function getCategory() {\r\n return $this->catList->find('id', $this->categoryId)[0];\r\n }", "public function getCategory()\n {\n }", "public function getProdCategory()\n {\n return $this->prod_category;\n }", "public function getCategories(){\n\t\t$stmt = $this->db->query(\"SELECT * FROM products_categories WHERE clientId = '{$this->clientId}'\");\n\t\treturn $stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function getCategory(){\n\t\t$stmt = $this->bdd->prepare('SELECT * FROM categorie');\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchAll();\n\t}", "public function getCategory()\n\t{\n\t\treturn $this->data['category'];\n\t}", "public function chooseCategory(){\n $req = $this->db->query('SELECT * FROM p5_files_category');\n $req->setFetchMode(\\PDO::FETCH_CLASS | \\PDO::FETCH_PROPS_LATE, \n 'taekwondo\\model\\Category');\n return $req;\n }", "function category(){\n\t\trequire('quizrooDB.php');\n\t\t$query = sprintf(\"SELECT cat_name FROM q_quiz_cat WHERE cat_id = %d\", GetSQLValueString($this->fk_quiz_cat, \"int\"));\n\t\t$getQuery = mysql_query($query, $quizroo) or die(mysql_error());\n\t\t$row_getQuery = mysql_fetch_assoc($getQuery);\n\t\treturn $row_getQuery['cat_name'];\n\t}", "public function getCategory()\n {\n\t\treturn self::$categories[ $this->category ];\n }", "function getProductCategories () {\r\n $sql = \"SELECT * FROM stockgroups\";\r\n return runQuery($sql);\r\n}", "function getCategory()\r\n\t\t{\r\n\t\t\treturn $this->category;\r\n\t\t\t\r\n\t\t}", "public function category() {\n\t\treturn $this->get_category();\n\t}", "public function get_category(){\n\t\treturn $this->category;\n\t}", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "function get_Category()\n {\n try {\n return $this->mCategory;\n }catch(Exception $e){\n $this->error->throwException('303', 'No s`ha pogut retornar la informació', $e);\n }\n }", "function getCategories(){\n\treturn dbSelect('categories');\n}", "public function getCategory(){\n return $this->category;\n }", "public function getCategory(){\r\n return Mage::registry('current_category');\r\n }", "public function getCategory()\n {\n return $this->_category;\n }", "function getCategory() \n {\n return $this->instance->getCategory();\n }", "public function getCategory() {\n return $this->category;\n }", "public function getCategory()\n\t{\n\t\treturn $this->category;\n\t}", "public function getCategoryCloud()\n {\n $sql = \"\n SELECT\n PC.id as cat_id,\n PC.category,\n P2C.id,\n P2C.cat_id,\n COUNT(P2C.id) AS amount\n FROM Prod2Cat AS P2C\n LEFT OUTER JOIN ProdCategory AS PC\n ON PC.id = P2C.cat_id\n GROUP BY P2C.cat_id\n -- ORDER BY amount DESC\n \";\n\n $this->db->execute($sql);\n $res = $this->db->fetchAll();\n return $res;\n }", "public function getCategory()\r\n\t{\r\n\t\tif (!empty($this->category))\r\n\t\t{\r\n\t\t\treturn $this->category;\r\n\t\t}\r\n\r\n\t\t$pk = $this->getState('category.id');\r\n\r\n\t\t$this->category = JTable::getInstance('Category');\r\n\t\t$this->category->load($pk);\r\n\r\n\t\treturn $this->category;\r\n\t}", "function getCategory(){\n\t\t\t$data = array(); \n\t\t\t$query = \"select * from packages_category\";\n\t\t\t$result = mysql_query($query);\n\t\t \n\t\t\tif($result){\n\t\t\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t\t\tarray_push($data,$row);\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t\t}else{\n\t\t\t\tdie(\"error in mysql query \" . mysql_error());\n\t\t\t}\n\t\t}", "function getCategory($id_category){\n $db = db();\n $db->begin();\n $data = $db->exec('SELECT * FROM m_song WHERE fk_id_category = '.$id_category);\n\n return $data;\n }", "public function get_category() {\n $data['get_category'] = $this->Category_model->get_category();\n return $data['get_category'];\n }", "public function getcategory()\r\n{\r\n {\r\n $sql = \"select * from categories\";\r\n $result = $this->connect()->query($sql);\r\n if ($result->rowCount() > 0) {\r\n while ($row = $result->fetch()) {\r\n $data[] = $row;\r\n\r\n }\r\n return $data;\r\n }\r\n }\r\n}", "public function catDisplay(){\n $query = \"SELECT * FROM shop_category\";\n $result = $this->db->select($query);\n\n return $result;\n }", "private function getCategory() {\n\n $category = Category::with('records');\n /**\n * Filter slug\n */\n $category = Category::where('slug', $this->property('categorySlug'));\n\n /**\n * Filter active only\n */\n if( $this->property('activeOnly') ) {\n $category->isActive();\n }\n\n $categoryDetail = $category->first();\n\n return $categoryDetail;\n\n }", "public function getProductCategory()\n {\n return $this->hasMany(ProductCategory::className(), ['category_id' => 'id']);\n }", "function getCategory($category)\n {\n\n $product_category = DB::table('products')->select('products.id','products.name','products.price', 'products.price_promotion','products.image')\n ->join('categories', 'categories.id', '=','products.id_category')\n ->where('categories.id', '=', $category )->get();\n \n $categories = DB::table('categories')->get();\n // var_dump($categories);exit;\n\n\n // var_dump($product_category);exit;\n return view('frontend.pages.category', compact('product_category','categories'));\n }", "public function getCategory()\n\t\t{\n\t\t\treturn $this->hasOne(Categories::className(), ['id' => 'category_id']);\n\t\t}", "public function getCategory()\n {\n\n return $this->category;\n }", "public function getCategory() {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "function get_cat() {\r\n \r\n $query = $this->db->get('categories');\r\n return $query->result_array();\r\n }", "public function getCategory() {\n\t\treturn $this->category;\n\t}", "function getCategoryNameById($cat_id) {\n $ci = & get_instance();\n $category = $ci->crud->get(ES_PRODUCT_CATEGORIES, array('id' => $cat_id));\n if (count($category) > 0) {\n return $category['name'];\n } else {\n return \"Not available\";\n }\n}", "public function getCat() {\n return DB::q_array(\"SELECT id, title, image FROM news_category WHERE published = 1\");\n }", "public function getCategory(){\n\n\t\t $this->db->where('delete_status',0);\n\t $query=$this->db->get('category'); \n\t return $query->result();\n\n\t}", "public function getCategory($name);", "public static function getCategory()\n {\n return self::$category;\n }", "function category()\n\t{\n\n\t\t//$CI =& get_instance();\n\t\t$this->load->model('shop/categories_m');\n\n\t\t$id = $this->attribute('id', '');\n\t\t$field = $this->attribute('field', '');\n\n\t\t$category = $this->categories_m->get( $id );\n\t\n\n\t\tif($category)\n\t\t{\n\t\t\tif($field != '')\n\t\t\t{\n\t\t\t\treturn array('result' => $category->$field );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn (array) $category;\n\t\t\t}\n\t\t}\n\n\t\treturn array('result' => '');\n\n\t}", "public function getCategories(){\n\t\t$query = \"SELECT * FROM final_categoria\";\n\t\treturn $this->con->action($query);\n\t}", "public function GetCategories() {\n // Setup the Query\n $this->sql = \"SELECT *\n FROM categories\";\n \n // Run the query \n $this->RunBasicQuery();\n }", "public static function getCategories()\n {\n \t$query = \"SELECT * FROM categories\";\n \t$result = DB::select($query);\n\n \treturn $result;\n }", "public function getCategory()\n {\n return $this->hasOne(MgfSelectionCategory::className(), ['id' => 'category_id']);\n }", "public function get_categories() {\n\t error_log(\"get_categories - category id: \" . $category_id,0);\n\n\t$query = \"SELECT * FROM category ORDER BY category_name ASC\";\n\n\t error_log(\"get_categories - query: \" . $query,0);\n\n \t $result = mysql_query($query);\n\n if ($result) {\n return $result;\n } else {\n\terror_log(\"did not get categories\",0);\n $error = mysql_errno();\n return -$error;\n }\n\n }", "public function getProductCategories($id){\n\t\t\t$sql = \"SELECT * FROM product_categories WHERE id = $id\";\n\t\t\t$result = mysqli_query($this->connect(),$sql);\n\t\t\treturn $result->fetch_assoc() ;\n\t\t}", "public function prod_list_by_category() {\n $url_cate = get_raw_app_uri();\n if (!empty($url_cate)) {\n $Product = new Product();\n $info = $Product->getProductByCategory($url_cate);\n $data['content'] = 'list_product'; \n $data['product'] = $info['product'];\n $data['paging'] = $info['paging'];\n $data['selected'] = $url_cate;\n \n //seo\n \n $Category = new ProductCategory();\n $list_cate = $Category->getCategoryByLink($url_cate);\n if ($list_cate->countRows() > 0){\n $list_cate->fetchNext();\n $data['title_page'] = $list_cate->get_prod_cate_name();\n $data['description'] = $list_cate->get_prod_cate_meta_description();\n $data['keywords'] = $list_cate->get_prod_cate_keywords();\n }else{\n $data['title_page'] = '';\n $data['description'] = '';\n $data['keywords'] = '';\n }\n \n $array_menus = array();\n $filter = array();\n $filter['parent_id'] = 0;\n Menu::getMenuTree($array_menus, $filter);\n $data['array_menus'] = $array_menus;\n \n $this->load->view('temp', $data);\n } else {\n redirect(Variable::getDefaultPageString());\n }\n }", "public function category()\n {\n // check if user is already loaded, if not, we fetch it from database\n if (!$this->_category) {\n $categories = new Application_Model_DbTable_Categories();\n try {\n $this->_category = $categories->findById($this->_category_id);\n } catch (Exception $e) {\n $this->_category = null;\n }\n }\n return $this->_category;\n }", "function getCategoryId($cname) {\n $ci = & get_instance();\n $ci->load->database();\n $sql = \"SELECT * FROM gm_category Where category_name='\" . $cname . \"'\";\n $query = $ci->db->query($sql);\n $result = $query->row();\n // echo $sql; die;\n return $result;\n}", "public function getCategory()\r\n{\r\n $query_string = \"SELECT categoryname, categorydescription FROM categories \";\r\n $query_string .= \"WHERE categoryid = :categoryid\";\r\n\r\n return $query_string;\r\n}", "function getProductsByCategory()\n\t{\n\t\tglobal $con;\n\t\tif (isset($_GET['cat'])){\n\t\t\t$cat_id = $_GET['cat'];\n\t\t\t$get_products = \"select * from products where prod_cat='$cat_id'\";\n\t\t\t$run_products = mysqli_query($con, $get_products);\n\t\t\t$count = mysqli_num_rows($run_products);\n\t\t\t\n\t\t\tif ($count == 0)\n\t\t\t\techo \"<h2>No Products in this category</h2>\";\n\t\t\t\n\t\t\twhile($row = mysqli_fetch_array($run_products)) {\n\t\t\t\t$prod_id = $row['prod_id'];\n\t\t\t\t$prod_cat = $row['prod_cat'];\n\t\t\t\t$prod_brand = $row['prod_brand'];\n\t\t\t\t$prod_price = $row['prod_price'];\n\t\t\t\t$prod_image = $row['prod_img'];\n\n\t\t\techo \"\n\t\t\t\t<div class='single_product'>\n\t\t\t\t\t<h3>$prod_title</h3>\n\t\t\t\t\t<img src='admin_area/product_images/$prod_image'>\t\n\t\t\t\t\t<h2>$prod_price</h2>\n\t\t\t\t\t<a href='details.php?pro_id=$prod_id' style='float:left;'>Details</a>\n\t\t\t\t\t<a href='index.php?add_cart=$prod_id'><button>Add to Cart</button></a>\n\t\t\t\t</div>\n\t\t\t\t\";\n\t\t\t}\n\t\t}\n\t}", "public function getCategory(): string;", "function get_lowcat($product_id)\n {\n \t\t $database =& JFactory::getDBO();\n \t\t //najde kategoriu druhej alebo mensej urovne viac menej nahodne\n \t\t $sql = \"SELECT #__vm_category.category_id FROM #__vm_product_category_xref, #__vm_category, #__vm_category_xref WHERE #__vm_category_xref.category_child_id=#__vm_product_category_xref.category_id AND #__vm_category.category_publish='Y' AND #__vm_category.category_id=#__vm_category_xref.category_child_id and #__vm_category_xref.category_parent_id <> 0 AND #__vm_product_category_xref.product_id = '\".$product_id.\"' \";\n \t \n\t\t\t$database->setQuery($sql);\n\t\t\t\n\t\t\t//$res = $database->loadResult();\n\t\t\t$resA = $database->loadAssocList();\n\t\t\tif (!empty($resA))\n\t\t\t{\n\t\t\tforeach ($resA as $res)\n\t\t\t{\n\t\t\t \n\t\t\t {\n\t\t\t $arr = array();\n\t\t\t $cats = $this->build_cats($res['category_id'], $arr);\n\t\t\t //$x = end($cats);\n\t\t\t //var_dump($x);\n\t\t\t if (!empty($cats))\n\t\t\t // if (end($cats)!='262') IF YOU USE A CATEGORY SUCH AS LATEST PRODUCTS\n\t\t\t {\n\t\t\t //var_dump($res['category_id']); die();\n\t\t\t return $res['category_id'];\n\t\t\t }\n\t\t\t }\n\t\t\t}\n\t\t\t//echo $product_id.'...cat...'.$res['category_id']; die();\n\t\t\t// nechame novinky ak inde nie je\n\t\t\treturn $res['category_id'];\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif (!isset($res) || ($res==false))\n\t\t\t{\n\t\t\t // ak podkategoria neexistuje, najde top kategoriu\n\t\t\t \t$sql = \"SELECT #__vm_category.category_id FROM #__vm_product_category_xref, #__vm_category, #__vm_category_xref WHERE #__vm_category_xref.category_child_id=#__vm_product_category_xref.category_id AND #__vm_category.category_publish='Y' AND #__vm_category.category_id=#__vm_category_xref.category_child_id AND #__vm_product_category_xref.product_id = '$product_id' LIMIT 0,1\";\n\t\t\t \t$database->setQuery($sql);\n\t\t\t\t$res = $database->loadResult();\n\t\t\t\treturn $res;\n\t\t\t}\n\n\t\t\treturn 0;\n\n }", "public function readProductosCategoria(){\n $sql='SELECT nomCategoria, idProducto, producto.foto, nombre, producto.descripcion,precio FROM producto INNER JOIN categoria USING (idCategoria) WHERE idCategoria = ? AND producto.estado=1 AND producto.estadoEliminacion=1';\n $params=array($this->categoria);\n return Database::getRows($sql, $params);\n }", "public function getCategory($catId) {\n return Mage::getModel ( 'catalog/category' )->load ( $catId );\n }", "public function getCategory($id) {\n\t\treturn $this->query ( \"SELECT * FROM categorie WHERE cat_id = $id\" );\n\t}", "public function getCategoryId();", "public function getCategoryById($id){ //print_r($id); die;\n $query = $this->db->get_where('category',array('id' => $id));\n return $query->row(); // print_r($query);\n }", "public function categories(){\n /* \n id_categoria_producto int NOT NULL AUTO_INCREMENT,\n\ttipo_producto varchar(20) NOT NULL ,\n\tcaracteristicas_producto varchar(100) ,\n CONSTRAINT pk_categoria_producto PRIMARY KEY ( id_categoria_producto )\n\n\n id_producto int NOT NULL AUTO_INCREMENT,\n\tt_cat_producto int NOT NULL ,\n\tnombre_producto varchar(50) NOT NULL ,\n\tfecha varchar(10) NOT NULL ,\n\tpeso varchar(10) NOT NULL ,\n\tCONSTRAINT pk_producto PRIMARY KEY ( id_producto )\n */ \n $sql = 'SELECT c.name_categoria,\n c.id,\n p.id,\n p.id_categoria,\n p.nombre_producto,\n p.peso\n FROM categoria AS c, producto AS p\n WHERE c.id = p.id_categoria';\n $categories = $this->db->query($sql)->fetchAll(PDO::FETCH_CLASS, 'Category');\n return $categories;\n }", "public function getCategoryName() {\n try {\n // connect to db\n $pdo = $this->_db->connect();\n\n // set up SQL\n $sql = \"SELECT categoryName FROM category WHERE categoryId = \" . $_GET[\"categoryId\"];\n $stmt = $pdo->prepare($sql);\n\n // execuet SQL\n $rows = $this->_db->executeSQL($stmt);\n\n return $rows;\n } catch (PDOException $e) {\n throw $e;\n }\n }", "static function get_category_by_id($category){\n\t\treturn self::$db->where('id',$category)->get('categories')->results();\n\t}", "public function index()\n {\n return ProductCategory::orderBy('name')->get();\n }", "public function get_category()\n {\n return $this->primary_category();\n }", "public function getCategories()\r\n {\r\n $this->db->query(\"SELECT * FROM categories\");\r\n\r\n $row = $this->db->resultset();\r\n\r\n //Check Rows\r\n return $row;\r\n }", "public function getCategoryList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('tbl_category');\r\n\t\t$this->db->where(\"(category_parent_id = '' OR category_parent_id = '0')\");\r\n\t\t$this->db->where('category_status', '1');\r\n\t\t$this->db->where('category_type', 'Product');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}", "public function product_get_by_category($data)\n {\n $queryColumn = \"DESCRIBE \" . $this->db_table_prefix . \"products\";\n $resultColumn = $this->commonDatabaseAction($queryColumn);\n $resultColumn = $this->resultArray($resultColumn);\n $columns = php_array_column($resultColumn, 'Field');\n \n $query = \"SELECT p.*, c.name as catName\n \t FROM \" . $this->db_table_prefix . \"products p\n JOIN \" . $this->db_table_prefix . \"categories c\n ON p.cat_id = c.id \";\n \n if (!empty($data))\n {\n $query .= 'WHERE 1';\n foreach ($data as $key => $value)\n {\n $pos = strpos($key, '.');\n $columnArray = ($pos) ? explode('.', $key) : ''; \n $columnName = (!empty($columnArray)) ? $columnArray[1] : $key ;\n \n if (in_array($columnName, $columns))\n {\n $query .= ' AND ' . $key . ' = ' . $value;\n }\n }\n }\n $query .= \" ORDER BY p.id DESC\";\n\n $result = $this->commonDatabaseAction($query);\n// if (mysql_num_rows($result) > 0)\n if ($this->rowCount > 0)\n {\n return $this->resultArray($result);\n }\n else\n {\n return null;\n }\n }", "function getProductsByCategory($categoryId){ \n $db = acmeConnect(); \n $sql = 'SELECT * FROM inventory WHERE categoryId = :categoryId'; \n $stmt = $db->prepare($sql); \n $stmt->bindValue(':categoryId', $categoryId, PDO::PARAM_INT); \n $stmt->execute(); \n $products = $stmt->fetchAll(PDO::FETCH_ASSOC); \n $stmt->closeCursor(); \n return $products; \n }", "function getCategoria($idProducte){\n $conn=connexioBD();\n $categoria=\"\";\n $sql1=\"SELECT nomCategoria FROM categories INNER JOIN categoria_producte ON categories.idCategoria=categoria_producte.categoria_id WHERE categoria_producte.producte_id='$idProducte'\";\n if (!$resultado =$conn->query($sql1)){\n die(\"Error al comprobar datos\".$conn->error);\n }\n if($resultado->num_rows>=0){\n while($categories=$resultado->fetch_assoc()){\n $categoria.=$categories[\"nomCategoria\"].\" \";\n }\n }\n \n return $categoria;\n $resultado->free();\n $conn->close();\n\n}", "function selectByCategory($cat) {\r\n global $conn;\r\n $select = \"SELECT * FROM product WHERE category='\" . $cat . \"';\";\r\n $result = mysqli_query($conn, $select);\r\n return $result;\r\n}", "public function GetCategory()\r\n {\r\n return AppHelper::GetCategory($this->Core);\r\n }" ]
[ "0.8007528", "0.79242253", "0.785443", "0.784101", "0.78224367", "0.76838833", "0.76838833", "0.763035", "0.7558307", "0.74781287", "0.74624836", "0.7396607", "0.73837435", "0.7315027", "0.72926235", "0.7265415", "0.7235513", "0.72241277", "0.7203779", "0.71912587", "0.7189554", "0.71888167", "0.71636534", "0.7139448", "0.7139448", "0.7137741", "0.7137741", "0.7137741", "0.7137741", "0.7137741", "0.7137741", "0.7137741", "0.7137741", "0.7137741", "0.7137741", "0.7137741", "0.7137741", "0.7137741", "0.7137741", "0.7137741", "0.7137741", "0.7133971", "0.712218", "0.7112331", "0.71036714", "0.7098442", "0.7077606", "0.7065412", "0.7060422", "0.7052611", "0.70464885", "0.7044421", "0.7039582", "0.7034029", "0.70240027", "0.7023458", "0.70179933", "0.7010518", "0.7006236", "0.6994142", "0.69833726", "0.69821274", "0.69579417", "0.6953383", "0.69426906", "0.694206", "0.6935866", "0.69152045", "0.6914483", "0.69090885", "0.6905889", "0.6895926", "0.6894815", "0.6875608", "0.6871309", "0.6869062", "0.6865579", "0.685472", "0.6851839", "0.68440366", "0.68415546", "0.6835832", "0.680759", "0.68039846", "0.6802333", "0.67973095", "0.67835706", "0.6780507", "0.6779117", "0.6772581", "0.6766154", "0.6766134", "0.6759293", "0.6756378", "0.6753685", "0.675011", "0.67489105", "0.6748891", "0.67416596", "0.6740337", "0.67344457" ]
0.0
-1
/ Transport zwrotny zawiera dane jednej lokalizacji
public function location() { return $this->belongsTo('App\Location', 'locations_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_cost($from, $to,$weight)\r\n{\r\n require_once 'REST_Ongkir.php';\r\n \r\n $rest = new REST_Ongkir(array(\r\n 'server' =&amp;gt; 'http://api.ongkir.info/'\r\n ));\r\n \r\n//ganti API-Key dibawah ini sesuai dengan API Key yang anda peroleh setalah mendaftar di ongkir.info\r\n $result = $rest-&amp;gt;post('cost/find', array(\r\n 'from' =&amp;gt; $from,\r\n 'to' =&amp;gt; $to,\r\n 'weight' =&amp;gt; $weight.'000',\r\n 'courier' =&amp;gt; 'jne',\r\n'API-Key' =&amp;gt;'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456'\r\n ));\r\n \r\n try\r\n {\r\n $status = $result['status'];\r\n \r\n // Handling the data\r\n if ($status-&amp;gt;code == 0)\r\n {\r\n $prices = $result['price'];\r\n $city = $result['city'];\r\n \r\n echo 'Ongkos kirim dari ' . $city-&amp;gt;origin . ' ke ' . $city-&amp;gt;destination . '&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';\r\n \r\n foreach ($prices-&amp;gt;item as $item)\r\n {\r\n echo 'Layanan: ' . $item-&amp;gt;service . ', dengan harga : Rp. ' . $item-&amp;gt;value . ',- &amp;lt;br /&amp;gt;';\r\n }\r\n }\r\n else\r\n {\r\n echo 'Tidak ditemukan jalur pengiriman dari surabaya ke jakarta';\r\n }\r\n \r\n }\r\n catch (Exception $e)\r\n {\r\n echo 'Processing error.';\r\n }\r\n}", "public function lokalizacjaAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$id = (int)$this->_request->getParam('id');\n\n\t\t\t$this->view->lista = $db->fetchAll($db->select()->from('inwestycje_markery')->order('sort ASC')->where('id_inwest =?', $id));\n\t\t\t$this->view->inwestycja = $db->fetchRow($db->select()->from('inwestycje')->where('id = ?', $id));\n\t\t}", "abstract public function getPasiekimai();", "public function nowyPunktAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$this->_helper->viewRenderer('form', null, true);\n\t\t\t$this->view->pagename = \" - Nowa lokalizacja\";\n\n\t\t\t$id_inwest = (int)$this->_request->getParam('inwestycja');\n\t\t\t$this->view->back = '<div class=\"back\"><a href=\"'.$this->view->baseUrl.'/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/\">Wróć do listy</a></div>';\n\t\t\t$this->view->info = '<div class=\"info\">Wymiary obrazka: szerokość <b>1165px</b> / wysokość <b>655px</b></div>';\n\t\t\t$this->view->tinymce = \"1\";\n\n\t\t\t// Wyswietl formularz\n\t\t\t$form = new Form_LokalizacjaForm();\n\t\t\t$this->view->form = $form;\n\n\t\t\t\t//Akcja po wcisnieciu Submita\n\t\t\t\tif ($this->_request->getPost()) {\n\n\t\t\t\t\t//Odczytanie wartosci z inputów \n\t\t\t\t\t$formData = $this->_request->getPost();\n\t\t\t\t\tunset($formData['MAX_FILE_SIZE']);\n\t\t\t\t\tunset($formData['obrazek']);\n\t\t\t\t\tunset($formData['submit']);\n\t\t\t\t\t$formData['id_inwest'] = $id_inwest;\n\t\t\t\t\t\n\t\t\t\t\t$obrazek = $_FILES['obrazek']['name'];\n\t\t\t\t\t$plik = zmiana($formData['nazwa']).'_'.$id_inwest.'.'.zmiennazwe($obrazek);\n\t\t\t\t\t\n\t\t\t\t\t//Sprawdzenie poprawnosci forma\n\t\t\t\t\tif ($form->isValid($formData)) {\n\n\t\t\t\t\t\t$db->insert('inwestycje_markery', $formData);\n\t\t\t\t\t\t$lastId = $db->lastInsertId();\n\n\t\t\t\t\t\tif ($obrazek) {\n\n\t\t\t\t\t\t\tmove_uploaded_file($_FILES['obrazek']['tmp_name'], FILES_PATH.'/inwestycje/lokalizacja/'.$plik);\n\t\t\t\t\t\t\t$upfile = FILES_PATH.'/inwestycje/lokalizacja/'.$plik;\n\t\t\t\t\t\t\tchmod($upfile, 0755);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\trequire_once 'kCMS/Thumbs/ThumbLib.inc.php';\n\n\t\t\t\t\t\t\t$options = array('jpegQuality' => 80);\n\t\t\t\t\t\t\t$thumb = PhpThumbFactory::create($upfile, $options)->adaptiveResizeQuadrant(1165, 655)->save($upfile);\n\n\t\t\t\t\t\t\t$dataImg = array('plik' => $plik);\n\t\t\t\t\t\t\t$db->update('inwestycje_markery', $dataImg, 'id = '.$lastId);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->_redirect('/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/');\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Wyswietl bledy\t\n\t\t\t\t\t\t$this->view->message = '<div class=\"error\">Formularz zawiera błędy</div>';\n\t\t\t\t\t\t$form->populate($formData);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function listarLotesParaTipoContrato(Request $request)\n {\n # code...\n /* Parametros ($request) : \n { codigo: string, contrato: string, ubigeo: Ubigeo }\n */\n try {\n //code...\n $respuesta = new RespuestaWebTO();\n // para la condicion del ubigeo\n $tipoubigeo = $request->input('ubigeo') ? $request->input('ubigeo.tipoubigeo_id') : null;\n $codigo = $request->input('ubigeo') ? $request->input('ubigeo.codigo'): null;\n $condicion = $request->input('ubigeo') ? $this->mostrarCondicionUbigeo($tipoubigeo,$codigo) : null;\n if ($condicion!== 'error') { // LoteTO\n $lotes = Lote::select('lote.id', 'lote.foto', 'persona.nombres as propietario', \n 'ubigeo.ubigeo as nombrehabilitacionurbana', 'habilitacionurbana.siglas',\n 'lote.direccion', 'precioadquisicion', 'preciocontrato', 'ganancia', 'largo', 'ancho',\n 'lote.contrato', 'lote.estadocontrato', 'lote.codigo', 'lote.estado', 'lote.nmensajes',\n 'ubigeo.rutaubigeo as ubicacion')\n ->join('persona', 'persona.id', '=', 'lote.persona_id')\n ->join('ubigeo', 'ubigeo.id', '=', 'lote.ubigeo_id')\n ->join('habilitacionurbana', 'habilitacionurbana.id', '=', 'ubigeo.habilitacionurbana_id')\n ->where([['lote.estado','=',true], ['lote.estadocontrato','=','L'],\n ['lote.codigo','like','%'.($request->codigo).'%'], ['lote.contrato','=',$request->contrato], \n ['ubigeo.codigo', $condicion[1], $condicion[2]]])\n ->orderBy('lote.codigo', 'asc')->get(); // con ubigeo\n if ($lotes!==null && !$lotes->isEmpty()) {\n $respuesta->setEstadoOperacion('EXITO');\n $respuesta->setExtraInfo($lotes);\n } else {\n $respuesta->setEstadoOperacion('ADVERTENCIA');\n $respuesta->setOperacionMensaje('No se encontraron lotes');\n }\n } else {\n $respuesta->setEstadoOperacion('ADVERTENCIA');\n $respuesta->setOperacionMensaje('Error con ubigeos');\n }\n } catch (Exception $e) {\n $respuesta->setEstadoOperacion('ERROR');\n $respuesta->setOperacionMensaje($e->getMessage());\n } catch (QueryException $qe) {\n $respuesta->setEstadoOperacion('ERROR');\n $respuesta->setOperacionMensaje($qe->getMessage());\n }\n return response()->json($respuesta, 200);\n }", "public function obtenerViajesplus();", "function alr_clima_localidad($pid=0)\n{\n\tif($pid!=0)\n\t{\n\t\t$response=array();\n\t\t$feed_loc = \"http://api.tiempo.com/index.php?api_lang=ar&provincia=\".$pid.\"&affiliate_id=jcp8s666brbh\";\t\n\t\t$curlL = curl_init();\n\t\tcurl_setopt($curlL, CURLOPT_URL,$feed_loc);\n\t\tcurl_setopt($curlL, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($curlL, CURLOPT_CONNECTTIMEOUT, 0);\n\t\t$xmlLoc = curl_exec($curlL);\n\t\tif(curl_errno($curlL)==0) \n\t\t{\n\t\t\t$xml = simplexml_load_string($xmlLoc);\n\t\t\tif(isset($xml->location->data[0]->name)) \n\t\t\t{\t\t\t\n\t\t\t\tforeach ($xml->location->data as $loc) \n\t\t\t\t{\n\t\t\t\t\t$lid=intval($loc->name->attributes()->id);\n\t\t \t$response[$lid]=(string)$loc->name;\n\t \t }\n\t\t\t}\n\t\t}\n\t\treturn $response;\n\t\tcurl_close($curl);\n\t}\n}", "Function DokumentZalozeniRequest($UdalostiPredchazejici, $ProfilDokumentu, $Autorizace) {\r\n //nastaveni parametru\r\n global $server, $soap;\r\n $server->responseMethodname = str_replace(\"Request\", \"\", $server->methodname).'Response';\r\n $server->methodURI = $soap[\"methodURI\"];\r\n \r\n //print_r($server->methodparams);\r\n //print_r($UdalostiPredchazejici);\r\n //print_r($ProfilDokumentu);\r\n //print_r($Autorizace);\r\n\r\n// ob_start;\r\n// print_r($ProfilDokumentu);\r\n// print_r($Autorizace);\r\n// eb_end_flush; Die();\r\n\r\n if (VratReferenta($Autorizace)==0) \r\n return VratChybu($log,'Nepovedlo se identifikovat uzivatele v parametru ProvedlKdo');\r\n\r\n //response null\r\n Response_Dokument($response_ProfilDokumentu, false, 'f');\r\n\r\n //Zalozeni dokumentu\r\n $res = DokumentZalozeni($ProfilDokumentu, 'f', $Autorizace, $id, $msg_popis);\r\n\r\n\r\n //Nacteni dokumentu\r\n if ($id>0) Response_Dokument($response_ProfilDokumentu, $id, 'f');\r\n\r\n Response_Dokument($response_Dokument, $id, 't');\r\n \r\n //response \r\n Response_OperaceStatus($response_OperaceStatus, $msg_popis[\"Kod\"], $msg_popis[\"Popis\"]);\r\n NastavLog($log, $msg_popis[\"Kod\"].': '.$msg_popis[\"Popis\"].($msg_popis[\"ErrSql\"] ? ' | '.$msg_popis[\"ErrSql\"] : '') , 'DokumentZalozeniRequest', $msg_popis[\"Kod\"]);\r\n \r\n\r\n $result = array(\r\n 'ProfilDokumentu' => $response_Dokument,\r\n 'OperaceStatus' => $response_OperaceStatus\r\n );\r\n \r\n ZapisLog($log); \r\n\r\n return $result;\r\n}", "public function loeschen(){\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\" && isset($_POST[\"loeschen\"]) && $_POST[\"loeschen\"] == \"Löschen\") {\n if ($this->error == false) {\n $datenbank = new DatenbankAufrufe;\n #Prüfung ob der Benutzer bereits existiert\n $result = $datenbank->existBenutzer();\n if ($result == true) {\n $dbPasswort = $datenbank->passwortAuslesen();\n $pwKrypto = new PasswortSpeichern;\n $result2 = $pwKrypto->passwortAbgleich($_POST['passwort'], $dbPasswort);\n if ($result2 == true) {\n $datenbank->benutzerLoeschen();\n header(\"Location: index.php?success=loeschen\");\n }\n else {\n echo \"Das Passwort ist nicht korrekt\";\n }\n }\n else {\n echo \"Der Benutzer existiert nicht.\";\n }\n }\n }\n }", "public function tampilDataGalang(){\n\t\t\n\t}", "function list_kelas_pertemuan_get()\n {\n $query = $this->M_kelas_pertemuan->tampil_data('kelas_pertemuan');\n\n // variable array\n $result = array();\n $result['kelas_pertemuan'] = array();\n\n if ($query->num_rows() > 0) {\n\n // mengeluarkan data dari database\n foreach ($query->result_array() as $row) {\n\n // ambil detail data db\n $data = array(\n 'id_kelas_p' => $row[\"id_kelas_p\"],\n 'id_pengajar' => $row[\"id_pengajar\"],\n 'id_mata_pelajaran' => $row[\"id_mata_pelajaran\"],\n 'hari' => $row[\"hari\"],\n 'jam_mulai' => $row[\"jam_mulai\"],\n 'jam_berakhir' => $row[\"jam_berakhir\"],\n 'harga_fee' => $row[\"harga_fee\"],\n 'harga_spp' => $row[\"harga_spp\"],\n 'id_sharing' => $row[\"id_sharing\"],\n 'nama_sharing' => $row[\"nama_sharing\"],\n );\n\n array_push($result['kelas_pertemuan'], $data);\n\n // membuat array untuk di transfer\n $result[\"success\"] = \"1\";\n $result[\"message\"] = \"success berhasil mengambil data\";\n $this->response($result, 200);\n }\n } else {\n // membuat array untuk di transfer ke API\n $result[\"success\"] = \"0\";\n $result[\"message\"] = \"error data tidak ada\";\n $this->response($result, 200);\n }\n }", "public function geolocalizacion(Request $request, Response $response, $args)\n {\n \n try {\n \n $ruc=\"20131380951\";\n $token=\"8c076ab2d795c792c8dd3749ebe29df1\";\n $fecha=\"20190227\";\n $path1 = $ruc.$token.$fecha;\n $clave=md5($path1);\n \n $url=\"http://190.102.145.252:8001/api/\";\n \n //$url=\"https://digital.miraflores.gob.pe:8443/miraflores/getDocTramiteByWeb.muni\";\n /*recibo los parametros del login*/ \n $dato = array(\n \"token\" => $clave,\n \"format\" => \"json\"\n );\n \n\n $datosM= Acl::curlGET($url,$dato);\n \n //var_dump($datosM);\n //exit;\n \n\n\n\n // $popup = ContenidoControlador::getContenidoPopups();\n // var_dump($popup);\n // exit;\n \n $nroRes=Constante::NOTIC_NRO_RESULTADOS_DEFAULT;\n // $datin[\"contenidos\"] = ContenidoControlador::getListadoNoticiasPortada($nroRes);\n $datin[\"contenidos\"] = GestContenido::getListadoNoticiasPortada($nroRes);\n $datin[\"popups\"] = ContenidoControlador::getContenidoPopups();\n $datin[\"novedades\"] = ContenidoControlador::getNovedadesMiraflores();\n $datin[\"pathmunlima\"]=Constante::PATHMUNLIMA;\n \n $mensaje =\"se elimino correctamente el usuario y la persona\";\n $estado = true;\n \n \n } catch (\\ErrorException $e) {\n $mensaje=\"Algo no salio muy bien\";\n $estado=false;\n }\n \n $datin[\"mensaje\"]= $mensaje;\n $datin[\"success\"] = $estado;\n // $datin[\"parametros\"] = ['title'=>\"Bienvenido :: Overseas Perú\", 'titulo' => \"BIENVENIDO A LOS SERVICIOS DE ATENCIÓN VIRTUAL\" ];\n //$obj1 = JsonRenderer::render($response,200,$datin);\n //var_dump($datin);\n //exit;\n $this->view->render($response, \"weblima/plantilla-map.twig\", $datin);\n return $response;\n \n }", "function pobierz_urle_uzyt($nazwa_uz) {\r\n // pobranie z bazy danych wszystkich URL-i danego u�ytkownika\r\n $lacz = lacz_bd();\r\n $wynik = $lacz->query(\"select URL_zak\r\n from zakladka\r\n where nazwa_uz = '\".$nazwa_uz.\"'\");\r\n if (!$wynik) {\r\n return false;\r\n }\r\n\r\n // tworzenie tablicy URL-i\r\n $tablica_url = array();\r\n for ($licznik = 0; $rzad = $wynik->fetch_row(); ++$licznik) {\r\n $tablica_url[$licznik] = $rzad[0];\r\n }\r\n return $tablica_url;\r\n}", "function SuoritaLisaysToimet(){\n /*Otetaan puuhaId piilotetustaKentasta*/\n $puuhaid = $_POST['puuha_id'];\n \n /* Hae puuhan tiedot */\n $puuha = Puuhat::EtsiPuuha($puuhaid);\n $suositus=luoSuositus($puuhaid,null);\n \n /*Tarkistetaan oliko suosituksessa virheita*/\n if(OlioOnVirheeton($suositus)){\n LisaaSuositus($suositus,$puuhaid);\n header('Location: puuhanTiedotK.php?puuhanid=' . $puuhaid . '.php');\n } else {\n $virheet = $suositus->getVirheet();\n naytaNakymaSuosituksenKirjoitusSivulle($puuha, $suositus, $virheet, \"Lisays\");\n }\n}", "public function index($id){\n\t\t$po_prostu_pokaz = true;\n\t\t$user = $this->session->zalogowany;\n\t\tif($dane = $this->baza->czy_zlecenie_istnieje($id)){\n\t\t\t$dane[0]->nick = $this->baza->daj_nick($dane[0]->zlecajacy_id);\n\t\t\t$prace = $this->baza->prace();\n\t\t\t$aktualna_data = date('Y-m-d');\n\t\t\t$aktualna_godzina = date('H:i');\n\t\t\tif($this->baza->czy_zlecenie_aktualne($id,$aktualna_data,$aktualna_godzina)){\n\t\t\t\t//zlecenie aktualne\n\t\t\t\tif($user != null){\n\t\t\t\t\tif($dane[0]->zlecajacy_id != $user){\n\t\t\t\t\t\t//nie jesteś zlecającym\n\t\t\t\t\t\t$zwyciezca = $this->baza->dane_zwyciezcy($id);\n\t\t\t\t\t\tif(count($zwyciezca)==0){\n\t\t\t\t\t\t\t//jeszcze nie wybrano zwycięzcy\n\t\t\t\t\t\t\tif(!$this->baza->czy_juz_zgloszono($id,$user)){\n\t\t\t\t\t\t\t\t//nie zgłosiłeś się jeszcze\n\t\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t\t$zgloszenie = $this->input->post('zlecenie_zgloszenie');\n\t\t\t\t\t\t\t\tif($zgloszenie != null){\n\t\t\t\t\t\t\t\t\t//wyświetl komunikat informujący o poprawnym zgłoszeniu się\n\t\t\t\t\t\t\t\t\t$this->baza->dodaj_zgloszenie($id,$user);\n\t\t\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zglos_sie'=>1));\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t//wyswietl widok z możliwością zgłoszenia się do niego\n\t\t\t\t\t\t\t\t\t//aktualne - true,jestes_zlecajacym=false,zgloszono_sie=false\n\t\t\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zglos_sie'=>0));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//wybrano zwycięzcę\n\t\t\t\t\t\t\tif($this->baza->czy_juz_zgloszono($id,$user)){\n\t\t\t\t\t\t\t\t//zgłoszono się\n\t\t\t\t\t\t\t\tif($this->baza->czy_wygrales_zlecenie($id,$user)){\n\t\t\t\t\t\t\t\t\t//jesteś zwycięzcą\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$status = $zwyciezca[0]->status;\n\t\t\t\t\t\t\t\t\tif($status == 0){\n\t\t\t\t\t\t\t\t\t\t//zostałeś wybrany przez zlecającego\n\t\t\t\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t\t\t\t$podjecie = $this->input->post('zlecenie_podjecie');\n\t\t\t\t\t\t\t\t\t\tif($podjecie != null){\n\t\t\t\t\t\t\t\t\t\t\t//komunikat o pomyślnym podjęciu się pracy\n\t\t\t\t\t\t\t\t\t\t\t$this->baza->potwierdz_podjecie($id);\n\t\t\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'podjecie'=>1));\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t//strona z możliwością potwierdzenia podjecia się pracy\n\t\t\t\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'podjecie'=>0));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//zalogowany jest zlecajacym\n\t\t\t\t\t\t$jestes_zlecajacym = true;\n\t\t\t\t\t\t$dane_zwyciezcy = $this->baza->dane_zwyciezcy($id);\n\t\t\t\t\t\tif(count($dane_zwyciezcy)==0){\n\t\t\t\t\t\t\t//nie wybrano zwycięzcy\n\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t$wybrany = $this->input->post('zlecenie_zwyciezca');\n\t\t\t\t\t\t\tif($wybrany != null){\n\t\t\t\t\t\t\t\t$this->baza->wybierz_zwyciezce($id,$wybrany);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zgloszenia'=>1));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t//wyświetl listę zgłoszeń\n\t\t\t\t\t\t\t\t//daj możliwość wybrania jednego\n\t\t\t\t\t\t\t\t$zgloszenia = $this->baza->lista_zgloszen($id);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'zgloszenia'=>$zgloszenia));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t//zlecenie po czasie wykonania\n\t\t\t\t$user = $this->session->zalogowany;\n\t\t\t\tif($dane[0]->zlecajacy_id == $user){\n\t\t\t\t\t//jesteś zleceniodawcą\n\t\t\t\t\t$dane_zwyciezcy = $this->baza->dane_zwyciezcy($id);\n\t\t\t\t\tif(count($dane_zwyciezcy)>0){\n\t\t\t\t\t\t//ktoś wygrał\n\t\t\t\t\t\t$status = $dane_zwyciezcy[0]->status;\n\t\t\t\t\t\tif($status == 1){\n\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t//daj możliwość potwierdzenia wykonania\n\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t$potwierdzono = $this->input->post('zlecenie_potwierdzenie');\n\t\t\t\t\t\t\tif($potwierdzono != null){\n\t\t\t\t\t\t\t\t$this->baza->potwierdz_wykonanie($id);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'ocena'=>0));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'potwierdzenie'=>0));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if($status == 2){\n\t\t\t\t\t\t\t$po_prostu_pokaz = false;\n\t\t\t\t\t\t\t//daj możliwość ocenienia\n\t\t\t\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t\t\t\t$ocena = $this->input->post('zlecenie_ocena');\n\t\t\t\t\t\t\t$komentarz = $this->input->post('zlecenie_komentarz');\n\t\t\t\t\t\t\tif($ocena != null && $komentarz != null){\n\t\t\t\t\t\t\t\t$this->baza->ocen($id,$dane_zwyciezcy[0]->zglaszajacy_id,$ocena,$komentarz);\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'ocena'=>1));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace,'ocena'=>0));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($po_prostu_pokaz){\n\t\t\t\t$this->load->view(\"naglowek\",array('tytul'=>'ZLECENIE'));\n\t\t\t\t$this->load->view('zlecenie/zlecenie',array('dane'=>$dane,'prace'=>$prace));\n\t\t\t}\n\t\t}else{\n\t\t\t$this->load->view('blad',array('komunikat'=>'Nie ma takiego zlecenia!'));\n\t\t}\n\t}", "public function masodik()\n {\n }", "public function baseSlajderi()\n {\n \n $this->linija = Slajderi::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]),array('order'=>'id'));\n $this->nalovSlajderi = $this->linija[0] -> naslov;\n \n \n }", "public function hapus_toko(){\n\t}", "public function getBanyakSoal();", "function cl_rhconsignadomovimentoservidorrubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhconsignadomovimentoservidorrubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function getLeja(){\r\n return $this->leja;\r\n }", "public static function Najdi_kolize_pro_formular_dosud_nezavolane ($iducast, $formular, $pole_id_volanych ) {\r\n $query= \"SELECT * FROM s_typ_kolize WHERE formular='\" . $formular . \"' and valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ; //to jsou vsechny pro formular\r\n \r\n //ty, co uz volal, z pole vypustit\r\n $kolize_pole_redukovane = array();\r\n \r\n foreach ($kolize_pole as $kprvek) {\r\n if ( in_array( $kprvek->id_s_typ_kolize_FK, $pole_id_volanych) ) {\r\n }\r\n else {\r\n array_push ($kolize_pole_redukovane, $kprvek ); //$kprvek->id_s_typ_kolize_FK);\r\n } \r\n }\r\n \r\n return $kolize_pole_redukovane; \r\n}", "function findKeyAndUriFromVeloWebsite()\n {\n\t\t$urlBase = $this->CI->config->item('UrlBase', 'velobleuconf');\n\t\t$urlCarte = $this->CI->config->item('UrlCarteVeloBleu', 'velobleuconf');\n\t\t\n $pageHTML = @file_get_contents($urlBase . $urlCarte);\n\t\t\n\t\tif(isset($http_response_header) && isValidHttpRequest($pageHTML, $http_response_header))\n\t\t{\n\t\t\t// Trouve la variable mapdb et prend ce qui est contenu entre quotes pour connaitre son contenu\n\t\t\t$posMapDb = strpos($pageHTML, 'var mapdb');\n\t\t\t$posQote1MapDb = strpos($pageHTML, \"'\", $posMapDb) + 1;\n\t\t\t$posQote2MapDb = strpos($pageHTML, \"'\", $posQote1MapDb);\n\t\t\t$varMapDb = substr($pageHTML, $posQote1MapDb, $posQote2MapDb - $posQote1MapDb);\n\t\t\tlog_message('debug', 'found mapdb : ' . $varMapDb);\n\t\t\t$this->mapDb = $varMapDb;\n\n\t\t\t// Idem pour var networks\n\t\t\t$posNetworks = strpos($pageHTML, 'var networks');\n\t\t\t$posQote1Networks = strpos($pageHTML, '\"', $posNetworks) + 1;\n\t\t\t$posQote2Networks = strpos($pageHTML, '\"', $posQote1Networks);\n\t\t\t$varNetworks = strtolower(substr($pageHTML, $posQote1Networks, $posQote2Networks - $posQote1Networks));\n\t\t\tlog_message('debug', 'found networks : ' . $varNetworks);\n\t\t\t$this->networks = $varNetworks;\n\n\t\t\t// Idem pour var mapdbkey\n\t\t\t$posMapdDbKey = strpos($pageHTML, 'var mapdbkey');\n\t\t\t$posQote1MapDbKey = strpos($pageHTML, \"'\", $posMapdDbKey) + 1;\n\t\t\t$posQote2MapDbKey = strpos($pageHTML, \"'\", $posQote1MapDbKey);\n\t\t\t$varMapDbKey = substr($pageHTML, $posQote1MapDbKey, $posQote2MapDbKey - $posQote1MapDbKey);\n\t\t\tlog_message('debug', 'found mapdbkey : ' . $varMapDbKey);\n\t\t\t$this->mapDbKey = $varMapDbKey;\n\n\t\t\t$this->jsonUrl = $this->getJsonUrl();\n\t\t\tlog_message('debug', 'found jsonUrl : ' . $this->jsonUrl);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$httpError = \"Aucune information\";\n\t\t\tif(isset($http_response_header))\n\t\t\t\t$httpError = getHttpError($http_response_header);\n\t\t\t\t\n\t\t\tlog_message('error', 'Chargement des données contenant la clé impossible : ' . $httpError);\n\t\t}\n\n }", "public function index()\n {\n try {\n $ruang_kelas = RuangKelas::get();\n \n return apiReturn($ruang_kelas, \"Berhasil menampilkan data ruang kelas\");\n } catch (\\Throwable $th) {\n return apiCatch();\n }\n }", "public function zpracuj($parametry)\n {\n $spravceHraci = new SpravceHraci();\n\n if (!empty($parametry)) {\n //ziskani clanku podle jeho url\n $clanek = $spravceHraci->vratClanekHrac($parametry[0]);\n\n //kdyz se clanek nenajde - presmerovani na chybovou stránku\n if (!$clanek) {\n $this->presmeruj('chyba');\n }\n\n $this->hlavicka = array(\n 'titulek' => $clanek['titulek'],\n 'popisek' => $clanek['popisek'],\n );\n\n $this->data['titulek'] = $clanek['titulek'];\n $this->data['obsah'] = $clanek['obsah'];\n //nastaveni sablony\n $this->pohled = 'clanek';\n } //když není zadána URl článku tak se vypíše seznam článků\n else {\n $clanky = $spravceHraci->vratClankyHrac();\n $this->data['clanky'] = $clanky;\n $this->pohled = 'proHrace';\n }\n }", "public function AggiornaPrezzi(){\n\t}", "public function run()\n {\n $transport_data = [\n ['code' => '01', 'name' => '西濃運輸'],\n ['code' => '02', 'name' => '京成運輸'],\n ['code' => '03', 'name' => '佐川急便'],\n ['code' => '04', 'name' => '久留米運送'],\n ['code' => '05', 'name' => '福山通運'],\n ['code' => '06', 'name' => '岡山県貨物'],\n ['code' => '07', 'name' => '野々村運送'],\n ['code' => '08', 'name' => '西濃(名古屋西)'],\n ['code' => '09', 'name' => '中央便'],\n ['code' => '10', 'name' => 'トール'],\n ['code' => '11', 'name' => '西濃(園芸部)'],\n ['code' => '12', 'name' => '阪急国内空輸'],\n ['code' => '13', 'name' => '丸工運送'],\n ['code' => '14', 'name' => '使用禁止'],\n ['code' => '15', 'name' => 'エスラインギフ'],\n ['code' => '16', 'name' => '福山(宅配)'],\n ['code' => '17', 'name' => '使用禁止'],\n ['code' => '18', 'name' => '京都運輸'],\n ['code' => '19', 'name' => '日本通運'],\n ['code' => '20', 'name' => '西濃(直売部)'],\n ['code' => '21', 'name' => '大島運輸'],\n ['code' => '22', 'name' => '西濃(彦根)'],\n ['code' => '23', 'name' => '近鉄物流'],\n ['code' => '24', 'name' => 'ヤマト運輸'],\n ['code' => '25', 'name' => '丸三海運'],\n ['code' => '26', 'name' => '琉球通運'],\n ['code' => '27', 'name' => '大商海運'],\n ['code' => '28', 'name' => '【離島】'],\n ['code' => '29', 'name' => '使用禁止'],\n ['code' => '30', 'name' => '近鉄第一トラック'],\n ['code' => '31', 'name' => '信州名鉄'],\n ['code' => '32', 'name' => '使用禁止'],\n ['code' => '33', 'name' => '第一貨物'],\n ['code' => '34', 'name' => '日本新潟運輸'],\n ['code' => '35', 'name' => '福井配送'],\n ['code' => '36', 'name' => 'マルニ'],\n ['code' => '37', 'name' => 'ヨナイザワ'],\n ['code' => '38', 'name' => '札幌急配'],\n ['code' => '39', 'name' => '京都通運'],\n ['code' => '40', 'name' => 'シズナイロゴス'],\n ['code' => '41', 'name' => '八潮運輸'],\n ['code' => '42', 'name' => '松運'],\n ['code' => '43', 'name' => '曙商事'],\n ['code' => '44', 'name' => '東栄運送'],\n ['code' => '45', 'name' => '三八五流通'],\n ['code' => '46', 'name' => '博運社'],\n ['code' => '47', 'name' => '九州産交運輸'],\n ['code' => '48', 'name' => '千石西濃運輸'],\n ['code' => '49', 'name' => '宮崎運輸'],\n ['code' => '50', 'name' => '野母商船'],\n ['code' => '51', 'name' => '南国海運'],\n ['code' => '52', 'name' => '壱岐海運'],\n ['code' => '53', 'name' => '松岡満'],\n ['code' => '54', 'name' => '新潟運輸'],\n ['code' => '55', 'name' => 'トナミ運輸'],\n ['code' => '56', 'name' => '西武運輸'],\n ['code' => '57', 'name' => '山陽自動車'],\n ['code' => '58', 'name' => '名鉄運輸'],\n ['code' => '59', 'name' => '小林運輸'],\n ['code' => '60', 'name' => 'クロネコメール便'],\n ['code' => '61', 'name' => '北九州宮崎運送'],\n ['code' => '62', 'name' => 'ナビックス'],\n ['code' => '63', 'name' => '札樽自動車'],\n ['code' => '64', 'name' => '月寒運輸'],\n ['code' => '65', 'name' => 'ネコポス'],\n ['code' => '66', 'name' => '日硝ハイウエー'],\n ];\n\n $date_data = [\n 'created_at' => 20200101,\n 'created_by' => 1,\n 'updated_at' => 20200101,\n 'updated_by' => 1,\n 'deleted_at' => null,\n 'deleted_by' => null\n ];\n\n foreach ($transport_data as $value) {\n $transport_array[] = array_merge($value, $date_data);\n }\n\n // 扱便マスタテーブル\n DB::table('transport')->insert($transport_array);\n }", "private function Zapis_jednu_kolizi() { \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n//echo \"<hr><br>* v Zapis_jednu_kolizi:\";\r\n\r\n //vyberu kolizi z uc_kolize_table pokud jiz existuje\r\n $query= \"SELECT * FROM uc_kolize_table WHERE id_ucastnik =\" . $this->id_ucastnik . \" and id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK ;\r\n //echo \"<br>*dotaz v Zapis_jednu_kolizi: \" . $query;\r\n $data = $dbh->prepare($query)->execute();\r\n //var_dump($data);\r\n \r\n if ($data) {\r\n $zaznam_kolize = $data->fetch() ; //vemu prvni (je predpoklad ze je jen jedna)\r\n if ($zaznam_kolize) {\r\n //echo \"<br>kolize je - budu prepisovat\"; //budu prepisovat\r\n $query1 = \"UPDATE uc_kolize_table set \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1 \" . \r\n \"WHERE id_uc_kolize_table =\" . $zaznam_kolize['id_uc_kolize_table'];\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute(); \r\n \r\n }\r\n else {\r\n //echo \"<br>kolize neni - budu vkladat\"; //budu vkladat\r\n $query1 = \"INSERT uc_kolize_table set \" . \r\n \"id_ucastnik= \" . $this->id_ucastnik . \", \" .\r\n \"id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK . \", \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1, date_vzniku=now() \" ;\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute();\r\n \r\n }\r\n } \r\n\r\n//echo \"<hr>\";\r\n}", "public static function dodajArtikelVKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n // ce narocilo ze obstaja mu samo povecamo kolicino \n // drugace narocilo ustvarimo\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n\n if (!$narocilo) {\n\n $id_narocila = NarocilaDB::insert($id, $status);\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $id_narocila);\n\n } else {\n\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n if (!$podrobnost_narocila) {\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $narocilo[\"id\"]);\n } else {\n PodrobnostiNarocilaDB::edit($id_artikla, $podrobnost_narocila[\"kolicina\"] + 1, $narocilo[\"id\"]); \n } \n }\n\n echo ViewHelper::redirect(BASE_URL);\n\n }", "public function loket($mode=\"one\",$param=\"\")\n\t{\n\t\t$nama_instansi = License::GetOrganization();\n\t\t$address = License::GetAddress();\n\t\t$telp = License::GetPhone();\n\t\t$daftar_poli_rs = $this->db->get('m_poli')->result_object();\n\t\t$daftar_poli = ['5'=>'Poli Kesehatan Awal'];\n\t\t$daftar_poli_all = [''=>'--PILIH POLI--'];\n\n\t\tforeach ($daftar_poli_rs as $poli) {\n\t\t\t$daftar_poli_all[$poli->id] = $poli->nama;\n\t\t}\n\t\t$dd_poli = form_dropdown('id_poli',$daftar_poli,'5','class=\"form-control\" v-model=\"form.id_poli\" @change=\"onChangePoli()\" :disabled=\"form.id_antrian==\\'\\'\"');\n\t\t$dd_poli_all = form_dropdown('id_poli',$daftar_poli_all,'','class=\"form-control\" v-model=\"form.id_poli\" @change=\"onChangePoli()\" :disabled=\"form.id_antrian==\\'\\'\"');\n\t\t$data = [\n\t\t\t'lokets' => $this->db->get('m_loket')->result_object(),\n\t\t\t'nama_instansi' => $nama_instansi,\n\t\t\t'alamat_instansi' => $address,\n\t\t\t'telp' => $telp,\n\t\t\t'dd_poli'=>$dd_poli,\n\t\t\t'dd_poli_all'=>$dd_poli_all,\n\t\t\t'mode'=>$mode,\n\t\t\t'ws_server'=> $this->config->item('ws_server')\n\t\t\t\n\t\t];\n\t\tswitch ($mode) {\n\t\t\tcase 'multiple':\n\t\t\t\tif(empty($param)){\n\t\t\t\t\tdie('invalid param');\n\t\t\t\t}\n\t\t\t\t$data['jps'] = $this->m_jenis_pendaftaran->get_jenis_pendaftaran();\n\t\t\t\t$data['jp_id'] = $param;\n\t\t\tbreak;\n\t\t\tcase 'merge':\n\t\t\t\tif(empty($param)){\n\t\t\t\t\tdie('invalid param');\n\t\t\t\t}\n\t\t\t\t$data['jps'] = $this->m_jenis_pendaftaran->get_jenis_pendaftaran();\n\t\t\t\t$data['jp_ids'] = $param;\n\t\t\t\t$data['jp_ids_arr'] = explode('_',$param);\n\t\t\t\t$data['jp_ids_cx'] = count($data['jp_ids_arr']);\n\t\t\t\t// print_r($data['jp_ids_cx']);\n\t\t\t\t// die();\n\t\t\t\t$data['grid_width'] = 12/$data['jp_ids_cx'] ;\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\t\t}\n\t\t$this->load->view('adm/loket/'.$mode, $data);\n\t\n\t}", "function cl_rhlocaltrab() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhlocaltrab\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function edytujPunktAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$this->_helper->viewRenderer('form', null, true);\n\n\t\t\t// Odczytanie id\n\t\t\t$id = (int)$this->getRequest()->getParam('id');\n\t\t\t$id_inwest = (int)$this->_request->getParam('inwestycja');\n\t\t\t$this->view->back = '<div class=\"back\"><a href=\"'.$this->view->baseUrl.'/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/\">Wróć do listy</a></div>';\n\t\t\t$this->view->info = '<div class=\"info\">Wymiary obrazka: szerokość <b>1165px</b> / wysokość <b>655px</b></div>';\n\t\t\t\n\t\t\t$wpis = $this->view->mapa = $db->fetchRow($db->select()->from('inwestycje_markery')->where('id = ?', $id));\n\t\t\t$this->view->pagename = \" - Edytuj lokalizacje: \".$wpis->nazwa;\n\t\t\t$this->view->tinymce = \"1\";\n\n\t\t\t$form = new Form_LokalizacjaForm();\n\t\t\t$this->view->form = $form;\n\n\t\t\t// Załadowanie do forma\n\t\t\t$array = json_decode(json_encode($wpis), true);\n\t\t\t$form->populate($array);\n\n\t\t\t\t//Akcja po wcisnieciu Submita\n\t\t\t\tif ($this->_request->getPost()) {\n\n\t\t\t\t\t//Odczytanie wartosci z inputów\n\t\t\t\t\t$formData = $this->_request->getPost();\n\t\t\t\t\tunset($formData['MAX_FILE_SIZE']);\n\t\t\t\t\tunset($formData['obrazek']);\n\t\t\t\t\tunset($formData['submit']);\n\t\t\t\t\t$formData['id_inwest'] = $id_inwest;\n\t\t\t\t\t\n\t\t\t\t\t$obrazek = $_FILES['obrazek']['name'];\n\t\t\t\t\t$plik = zmiana($formData['nazwa']).'_'.$id_inwest.'.'.zmiennazwe($obrazek);\n\n\n\t\t\t\t\t//Sprawdzenie poprawnosci forma\n\t\t\t\t\tif ($form->isValid($formData)) {\n\n\t\t\t\t\t$db->update('inwestycje_markery', $formData, 'id = '.$id);\n\n\t\t\t\t\tif ($obrazek) {\n\t\t\t\t\t\tunlink(FILES_PATH.\"/inwestycje/lokalizacja/\".$wpis->plik);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tmove_uploaded_file($_FILES['obrazek']['tmp_name'], FILES_PATH.'/inwestycje/lokalizacja/'.$plik);\n\t\t\t\t\t\t$upfile = FILES_PATH.'/inwestycje/lokalizacja/'.$plik;\n\t\t\t\t\t\tchmod($upfile, 0755);\n\t\t\t\t\t\t\n\t\t\t\t\t\trequire_once 'kCMS/Thumbs/ThumbLib.inc.php';\n\n\t\t\t\t\t\t$options = array('jpegQuality' => 80);\n\t\t\t\t\t\t$thumb = PhpThumbFactory::create($upfile, $options)->adaptiveResizeQuadrant(1165, 655)->save($upfile);\n\n\t\t\t\t\t\t$dataImg = array('plik' => $plik);\n\t\t\t\t\t\t$db->update('inwestycje_markery', $dataImg, 'id = '.$id);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$this->_redirect('/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/');\n\n\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t//Wyswietl bledy\t\n\t\t\t\t\t$this->view->message = '<div class=\"error\">Formularz zawiera błędy</div>';\n\t\t\t\t\t$form->populate($formData);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function obtenerListaPaises() { \r\n\r\n //objeto que maneja los requerimientos/peticiones\r\n $request = new simpleRest();\r\n //obtiene los datos de la peticion\r\n //$json = $request->getHttpRequestBody();\r\n //objeto que maneja las codificaciones/descodificaciones\r\n $handler = new requestRestHandler();\r\n \r\n //if (filter_var($username, FILTER_VALIDATE_EMAIL)) { \r\n $consulDB = new consultasDB(); \r\n //$this->mostrarRespuesta($this->convertirJson($respuesta), 200); \r\n $responsePaises = $consulDB->obtenerListaPaises();\r\n\r\n //echo $responseUsuario;\r\n //$datosRespuesta = (array)$handler->decodeJson($responsePaises);\r\n $datosRespuesta = $responsePaises;\r\n //$datosRespuesta = $handler->decodeJson($responsePaises);\r\n\r\n if (!isset($datosRespuesta[\"error\"])){\r\n //$respuesta['usuario'] = $username;\r\n $responseObtenerPaises[\"error\"] = \"false\";\r\n $responseObtenerPaises[\"status\"] = \"OK\";\r\n $responseObtenerPaises[\"message\"] = \"SUCCESS\";\r\n $responseObtenerPaises['fecha'] = ObtenerFecha(); //Obtiene la fecha actual\r\n //Aqui se implementa el manejo del token\r\n $responseObtenerPaises[\"respuesta\"] = $datosRespuesta;\r\n\r\n }\r\n else {\r\n //Hay posiblidades: 1 - usuario no existe 2 - clave invalida\r\n $responseObtenerPaises[\"error\"] = \"true\";\r\n $responseObtenerPaises[\"status\"] = \"error\";\r\n $responseObtenerPaises[\"message\"] = $datosRespuesta['error'];\r\n $responseObtenerPaises['fecha'] = \"\";\r\n $responseObtenerPaises[\"respuesta\"] = \"{}\";\r\n }\r\n\r\n $consulDB = null;\r\n //enviar respuesta\r\n return $responseObtenerPaises;\r\n\r\n //}\r\n \r\n }", "function cl_tipovistoriasrec() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tipovistoriasrec\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "private function Zapis_kolize_formulare($pole, $idcka_skolizi, $iducast, $formular) { \r\n//znevalidneni vsech kolizi pro ucastnika a tento formular\r\n self::Znevalidni_kolize_ucastnika_formulare($iducast, $formular); \r\n\r\n//zapis do uc_kolize_table pro kazdou nastalou s_kolizi\r\n foreach ($idcka_skolizi as $id_skolize) { //zapisovana policka jsou v $pole\r\n //echo \"policko: \" . $pole['uc_kolize_table§' . $id_skolize . '_revidovano'];\r\n $kolize = new Projektor2_Table_UcKolizeData ($iducast, (int)$id_skolize,\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano'],\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano_pozn'],\r\n null, 1,\r\n null,null,null,null,null) ;\r\n // echo \"v Zapis_kolize_temp\" . var_dump ($kolize);\r\n $kolize->Zapis_jednu_kolizi(); //kdyz je v tabulce uc_kolize_table, tak prepsat, kdyz neni, tak insert\r\n }\r\n\r\n}", "function cek_dpl(){\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t$ta = $this->session->userdata('ta');\n\t\t$smt = $this->session->userdata('smt');\n\t\t# cek data beban kerja\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/cek_data_bkd';\n\t\t$parameter = array('api_search' => array($kd_dosen, 'C', $ta, $smt));\n\t\t$data['jml'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t#echo $data['jml']; print_r($parameter); die();\n\t\tif ($data['jml'] == 0){\n\t\t\t$url\t\t= 'http://service.uin-suka.ac.id/servsiasuper/index.php/';\n\t\t\t$parameter\t= array('api_kode' => 1000, 'api_subkode' => 1, 'api_search' => array($kd_dosen));\n\t\t\t$data\t\t= $this->mdl_bkd->get_api_kkn('kkn_admin/data_dpl_kkn', 'json', 'POST', $parameter);\n\t\t\tif(count($data) > 0){\n\t\t\t\t$tema = $data[0]['TEMA_KKN'];\n\t\t\t\t$angkatan = $data[0]['ANGKATAN'];\n\t\t\t\t$periode = $data[0]['PERIODE'];\n\t\t\t\t$ta = $data[0]['TA'];\n\t\t\t\t$tgl_mulai = $data[0]['TANGGAL_MULAI'];\n\t\t\t\t$tgl_selesai = $data[0]['TANGGAL_SELESAI'];\n\t\t\t\t$kelompok = $data[0]['JUM_KELOMPOK'];\n\t\t\t\t# BEBAN KERJA\n\t\t\t\t$jenis_kegiatan = \"Menjadi Dosen Pembimbing Lapangan (DPL) KKN, Angkatan \".$angkatan.\", Periode \".$periode.\", dengan Tema \\\"\".$tema.\"\\\", Kelompok \".$kelompok;\n\t\t\t\t$masa_penugasan = \"1 Semester\";\n\t\t\t\t$bukti_penugasan = '-'; $bkt_dokumen = '-';\n\t\t\t\t$sks_rule = 1;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia';\n\t\t\t\t$parameter = array('api_search' => array($kd_dosen, 'C', $jenis_kegiatan, $bukti_penugasan, $sks_rule, $masa_penugasan, $sks_rule, $bkt_dokumen, $ta, $smt, 'LANJUTKAN','100'));\n\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\tif($simpan){\n\t\t\t\t\t# get last id beban kerja \n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_current_data_tersimpan';\n\t\t\t\t\t$parameter\t= array('api_search' => array('BKD.BKD_BEBAN_KERJA','KD_BK'));\n\t\t\t\t\t$getid = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter); \n\t\t\t\t\t#simpan data pengabdian\n\t\t\t\t\t$sumber_dana = '-'; $jumlah_dana = 0;\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pengabdian';\n\t\t\t\t\t$parameter\t= array('api_search' => array($getid, $tgl_mulai, $tgl_selesai, $tema, $sumber_dana, $jumlah_dana, '50'));\n\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t}\n\t\t\t\tredirect('bkd/dosen/bebankerja/data/C');\n\t\t\t}else{\n\t\t\t\tredirect('bkd/dosen/bebankerja/data/C');\n\t\t\t}\n\t\t}else{\n\t\t\tredirect('bkd/dosen/bebankerja/data/C');\t\t\n\t\t}\n\t}", "public function show($id)\n {\n //\n try {\n //code...\n $respuesta = new RespuestaWebTO();\n $lotedto = new LoteDto();\n $ubigeodetalledto = new UbigeoDetalleDto();\n $ubigeodto = new UbigeoDto();\n\n $lote = Lote::select('lote.id', 'nombres', 'lote.codigo','precioadquisicion', 'preciocontrato',\n 'largo', 'ancho', 'habilitacionurbana.nombre', 'habilitacionurbana.siglas',\n 'ubigeo.ubigeo as nombrehabilitacionurbana', 'lote.direccion', 'lote.latitud', \n 'lote.longitud', 'descripcion', 'path', 'pathArchivos', 'lote.foto', 'lote.estado', 'contrato', \n 'estadocontrato', 'referencia', 'lote.persona_id as idpersona', 'lote.ubigeo_id as idubigeo',\n 'ubigeo.habilitacionurbana_id as idhabilitacionurbana')\n ->join('persona', 'persona.id', '=', 'lote.persona_id')\n ->join('ubigeo', 'ubigeo.id', '=', 'lote.ubigeo_id')\n ->join('habilitacionurbana', 'habilitacionurbana.id', '=', 'ubigeo.habilitacionurbana_id')\n ->where('lote.id','=',$id)->first();\n if ($lote !== null && $lote !== '') {\n $lotedto->setLote($lote);\n $persona = Persona::FindOrFail($lote->idpersona);\n $lotedto->setPersona($persona);\n\n // habilitacionurbana\n $habilitacionurbana = HabilitacionUrbana::FindOrFail($lote->idhabilitacionurbana);\n $lotedto->setHabilitacionUrbana($habilitacionurbana);\n //end habilitacionurbana\n\n // ubigeo\n $ubigeo = Ubigeo::FindOrFail($lote->idubigeo); // siempre es el ubigeo distrito\n $ubigeodto->setUbigeo($ubigeo);\n $codigo = $ubigeo->codigo;\n $subsdepartamento = substr($codigo, 0, 2).\"00000000\";\n $subsprovincia = substr($codigo, 0, 4).\"000000\";\n $subsdistrito = substr($codigo, 0, 6).\"0000\";\n\n $ubigeos = Ubigeo::whereIn('codigo', [$subsdepartamento, $subsprovincia, $subsdistrito])->get();\n\n $departamento = $ubigeos[0];\n $provincia = $ubigeos[1];\n $distrito = $ubigeos[2];\n $ubigeodetalledto->setDepartamento($departamento);\n $ubigeodetalledto->setProvincia($provincia);\n $ubigeodetalledto->setDistrito($distrito);\n $ubigeodetalledto->setUbigeo($ubigeodto);\n $lotedto->setUbigeo($ubigeodetalledto);// ingreso del ubigeo\n // end ubigeo\n\n $fotos = Foto::select('foto.id', 'foto.nombre', 'foto.foto', 'foto.detalle', 'foto.estado')\n ->join('lotefoto', 'lotefoto.foto_id', '=', 'foto.id')\n ->where('lotefoto.lote_id', $id)->get();\n $lotedto->setFotos($fotos);\n // archivos\n $archivos = LoteArchivo::select('lotearchivo.id', 'lotearchivo.lote_id', 'lotearchivo.nombre',\n 'lotearchivo.archivo', 'lotearchivo.tipoarchivo', 'lotearchivo.estado')\n ->join('lote', 'lote.id', '=', 'lotearchivo.lote_id')\n ->where('lotearchivo.lote_id', $id)->get();\n $lotedto->setArchivos($archivos); // ingreso de los archivos del lote\n $respuesta->setEstadoOperacion('EXITO');\n $respuesta->setExtraInfo($lotedto);\n } else {\n $respuesta->setEstadoOperacion('ADVERTENCIA');\n $respuesta->setOperacionMensaje('No se encontraron lotes');\n }\n } catch (Exception $e) {\n $respuesta->setEstadoOperacion('ERROR');\n $respuesta->setOperacionMensaje($e->getMessage());\n } catch (QueryException $qe) {\n $respuesta->setEstadoOperacion('ERROR');\n $respuesta->setOperacionMensaje($qe->getMessage());\n }\n return response()->json($respuesta, 200); // 201\n }", "function getKontaktStamm($id,$pfad=\"\") {\n $sql=\"select C.*,E.login from contacts C left join employee E on C.cp_employee=E.id where C.cp_id=$id\";\n $rs=$GLOBALS['dbh']->getAll($sql);\n if(!$rs) {\n $daten=false;\n } else {\n $firma=\"Einzelperson\";\n $tab=\"\";\n $cnr=\"\";\n if (!empty($rs[0][\"cp_cv_id\"])) { // gehört zu einem Kunden oder Lieferanten\n $sql=\"select id,name,department_1,customernumber,language_id from customer where id=\".$rs[0][\"cp_cv_id\"];\n $rs1=$GLOBALS['dbh']->getAll($sql);\n if (empty($rs1[0][\"name\"])) { // nicht zu Kunde sondern zu Lieferant\n $sql=\"select id,name,department_1,vendornumber,language_id from vendor where id=\".$rs[0][\"cp_cv_id\"];\n $rs1=$GLOBALS['dbh']->getAll($sql);\n $tab=\"V\";\n $cnr=$rs1[0][\"vendornumber\"];\n $firma=$rs1[0][\"name\"];\n $language_id=$rs1[0][\"language_id\"];\n } else {\n $tab=\"C\";\n $cnr=$rs1[0][\"customernumber\"];\n $firma=$rs1[0][\"name\"];\n $language_id=$rs1[0][\"language_id\"];\n }\n }\n $daten=$rs[0];\n if ($daten[\"cp_grafik\"]) {\n $image=\"$pfad./dokumente/\".$_SESSION[\"dbname\"].\"/$tab$cnr/$id/kopf$id.\".$daten[\"cp_grafik\"];\n clearstatcache();\n if (file_exists($image)) {\n $size=@getimagesize($image);\n $daten[\"size\"]=$size[3];\n if ($size[1]>$size[0]) {\n $faktor=ceil($size[1]/70);\n } else {\n $faktor=ceil($size[0]/120);\n }\n $breite=floor($size[0]/$faktor);\n $hoehe=floor($size[1]/$faktor);\n $daten[\"icon\"]=\"width=\\\"$breite\\\" height=\\\"$hoehe\\\"\";\n } else {\n $daten[\"icon\"]=\"width=\\\"75\\\" height=\\\"100\\\"\";\n }\n }\n $daten[\"Firma\"] = $firma;\n $daten[\"Department_1\"]=$rs1[0][\"department_1\"];\n $daten[\"tabelle\"] = $tab;\n $daten[\"nummer\"]=$cnr;\n $daten[\"language_id\"]=$language_id;\n }\n return $daten;\n}", "public function get_signalisation(){retrun($id_local_signalisation); }", "public function zpracuj($parametry) {\r\n $akce = \"new\";\r\n\r\n // bude-li odeslano take z formulare ma _POST prednost pred URL\r\n if (isset($_POST['akce'])&& (!empty($_POST['akce']))) {\r\n $akce = $_POST['akce'];\r\n } else {\r\n if (isset($parametry[0]) and in_array($parametry[0], ObjektKontroler::$typakce))\r\n $akce = $parametry[0];\r\n };\r\n\r\n if ((!isset($_POST['list'])) and isset($parametry[1]))\r\n $_POST['list'] = $parametry[1];\r\n\r\n\t\t//Debug::p($akce);\r\n\r\n $this->pohled = 'nabidka'; // Nastavení implicitni šablony\r\n // Hlavička stránky\r\n $this->hlavicka['titulek'] = 'Editor nabidky';\r\n $nab = new NhlavickaClass();\r\n\t\t$nab->data[\"nazev\"]=\"Nabidka XY\";\r\n\t\t$nab->data[\"id\"] = $nab->insert($nab->data);\r\n\t\t$nab->data[\"nazev\"]=\"Nabidka \".$nab->data[\"id\"] ;\r\n // Byl odeslán formulář\r\n if ($akce == \"new\") {\r\n\t\t\tif ( empty($_POST['list'])){\r\n\r\n\t\t\t}else{\r\n\t\t\t\t//je to seznam objektu oddelenych carkou \"15,12,78\"\r\n\t\t\t\t$polozky = explode(\",\",$_POST['list']);\r\n\t\t\t\tforeach ($polozky as $polID){\r\n\t\t\t\t\t$obj = new ObjektClass();\r\n\t\t\t\t\t$obj->get($polID);\r\n\t\t\t\t\t$pol = new NpolozkaClass();\r\n\t\t\t\t\t$pol->setByObjekt($obj);\r\n\t\t\t\t\t$pol->insert();\r\n\t\t\t\t}\r\n\t\t\t}\r\n $this->data = $nab->data; // Proměnné pro šablonu\r\n $this->data['titulek'] = 'Nová nabídka';\r\n\t\t\t// po odeslani formulare uloz\r\n $this->data['akce'] = 'insert';\r\n\t\t\t// $akce = 'insert'; // po odeslani formulare uloz\r\n }\r\n\r\n if ($akce == \"view\") {\r\n $nab->get($parametry[1]);\r\n $nab->data = array_intersect_key(array_merge(array_flip(NhlavickaClass::$sloupce), $nab->data), $nab->data);\r\n $this->data = $nab->data;\r\n $this->data['akce'] = 'save';\r\n $this->data['titulek'] = 'Detail nabídky ' . $nab->data['nazev'];\r\n Zprava::zobraz('Objekt k detailu byl vybrán');\r\n $this->pohled = 'DetailObjekt';\r\n }\r\n if ($akce == \"ObnovSkryj\") {\r\n DB::proved(\"UPDATE objekt SET status = (- status) WHERE objekt_id = ? \", array($parametry[1]));\r\n Zprava::zobraz('Objekt byl zneplatněn');\r\n $this->presmeruj('/objekt/edit/' . $parametry[1]);\r\n }\r\n if ($akce == \"delete\") {\r\n DB::proved(\"DELETE FROM obr WHERE id_objekt= ? \", array($parametry[1]));\r\n\t\t\tDB::proved(\"DELETE FROM objekt WHERE objekt_id = ? \", array($parametry[1]));\r\n Zprava::zobraz('Objekt byl smazán');\r\n $this->presmeruj('/');\r\n }\r\n\r\n\r\n if ($akce == \"insert\") {\r\n\r\n $nab->data = array_intersect_key($_POST, array_flip(NhlavickaClass::$sloupce));\r\n $nab->data['status'] = 1;\r\n $this->data = $nab->data;\r\n // zaloz noveho\r\n $this->data['objekt_id'] = $nab->insert($nab->data);\r\n $this->data['titulek'] = 'Editace objektu';\r\n // budu ho pak editovat\r\n $this->data['akce'] = 'edit';\r\n Zprava::zobraz('Objekt byl založen');\r\n $this->presmeruj('/nabidka/edit/' . $this->data['id']);\r\n }\r\n\r\n if ($akce == \"edit\") {\r\n //najdu objekt podle objekt_id\r\n $obj->get($_POST['objekt_id']);\r\n $obj->data = array_intersect_key(array_merge(array_flip(NhlavickaClass::$sloupce), $obj->data), $obj->data);\r\n $this->data = $obj->data;\r\n $this->data['akce'] = 'save';\r\n $this->data['titulek'] = 'Editace objektu ' . $obj->data['nazev'];\r\n Zprava::zobraz('Objekt byl vybrán');\r\n }\r\n if ($akce == \"save\") {\r\n\t\t\t//najdu objekt podle objekt_id\r\n\t\t\t// $obj->get($_POST['objekt_id']);\r\n $obj->data = array_intersect_key($_POST, array_flip(NhlavickaClass::$sloupce));\r\n $this->data = $obj->data;\r\n $obj->data['status'] = 2;\r\n $obj->update($obj->data);\r\n $this->data['akce'] = 'edit';\r\n $this->data['titulek'] = 'Editace objektu ' . $obj->data['nazev'];\r\n Zprava::zobraz('Objekt byl upraven');\r\n\t\t\t// //pridam obrazky udelam to pres Ajax\r\n\t\t\t// $img = new ObrClass();\r\n\t\t\t// $img->data['id_objekt'] = $obj->data['objekt_id'];\r\n\t\t\t// $img->insertFILES();\r\n $this->presmeruj('/nabidka/edit/' . $this->data['objekt_id']);\r\n }\r\n\r\n if ($akce == \"seznam\") {\r\n //seznam vsech objektu\r\n $obj->select( ' status >= ? ', Array(0) );\r\n // Debug::p($obj);\r\n $this->data['seznam'] = $obj->data;\r\n $this->data['akce'] = 'seznam';\r\n $this->data['titulek'] = 'Seznam objektů';\r\n Zprava::zobraz('Vybráno ' . count($this->data['seznam']) . ' objektů');\r\n // $this->presmeruj('/objekt');\r\n $this->pohled = 'objekty';\r\n if (isset($parametry[1]) and $parametry[1] === 'T')\r\n $this->pohled = 'objektyTab';\r\n }\r\n }", "public function __construct()\n {\n $this->Sendws = 'http://celmediainfo.cl/celmedia_chile/2138_WSDLCLOPCorpbanca/WS_MensajeriaCLOPCorpbanca.php?wsdl';\n $this->CanjeWs = 'http://190.196.23.186/clop/ws/server.php?wsdl';\n $this->OpUrlWs = 'http://200.68.3.74/toolsbkp/WSDLGetOper/wsdl.php?wsdl';\n\n /* WebService Server Route For Prestashop */\n $this->WebServiceServer = 'http://190.196.23.184/clop_otpc_web_prestashop_desa/wscl/wsclotpc_server_ps.php?wsdl';\n\n /* Promo Service */\n $this->WebServiceUser = 'tienda_ps';\n $this->WebServicePassword = '0x552A6798E1F1BCF715EFDB1E1DDC0874';\n $this->WebServiceOrigen = 'Login WEB OTPC';\n $this->WebServiceIdProveedor = '8';\n\n /* Ecommerce Home Url for Redirects */\n $this->ecommerceHomeUrl = 'http://ecorpbancadesa.celmedia.cl/';\n\n /* Urls consumibles for Transbank */\n $this->urlReturn = \"http://192.168.1.192/getResult\";\n $this->urlFinal = \"http://192.168.1.192/end\";\n $this->urlFracaso = \"http://ecorpbancadesa.celmedia.cl/fracaso\";\n $this->urlExito = \"http://ecorpbancadesa.celmedia.cl/module/celmediapago/validation\";\n $this->urlApi = \"http://192.168.1.192\";\n\n /* Celmedia Pago */\n $this->WebServiceUserCelPago = 'celmediapago';\n $this->WebServicePasswordCelPago = '0x552A6798E1F1BCF715EFDB1E1DDC0874';\n $this->WebServiceOrigenCelPago = 'ECOMMERCE_CELMEDIAPAGO';\n $this->WebServiceIdProveedorCelPago = '9';\n $this->WebServiceUniCanjeCelPago = '0';\n $this->WebServiceIdGrupoCelPago = '10';\n $this->WebServiceIdCategoriaCelPago = '36';\n $this->WebServiceIdSubCategoriaCelPago = '187';\n $this->WebServiceTdvOtpcCelPago = '31';\n $this->WebServiceTpTransactionCelPago = 'TR_NORMAL_WS';\n\n /* Other WebServices Credentials */\n $this->WSCLOTPC_Tiempo_OTPC = 30;\n\n $this->WSDL_SEND_ABOUT = 'Clave acceso canje on-line CORPUNTOS.';\n $this->WSDL_SEND_FROM = 'Canje on-line CORPUNTOS';\n $this->WSDL_SEND_HOST = 'mail.misp.cl';\n\n $this->WSDL_SEND_USER = '[email protected]';\n $this->WSDL_SEND_PASS = 'p$qg5*/';\n $this->WSDL_SEND_MAIL = '[email protected]';\n\n $this->WSDL_SEND_USER_PS = '[email protected]';\n $this->WSDL_SEND_PASS_PS = '8a4_27j';\n $this->WSDL_SEND_MAIL_PS = '[email protected]';\n\n /* Points by pesos */\n $this->tasa_conv_CI = '3';\n\n /* Keys And Variables for Transbank */\n $this->TransbankEnvironment = \"INTEGRACION\";\n $this->TransbankCommerceCode = \"597020000541\";\n\n $this->TransbankPrivateKey =\n \"-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEA0ClVcH8RC1u+KpCPUnzYSIcmyXI87REsBkQzaA1QJe4w/B7g\n6KvKV9DaqfnNhMvd9/ypmGf0RDQPhlBbGlzymKz1xh0lQBD+9MZrg8Ju8/d1k0pI\nb1QLQDnhRgR2T14ngXpP4PIQKtq7DsdHBybFU5vvAKVqdHvImZFzqexbZjXWxxhT\n+/sGcD4Vs673fc6B+Xj2UrKF7QyV5pMDq0HCCLTMmafWAmNrHyl6imQM+bqC12gn\nEEAEkrJiSO6P/21m9iDJs5KQanpJby0aGW8mocYRHDMHZjtTiIP0+JAJgL9KsH+r\nXdk2bT7aere7TzOK/bEwhkYEXnMMt/65vV6AfwIDAQABAoIBAHnIlOn6DTi99eXl\nKVSzIb5dA747jZWMxFruL70ifM+UKSh30FGPoBP8ZtGnCiw1ManSMk6uEuSMKMEF\n5iboVi4okqnTh2WSC/ec1m4BpPQqxKjlfrdTTjnHIxrZpXYNucMwkeci93569ZFR\n2SY/8pZV1mBkZoG7ocLmq+qwE1EaBEL/sXMvuF/h08nJ71I4zcclpB8kN0yFrBCW\n7scqOwTLiob2mmU2bFHOyyjTkGOlEsBQxhtVwVEt/0AFH/ucmMTP0vrKOA0HkhxM\noeR4k2z0qwTzZKXuEZtsau8a/9B3S3YcgoSOhRP/VdY1WL5hWDHeK8q1Nfq2eETX\njnQ4zjECgYEA7z2/biWe9nDyYDZM7SfHy1xF5Q3ocmv14NhTbt8iDlz2LsZ2JcPn\nEMV++m88F3PYdFUOp4Zuw+eLJSrBqfuPYrTVNH0v/HdTqTS70R2YZCFb9g0ryaHV\nTRwYovu/oQMV4LBSzrwdtCrcfUZDtqMYmmZfEkdjCWCEpEi36nlG0JMCgYEA3r49\no+soFIpDqLMei1tF+Ah/rm8oY5f4Wc82kmSgoPFCWnQEIW36i/GRaoQYsBp4loue\nvyPuW+BzoZpVcJDuBmHY3UOLKr4ZldOn2KIj6sCQZ1mNKo5WuZ4YFeL5uyp9Hvio\nTCPGeXghG0uIk4emSwolJVSbKSRi6SPsiANff+UCgYEAvNMRmlAbLQtsYb+565xw\nNvO3PthBVL4dLL/Q6js21/tLWxPNAHWklDosxGCzHxeSCg9wJ40VM4425rjebdld\nDF0Jwgnkq/FKmMxESQKA2tbxjDxNCTGv9tJsJ4dnch/LTrIcSYt0LlV9/WpN24LS\n0lpmQzkQ07/YMQosDuZ1m/0CgYEAu9oHlEHTmJcO/qypmu/ML6XDQPKARpY5Hkzy\ngj4ZdgJianSjsynUfsepUwK663I3twdjR2JfON8vxd+qJPgltf45bknziYWvgDtz\nt/Duh6IFZxQQSQ6oN30MZRD6eo4X3dHp5eTaE0Fr8mAefAWQCoMw1q3m+ai1PlhM\nuFzX4r0CgYEArx4TAq+Z4crVCdABBzAZ7GvvAXdxvBo0AhD9IddSWVTCza972wta\n5J2rrS/ye9Tfu5j2IbTHaLDz14mwMXr1S4L39UX/NifLc93KHie/yjycCuu4uqNo\nMtdweTnQt73lN2cnYedRUhw9UTfPzYu7jdXCUAyAD4IEjFQrswk2x04=\n-----END RSA PRIVATE KEY-----\";\n $this->TransbankPublicCert=\"-----BEGIN CERTIFICATE-----\nMIIDujCCAqICCQCZ42cY33KRTzANBgkqhkiG9w0BAQsFADCBnjELMAkGA1UEBhMC\nQ0wxETAPBgNVBAgMCFNhbnRpYWdvMRIwEAYDVQQKDAlUcmFuc2JhbmsxETAPBgNV\nBAcMCFNhbnRpYWdvMRUwEwYDVQQDDAw1OTcwMjAwMDA1NDExFzAVBgNVBAsMDkNh\nbmFsZXNSZW1vdG9zMSUwIwYJKoZIhvcNAQkBFhZpbnRlZ3JhZG9yZXNAdmFyaW9z\nLmNsMB4XDTE2MDYyMjIxMDkyN1oXDTI0MDYyMDIxMDkyN1owgZ4xCzAJBgNVBAYT\nAkNMMREwDwYDVQQIDAhTYW50aWFnbzESMBAGA1UECgwJVHJhbnNiYW5rMREwDwYD\nVQQHDAhTYW50aWFnbzEVMBMGA1UEAwwMNTk3MDIwMDAwNTQxMRcwFQYDVQQLDA5D\nYW5hbGVzUmVtb3RvczElMCMGCSqGSIb3DQEJARYWaW50ZWdyYWRvcmVzQHZhcmlv\ncy5jbDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANApVXB/EQtbviqQ\nj1J82EiHJslyPO0RLAZEM2gNUCXuMPwe4OirylfQ2qn5zYTL3ff8qZhn9EQ0D4ZQ\nWxpc8pis9cYdJUAQ/vTGa4PCbvP3dZNKSG9UC0A54UYEdk9eJ4F6T+DyECrauw7H\nRwcmxVOb7wClanR7yJmRc6nsW2Y11scYU/v7BnA+FbOu933Ogfl49lKyhe0MleaT\nA6tBwgi0zJmn1gJjax8peopkDPm6gtdoJxBABJKyYkjuj/9tZvYgybOSkGp6SW8t\nGhlvJqHGERwzB2Y7U4iD9PiQCYC/SrB/q13ZNm0+2nq3u08ziv2xMIZGBF5zDLf+\nub1egH8CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAdgNpIS2NZFx5PoYwJZf8faze\nNmKQg73seDGuP8d8w/CZf1Py/gsJFNbh4CEySWZRCzlOKxzmtPTmyPdyhObjMA8E\nAdps9DtgiN2ITSF1HUFmhMjI5V7U2L9LyEdpUaieYyPBfxiicdWz2YULVuOYDJHR\nn05jlj/EjYa5bLKs/yggYiqMkZdIX8NiLL6ZTERIvBa6azDKs6yDsCsnE1M5tzQI\nVVEkZtEfil6E1tz8v3yLZapLt+8jmPq1RCSx3Zh4fUkxBTpUW/9SWUNEXbKK7bB3\nzfB3kGE55K5nxHKfQlrqdHLcIo+vdShATwYnmhUkGxUnM9qoCDlB8lYu3rFi9w==\n-----END CERTIFICATE-----\";\n $this->TransbankWebpayCert=\"-----BEGIN CERTIFICATE-----\nMIIDKTCCAhECBFZl7uIwDQYJKoZIhvcNAQEFBQAwWTELMAkGA1UEBhMCQ0wxDjAMBgNVBAgMBUNo\naWxlMREwDwYDVQQHDAhTYW50aWFnbzEMMAoGA1UECgwDa2R1MQwwCgYDVQQLDANrZHUxCzAJBgNV\nBAMMAjEwMB4XDTE1MTIwNzIwNDEwNloXDTE4MDkwMjIwNDEwNlowWTELMAkGA1UEBhMCQ0wxDjAM\nBgNVBAgMBUNoaWxlMREwDwYDVQQHDAhTYW50aWFnbzEMMAoGA1UECgwDa2R1MQwwCgYDVQQLDANr\nZHUxCzAJBgNVBAMMAjEwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAizJUWTDC7nfP\n3jmZpWXFdG9oKyBrU0Bdl6fKif9a1GrwevThsU5Dq3wiRfYvomStNjFDYFXOs9pRIxqX2AWDybjA\nX/+bdDTVbM+xXllA9stJY8s7hxAvwwO7IEuOmYDpmLKP7J+4KkNH7yxsKZyLL9trG3iSjV6Y6SO5\nEEhUsdxoJFAow/h7qizJW0kOaWRcljf7kpqJAL3AadIuqV+hlf+Ts/64aMsfSJJA6xdbdp9ddgVF\noqUl1M8vpmd4glxlSrYmEkbYwdI9uF2d6bAeaneBPJFZr6KQqlbbrVyeJZqmMlEPy0qPco1TIxrd\nEHlXgIFJLyyMRAyjX9i4l70xjwIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQBn3tUPS6e2USgMrPKp\nsxU4OTfW64+mfD6QrVeBOh81f6aGHa67sMJn8FE/cG6jrUmX/FP1/Cpbpvkm5UUlFKpgaFfHv+Kg\nCpEvgcRIv/OeIi6Jbuu3NrPdGPwzYkzlOQnmgio5RGb6GSs+OQ0mUWZ9J1+YtdZc+xTga0x7nsCT\n5xNcUXsZKhyjoKhXtxJm3eyB3ysLNyuL/RHy/EyNEWiUhvt1SIePnW+Y4/cjQWYwNqSqMzTSW9TP\n2QR2bX/W2H6ktRcLsgBK9mq7lE36p3q6c9DtZJE+xfA4NGCYWM9hd8pbusnoNO7AFxJZOuuvLZI7\nJvD7YLhPvCYKry7N6x3l\n-----END CERTIFICATE-----\";\n\n }", "function get_city($query,$type)\r\n{\r\nrequire_once 'REST_Ongkir.php';\r\n \r\n $rest = new REST_Ongkir(array(\r\n 'server' =&amp;gt; 'http://api.ongkir.info/'\r\n ));\r\n \r\n//ganti API-Key dibawah ini sesuai dengan API Key yang anda peroleh setalah mendaftar di ongkir.info\r\n $result = $rest-&amp;gt;post('city/list', array(\r\n 'query' =&amp;gt; $query,\r\n 'type' =&amp;gt; $type,\r\n 'courier' =&amp;gt; 'jne',\r\n 'API-Key' =&amp;gt; 'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456' ), 'JSON');\r\n \r\n try\r\n {\r\n $status = $result['status'];\r\n \r\n // Handling the data\r\n if ($status-&amp;gt;code == 0)\r\n {\r\n return $cities = $result['cities'];\r\n //print_r($cities);\r\n //foreach ($cities-&amp;gt;item as $item)\r\n //{\r\n //echo 'Kota: ' . $item . '&amp;lt;br /&amp;gt;';\r\n // }\r\n }\r\n else\r\n {\r\n echo 'Tidak ditemukan kota yang diawali &amp;quot;band&amp;quot;';\r\n }\r\n \r\n }\r\n catch (Exception $e)\r\n {\r\n echo 'Processing error.';\r\n }\r\n}", "function zwrocPytanieZKategorii($ID)\r\n\t{\r\n\t require(\"config.php\");\r\n\t require(\"Pytania.php\");\r\n\t $dbConnect1=new mysqli($Serwer,$DBUser,$DBPassword,$DBName);\r\n $zapytanie1=\"SELECT * FROM pytania WHERE IDKategorii='\".$ID.\"'\";\r\n $wynik =$dbConnect1->query($zapytanie1);\r\n $ile=$wynik->num_rows;\r\n\r\n $tablicaPytan=array();\r\n if($ile<1)\r\n {\r\n $idPytania=0;\r\n }\r\n else\r\n {\r\n for($a=0;$a<$ile;$a++)\r\n {\r\n $Pytanie = new Pytania(); \r\n $wiersz=$wynik->fetch_assoc(); \r\n $Pytanie->ID=$wiersz['IDPytania'];\r\n $Pytanie->Pytanie=$wiersz['Pytanie'];\r\n $Pytanie->OdpowiedzA=$wiersz['OdpowiedzA']; \r\n $Pytanie->OdpowiedzB=$wiersz['OdpowiedzB']; \r\n $Pytanie->OdpowiedzC=$wiersz['OdpowiedzC']; \r\n $Pytanie->OdpowiedzD=$wiersz['OdpowiedzD']; \r\n $Pytanie->Prawidlowa=$wiersz['Prawidlowa'];\r\n $tablicaPytan[$a]=$Pytanie;\r\n }\r\n $wynik->free();\r\n $dbConnect1->close();\r\n $idPytania=$Pytanie->losuj($ile);\r\n for($a=0;$a<count($tablicaPytan);$a++)\r\n {\r\n if($tablicaPytan[$a]->ID==$idPytania)\r\n {\r\n $tablicaPytan[$a]->Pytanie;\r\n return $tablicaPytan[$a];\r\n }\r\n }\r\n }\r\n\t}", "public function save_info_pointeuse() {\n $this->autoRender = false;\n header('Cache-Control: no-cache, must-revalidate');\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\n header('Content-type: application/json');\n header('Access-Control-Allow-Origin: *');\n header(\"Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS\");\n header(\"Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With\");\n if ($this->request->is('post')) {\n $data = $this->request->data;\n require APP . 'Vendor/autoload.php';\n require_once APP . 'Vendor' . DS . 'lib/TADFactory.php';\n require_once APP . 'Vendor' . DS . 'lib/TAD.php';\n require_once APP . 'Vendor' . DS . 'lib/TADResponse.php';\n require_once APP . 'Vendor' . DS . 'lib/Providers/TADSoap.php';\n require_once APP . 'Vendor' . DS . 'lib/Providers/TADZKLib.php';\n require_once APP . 'Vendor' . DS . 'lib/Exceptions/ConnectionError.php';\n require_once APP . 'Vendor' . DS . 'lib/Exceptions/FilterArgumentError.php';\n require_once APP . 'Vendor' . DS . 'lib/Exceptions/UnrecognizedArgument.php';\n require_once APP . 'Vendor' . DS . 'lib/Exceptions/UnrecognizedCommand.php';\n $date = date('Y-m-d');\n if (!empty($data['Pointage']['date'])) {\n $date = $data['Pointage']['date'];\n }\n $tad = (new TADFactory(['ip' => '192.168.1.201', 'encoding' => 'utf-8']))->get_instance();\n // list pointage in date [$date]\n $att_logs = $tad->get_att_log();\n $filtered_att_logs = $att_logs->filter_by_date(\n ['start' => $date, 'end' => $date]\n );\n $all_pointages = $filtered_att_logs->to_array();\n // list user pointer\n $list_user_point = array();\n $list_user_point_name = array();\n $list_user_point_id = array();\n// $ap = current($all_pointages);\n $ap = $all_pointages['Row'];\n foreach ($ap as $k => $point):\n if (!in_array($point['PIN'], $list_user_point_id)):\n array_push($list_user_point_id, $point['PIN']);\n $user_info = $tad->get_user_info(['pin' => $point['PIN']]);\n $full_name_xml = simplexml_load_string(\"<?xml version='1.0' encoding='UTF-8'?>\" . utf8_encode($user_info->get_response_body())) or die(\"Error: Cannot create object\");\n $full_name_array = (array) $full_name_xml;\n $full_name_row = (array) $full_name_array['Row'];\n $full_name = $full_name_row['Name'];\n array_push($list_user_point, array('full_name' => $full_name));\n array_push($list_user_point_name, $full_name);\n endif;\n $user_info = $tad->get_user_info(['pin' => $point['PIN']]);\n $full_name_xml = simplexml_load_string(\"<?xml version='1.0' encoding='UTF-8'?>\" . utf8_encode($user_info->get_response_body())) or die(\"Error: Cannot create object\");\n $full_name_array = (array) $full_name_xml;\n $full_name_row = (array) $full_name_array['Row'];\n $full_name = $full_name_row['Name'];\n $point['full_name'] = $full_name;\n $point['isAbsent'] = FALSE;\n $point['date'] = explode(\" \", $point['DateTime'])[0];\n $ap[$k] = $point;\n endforeach;\n $pointage_not_absent = $this->_group_by($ap, 'full_name');\n $pointage_notabsent = array();\n $times = array();\n foreach ($pointage_not_absent as $k => $pointage):\n array_push($pointage_notabsent, array($k => $pointage));\n array_push($times, $pointage);\n endforeach;\n // Get attendance logs for all users;\n $all_user_info = $tad->get_all_user_info();\n $full_user = simplexml_load_string(\"<?xml version='1.0' encoding='UTF-8'?>\" . utf8_encode($all_user_info->get_response_body())) or die(\"Error: Cannot create object\");\n $rowUser = (array) $full_user;\n $all_user = current($rowUser);\n $user_absent_name = array();\n $user_absent = array();\n $pointage_absent = array();\n foreach ($all_user as $user):\n $user_array = (array) $user;\n if (!empty($user_array['Name'])):\n if (!in_array($user_array['Name'], $list_user_point_name)) {\n array_push($user_absent_name, $user_array['Name']);\n array_push($user_absent, array('full_name' => $user_array['Name']));\n array_push($pointage_absent, array($user_array['Name'] => array(\n 'full_name' => ucwords($user_array['Name']),\n 'pin' => NULL,\n 'isAbsent' => TRUE,\n 'datetime' => NULL,\n 'date' => NULL,\n 'verified' => NULL,\n 'status' => NULL,\n 'workCode' => NULL\n )));\n }\n endif;\n endforeach;\n header(\"HTTP/1.1 200 OK\");\n echo json_encode(array(\n 'absent' => $pointage_absent,\n 'notabsent' => $pointage_notabsent,\n 'names' => $list_user_point,\n 'names_absent' => $user_absent,\n 'status' => 200,\n 'times' => $times,\n 'type' => 'success'\n ));\n die();\n }\n }", "public function istorijaRezultata() {\n $rModel = new RezultatModel();\n $igrac = $this->session->get('igrac');\n $rezultati = $rModel->nadji_rezultateigraca($igrac['idKI']);\n $this->prikaz(\"mod_istorijarezultata\", ['rezultati' => $rezultati]);\n }", "function index_get() {\n $id = $this->get('id'); // Mengecek apakah ada property id pada address sehingga data yang ditampilkan dapat diseleksi berdasarkan id atau ditampikan semua\n if ($id == '') {\n $kontak = $this->db->get('telepon')->result(); // Jika id tidak ada maka data ditampilkan semua\n } else {\n $this->db->where('id', $id);\n $kontak = $this->db->get('telepon')->result(); // Data ditampilkan berdasarkan id yang terdapat di property address\n }\n $this->response($kontak, 200);\n }", "public static function getLayers($params) {\n $service = $params['service'];\n $user = $params['user'];\n $password = $params['password'];\n\n $physical_id = -1;\n\n $db = JFactory::getDbo();\n $pos = strstr($service, 'physical_');\n if ($pos) {\n $id = substr($service, strrpos($service, '_') + 1);\n $query = $db->getQuery(true);\n $query->select('s.resourceurl as url, sc.value as connector');\n $query->from('#__sdi_physicalservice s');\n $query->innerJoin('#__sdi_sys_serviceconnector sc ON sc.id = s.serviceconnector_id');\n $query->where('s.id=' . (int) $id);\n\n $db->setQuery($query);\n $resource = $db->loadObject();\n\n $query = $db->getQuery(true);\n $query->select('sv.value as value, sc.id as id');\n $query->from('#__sdi_physicalservice_servicecompliance ssc');\n $query->innerJoin('#__sdi_sys_servicecompliance sc ON sc.id = ssc.servicecompliance_id');\n $query->innerJoin('#__sdi_sys_serviceversion sv ON sv.id = sc.serviceversion_id');\n $query->where('ssc.service_id =' . (int) $id);\n $query->order('sv.ordering DESC');\n\n $db->setQuery($query, 0, 1);\n $compliance = $db->loadObject();\n $physical_id = $id;\n } else {\n $id = substr($service, strrpos($service, '_') + 1);\n\n $query = $db->getQuery(true);\n $query->select('ps.id as physicalservice_id, ps.resourceurl as url, sc.value as connector');\n $query->from('#__sdi_virtualservice vs');\n $query->innerJoin('#__sdi_physicalservice ps ON ps.id = vs.physicalservice_id');\n $query->innerJoin('#__sdi_sys_serviceconnector sc ON sc.id = ps.serviceconnector_id');\n $query->where('vs.id=' . (int) $id);\n\n $db->setQuery($query);\n $resource = $db->loadObject();\n\n $query = $db->getQuery(true);\n $query->select('sv.value as value, sc.id as id');\n $query->from('#__sdi_physicalservice_servicecompliance pssc');\n $query->innerJoin('#__sdi_sys_servicecompliance sc ON sc.id = pssc.servicecompliance_id');\n $query->innerJoin('#__sdi_sys_serviceversion sv ON sv.id = sc.serviceversion_id');\n $query->where('pssc.service_id =' . $resource->physicalservice_id);\n $query->order('sv.ordering DESC');\n\n $db->setQuery($query, 0, 1);\n $compliance = $db->loadObject();\n $physical_id = $resource->physicalservice_id;\n }\n\n $url = $resource->url;\n $connector = ($resource->connector == \"WMSC\") ? \"WMS\" : $resource->connector;\n $pos1 = stripos($url, \"?\");\n $separator = \"&\";\n if ($pos1 === false) {\n $separator = \"?\";\n }\n\n $completeurl = $url . $separator . \"REQUEST=GetCapabilities&SERVICE=\" . $connector;\n if ($compliance && $compliance->value) {\n $completeurl .= \"&version=\" . $compliance->value;\n }\n\n $session = curl_init($completeurl);\n $httpHeader = array();\n $httpHeader[] = 'Expect:';\n if (!empty($user) && !empty($password)) {\n $httpHeader[] = 'Authorization: Basic ' . base64_encode($user . ':' . $password);\n }\n curl_setopt($session, CURLOPT_HTTPHEADER, $httpHeader);\n curl_setopt($session, CURLOPT_HEADER, false);\n curl_setopt($session, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($session, CURLOPT_SSL_VERIFYPEER, false);\n\n $response = curl_exec($session);\n $http_status = curl_getinfo($session, CURLINFO_HTTP_CODE);\n curl_close($session);\n\n //HTTP status error\n if ($http_status != '200') {\n $result['ERROR'] = JText::_('COM_EASYSDI_MAP_GET_CAPABILITIES_HTTP_ERROR') . $http_status;\n echo json_encode($result);\n die();\n }\n\n $xmlCapa = simplexml_load_string($response);\n $result = array();\n\n //Response empty\n if ($xmlCapa === false) {\n $result['ERROR'] = JText::_('COM_EASYSDI_MAP_GET_CAPABILITIES_ERROR');\n echo json_encode($result);\n die();\n }\n\n //OGC exception returned\n if ($xmlCapa->getName() == \"ServiceExceptionReport\") {\n foreach ($xmlCapa->children() as $exception) {\n $ogccode = $exception['code'];\n break;\n }\n $result['ERROR'] = JText::_('COM_EASYSDI_MAP_GET_CAPABILITIES_OGC_ERROR') . $ogccode;\n echo json_encode($result);\n die();\n }\n\n //Parse capabilities to get layers\n $namespaces = $xmlCapa->getNamespaces(true);\n foreach ($namespaces as $key => $value) {\n if ($key == '') {\n $xmlCapa->registerXPathNamespace(\"dflt\", $value);\n } else {\n $xmlCapa->registerXPathNamespace($key, $value);\n }\n }\n $version = $xmlCapa->xpath('@version');\n $version = (string) $version[0];\n\n switch ($resource->connector) {\n case \"WMS\":\n case \"WMSC\":\n switch ($version) {\n case \"1.3.0\":\n $wmsLayerList = $xmlCapa->xpath('//dflt:Layer');\n break;\n default:\n $wmsLayerList = $xmlCapa->xpath('/Capability//Layer[Name]');\n break;\n }\n\n //flushing the wmslayer table\n $tab_layer = JTable::getInstance('wmslayer', 'Easysdi_serviceTable');\n $tab_layer->wipeByPhysicalId($physical_id);\n unset($tab_layer);\n\n //inserting each wmslayer\n foreach ($wmsLayerList as $wmsLayer) {\n $tab_layer = JTable::getInstance('wmslayer', 'Easysdi_serviceTable');\n $tab_layer->save(Array(\n 'name' => (String) $wmsLayer->Name,\n 'description' => (String) $wmsLayer->Title,\n 'physicalservice_id' => $physical_id\n ));\n unset($tab_layer);\n }\n break;\n case \"WMTS\":\n $time_stack = 0;\n $wmtsLayerList = $xmlCapa->xpath('/dflt:Capabilities/dflt:Contents/dflt:Layer');\n //flushing the wmtslayer table\n $tab_layer = JTable::getInstance('wmtslayer', 'Easysdi_serviceTable');\n $tab_layer->wipeByPhysicalId($physical_id);\n unset($tab_layer);\n\n //inserting each wmtslayer\n foreach ($wmtsLayerList as $wmtsLayer) {\n\n $tab_layer = JTable::getInstance('wmtslayer', 'Easysdi_serviceTable');\n $tab_layer->save(Array(\n 'name' => (String) $wmtsLayer->children('ows', true)->Identifier,\n 'description' => (String) $wmtsLayer->children('ows', true)->Title,\n 'physicalservice_id' => $physical_id\n ));\n\n $wmtslayer_id = $tab_layer->id;\n\n foreach ($wmtsLayer->TileMatrixSetLink as $tileMatrixSet) {\n $tileMatrixSetIdentifier = (String) $tileMatrixSet->TileMatrixSet;\n\n //we save the tilematrixset\n $supported_CRS = $xmlCapa->xpath(\"/dflt:Capabilities/dflt:Contents/dflt:TileMatrixSet[ows:Identifier = '\" . $tileMatrixSetIdentifier . \"']\");\n $supported_CRS = (String) $supported_CRS[0]->children('ows', true)->SupportedCRS;\n\n $tab_tileMatrixSet = JTable::getInstance('tileMatrixSet', 'Easysdi_serviceTable');\n $tab_tileMatrixSet->save(Array(\n 'identifier' => $tileMatrixSetIdentifier,\n 'supported_crs' => $supported_CRS,\n 'wmtslayer_id' => $wmtslayer_id,\n ));\n\n //we probe if the tilematrixset has limits\n $hasLimits = isset($tileMatrixSet->TileMatrixSetLimits);\n\n //we get the list of authorized tilematrix for this tilematrixset\n if ($hasLimits) {\n $authorized_tiles = Array();\n foreach ($tileMatrixSet->TileMatrixSetLimits->TileMatrixLimits as $limits) {\n $tileMatrixIdentifier = (String) $limits->TileMatrix;\n $authorized_tiles[] = $tileMatrixIdentifier;\n }\n }\n\n //we get the list of all the tilematrix for this tilematrixset\n $tileMatrixList = $xmlCapa->xpath(\"/dflt:Capabilities/dflt:Contents/dflt:TileMatrixSet[ows:Identifier = '\" . $tileMatrixSetIdentifier . \"']/dflt:TileMatrix\");\n\n //we sanitize the output of the xpath\n $tileMatrixArray = Array();\n foreach ($tileMatrixList as $tileMatrix) {\n $identifier = (String) $tileMatrix->children('ows', true)->Identifier;\n //if there are limits on the tilematrixset we filter the list of tilematrix with authorized tilematrixes and we save\n if (!$hasLimits || in_array($identifier, $authorized_tiles)) {\n $tileMatrixArray[] = Array(\n 'identifier' => $identifier,\n 'scaledenominator' => (String) $tileMatrix->ScaleDenominator,\n 'topleftcorner' => (String) $tileMatrix->TopLeftCorner,\n 'tilewidth' => (String) $tileMatrix->TileWidth,\n 'tileheight' => (String) $tileMatrix->TileHeight,\n 'matrixwidth' => (String) $tileMatrix->MatrixWidth,\n 'matrixheight' => (String) $tileMatrix->MatrixHeight,\n 'tilematrixset_id' => $tab_tileMatrixSet->id,\n );\n }\n }\n $tab_tileMatrix = JTable::getInstance('tileMatrix', 'Easysdi_serviceTable');\n $tab_tileMatrix->saveBatch($tileMatrixArray);\n unset($tab_tileMatrixSet, $tab_tileMatrix, $tileMatrixArray);\n }\n unset($tab_layer);\n }\n\n break;\n case \"WFS\":\n $featureTypeList = $xmlCapa->xpath('//dflt:FeatureType');\n\n //flushing the featureClass table\n $tab_layer = JTable::getInstance('featureclass', 'Easysdi_serviceTable');\n $tab_layer->wipeByPhysicalId($physical_id);\n unset($tab_layer);\n\n //inserting each featureClass\n foreach ($featureTypeList as $featureType) {\n $tab_layer = JTable::getInstance('featureclass', 'Easysdi_serviceTable');\n $tab_layer->save(Array(\n 'name' => (String) $featureType->Name,\n 'description' => (String) $featureType->Title,\n 'physicalservice_id' => $physical_id\n ));\n unset($tab_layer);\n }\n break;\n }\n }", "public function Zapis_vsechny_kolize_v_zaveru_formulare ($pole, $idcka_skolizi, $iducast, $formular){\r\n //zapise kolize formulare \r\n self::Zapis_kolize_formulare($pole,$idcka_skolizi, $iducast, $formular);\r\n //-----------------------------------------------------------------------------\r\n \r\n \r\n //a zjisti a zapise kolize ucastnika pro vsechny formulare \r\n $vsechny_kolize_ucastnika_pole = self::Najdi_kolize_vsechny($iducast);\r\n //echo \"<br>**Vsechny kolize_pole v Zapis_vsechny_kolize..... **\";\r\n //var_dump($vsechny_kolize_ucastnika_pole);\r\n \r\n //znevalidneni vsech kolizi pro ucastnika \r\n self::Znevalidni_kolize_ucastnika_vsechny($iducast);\r\n foreach($vsechny_kolize_ucastnika_pole as $jedna_kolize){\r\n if ($jedna_kolize->kolize_nastala) {\r\n $jedna_kolize->Zapis_jednu_kolizi();\r\n } \r\n }\r\n \r\n}", "function anuncio_a_colocar_en_portada($anuncios_n5){\n //obtenemos el id y la url de la foto principal del anuncio con fecha de hoy\n //inincializamos las variables\n $id_anuncio = 0;\n $url_foto_anuncio = '';\n $localidad = '';\n $precio = 0;\n $anuncio_hoy = 0;\n\n $fecha_hoy = getdate();\n #var_dump($fecha_hoy[0]);\n //comprobamos qué anuncio tiene la fecha de hoy, que será el buscado para\n //colocar en portda\n $diferencia = 24*3600;\n for ($i=0; $i < count($anuncios_n5); $i++) {\n #var_dump($anuncios_n5[$i]['fecha_anuncio']);\n $dif = $anuncios_n5[$i]['fecha_anuncio'] - $fecha_hoy[0];\n if($dif < $diferencia) {\n $diferencia = $dif;\n $anuncio_hoy = $i;\n }\n }\n //pasamos al anuncio los datos id y url\n $anuncio = $anuncios_n5[$anuncio_hoy];\n //devolvemos el anuncio que se debe colocar en la portada y su foto\n #var_dump($anuncio);\n #die();\n echo json_encode($anuncio);\n $dbh = null;\n}", "function prijavaKorisnik($email,$lozinka){\n //Kreiram prazno polje\n $response = [];\n //Kreiram objekt tipa \"Baza\"\n $baza = new Baza();\n $conn = $baza->spojiSBazom();\n //Trenutno vrijeme\n $vrijeme = date('H:i:s');\n //Kreiram upit koji provjerava postoji li uneseni email u bazi\n $sql = \"SELECT * FROM korisnik k \n WHERE k.email = ?\";\n\n //Kreiranje prepared statementa\n $stmt = mysqli_stmt_init($conn);\n if(!mysqli_stmt_prepare($stmt,$sql)){\n $response[\"success\"] = \"false\";\n $response[\"message\"] = \"Došlo je do pogreške!\";\n \n }\n //Ako je prepared statement u redu\n else{\n //Zamjena parametara u statementu (umjesto ? se stavlja vrijednost)\n mysqli_stmt_bind_param($stmt,\"s\",$email);\n //Izvršavanje statementa\n mysqli_stmt_execute($stmt);\n //Vraćam rezultat statementa u varijablu $result\n $result = mysqli_stmt_get_result($stmt);\n \n //Ako smo dobili nešto u $result, tj. ako je baza podataka našla nešto\n if($row = mysqli_fetch_assoc($result)){\n //Provjera passworda korisnika (uzima password koji je korisnik upisao i password koji odgovara upisanom username-u u bazi podataka\n //i provjerava je li se ti passwordi poklapaju) -> vraća true ili false\n $passwordCheck = password_verify($lozinka,$row['pass']);\n //Ako password koji je korisnik upisao NE ODGOVARA passwordu iz baze podataka za taj username\n if($passwordCheck == false){\n $response[\"success\"] = \"false\";\n $response[\"message\"] = \"Unijeli ste krivu lozinku\"; \n }\n //Ako password koji je korisnik upisao ODGOVARA passwordu iz baze podataka za taj username\n else if($passwordCheck == true){\n //Ako je tip korisnika liječnik:\n if($row['tip'] == \"lijecnik\"){\n \n $sqlLijecnik = \"SELECT * FROM lijecnik l \n JOIN korisnik k ON l.idKorisnik = k.idKorisnik \n WHERE k.email = '$email'\";\n $resultLijecnik = $conn->query($sqlLijecnik);\n if ($resultLijecnik->num_rows > 0) {\n // output data of each row\n while($rowLijecnik = $resultLijecnik->fetch_assoc()) {\n //Pokrećem novu sesiju\n session_start();\n //Kreiranje globalne varijable $_SESSION u koju se stavljaju svi podatci prijavljenog korisnika (Sve podatke iz baze za korisnika\n //preslikavam u array $_SESSION)\n $_SESSION['idLijecnik'] = $rowLijecnik['idLijecnik'];\n $_SESSION['imeLijecnik'] = $rowLijecnik['imeLijecnik'];\n $_SESSION['prezLijecnik'] = $rowLijecnik['prezLijecnik'];\n $_SESSION['idKorisnik'] = $rowLijecnik['idKorisnik'];\n $_SESSION['email'] = $rowLijecnik['email'];\n //Kreiram token za liječnika\n $token = sha1(uniqid($_SESSION['email'], true));\n $_SESSION['datPrijLijecnik']=date(\"Y-m-d\");\n $_SESSION['tokenLijecnik'] = $token;\n //Kreiram upit za ubacivanje podataka u tablicu \"session_lijecnik\" :\n $sqlSessionLijecnik = \"INSERT INTO session_lijecnik (idLijecnik,datPrijLijecnik,tokenLijecnik,vrijemePrijLijecnik) VALUES (?,?,?,?)\";\n //Kreiram prepared statment\n $stmtSessionLijecnik = mysqli_stmt_init($conn);\n //Ako je prepared statment neuspješno izvršen\n if(!mysqli_stmt_prepare($stmtSessionLijecnik,$sqlSessionLijecnik)){\n $response[\"success\"] = \"false\";\n $response[\"message\"] = \"Došlo je do pogreške!\";\n }\n else{\n //Ako je prepared statment uspješno izvršen\n //Uzima sve parametre što je liječnik unio i stavlja ih umjesto upitnika\n mysqli_stmt_bind_param($stmtSessionLijecnik,\"isss\",$_SESSION['idLijecnik'],$_SESSION['datPrijLijecnik'],$_SESSION['tokenLijecnik'],$vrijeme);\n //Izvršavam statement\n mysqli_stmt_execute($stmtSessionLijecnik);\n\n //Vrati uspješno polje\n $response[\"success\"] = \"true\";\n $response[\"message\"] = \"Liječnik je uspješno prijavljen!\";\n $response[\"token\"] = $token;\n $response[\"tip\"] = $rowLijecnik[\"tip\"];\n $response[\"expiresIn\"] = 14400;\n }\n }\n }\n }\n //Ako je tip korisnika \"Medicinska sestra\n if($row['tip'] == \"sestra\"){\n\n $sqlSestra = \"SELECT * FROM med_sestra m \n JOIN korisnik k ON m.idKorisnik = k.idKorisnik \n WHERE k.email = '$email'\";\n $resultSestra = $conn->query($sqlSestra);\n if ($resultSestra->num_rows > 0) {\n // output data of each row\n while($rowSestra = $resultSestra->fetch_assoc()) {\n //Pokrećem novu sesiju\n session_start();\n //Kreiranje globalne varijable $_SESSION u koju se stavljaju svi podatci prijavljenog korisnika (Sve podatke iz baze za korisnika\n //preslikavam u array $_SESSION)\n $_SESSION['idMedSestra'] = $rowSestra['idMedSestra'];\n $_SESSION['imeMedSestra'] = $rowSestra['imeMedSestra'];\n $_SESSION['prezMedSestra'] = $rowSestra['prezMedSestra'];\n $_SESSION['idKorisnik'] = $rowSestra['idKorisnik'];\n $_SESSION['email'] = $rowSestra['email'];\n //Kreiram token za medicinsku sestru\n $token = sha1(uniqid($_SESSION['email'], true));\n $_SESSION['datPrijMedSestra']=date(\"Y-m-d\");\n $_SESSION['tokenMedSestra'] = $token;\n //Kreiram upit za ubacivanje podataka u tablicu \"session_med_ses\" :\n $sqlSessionMedSestra = \"INSERT INTO session_med_sestra (idMedSestra,datPrijMedSestra,tokenMedSestra,vrijemePrijMedSestra) VALUES (?,?,?,?)\";\n //Kreiram prepared statment\n $stmtSessionMedSestra = mysqli_stmt_init($conn);\n //Ako je prepared statment neuspješno izvršen\n if(!mysqli_stmt_prepare($stmtSessionMedSestra,$sqlSessionMedSestra)){\n $response[\"success\"] = \"false\";\n $response[\"message\"] = \"Došlo je do pogreške!\";\n }\n else{\n //Ako je prepared statment uspješno izvršen\n //Uzima sve parametre što je medicinska sestra unijela i stavlja ih umjesto upitnika\n mysqli_stmt_bind_param($stmtSessionMedSestra,\"isss\",$_SESSION['idMedSestra'],$_SESSION['datPrijMedSestra'],$_SESSION['tokenMedSestra'],$vrijeme);\n //Izvršavam statement\n mysqli_stmt_execute($stmtSessionMedSestra);\n\n $response[\"success\"] = \"true\";\n $response[\"message\"] = \"Medicinska sestra je uspješno prijavljena!\";\n $response[\"token\"] = $token;\n $response[\"tip\"] = $rowSestra[\"tip\"];\n $response[\"expiresIn\"] = 14400;\n }\n }\n }\n }\n }\n //Ako se nešto čudno dogodi\n else{\n $response[\"success\"] = \"false\";\n $response[\"message\"] = \"Nešto se čudno dogodilo!\";\n }\n }\n //Ako je $result prazan, tj. ako nismo ništa dobili iz baze podataka\n else{\n $response[\"success\"] = \"false\";\n $response[\"message\"] = \"Korisnik ne postoji!\"; \n }\n }\n //Vraćam response polje\n return $response;\n }", "function redirecionaClienteParaDepartamentoTecnologia($cliente)\n{\n\n # montando URL\n $url =\n \"index.php/por/chat/startchat/(leaveamessage)/true?prefill%5Busername%5D={$cliente['razao_social']}&value_items_admin[0]={$cliente['duvida']}&value_items_admin[1]={$cliente['nome_usuario']}&value_items_admin[2]={$cliente['conta_contrato']}&value_items_admin[3]={$cliente['razao_social']}&value_items_admin[4]={$cliente['cnpj']}&value_items_admin[5]=0&nome_departamento=Tecnologia&codigo_ticket=0&novo_erp={$cliente['novo_erp']}&prefill%5Bphone%5D=2&value_items_admin[6]={$cliente['telefone']}&value_items_admin[7]=0\";\n\n # redirecionando cliente para o colaborador no chat teste\n echo json_encode(['url' => 'http://192.168.0.47:9999/' . $url], JSON_UNESCAPED_UNICODE);\n\n # redirecionando cliente para o colaborador no chat produção\n #echo json_encode(['url' => 'https://chat.avancoinfo.net/' . $url], JSON_UNESCAPED_UNICODE);\n\n exit;\n}", "function get() {\n\n\n $node_id = $this->input->post('node_id');\n $plans = Doctrine_Core::getTable('Plan')->retrieveCurrents($node_id);\n\n //ESTA INTRUCCION SOLO SE OCUPA SI SE ESTA EN UN SERVODOR WINDOWS\n $dir = str_replace(\"\\\\\", \"/\", $this->config->item('plan_dir'));\n // si posee algun plano asociado\n if ($plans->count()) {\n $size = $plans->count();\n $plans = $plans->toArray();\n\n $ruta = 'plans/' . $plans[0]['plan_filename'];\n\n if (!file_exists($ruta)) {\n\n $plans[0]['plan_filename'] = \"not_image_icon.png\";\n }\n\n echo '({\"total\":\"' . $size . '\", \"plan_dir\": \"' . $dir . '\", \"results\":' . $this->json->encode($plans) . '})';\n } else {\n\n //El caso de no poseer plano se busca si posee linea asociada\n $line = Doctrine_Core::getTable('PlanNode')->findPlanNode($node_id);\n\n if ($line->count()) {\n $line = $line->toArray();\n $nodeLine = intval($line[0]['nodeLine']);\n $associatedLine = Doctrine_Core::getTable('Plan')->retrieveCurrents($nodeLine);\n if ($associatedLine->count()) {\n $associatedLine = $associatedLine->toArray();\n $associatedLine[0]['handler'] = $line[0]['handler'];\n $associatedLine[0]['plan_node_id'] = $line[0]['plan_node_id'];\n $associatedLine[0]['plan_section_id'] = $line[0]['plan_section_id'];\n\n echo '({\"total\":\"' . $plans->count() . '\", \"plan_dir\": \"' . $dir . '\", \"results\":' . $this->json->encode($associatedLine) . '})';\n } else {\n echo '({\"total\":\"0\", \"results\":[]})';\n }\n }\n }\n }", "public function __construct() {\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n CURLOPT_URL => \"https://api.rajaongkir.com/starter/province?id=12\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => array(\n \"key: 7ce7425edc117427abb39cb21e69e456\"\n ),\n ));\n\n $response = curl_exec($curl);\n $err = curl_error($curl);\n\n curl_close($curl);\n return $response;\n }", "function __construct($map_file = \"\", $locaplic = \"\", $tema = \"\", $template = \"\")\n {\n include (dirname(__FILE__) . \"/../ms_configura.php\");\n $this->postgis_mapa = $postgis_mapa;\n include_once (dirname(__FILE__) . \"/funcoes_gerais.php\");\n include_once (dirname(__FILE__) . \"/classe_vermultilayer.php\");\n $this->v = versao();\n $this->v = $this->v[\"principal\"];\n $this->localaplicacao = $locaplic;\n if ($map_file == \"\") {\n return;\n }\n $this->mapa = ms_newMapObj($map_file);\n substituiConObj($this->mapa, $postgis_mapa);\n $this->arquivo = str_replace(\".map\", \"\", $map_file) . \".map\";\n\n if ($tema != \"\" && @$this->mapa->getlayerbyname($tema)) {\n $this->layer = $this->mapa->getlayerbyname($tema);\n $this->nome = $tema;\n $vermultilayer = new vermultilayer();\n $vermultilayer->verifica($map_file, $tema);\n if ($vermultilayer->resultado == 1) // o tema e multi layer\n {\n $ls = $vermultilayer->temas;\n $this->visiveis = $vermultilayer->temasvisiveis;\n } else {\n $ls[] = $tema;\n $this->visiveis = array(\n $tema\n );\n }\n $this->grupo = $ls;\n foreach ($ls as $l) {\n $t = $this->mapa->getlayerbyname($l);\n $this->indices[] = $t->index;\n }\n }\n if ($template == \"\") {\n $template = \"legenda.htm\";\n }\n if (file_exists($template)) {\n $this->templateleg = $template;\n return;\n }\n if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) {\n $this->templateleg = $locaplic . \"\\\\aplicmap\\\\\" . $template;\n } else {\n $this->templateleg = $locaplic . \"/aplicmap/\" . $template;\n }\n }", "public function leeDatosZonaVW() {\n\t\t$zona = new ZonaBSN ();\n\t\t$this->zona = $zona->leeDatosForm ($_POST);\n\t}", "public function getTri() {\n\t\n\t\t$this->log->debug(\"Usager::getTri() Début\");\n\t\n\t\t$session = new Session();\n\t\n\t\t// Vérifier si un tri est spécifié dans la session\n\t\t$triSessionChamp = $session->get(\"usager_pref_tri_champ\");\n\t\t$triSessionOrdre = $session->get(\"usager_pref_tri_ordre\");\n\t\t$this->log->debug(\"Usager::getTri() triSessionChamp = '$triSessionChamp'\");\n\t\t$this->log->debug(\"Usager::getTri() triSessionOrdre = '$triSessionOrdre'\");\n\t\n\t\t// Vérifier si l'ordre de tri désiré est passé en paramètre\n\t\t$triParamChamp = Web::getParam(\"tri\");\n\t\t$triParamOrdre = \"\";\n\t\n\t\t// Vérifier si l'ordre demandé est disponible\n\t\tif ($triParamChamp != \"\") {\n\t\t\t$listeValeurs = array(\"id_usager\", \"nom_prenom\", \"courriel\", \"nb_projets\", \"statut\", \"date_dern_authentification\");\n\t\t\tif ( !Securite::verifierValeur( $triParamChamp, $listeValeurs) ) {\n\t\t\t\t$triParamChamp = \"id_usager\";\n\t\t\t} else {\n\t\t\t\t// Déterminer si on doit inverser le tri ou non\n\t\n\t\t\t\tif ($triSessionChamp == \"\" || $triSessionChamp != $triParamChamp) {\n\t\t\t\t\t// Aucune valeur en session, on tri selon le champ demandé en mode croissant\n\t\t\t\t\t$triParamOrdre .= \"asc\";\n\t\t\t\t} else {\n\t\t\t\t\t// Inverser l'ordre de tri\n\t\t\t\t\tif ($triSessionOrdre == \"asc\") {\n\t\t\t\t\t\t$triParamOrdre = \"desc\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$triParamOrdre = \"asc\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Si aucun tri spécifié, utilisé celui de la session\n\t\tif ($triParamChamp == \"\") {\n\t\t\t$triParamChamp = $triSessionChamp;\n\t\t\t$triParamOrdre = $triSessionOrdre;\n\t\t}\n\t\n\t\t// Si aucun tri en session, utilisé celui par défaut\n\t\tif ($triParamChamp == \"\") {\n\t\t\t$triParamChamp = \"id_usager\";\n\t\t\t$triParamOrdre = \"asc\";\n\t\t}\n\t\n\t\t// Stocker le tri dans la session\n\t\t$session->set(\"usager_pref_tri_champ\", $triParamChamp);\n\t\t$session->set(\"usager_pref_tri_ordre\", $triParamOrdre);\n\t\n\t\t$this->log->debug(\"Usager::getTri() Fin\");\n\t\n\t\treturn $triParamChamp . \" \" . $triParamOrdre;\n\t}", "public function obtenerListaCIE() {\r\n $request = new simpleRest();\r\n //obtiene los datos de la peticion\r\n //$json = $request->getHttpRequestBody();\r\n //objeto que maneja las codificaciones/descodificaciones\r\n $handler = new requestRestHandler();\r\n \r\n //if (filter_var($username, FILTER_VALIDATE_EMAIL)) { \r\n $consulDB = new consultasDB(); \r\n //$this->mostrarRespuesta($this->convertirJson($respuesta), 200); \r\n $responseCIE = $consulDB->obtenerListaCIE();\r\n\r\n //echo $responseUsuario;\r\n //$datosRespuesta = (array)$handler->decodeJson($responsePaises);\r\n $datosRespuesta = $responseCIE;\r\n //$datosRespuesta = $handler->decodeJson($responsePaises);\r\n\r\n if (!isset($datosRespuesta[\"error\"])){\r\n //$respuesta['usuario'] = $username;\r\n $responseObtenerCIE10[\"error\"] = \"false\";\r\n $responseObtenerCIE10[\"status\"] = \"OK\";\r\n $responseObtenerCIE10[\"message\"] = \"SUCCESS\";\r\n $responseObtenerCIE10['fecha'] = ObtenerFecha(); //Obtiene la fecha actual\r\n //Aqui se implementa el manejo del token\r\n $responseObtenerCIE10[\"respuesta\"] = $datosRespuesta;\r\n\r\n }\r\n else {\r\n //Hay posiblidades: 1 - usuario no existe 2 - clave invalida\r\n $responseObtenerCIE10[\"error\"] = \"true\";\r\n $responseObtenerCIE10[\"status\"] = \"error\";\r\n $responseObtenerCIE10[\"message\"] = $datosRespuesta['error'];\r\n $responseObtenerCIE10['fecha'] = \"\";\r\n $responseObtenerCIE10[\"respuesta\"] = \"{}\";\r\n }\r\n\r\n $consulDB = null;\r\n //enviar respuesta\r\n return $responseObtenerCIE10;\r\n\r\n //}\r\n \r\n }", "public function getLly() {}", "public function getLaporan(){\n\t\t$this->db->from('transaksi');\n\t\t$this->db->join('tiket','tiket.id = transaksi.id', 'left');\n\t\treturn $this->db->get();\n }", "public function obtenerViajesplusAbonados();", "public function cercaProvvedimenti() {\r\n $operatore = $_SESSION[\"op\"];\r\n $ruolo = $operatore->getFunzione();\r\n \r\n $offset = isset($_REQUEST[\"offset\"]) ? $_REQUEST[\"offset\"] : 0;\r\n $numero = isset($_REQUEST[\"numero\"]) ? $_REQUEST[\"numero\"] : 15;\r\n \r\n\r\n $numeroProvvedimenti = ProvvedimentoFactory::numeroTotaleProvvedimenti();\r\n\r\n if ($offset >= $numeroProvvedimenti) {\r\n $offset = 0;\r\n }\r\n if ($offset < 1) {\r\n $offset = 0;\r\n }\r\n\r\n $href = '<a href=\"index.php?page=operatore&cmd=elencoProvvedimenti&id=';\r\n $href2 = '<a href=\"index.php?page=operatore&cmd=firmaP&numeroP=';\r\n\r\n $provvedimenti = ProvvedimentoFactory::elencoP($offset, $numero);\r\n $x = count($provvedimenti);\r\n $data = \"\";\r\n for ($i = 0; $i < $x; $i++) {\r\n $data.= \"<tr class=\\\"\" . ($i % 2 == 1 ? \"a\" : \"b\") . \"\\\"><td>\" . $href\r\n . $provvedimenti[$i]->getId() . \"\\\">\" . $provvedimenti[$i]->getNumeroProvvedimento() . \"</a></td>\"\r\n . \"<td>\" . $provvedimenti[$i]->getDataProvvedimento(true) . \"</td>\"\r\n . \"<td>\" . $provvedimenti[$i]->getNumeroProtocollo() . \"</td>\"\r\n . \"<td>\" . $provvedimenti[$i]->getDataProtocollo(true) . \"</td>\"\r\n . \"<td>\". $href2 . $provvedimenti[$i]->getPraticaCollegata() . \"\\\">\" . $provvedimenti[$i]->getPraticaCollegata() . \"</a></td>\";\r\n }\r\n\r\n header('Cache-Control: no-cache, must-revalidate');\r\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\r\n header('Content-type: application/json');\r\n $json = array();\r\n $json[\"testo\"] = $data;\r\n $json[\"numeroProvvedimenti\"] = $numeroProvvedimenti;\r\n $json[\"numRow\"] = $x;\r\n echo json_encode($json);\r\n }", "public function existujeKolizna()\n {\n // hlada nasledovne kolizne pripady:\n // - existuje zaciatok nejakeho obdobia v nasom\n // - existuje koniec nejakeho obdobia v nasom\n // - nejake obdobie kompletne prekryva nase obbodie\n // pricom vzdy sa ignoruje nase obdobie (kvoli update ktory by bol kolizny so sebou)\n // a zaroven nie su kolizie ak bezi vaicero akcii na viacero inych semestrov\n $sql =\n \"SELECT id, \".\n DateConvert::DBTimestampToSkDateTime(\"zaciatok\"). \" AS zaciatok, \".\n DateConvert::DBTimestampToSkDateTime(\"koniec\"). \" AS koniec\n\t\t\tFROM rozvrhova_akcia\n\t\t\t WHERE \n\t\t\t \t((zaciatok>\".DateConvert::SKDateTime2DBTimestamp(\"$1\").\" AND\n\t\t\t \t zaciatok<\".DateConvert::SKDateTime2DBTimestamp(\"$2\").\") OR\t\n\t\t\t \t(koniec>\".DateConvert::SKDateTime2DBTimestamp(\"$1\").\" AND\n\t\t\t \t koniec<\".DateConvert::SKDateTime2DBTimestamp(\"$2\").\") OR\n\t\t\t \t(zaciatok<=\".DateConvert::SKDateTime2DBTimestamp(\"$1\").\" AND\n\t\t\t \t koniec>=\".DateConvert::SKDateTime2DBTimestamp(\"$2\").\")) AND\n\t\t\t \t id_semester=$3\";\n $params = array($this->zaciatok, $this->koniec, $this->id_semester);\n // ak je edit TREBA aj vylucit koliziu so sebou\n if (!empty($this->id))\n {\n $sql .= \" AND id<>$4\";\n $params[] = $this->id;\n }\n $this->dbh->query($sql, $params);\n\n if ($this->dbh->RowCount()>0)\n {\n $kolizia = $this->dbh->fetch_assoc();\n return \"{$kolizia[\"zaciatok\"]} - {$kolizia[\"koniec\"]}\";\n } else return null;\n }", "static function generarServicioL($par){\n\n\t\tif($par==\"T\"){\n\t\trequire_once('../SERVIDOR/lib/nusoap.php');\n\t\t}else{\n\t\trequire_once('SERVIDOR/lib/nusoap.php');\n\t\t}\n\n\t\t$host = 'http://localhost/Final2k16/SERVIDOR/ws.php?wsdl';\t\n \n $client = new nusoap_client($host);\n $err = $client->getError();\n if ($err) {\n die();\n return '<h2>ERROR EN LA CONSTRUCCION DEL WS:</h2><pre>' . $err . '</pre>';\n }\n return $client;\n\n\t}", "function sviRezultati() {\n\t\t$mysqli = new mysqli(\"localhost\", \"root\", \"\", \"kviz\");\n\t\t$q = 'SELECT * FROM tabela t join korisnik k on t.korisnikID = k.korisnikID order by t.brojPoena desc';\n\t\t$this ->result = $mysqli->query($q);\n\t\t$mysqli->close();\n\t}", "function get_kelas4a_json() { //data kelas1a by JSON object\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas4a();\n}", "private function getTraffic() {//Irá verificar na tabela se os dados do dia existem\n $readSiteViews = new Read; //Aqui ocorrendo uma composição\n $readSiteViews->ExeRead('siteviews', \"WHERE siteviews_date = :date\", \"date={$this->Date}\");\n if ($readSiteViews->getRowCount())://Verifica se a leitura retornou resultado\n $this->Traffic = $readSiteViews->getResult()[0]; //Pega apenas o resultado atual, logo o Traffic vai armazenar os dados do dia recorrente\n endif;\n }", "function request_API($bypassCahe,$path, $parameters){\r\n\t // Create connection\r\n\t global $host, $username, $db, $password;\r\n\t $con=mysqli_connect($host, $username, $password, $db);\r\n\r\n\t if (mysqli_connect_errno()) {\r\n\t printf(\"Connect failed: %s\\n\", mysqli_connect_error());\r\n\t exit();\r\n\t }\r\n\t include('cache/translink_config.php');\r\n\t \r\n\t $url=\"https://opia.api.translink.com.au/v1/\";\r\n\t \r\n\t $headers = array('Accept: applicationk/json','Content-Type: application/json');\r\n\t \r\n\r\n\t //intiitial ther cURL \r\n\t $curl = curl_init();\r\n\t \r\n\t curl_setopt($curl, CURLOPT_URL, $url.$path.'?'.$parameter);\r\n\t curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\r\n\t curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);\r\n\t curl_setopt($curl, CURLOPT_USERPWD,$opia_username.':'.$opia_password);\r\n\t $resp = curl_exec($curl);\r\n\r\n\t $query = \"SELECT * FROM API_Cache.date_test\";\r\n\t $result = mysqli_query($con, $query);\r\n\t $rows = mysqli_fetch_array($result, MYSQLI_ASSOC);\r\n\t mysqli_close($con);\r\n\t //print_r($rows);\r\n\t //die();\r\n\r\n\t $data = parseJSON($resp);\r\n\t pushStopData($data);\r\n\t pushData($data, \"caches\");\r\n\t die();\r\n\r\n\t $sql_string = \"INSERT INTO `API_Cache`.`caches` (`cache_ID`, `time_stamp`, `stored_responds`) VALUES (NULL, CURRENT_TIMESTAMP,\".$resp.\" )\";\r\n\t mysqli_query($con, $sql_string);\r\n\t mysqli_close($con);\r\n\r\n\r\n\t \r\n\t echo ('<hr>'.curl_getinfo($curl, CURLINFO_HEADER_OUT));\r\n\t curl_close($curl);\r\n\t \r\n\t}", "function simpleLayerKML($ar){\n $p = new XParam($ar, array('tplentry'=>'br', 'kml'=>0));\n $tpl = $p->get('tplentry');\n $layeroid = $p->get('layeroid');\n $template = $p->get('template');\n $kml = $p->get('kml');\n // lecture de la description de la carte\n $modmap = $this->xset->rdisplay($layeroid);\n if (!is_array($modmap)){\n XLogs::critical(get_class($this), get_class($this).\"::simpleLayerKML layer not found {$layeroid}\");\n return array('Could not find layeroid '.$layeroid);\n }\n // browse sur le module associé avec la clause where specifiée\n //\n $mod = XModule::objectFactory($modmap['ormoid']->raw);\n if (!empty($modmap['orfilter']->raw)){\n $select = $mod->xset->select_query().' and '.$modmap['orfilter']->raw;\n } else {\n $select = '';\n }\n $br = $mod->browse(array('_options'=>array(),\n\t\t\t 'tplentry'=>TZR_RETURN_DATA,\n\t\t\t 'selectedfields'=>'all',\n\t\t\t 'first'=>0,\n\t\t\t 'select'=>$select,\n\t\t\t 'pagesize'=>9999));\n $places = array();\n $fname = $modmap['ofname']->raw;\n foreach($br['lines_oid'] as $i=>$lineoid){\n $coords = $br['lines_o'.$fname][$i]->raw;\n list($lat, $lng, $type, $acc, $upd) = explode(';', $coords);\n $aplace = $this->getPlace($i, $mod, $br, $modmap);\n if (!empty($lat) && !empty($lng)){\n\t$aplace['valid'] = true;\n } else {\n\t$aplace['valid'] = false;\n }\n $places[] = array('oid'=>$lineoid,\n\t\t\t'latlng'=>$lng.','.$lat,\n\t\t\t'name'=>$aplace['name'],\n\t\t\t'valid'=>$aplace['valid'],\n\t\t\t'description'=>$aplace['descr']);\n unset($aplace);\n }\n $ret = array('places'=>$places,\n\t\t 'browse'=>$br,\n\t\t 'modmap'=>$modmap);\n if (!empty($kml)){\n $xt = new XTemplate('file://'.TZR_SHARE_DIR.'xmodmap/simplekml.xml');\n $r3=array();\n $tpldata['br']=$ret;\n $content=$xt->parse($tpldata,$r3,NULL);\n $filename = cleanFileName($modmap['name'].'.kml');\n header('Content-Name: '.$filename);\n header('Content-type: application/vnd.google-earth.kml+xml');\n header('Content-disposition: attachment; filename='.$filename);\n echo($content);\n exit(0); \n } else if ($tpl == TZR_RETURN_DATA){\n return $ret;\n } else if (empty($template)){\n // on genere le kml avec xmodmap/simplelayerkml.xml\n $xt = new XTemplate('file://'.TZR_SHARE_DIR.'xmodmap/simplelayerkml.xml');\n $r3=array();\n $tpldata['br']=$ret;\n $content=$xt->parse($tpldata,$r3,NULL);\n header('Content-type: text/xml');\n header('Content-disposition: inline');\n echo($content);\n exit(0); \n } else {\n XShell::toScreen1('br', $ret);\n }\n }", "public function obtener()\n {\n }", "private function CsomagHozzaadasa()\r\n {\r\n foreach (Lap::Nevkeszlet() as $nev)\r\n {\r\n foreach (Lap::Szinkeszlet() as $szin)\r\n {\r\n $this->lapok[]=new Lap($szin,$nev);\r\n }\r\n }\r\n }", "function listarServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_sel';\r\n\t\t$this->transaccion='tgv_SERVIC_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n\t\t$this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\t\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('id_servicio','int4');\r\n\t\t$this->captura('estado','varchar');\r\n\t\t$this->captura('estado_reg','varchar');\r\n\t\t$this->captura('id_lugar_destino','int4');\r\n\t\t$this->captura('id_ep','int4');\r\n\t\t$this->captura('fecha_asig_fin','date');\r\n\t\t$this->captura('fecha_sol_ini','date');\r\n\t\t$this->captura('descripcion','varchar');\r\n\t\t$this->captura('id_lugar_origen','int4');\r\n\t\t$this->captura('cant_personas','int4');\r\n\t\t$this->captura('fecha_sol_fin','date');\r\n\t\t$this->captura('id_funcionario','int4');\r\n\t\t$this->captura('fecha_asig_ini','date');\r\n\t\t$this->captura('id_usuario_reg','int4');\r\n\t\t$this->captura('fecha_reg','timestamp');\r\n\t\t$this->captura('id_usuario_mod','int4');\r\n\t\t$this->captura('fecha_mod','timestamp');\r\n\t\t$this->captura('usr_reg','varchar');\r\n\t\t$this->captura('usr_mod','varchar');\r\n\t\t$this->captura('desc_funcionario','text');\r\n\t\t$this->captura('desc_lugar_ini','varchar');\r\n\t\t$this->captura('desc_lugar_des','varchar');\r\n\t\t$this->captura('id_funcionario_autoriz','int4');\r\n\t\t$this->captura('observaciones','varchar');\r\n\t\t$this->captura('desc_funcionario_autoriz','text');\r\n\t\t\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t//echo '--->'.$this->getConsulta(); exit;\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "private static function Najdi_kolize ($query,$iducast){\r\n $kolize_pole = array();\r\n $dbh = Projektor2_AppContext::getDB();\r\n \r\n //echo \" <br>\". $query . \" \" . $iducast;\r\n \r\n //--\r\n Projektor2_Table_UcKolizeData::$zjistovane_kolize=array();\r\n Projektor2_Table_UcKolizeData::$nastava_kolize_ve_zjistovanych = false; \r\n //echo \"NAJDI KOLIZE\";\r\n \r\n try { \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute();\r\n while($zaznam_s_kolize = $sth->fetch(PDO::FETCH_ASSOC)) { //pro pozadovane kontroly (kolize) sestavuji dotazy\r\n //var_dump($zaznam_s_kolize);\r\n //--\r\n array_push (Projektor2_Table_UcKolizeData::$zjistovane_kolize, $zaznam_s_kolize['id_s_typ_kolize']);\r\n //echo \"Table_UcKolizeData::zjistovane_kolize\"; var_dump(Table_UcKolizeData::$zjistovane_kolize);\r\n \r\n //ze zjistenych udaju sestavuji dotazy na kolize\r\n $query_kolize = self::Sestav_dotaz_na_kolizi($zaznam_s_kolize['zobrazovany_text_kolize'], $zaznam_s_kolize['select_text'], $zaznam_s_kolize['from_text'], $zaznam_s_kolize['where_text'] );\r\n //echo \"<br>*id_s_typ_kolize a dotaz na kolizi*|\" . $zaznam_s_kolize['id_s_typ_kolize'] ;\r\n //echo \" |<br>\". $query_kolize;\r\n \r\n if ($query_kolize) {\r\n $sth = $dbh->prepare($query_kolize);\r\n $succ = $sth->execute($iducast); \r\n \r\n //while ($zaznam_kolize = $data_kolize->fetch()) { \r\n $zaznam_kolize = $sth->fetch(PDO::FETCH_ASSOC);\r\n //echo \"<br>zaznam_kolize\" ; var_dump( $zaznam_kolize );\r\n \r\n if ( $zaznam_kolize['kolize_nastala'] ) { // kolize nastava\r\n // echo \"<br>\" . $zaznam_kolize['kolize_nastala'];\r\n //--/\r\n Projektor2_Table_UcKolizeData::$nastava_kolize_ve_zjistovanych = true; // nastavi priznak, ze alespon jedna zjistovana kolize skutecne nastava\r\n \r\n // ***minula*** - kolize nastava, je treba z uc_kolize_table precist ulozena data pokud uz kolize byla a !je! validni\r\n // hledat podle iducast, id s kolize , formular-nemusi, lokace-nemusi\r\n $query_minula = \"SELECT * FROM uc_kolize_table left join s_typ_kolize on (s_typ_kolize.id_s_typ_kolize = uc_kolize_table.id_s_typ_kolize_FK) \" .\r\n \"WHERE id_ucastnik=\" . $iducast .\r\n //\" and s_typ_kolize.formular='\" . $formular .\"'\" .\r\n //\" and s_typ_kolize.lokace_kolize='\" . $lokacekolize .\"'\" .\r\n \" and s_typ_kolize.id_s_typ_kolize=\" . $zaznam_s_kolize['id_s_typ_kolize'] . \r\n \" and uc_kolize_table.valid\" ; \r\n //echo \"<br>query_minula: \" .$query_minula;\r\n $sth = $dbh->prepare($query_minula);\r\n $suvv = $sth->execute();\r\n $zaznam_minula = $sth->fetch(PDO::FETCH_ASSOC);\r\n //var_dump ($zaznam_minula);\r\n \r\n if ($zaznam_minula) {\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n $zaznam_minula['revidovano'], $zaznam_minula['revidovano_pozn'],\r\n $zaznam_minula['date_vzniku'], $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'], \r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n $zaznam_minula['id_uc_kolize_table']);\r\n }\r\n else {\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n null, null,\r\n null, $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'],\r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n null);\r\n }\r\n //var_dump($kolize); \r\n $kolize_pole[] = $kolize;\r\n \r\n \r\n \r\n } //- kolize nastava\r\n \r\n else { // kolize nenastava nevim zda i u kolize ktera nenastava mam naplnovat informace z uc_kolize_table (revidovano....)\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n null, null,\r\n null, $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'],\r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n null);\r\n \r\n $kolize_pole[] = $kolize; \r\n \r\n }\r\n \r\n //}//while\r\n \r\n }//if query \r\n \r\n } // while - pro pozadovane kontroly (kolize) sestavuji dotazy\r\n } //try\r\n catch (Exception $e) {\r\n\t//header(\"Location: ./login.php?originating_uri=\".$_SERVER['REQUEST_URI']);\r\n \r\n }\r\n//echo \"<br>**Kolize_pole v Najdi_kolize..... **\";\r\n//var_dump($kolize_pole);\r\n \r\n return $kolize_pole;\r\n \r\n}", "function get_kelas5a_json() { //data kelas1a by JSON object\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas5a();\n}", "function getPlat(){\n //cration d'une connextion à la base de donnée\n $dbh = new PDO('mysql:host=localhost;dbname=resto_db_bwb', \"root\", \"\");\n //corp de la requete SQL du point de vue metier\n $request = \"SELECT * FROM plats\";\n //executon de la requete\n $statement = $dbh->query($request);\n //récupération du resultat de la requete\n $plats = $statement->fetchAll();\n return $plats;\n }", "function listarSolicitudObligacionPagoSol()\r\n {\r\n $this->procedimiento = 'tes.ft_solicitud_obligacion_pago_sel';\r\n $this->transaccion = 'TES_SOOBPGSOL_SEL';\r\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\r\n\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('tipo_interfaz', 'tipo_interfaz', 'varchar');\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_obligacion_pago', 'int4');\r\n $this->captura('id_proveedor', 'int4');\r\n $this->captura('desc_proveedor', 'varchar');\r\n $this->captura('estado', 'varchar');\r\n $this->captura('tipo_obligacion', 'varchar');\r\n $this->captura('id_moneda', 'int4');\r\n $this->captura('moneda', 'varchar');\r\n $this->captura('obs', 'varchar');\r\n $this->captura('porc_retgar', 'numeric');\r\n $this->captura('id_subsistema', 'int4');\r\n $this->captura('nombre_subsistema', 'varchar');\r\n $this->captura('id_funcionario', 'int4');\r\n $this->captura('desc_funcionario1', 'text');\r\n $this->captura('estado_reg', 'varchar');\r\n $this->captura('porc_anticipo', 'numeric');\r\n $this->captura('id_estado_wf', 'int4');\r\n $this->captura('id_depto', 'int4');\r\n $this->captura('nombre_depto', 'varchar');\r\n $this->captura('num_tramite', 'varchar');\r\n $this->captura('id_proceso_wf', 'int4');\r\n $this->captura('fecha_reg', 'timestamp');\r\n $this->captura('id_usuario_reg', 'int4');\r\n $this->captura('fecha_mod', 'timestamp');\r\n $this->captura('id_usuario_mod', 'int4');\r\n $this->captura('usr_reg', 'varchar');\r\n $this->captura('usr_mod', 'varchar');\r\n $this->captura('fecha', 'date');\r\n $this->captura('numero', 'varchar');\r\n $this->captura('tipo_cambio_conv', 'numeric');\r\n $this->captura('id_gestion', 'integer');\r\n $this->captura('comprometido', 'varchar');\r\n $this->captura('nro_cuota_vigente', 'numeric');\r\n $this->captura('tipo_moneda', 'varchar');\r\n $this->captura('total_pago', 'numeric');\r\n $this->captura('pago_variable', 'varchar');\r\n $this->captura('id_depto_conta', 'integer');\r\n $this->captura('total_nro_cuota', 'integer');\r\n $this->captura('fecha_pp_ini', 'date');\r\n $this->captura('rotacion', 'integer');\r\n $this->captura('id_plantilla', 'integer');\r\n $this->captura('desc_plantilla', 'varchar');\r\n $this->captura('desc_funcionario', 'text');\r\n $this->captura('ultima_cuota_pp', 'numeric');\r\n $this->captura('ultimo_estado_pp', 'varchar');\r\n $this->captura('tipo_anticipo', 'varchar');\r\n $this->captura('ajuste_anticipo', 'numeric');\r\n $this->captura('ajuste_aplicado', 'numeric');\r\n $this->captura('monto_estimado_sg', 'numeric');\r\n $this->captura('id_obligacion_pago_extendida', 'integer');\r\n $this->captura('desc_contrato', 'text');\r\n $this->captura('id_contrato', 'integer');\r\n $this->captura('obs_presupuestos', 'varchar');\r\n $this->captura('uo_ex', 'varchar');\r\n\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "function get_kelas2a_json() { //data kelas1a by JSON object\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas2a();\n}", "function f_app_lov($lov)\n {\n//############################################ HELP #############################################################################\n/*\n unset($lov);\n $lov[\"name\"] = \"procesi\"; //DS -> sherben vetem per funksionin lov_default_values();\n $lov[\"obj_or_label\"] = \"object\"; //DS -> sherben vetem per funksionin lov_name_default_values(); pranon vetem vlerat object, label; default = object;\n $lov[\"type\"] = \"dinamik\"; //*DS -> pranon vlerat dinamik, statik;\n $lov[\"object_name\"] = \"id_proces\"; //*DS -> emri i objektit LOV;\n $lov[\"tab_name\"] = \"proces\"; //*D -> per tipin=\"dinamik\" emri tabeles ku do behet select | per tipin=\"statik\" sduhet;\n $lov[\"id\"] = \"id_proces\"; //*DS -> per tipin=\"dinamik\" emri i fushes qe ruan kodin | per tipin=\"statik\" lista e kodeve te ndara me ndaresin perkates, default ,;\n $lov[\"field_name\"] = \"name_proces\"; //*DS -> per tipin=\"dinamik\" emri i fushes qe ruan emertimin, mund te perdoret p.sh: Concat(id_proces, ' ', name_proces) | per tipin=\"statik\" lista e emertimeve te ndara me ndaresin perkates, default ,;\n\n $lov[\"layout_object\"] = \"\"; //DS -> pranon vlerat: select, select-multiple, checkbox, radio; default = select;\n $lov[\"layout_forma\"] = \"\"; //DS -> ka kuptim vetem per $lov[\"layout_object\"] = checkbox ose radio; ne rast se vendoset vlera 'table' elementet e lov strukturohen ne nje tabele; vlera te ndryshme jane: <br> = elementet thyhen njeri poshte tjetrit; &nbsp = elementet ndahen me nje ose me shume spacio; default = <br>;\n\n $lov[\"filter\"] = \"WHERE id_proces < 30\"; //D -> per tipin=\"dinamik\" kushti i filtrimit te te dhenave, default = '', p.sh: WHERE status = 1 AND id > 0 (mos haroni 'WHERE');\n $lov[\"filter_plus\"] = \"\"; //D -> per tipin=\"dinamik\" kusht filtrimi shtese, default = '', p.sh: AND status = 1 AND id > 0 (mos haroni qe 'WHERE' ne kete rast nuk duhet sepse duhet ta kete variabli $filter); meret parasysh vetem kur $filter != ''; filtrimi i vlerave kryhet: $filter.\" \".$filter_plus\n\n $lov[\"distinct\"] = \"F\"; //D -> per tipin=\"dinamik\", pranon vlerat T,F (pra true ose false), default = 'F', pra ti beje distinct vlerat apo jo;\n $lov[\"disabled\"] = \"F\"; //DS -> pranon vlerat T,F (pra true ose false), default = 'F';\n\n $lov[\"null_print\"] = \"T\"; //DS -> pranon vlerat T,F (pra true ose false), default select = 'T', default select-multiple = 'F'; ka kuptim vetem per $lov[\"layout_object\"] = \"select\",\"select-multiple\" ;\n $lov[\"null_id\"] = \"\"; //DS -> ne rast se $lov[\"null_print\"] == 'T' id e rekordit te pare ne liste, zakonisht lihet bosh, default = '';\n $lov[\"null_etiketa\"] = \"\"; //DS -> ne rast se $lov[\"null_print\"] == 'T' etiketa e rekordit te pare ne liste, zakonisht lihet bosh, ose Zgjidhni emertimin, default = '';\n\n $lov[\"id_select\"] = \"1\"; //DS -> vlerat e kodit qe duhet te dalin te selektuara te ndara me ndaresin perkates default ,(presje); bosh kur s'duam te dali ndonje vlere e selektuar; kur eshte vetem nje vlere vendoset vetem vlera e kodit pa presje;\n $lov[\"order_by\"] = \"name_proces\"; //D -> emri i kolones qe do perdoret per order, default = $lov[\"field_name\"] | per tipin=\"statik\" sduhet;\n $lov[\"valid\"] = \"1,0,0,0,0,0\"; //DS -> Validimet e ndryshme JS, normalisht kjo fushe testohet vetem me shifren e pare pra te lejoje ose jo NULL;\n $lov[\"alert_etiketa\"] = \"Serveri\"; //DS -> Etiketa e fushes qe do perdoret ne alertet ne validimet JS, mos perdorni thonjeza teke dopjo;\n $lov[\"ndares_vlerash\"] = \",\"; //S -> stringa qe ndan vlerat e listes statike (kod dhe emertim), default = ,(presje);\n $lov[\"class\"] = \"\"; //DS -> emri i klases ne style, default = 'txtbox'; per $lov[\"layout_object\"] = checkbox, radio po spati vlere nuk meret parasysh\n $lov[\"width\"] = \"300\"; //DS -> gjeresia ne piksel e LOV, ne rast se lihet bosh LOV i bindet gjeresise qe eshte percaktuar tek klasa, perndryshe gjeresia e LOV mer vleren e percaktuar;\n $lov[\"height\"] = \"60\"; //DS -> lartesia ne piksel e LOV; vlen vetem per tipin select-multiple; ne rast se lihet bosh LOV i bindet lartesise qe eshte percaktuar tek klasa, perndryshe lartesia e LOV mer vleren e percaktuar;\n \n \n $lov[\"class_etiketa\"] = \"\"; //DS -> emri i klases ne style per etiketat per $lov[\"layout_object\"] = checkbox, radio, vetem ne rastet kur strukturohen ne tabele; po spati vlere nuk meret parasysh;\n $lov[\"isdate\"] = \"\"; //D -> pranon vlerat T,F (pra true ose false), default = 'F'; perdoret kur etiketa eshte e tipit date;\n $lov[\"asc_desc\"] = \"\"; //D -> per orderin, pranon vlerat ASC,DESC; default = 'ASC';;\n $lov[\"triger_function\"]= \"\"; //DS -> emri i funksionit qe do trigerohet;\n\n $lov[\"element_id\"] = \"\"; //DS ID qe deshironi te kete elementi; sintaksa qe kthen lov kur ky variabel eshte i ndryshem nga bosh : id='$lov[\"element_id\"]'; kur variabli eshte bosh lov kthen default: id='$lov[\"object_name\"]';\n $lov['tabindex'] = ''; //tabindex ne html vetem numri 1 ose 12\n*/\n//############################################ HELP #############################################################################\n\n $lov_array_id = \"\";\n $lov_array_name = \"\";\n\n $lov_alert_etiketa = \"\";\n IF (isset($lov[\"alert_etiketa\"]) AND ($lov[\"alert_etiketa\"]!=\"\"))\n {$lov_alert_etiketa .= \"etiketa='\".$lov[\"alert_etiketa\"].\"'\";}\n\n $lov_valid = \"\";\n IF (isset($lov[\"valid\"]) AND ($lov[\"valid\"]!=\"\"))\n {$lov_valid .= \"valid='\".$lov[\"valid\"].\"'\";}\n\n $disabled = \"\";\n IF ($lov[\"disabled\"] == \"T\")\n {$disabled = \" disabled\";}\n\n IF (!isset($lov[\"layout_object\"]) OR ($lov[\"layout_object\"]==\"\"))\n {$lov[\"layout_object\"] = \"select\";}\n\n IF (!isset($lov[\"ndares_vlerash\"]) OR ($lov[\"ndares_vlerash\"]==\"\"))\n {$lov[\"ndares_vlerash\"] = \",\";}\n\n $triger_function = \"\";\n IF (ISSET($lov[\"triger_function\"]) AND ($lov[\"triger_function\"] != \"\"))\n {$triger_function = $lov[\"triger_function\"];}\n\n $element_id = \"\";\n IF (ISSET($lov[\"element_id\"]) AND ($lov[\"element_id\"] != \"\"))\n {$element_id = \" id='\".$lov[\"element_id\"].\"' \";}\n ELSE\n {$element_id = \" id='\".$lov[\"object_name\"].\"' \";}\n \n $tabindex = '';\n IF (ISSET($lov['tabindex']) AND ($lov['tabindex'] != ''))\n {$tabindex = ' tabindex=\"'.$lov['tabindex'].'\" ';}\n\n //PER LISTEN DINAMIKE ---------------------------------------------------------------------------------------------------------\n IF ($lov[\"type\"] == \"dinamik\")\n {\n IF (!isset($lov[\"order_by\"]) OR ($lov[\"order_by\"]==\"\"))\n {$lov[\"order_by\"] = $lov[\"field_name\"];}\n\n $filter = \"\";\n IF (ISSET($lov[\"filter\"]) AND ($lov[\"filter\"] != \"\"))\n {\n $filter = $lov[\"filter\"];\n IF (ISSET($lov[\"filter_plus\"]) AND ($lov[\"filter_plus\"] != \"\"))\n {$filter .= \" \".$lov[\"filter_plus\"];}\n }\n\n $lov_distinct = \"\";\n IF (ISSET($lov[\"distinct\"]) AND ($lov[\"distinct\"] == \"T\"))\n {$lov_distinct = \"DISTINCT\";}\n\n IF (!isset($lov[\"asc_desc\"]) OR ($lov[\"asc_desc\"]==\"\"))\n {$lov[\"asc_desc\"] = \"ASC\";}\n\n IF ($lov[\"isdate\"] == \"T\")\n {$sql = \"SELECT \".$lov_distinct.\" \".$lov[\"id\"].\" as id_as, IF(\".$lov[\"field_name\"].\" IS NULL, '',DATE_FORMAT(\".$lov[\"field_name\"].\",'%d.%m.%Y')) AS fusha_as_as, \".$lov[\"field_name\"].\" as field_name_order FROM \".$lov[\"tab_name\"].\" \".$filter.\" ORDER BY field_name_order \".$lov[\"asc_desc\"];}\n ELSE\n {$sql = \"SELECT \".$lov_distinct.\" \".$lov[\"id\"].\" as id_as, IF(\".$lov[\"field_name\"].\" IS NULL, '',\".$lov[\"field_name\"].\") AS fusha_as_as FROM \".$lov[\"tab_name\"].\" \".$filter.\" ORDER BY \".$lov[\"order_by\"].\" \".$lov[\"asc_desc\"];}\n\n //print $sql;\n $i = -1;\n $rs = WebApp::execQuery($sql);\n $rs->MoveFirst();\n while (!$rs->EOF())\n {\n $id = $rs->Field(\"id_as\");\n $name = $rs->Field(\"fusha_as_as\");\n\n $i = $i + 1;\n $lov_array_id[$i] = $id;\n $lov_array_name[$i] = $name;\n\n $rs->MoveNext();\n }\n }\n //PER LISTEN DINAMIKE =========================================================================================================\n\n //PER LISTEN STATIKE ----------------------------------------------------------------------------------------------------------\n IF ($lov[\"type\"] == \"statik\")\n {\n $lov_array_id = EXPLODE($lov[\"ndares_vlerash\"], $lov[\"id\"]);\n $lov_array_name = EXPLODE($lov[\"ndares_vlerash\"], $lov[\"field_name\"]);\n }\n //PER LISTEN STATIKE ==========================================================================================================\n\n //FORMOHET HTML E LOV ---------------------------------------------------------------------------------------------------------\n IF ((($lov[\"layout_object\"] == \"checkbox\") OR ($lov[\"layout_object\"] == \"radio\")) AND ($lov[\"only_options\"] == \"Y\"))\n {\n $lov_html = array();\n }\n ELSE\n {\n $lov_html = \"\";\n }\n \n IF (($lov[\"layout_object\"] == \"select\") OR ($lov[\"layout_object\"] == \"select-multiple\"))\n {\n IF (!isset($lov[\"class\"]) OR ($lov[\"class\"]==\"\"))\n {$lov[\"class\"] = \"form-control input-xs\";}\n\n IF (!isset($lov[\"null_print\"]) OR ($lov[\"null_print\"]==\"\"))\n {\n IF ($lov[\"layout_object\"] == \"select-multiple\")\n {$lov[\"null_print\"] = \"F\";}\n ELSE\n {$lov[\"null_print\"] = \"T\";}\n }\n \n \n IF (!isset($lov[\"null_id\"]))\n {$lov[\"null_id\"] = \"\";}\n IF (!isset($lov[\"null_etiketa\"]))\n {$lov[\"null_etiketa\"] = \"\";}\n\n $lov_style = \"\";\n IF ((isset($lov[\"width\"]) AND ($lov[\"width\"]!=\"\")) OR (isset($lov[\"height\"]) AND ($lov[\"height\"]!=\"\")))\n {\n $lov_style .= \"style='\";\n IF (isset($lov[\"width\"]) AND ($lov[\"width\"]!=\"\"))\n {$lov_style .= \"width:\".$lov[\"width\"].\"px;\";}\n IF (isset($lov[\"height\"]) AND ($lov[\"height\"]!=\"\"))\n {$lov_style .= \"height:\".$lov[\"height\"].\"px;\";}\n $lov_style .= \"'\";\n }\n\n $multiple = \"\";\n IF ($lov[\"layout_object\"] == \"select-multiple\")\n {$multiple = \"MULTIPLE\";}\n \n \n IF ($lov[\"only_options\"] == \"Y\")\n {\n //select nuk e perfshime\n }\n ELSE\n {\n $lov_html = \"<select \".$multiple.\" name='\".$lov[\"object_name\"].\"' \".$disabled.\" class='\".$lov[\"class\"].\"' \".$lov_valid.\" \".$lov_alert_etiketa.\" \".$lov_style.\" \".$triger_function.\" \".$element_id.\" \".$tabindex.\">\";\n }\n \n IF ($lov[\"null_print\"] == \"T\")\n {$lov_html .= \"<option value='\".$lov[\"null_id\"].\"'>\".$lov[\"null_etiketa\"].\"</option>\";}\n\n //per rastin kur SELECT_ONE perdoret si select-multiple shtojme nje rresht ne fund te LOV; -- \n $nr_id_select = 0;\n $name_id_select = \"\";\n //===========================================================================================\n $id_select_txt = $lov[\"ndares_vlerash\"].$lov[\"id_select\"].$lov[\"ndares_vlerash\"];\n FOR ($i=0; $i < count($lov_array_id); $i++)\n {\n $lov_array_id_txt = $lov[\"ndares_vlerash\"].$lov_array_id[$i].$lov[\"ndares_vlerash\"];\n\n IF (stristr($id_select_txt, $lov_array_id_txt))\n {\n $selected_txt = \" selected\";\n $nr_id_select = $nr_id_select + 1;\n $name_id_select .= \" | \".$lov_array_name[$i];\n }\n ELSE\n {$selected_txt = \"\";}\n\n $lov_html .= \"<option value='\".$lov_array_id[$i].\"'\".$selected_txt.\">\".$lov_array_name[$i].\"</option>\";\n }\n\n //per rastin kur SELECT_ONE perdoret si select-multiple shtojme nje rresht ne fund te LOV; ------- \n IF (($lov[\"layout_object\"] == \"select\") AND ($nr_id_select > 1))\n {\n //po e komentoje kete se do perdor element te tjere\n //$lov_html .= \"<option value='\".$lov[\"id_select\"].\"' selected>\".SUBSTR($name_id_select,3).\"</option>\";\n }\n //================================================================================================\n \n IF ($lov[\"only_options\"] == \"Y\")\n {\n //select nuk e perfshime\n }\n ELSE\n {\n $lov_html .= \"</select>\";\n }\n }\n\n IF (($lov[\"layout_object\"] == \"checkbox\") OR ($lov[\"layout_object\"] == \"radio\"))\n {\n IF (!isset($lov[\"class\"]) OR ($lov[\"class\"]==\"\"))\n {$lov[\"class\"] = \"\";}\n ELSE\n {$lov[\"class\"] = \"class='\".$lov[\"class\"].\"'\";}\n\n IF (!isset($lov[\"class_etiketa\"]) OR ($lov[\"class_etiketa\"]==\"\"))\n {$lov[\"class_etiketa\"] = \"\";}\n ELSE\n {$lov[\"class_etiketa\"] = \"class='\".$lov[\"class_etiketa\"].\"'\";}\n\n IF (!isset($lov[\"layout_forma\"]) OR ($lov[\"layout_forma\"]==\"\"))\n {$lov[\"layout_forma\"] = \"<br>\";}\n\n IF ($lov[\"layout_forma\"] == \"table\")\n {$lov_html .= \"<Table border=0 cellspacing=0 cellpadding=0>\";}\n\n\n $id_select_txt = $lov[\"ndares_vlerash\"].$lov[\"id_select\"].$lov[\"ndares_vlerash\"];\n FOR ($i=0; $i < count($lov_array_id); $i++)\n {\n $lov_array_id_txt = $lov[\"ndares_vlerash\"].$lov_array_id[$i].$lov[\"ndares_vlerash\"];\n\n IF (stristr($id_select_txt, $lov_array_id_txt))\n {$selected_txt = \" checked\";}\n ELSE\n {$selected_txt = \"\";}\n\n IF ($lov[\"only_options\"] == \"Y\")\n {\n $lov_html[$lov_array_id[$i]][\"name\"] = $lov_array_name[$i];\n $lov_html[$lov_array_id[$i]][\"checked\"] = SUBSTR($selected_txt, 1);\n }\n ELSE\n {\n $lov_element_id = \"<input type='\".$lov[\"layout_object\"].\"' \".$lov[\"class\"].\" name='\".$lov[\"object_name\"].\"' value='\".$lov_array_id[$i].\"' \".$lov_valid.\" \".$lov_alert_etiketa.\" \".$selected_txt.\" \".$disabled.\" \".$triger_function.\" \".$element_id.\" \".$tabindex.\">\";\n\n IF ($lov[\"layout_forma\"] == \"table\")\n {\n $lov_html .= \"<TR>\";\n $lov_html .= \"<TD>\".$lov_element_id.\"</TD>\";\n $lov_html .= \"<TD \".$lov[\"class_etiketa\"].\">\".$lov_array_name[$i].\"</TD>\";\n $lov_html .= \"</TR>\";\n }\n ELSE\n {\n IF ($i == 0)\n {$lov_html .= $lov_element_id.$lov_array_name[$i];}\n ELSE\n {$lov_html .= $lov[\"layout_forma\"].$lov_element_id.$lov_array_name[$i];}\n }\n }\n }\n \n IF ($lov[\"layout_forma\"] == \"table\")\n {\n IF ($lov[\"only_options\"] == \"Y\")\n {\n //\n }\n ELSE\n {\n $lov_html .= \"</Table>\";\n }\n }\n }\n //FORMOHET HTML E LOV =========================================================================================================\n\n RETURN $lov_html;\n }", "private function f_ListarValidado(){\n $lobj_AccesoZona = new cls_AccesoZona;\n //creo la peticion\n $pet = array(\n 'operacion' => 'buscarZonas',\n 'codigo_usuario' => $_SESSION['Con']['Nombre']\n );\n //guardo los datos en el objeto y gestiono para obtener una respuesta\n $lobj_AccesoZona->setPeticion($pet);\n $zona = $lobj_AccesoZona->gestionar();\n $cadenaBusqueda = ' where codigo_zona in(';\n if($zona['success'] == 1){\n for($x = 0;$x < count($zona['registros']) - 1; $x++){\n $cadenaBusqueda .= $zona['registros'][$x].',';\n }\n $cadenaBusqueda .= $zona['registros'][count($zona['registros']) - 1].' ';\n }\n $cadenaBusqueda .= \") \";\n $cadenaBusqueda .= ($this->aa_Atributos['valor']=='')?'':\"and nombre_finca like '%\".$this->aa_Atributos['valor'].\"%'\";\n $ls_SqlBase=\"SELECT * FROM agronomia.vfinca $cadenaBusqueda\";\n $orden = ' order by codigo_productor,letra';\n $ls_Sql = $this->f_ArmarPaginacion($ls_SqlBase,$orden);\n $x=0;\n $la_respuesta=array();\n $this->f_Con();\n $lr_tabla=$this->f_Filtro($ls_Sql);\n while($la_registros=$this->f_Arreglo($lr_tabla)){\n $la_respuesta[$x]['codigo']=$la_registros['codigo_productor'];\n $la_respuesta[$x]['nombre']=$la_registros['codigo_productor'].'-'.$la_registros['letra'];\n $la_respuesta[$x]['id_finca']=$la_registros['id_finca'];\n $x++;\n }\n $this->f_Cierra($lr_tabla);\n $this->f_Des();\n $this->aa_Atributos['registros'] = $la_respuesta;\n $lb_Enc=($x == 0)?false:true;\n return $lb_Enc;\n }", "function get_kelas3a_json() { //data kelas1a by JSON object\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas3a();\n}", "function rest_get($request, $data) {\n //Autentikacija\n if(!isset($_SESSION['username'])){\n header(\"Location: http://\" . $_SERVER[\"HTTP_HOST\"]. \"/error.html\");\n }\n $array = explode(\"/\", $request);\n $priv = $array[count($array)-2];\n $tmp = $array[count($array)-1];\n $username = htmlentities($tmp);\n $klasa = htmlentities($priv);\n try{\n $veza = connect();\n }catch (PDOException $ex){\n echo $ex->getMessage();\n die();\n }\n if($klasa===\"admin\"){\n if($username===\"all\"){\n $admini = $veza->query(\n \"SELECT username, registrovan, email FROM korisnici WHERE admin='1'\"\n );\n print \"{ \\\"admini\\\": \" . json_encode($admini->fetchAll()) . \"}\";\n }else{\n $admini = $veza->prepare(\n \"SELECT username, registrovan, email FROM korisnici WHERE admin='1' AND username=?\"\n );\n $admini->execute(\n array($username)\n );\n print \"{ \\\"admin\\\": \" . json_encode($admini->fetchAll()) . \"}\";\n }\n }\n\n}", "function konversi_data($spout, $status = 0)\n{\n\n $spout_log = array();\n $spout_log[ kode ] = ($spout[ kode ]);\n $spout_log[ kode2 ] = ($spout[ kode2 ]);\n $spout_log[ kode3 ] = ($spout[ kode3 ]);\n $spout_log[ kode4 ] = ($spout[ kode4 ]);\n $spout_log[ kode5 ] = ($spout[ kode5 ]);\n $spout_log[ Uraian ] = ($spout[ Uraian ]);\n if($status == 0) {\n $spout_log[ no_aset ] = ($spout[ no_aset ]);\n $spout_log[ riwayat ] = ($spout[ riwayat ]);\n } else {\n $spout_log[ no_aset ] = ($spout[ Aset_ID ]);\n $spout_log[ riwayat ] = ($spout[ log_id ]);\n }\n $spout_log[ saldo_awal_jml ] = abs ($spout[ saldo_awal_jml ]);\n $spout_log[ saldo_awal_nilai ] = abs ($spout[ saldo_awal_nilai ]);\n $spout_log[ saldo_awal_akm ] = abs ($spout[ saldo_awal_akm ]);\n $spout_log[ saldo_awal_nilaibuku ] = abs ($spout[ saldo_awal_nilaibuku ]);\n\n $spout_log[ koreksi_tambah_jml ] = abs ($spout[ koreksi_tambah_jml ]);\n $spout_log[ koreksi_tambah_nilai ] = abs ($spout[ koreksi_tambah_nilai ]);\n \n $spout_log[ bj_aset_baru ] = abs ($spout[ bj_aset_baru ]);\n $spout_log[ bj_aset_kapitalisasi ] = abs ($spout[ bj_aset_kapitalisasi ]);\n\n $spout_log[ bj_total_brg ] = abs ($spout[ bj_total_brg ]);\n $spout_log[ bj_total_nilai ] = abs ($spout[ bj_total_nilai ]);\n\n $spout_log[ bm_aset_baru ] = abs ($spout[ bm_aset_baru ]);\n $spout_log[ bm_aset_kapitalisasi ] = abs ($spout[ bm_aset_kapitalisasi ]);\n $spout_log[ bm_total_nilai ] = abs ($spout[ bm_total_nilai ]);\n $spout_log[ bm_total_brg ] = abs ($spout[ bm_total_brg ]);\n \n $spout_log[ hibah_jml ] = abs ($spout[ hibah_jml ]);\n $spout_log[ hibah_nilai ] = abs ($spout[ hibah_nilai ]);\n $spout_log[ transfer_skpd_tambah_jml ] = abs ($spout[ transfer_skpd_tambah_jml ]);\n $spout_log[ transfer_skpd_tambah_nilai ] = abs ($spout[ transfer_skpd_tambah_nilai ]);\n\n $spout_log[ reklas_aset_tambah_jml ] = abs ($spout[ reklas_aset_tambah_jml ]);\n $spout_log[ reklas_aset_tambah_nilai ] = abs ($spout[ reklas_aset_tambah_nilai ]);\n\n\n $spout_log[ inventarisasi_jml ] = abs ($spout[ inventarisasi_jml ]);\n $spout_log[ inventarisasi_nilai ] = abs ($spout[ inventarisasi_nilai ]);\n \n $spout_log[ jumlah_mutasi_tambah_jml ] = abs ($spout[ jumlah_mutasi_tambah_jml ]);\n $spout_log[ jumlah_mutasi_tambah_nilai ] = abs ($spout[ jumlah_mutasi_tambah_nilai ]);\n $spout_log[ koreksi_penyusutan_tambah ] = abs ($spout[ koreksi_penyusutan_tambah ]);\n $spout_log[ bp_penyusutan_tambah ] = abs ($spout[ bp_penyusutan_tambah ]);\n $spout_log[ bp_berjalan ] = abs ($spout[ bp_berjalan ]);\n\n $spout_log[ koreksi_kurang_jml ] = abs ($spout[ koreksi_kurang_jml ]);\n $spout_log[ koreksi_kurang_nilai ] = abs ($spout[ koreksi_kurang_nilai ]);\n \n $spout_log[ hapus_hibah_nilai ] = abs ($spout[ hapus_hibah_nilai ]);\n $spout_log[ hapus_lelang_nilai ] = abs ($spout[ hapus_lelang_nilai ]);\n $spout_log[ hapus_hilang_musnah_nilai ] = abs ($spout[ hapus_hilang_musnah_nilai ]);\n $spout_log[ hapus_total_jml ] = abs ($spout[ hapus_total_jml ]);\n $spout_log[ hapus_total_nilai ] = abs ($spout[ hapus_total_nilai ]);\n \n $spout_log[ transfer_skpd_kurang_jml ] = abs ($spout[ transfer_skpd_kurang_jml ]);\n $spout_log[ transfer_skpd_kurang_nilai ] = abs ($spout[ transfer_skpd_kurang_nilai ]);\n\n $spout_log[ reklas_krg_aset_tetap ] = abs ($spout[ reklas_krg_aset_tetap ]);\n $spout_log[ reklas_krg_ekstra ] = abs ($spout[ reklas_krg_ekstra ]);\n $spout_log[ reklas_krg_aset_lain ] = abs ($spout[ reklas_krg_aset_lain ]);\n $spout_log[ reklas_krg_aset_bm_tdk_dikapitalisasi ] = abs ($spout[ reklas_krg_aset_bm_tdk_dikapitalisasi ]);\n\n $spout_log[ reklas_krg_jml ] = abs ($spout[ reklas_krg_jml ]);\n $spout_log[ reklas_krg_nilai ] = abs ($spout[ reklas_krg_nilai ]);\n \n $spout_log[ jumlah_mutasi_kurang_jml ] = abs ($spout[ jumlah_mutasi_kurang_jml ]);\n $spout_log[ jumlah_mutasi_kurang_nilai ] = abs ($spout[ jumlah_mutasi_kurang_nilai ]);\n $spout_log[ koreksi_penyusutan_kurang ] = abs ($spout[ koreksi_penyusutan_kurang ]);\n $spout_log[ bp_penyusutan_kurang ] = abs ($spout[ bp_penyusutan_kurang ]);\n \n $spout_log[ NilaiPerolehan ] = abs ($spout[ NilaiPerolehan ]);\n $spout_log[ Saldo_akhir_jml ] = abs ($spout[ Saldo_akhir_jml ]);\n $spout_log[ AkumulasiPenyusutan ] = abs ($spout[ AkumulasiPenyusutan ]);\n $spout_log[ NilaiBuku ] = abs ($spout[ NilaiBuku ]);\n\n\n $spout_log[ Kd_Riwayat ] = ($spout[ Kd_Riwayat ]);\n $spout_log[ log_data ] = ($spout[ log_data ]);\n return $spout_log;\n}", "public function nahrajObrazky(){\t\t\t\n\t\t\t$dotaz = \"SELECT obrazekID,filepath,tabObrazky.uzivatelID,uzivatelJmeno FROM tabObrazky \n\t\t\t\t\tJOIN tabUzivatele ON tabUzivatele.uzivatelID = tabObrazky.uzivatelID WHERE 1 \";\n\t\t\t\n\t\t\t\t//echo \"X \".$dotaz .\" X\";\n\t\t\t\n\t\t\t$vysledek = mysqli_query($this -> pripojeni,$dotaz);\n\t\t\t$vratit = array();\n\t\t\t\n\t\t\tif($vysledek == false){\n\t\t\t\techo(\"During data upload an error occured!\" . mysqli_error($this->pripojeni) );\n\t\t\t}\n\t\telse{\n\t\t\t//case result is mysqli_result\n\t\t\t$pole = $vysledek->fetch_all(MYSQLI_ASSOC);\n\t\t\tforeach($pole as $radek ){\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tforeach($radek as $x => $x_value) {\n\t\t\t\t\techo \"Key=\" . $x . \", Value=\" . $x_value;\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t}\n\t\t\t\t*/\n\n\t\t\t\t$obrazekID = $radek[\"obrazekID\"];\n\t\t\t\t$filePath = $radek[\"filepath\"];\n\t\t\t\t$uzivatelID = $radek[\"uzivatelID\"];\n\t\t\t\t$jmenoUzivateleCoNahral = $radek[\"uzivatelJmeno\"];\t\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\techo $obrazekID;\n\t\t\t\techo $filePath;\n\t\t\t\techo $uzivatelID;\n\t\t\t\t*/\n\t\t\t\t//echo '*'.$jmenoUzivateleCoNahral.'*';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$obrazek = new obrazekObjekt($obrazekID, $filePath,$uzivatelID,$jmenoUzivateleCoNahral);\n\t\t\t\t\n\t\t\t\t//echo $obrazek->filePath;\n\t\t\t\t//echo $obrazek->jmenoUzivateleCoNahral;\n\t\t\t\t\n\t\t\t\tarray_push($vratit,$obrazek); \n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\t\n\t\treturn\t$vratit;\t\t\n\t\t\n\t}", "function get_kelas6a_json() { //data kelas1a by JSON object\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas6a();\n}", "public function run()\n {\n\n\n $kierunki=[\n 'Ekonomiczno-prawny',\n 'Informatyka w biznesie',\n 'Finanse i rachunkowość',\n 'Zarządzanie',\n 'informatyka i ekonometria',\n 'Gospodarka nieruchomościami',\n 'Przedsiębiorczość i inwestycje'\n ];\n\n $jezyki=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski'\n ];\n\n $ekonomiczno_prawny=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'ochrona własności intelektualnej','poprawna polszczyzna w praktyce','technologie informacyjne','wychowanie fizyczne',\n 'historia prawa','metody ilościowe w ekonomii','podstawy ekonomii','prawo cywilne cześć ogólna i rzeczowa','wstęp do prawoznawstwa',\n 'analiza i interpretacja informacji gospodarczych','etyka w biznesie','finanse przedsiębiorstw','inwestycje i wycena przedsiębiorstw',\n 'narzędzia informatyczne w ekonomii','nauka o przedsiębiorstwie',\n 'postępowanie administracyjne','prawo administracyjne','prawo cywilne – zobowiązania','prawo finansowe prawo','gospodarcze publiczne',\n 'prawo karne skarbowe','prawo podatkowe','prawo Unii Europejskiej','rynki finansowe','rynki towarowe','seminarium dyplomowe','szkolenie BHP',\n 'szkolenie biblioteczne','bankowość','ekonomia menadżerska','planowanie finansowe w przedsiębiorstwie','podstawy sprawozdawczości finansowej w przedsiębiorstwie',\n 'prawne aspekty gospodarki nieruchomościami',\n 'prawo bankowe','prawo obrotu instrumentami finansowymi','prawo ubezpieczeń gospodarczych','prawo uczciwej konkurencji',\n 'prawo upadłościowe i naprawcze','ubezpieczenia','finanse publiczne i samorządowe','makroekonomia','partnerstwo publiczno-prywatne','planowanie finansowe',\n 'podstawy sprawozdawczości finansowej w jednostkach samorządu terytorialnego','prawo gospodarki komunalnej','prawo ochrony konkurencji','prawo ochrony środowiska',\n 'prawo pomocy publicznej prawo samorządu terytorialnego prawo zamówień publicznych'\n ];\n $informatyka_w_biznesie=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'ochrona własności intelektualnej',\n 'socjologia',\n 'technologie informacyjne w biznesie',\n 'wychowanie fizyczne',\n 'logika',\n 'matematyka ',\n 'podstawy finansów ',\n 'podstawy makroekonomii ',\n 'podstawy marketingu ',\n 'podstawy mikroekonomii ',\n 'podstawy rachunkowości ',\n 'podstawy zarządzania ',\n 'prawo w działalności gospodarczej ',\n 'przedsiębiorczość ',\n 'statystyka ',\n 'wstęp do informatyki w biznesie ',\n 'algorytmy i struktury danych ',\n 'analiza i projektowanie systemów informatycznych ',\n 'bazy danych',\n 'e-biznes ',\n 'grafika komputerowa dla biznesu ',\n 'komputerowe wspomaganie decyzji ',\n 'modelowanie i symulacja procesów biznesowych ',\n 'programowanie komputerów ',\n 'systemy operacyjne i technologie sieciowe w biznesie',\n 'technologie webowe w biznesie ',\n 'zarządzanie bezpieczeństwem informacji',\n 'zarządzanie projektami informatycznymi',\n 'analityka internetowa ',\n 'marketing w mediach społecznościowych ',\n 'narzędzia content marketingu',\n 'planowanie przedsięwzięć internetowych ',\n 'platformy i narzędzia social media ',\n 'pozycjonowanie i optymalizacja stron internetowych ',\n 'systemy i platformy handlu elektronicznego ',\n 'systemy zarządzania treścią ',\n 'techniki neuronauki poznawczej w biznesie ',\n 'zespołowy projekt informatyczny ',\n 'programowanie aplikacji chmurowych dla biznesu ',\n 'programowanie aplikacji mobilnych ',\n 'programowanie obiektowe ',\n 'programowanie serwisów internetowych ',\n 'projektowanie interfejsów aplikacji biznesowych ',\n 'techniki twórczego rozwiązywania problemów gospodarczych ',\n 'testowanie oprogramowania ',\n 'zespołowy projekt informatyczny'\n ];\n $finanse_i_rachunkowosc=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'ekonometria','makroekonomia','matematyka','mikroekonomia',\n 'podstawy finansów','podstawy prawa','podstawy rachunkowości',\n 'statystyka','analiza finansowa','arkusz kalkulacyjny w finansach i rachunkowości',\n 'bankowość','etyka w biznesie','ewidencje podatkowe przedsiębiorstw','finanse osobiste',\n 'finanse przedsiębiorstwa','finanse publiczne','finanse samorządowe','geografia ekonomiczna',\n 'marketing usług finansowoksięgowych','matematyka w finansach i rachunkowości',\n 'międzynarodowe stosunki gospodarcze','planowanie finansowe','podatki',\n 'podstawy zarządzania','polityka społeczna','prawo gospodarcze','rachunek kosztów',\n 'rachunkowość finansowa',\n 'rynek finansowy','ryzyko w finansach i rachunkowości','seminarium dyplomowe',\n 'sprawozdawczość finansowa','systemy finansowo-księgowe','ubezpieczenia',\n 'International Accouting','kadry i płace','organizacja rachunkowości','podstawy auditingu',\n 'rachunkowość budżetowa','rachunkowość instrumentów finansowych',\n 'rachunkowość instytucji finansowych','rachunkowość NGOs',\n 'rozliczenia publicznoprawne przedsiębiorstw','systemy finansowo-księgowe II',\n 'bankowość zaawansowana','Basic Terms in Finance and Banking',\n 'bezpieczeństwo finansów osobistych','doradztwo bankowoubezpieczeniowe',\n 'doradztwo finansowe dla biznesu','doradztwo inwestycyjne i zarządzanie aktywami',\n 'planowanie ubezpieczeniowe i emerytalne','Corporate Finance and Taxation',\n 'decyzje i kalkulacje finansowe','finanse sektora MSP',\n 'obciążenia podatkowe i pozapodatkowe przedsiębiorstwa',\n 'ordynacja podatkowa i księgi podatkowe',\n 'podatki a źródła i formy finansowania przedsiębiorstwa',\n 'relacje przedsiębiorstwa z organami podatkowymi','systemy rozliczeń podatkowych'\n ];\n $zarzadzanie=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'psychologia zarządzania','socjologia','technologie informacyjne','wychowanie fizyczne','marketing','matematyka','nauka o przedsiębiorstwie','podstawy ekonomii','podstawy finansów','podstawy prawa',\n 'podstawy rachunkowości','podstawy zarządzania','statystyka','analiza ekonomiczna','badania marketingowe','przywództwo - studia przypadków zarządzanie pracą zespołową','projektowanie organizacji','komunikacja w biznesie',\n 'gry decyzyjne','analiza danych marketingowych komunikacja marketingowa','zarządzanie sprzedażą','obsługa klienta','social media','Blok: Tworzenie i rozwój kapitału ludzkiego w organizacji [moduł]','motywowanie pracowników',\n 'rozwój pracowników','zarządzanie relacjami z pracownikami','planowanie i pozyskiwanie pracowników zarządzanie różnorodnością','ocenianie pracowników','zarządzanie zasobami niematerialnymi',\n 'metody i techniki doskonalenia jakości','kreatywność i współczesne koncepcje tworzenia innowacji','nowoczesne formy przedsiębiorstw transfer technologii','kształtowanie konkurencyjności przedsiębiorstw e-marketing',\n 'ergonomia i zarządzanie bezpieczeństwem pracy w organizacji','etyka biznesu','gospodarowanie kapitałem ludzkim','informatyka w zarządzaniu','innowacje w przedsiębiorstwie','logistyka','marketing międzynarodowy','media w zarządzaniu',\n 'metody i techniki heurystyczne','negocjacje','przedsiębiorczość','rachunkowość zarządcza','seminarium dyplomowe','tworzenie i rozwój małej firmy','zachowania konsumentów','zachowania organizacyjne','zarządzanie jakością','zarządzanie kapitałem trwałym',\n 'zarządzanie produkcją','zarządzanie projektami','zarządzanie relacjami z klientem','zarządzanie usługami','zarządzanie własnym rozwojem','zarządzanie zasobami ludzkimi','zarządzanie zmianą'\n ];\n $informatyka_i_ekonometria=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'historia filozofii','ochrona własności intelektualnej','analiza ekonomiczna','dylematy społeczeństwa informacyjnego','kompleksowe zarządzanie jakością','makroekonomia','mikroekonomia','podstawy finansów','podstawy prawa','podstawy rachunkowości',\n 'podstawy zarządzania','technologie informacyjne','algebra liniowa','algorytmy i struktury danych','analiza i projektowanie systemów informatycznych','analiza matematyczna','badania operacyjne','bazy danych','ekonometria','ekonomika informacji','informatyka ekonomiczna',\n 'IT tools in marketing (narzędzia IT w marketingu)','komunikacja biznesowa i organizacje wirtualne','matematyka finansowa','planowanie finansowe','podstawy demografii','podstawy e-biznesu','podstawy programowania','programowanie stron WWW','rachunek prawdopodobieństwa i statystyka matematyczna',\n 'regionalna polityka gospodarcza','seminarium licencjackie','sieci komputerowe - podstawy','statystyka opisowa i ekonomiczna','symulacja komputerowa systemów','technologie multimedialne','zakładanie i prowadzenie działalności gospodarczej','zastosowanie pakietów statystycznych',\n 'zintegrowane systemy zarządzania przedsiębiorstwem','informacja naukowa','szkolenie BHP','szkolenie biblioteczne','hurtownie danych','inżynieria wymagań użytkownika','metody analityki biznesowej','metody eksploracji danych','metody sztucznej inteligencji w analizie biznesowej',\n 'metody uczenia maszynowego','modelowanie procesów w analizie biznesowej','systemy business intelligence','systemy IT w ewidencji gospodarczej','systemy wspomagania decyzji biznesowych','systemy zarządzania bazami danych','zaawansowane metody analizy danych','zarządzanie bezpieczeństwem IT',\n 'zasoby wiedzy w systemach IT','analiza szeregów czasowych','ilościowa analiza skłonności','konstrukcja produktów ubezpieczeniowych','matematyka w biznesie','metody analizy trwania','metody ilościowe na rynku nieruchomości','metody inwestowania na giełdzie','metody klasyfikacji',\n 'metody wyceny nieruchomości','modelowanie rynków finansowych','pomiar zasobów ludzkich','statystyczna kontrola jakości','statystyka publiczna','symulacje obliczeniowe w biznesie','systemy pozyskiwania danych','wnioskowanie statystyczne'\n ];\n $gospodarka_niercuhomosciami=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'ochrona własności intelektualnej','sztuka wystąpień publicznych','warsztaty budowania zespołów','wychowanie fizyczne','algebra liniowa','analiza matematyczna','analiza szeregów czasowych','bazy danych','demografia','ekonometria',\n 'informatyka ekonomiczna','inwestycje na rynku finansowym','makroekonomia','matematyka finansowa','mikroekonomia','podstawy finansów publicznych','podstawy organizacji i zarządzania','podstawy rachunkowości','produkty ubezpieczeniowe w gospodarce nieruchomościami',\n 'statystyka matematyczna','statystyka opisowa','technologie CRM','zastosowania pakietów obliczeniowych','ekonomika rynku nieruchomości','gospodarka mieszkaniowa','gospodarka nieruchomościami','Metody ilościowe w wycenie firm i farm [moduł]','metody ilościowe w wycenie przedsiębiorstw',\n 'wycena farm i gospodarstw rolnych','podstawy ekonomiki przedsiębiorstw ochrona danych osobowych','podstawy prawa administracji i zobowiązań',\n 'Pośrednictwo w obrocie nieruchomościami [moduł]','ekonomiczne zagadnienia pośrednictwa na rynku nieruchomości','marketing na rynku nieruchomości','wstęp do pośrednictwa w obrocie nieruchomościami projekt grupowy operat szacunkowy',\n 'seminarium','technika nieruchomości','Teoria optymalizacji w gospodarowaniu nieruchomościami [moduł]','statystyczna kontrola jakości w gospodarce nieruchomościami','metody reprezentacyjne na rynku nieruchomości',\n 'badania operacyjne w gospodarowaniu nieruchomościami wstęp do gospodarki nieruchomościami','wstęp do wyceny nieruchomości','Wycena nieruchomości','metodyka wyceny nieruchomości','wycena nieruchomości niezurbanizowanych',\n 'wycena nieruchomości zurbanizowanych wycena podmiotów gospodarczych Zarządzanie nieruchomościami [moduł]','zarządzanie nieruchomościami inwestycyjnymi','zarządzanie nieruchomościami mieszkalnymi',\n 'podstawy planowania i zarządzania nieruchomościami zastosowania informacji przestrzennej w gospodarce nieruchomościami'\n ];\n $przedsiebiorczosc_i_inwestycje=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'etyka w biznesie','innowacje w przedsiębiorstwie','ochrona własności intelektualnej','podstawy ekonomiki przedsiębiorstw','podstawy makroekonomii','podstawy prawa dla ekonomistów','przedsiębiorczość','sztuka wystąpień publicznych',\n 'tworzenie i funkcjonowanie małej firmy','funkcjonowanie klastrów','gra decyzyjna','marketing w małej firmie','metody ilościowe w zarządzaniu przedsiębiorstwem','metody twórczego rozwiązywania problemów','narzędzia informatyczne w małej firmie',\n 'negocjacje','ocena efektywności inwestycji','opodatkowanie małych firm','podstawy rachunkowości w małych firmach','problemy biznesu w praktyce','przywództwo i kierowanie zespołem','psychologia w zarządzaniu','seminarium dyplomowe',\n 'społeczna odpowiedzialność biznesu','sprawozdawczość i analiza ekonomiczno-finansowa','wyszukiwanie, ocena wiarygodności informacji i bazy danych','zarządzanie jakością w małej firmie','zarządzanie kapitałem trwałym',\n 'zarządzanie procesami w małym przedsiębiorstwie','zarządzanie strategiczne małą firmą','zarządzanie zasobami ludzkimi','informacja naukowa','finansowanie małych firm','MSP w Unii Europejskiej','risk management','strategie innowacyjne','technologie ICT w małej firmie',\n 'transfer technologii','tworzenie biznesplanu przedsięwzięcia','wycena własności intelektualnej','zarządzanie projektami innowacyjnymi','e-biznes','internacjonalizacja małej firmy','planowanie w małym przedsiębiorstwie','social media in management and marketing of SMEs',\n 'system wspierania małych firm','wycena przedsiębiorstw','zarządzanie kreatywnością','zarządzanie projektami w małym przedsiębiorstwie','zarządzanie technologią'\n ];\n\n\n\n sort($ekonomiczno_prawny);\n sort($informatyka_w_biznesie);\n sort($finanse_i_rachunkowosc);\n sort($zarzadzanie);\n sort($informatyka_i_ekonometria);\n sort($gospodarka_niercuhomosciami);\n sort($przedsiebiorczosc_i_inwestycje);\n\n\n $kierunki_przedmioty=[\n $ekonomiczno_prawny,\n $informatyka_w_biznesie,\n $finanse_i_rachunkowosc,\n $zarzadzanie,\n $informatyka_i_ekonometria,\n $gospodarka_niercuhomosciami,\n $przedsiebiorczosc_i_inwestycje\n ];\n\n\n for ($i=0; $i < count($kierunki) ; $i++) {\n App\\Dom::create([\n 'uczelnia' => \"Wydział nauk ekonomicznych i zarządzania\",\n 'kierunek' => $kierunki[$i]\n ]);\n\n for($j=0;$j<count($kierunki_przedmioty[$i]);$j++){\n\n App\\Subject::create([\n 'dom_id' => $i+1,\n 'name' => $kierunki_przedmioty[$i][$j]\n ]);\n\n }\n }\n\n }", "function meteoGreg(){\r\n $curl = curl_init();\r\n \r\n curl_setopt_array($curl, array(\r\n CURLOPT_URL => \"api.openweathermap.org/data/2.5/find?q=Prévenchères&units=metric&appid=d196fbd705116ddcd1911b5c8606c6e0&lang=fr\",\r\n CURLOPT_RETURNTRANSFER => true,\r\n CURLOPT_TIMEOUT => 30,\r\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\r\n CURLOPT_CUSTOMREQUEST => \"GET\",\r\n CURLOPT_HTTPHEADER => array(\r\n \"cache-control: no-cache\"\r\n ),\r\n ));\r\n \r\n $response = curl_exec($curl);\r\n \r\n curl_close($curl);\r\n \r\n $response = json_decode($response, true);\r\n echo(\"<p style='text-align:center; color:#373737;'>Le temps à <b>Prévenchères</b> est actuellement <b>\".$response['list'][0]['weather'][0]['description'].\"</b> et la température est de <b>\".intval($response['list'][0]['main']['temp']).\"°C</b></p>\");\r\n}", "public function getPlatoxRestaurant($idplato) {\n $adapter = $this->tableGateway->getAdapter();\n $sql = new Sql($adapter);\n $selecttot = $sql->select()\n ->from('ta_plato')\n ->columns(array('*', 'num' => new \\Zend\\Db\\Sql\\Expression('COUNT(tc.in_id)')))\n ->join('ta_tipo_plato', 'ta_plato.ta_tipo_plato_in_id=ta_tipo_plato.in_id ', array('tipo_plato_nombre' => 'va_nombre'), 'left')\n ->join(array('pl' => 'ta_plato_has_ta_local'), 'pl.ta_plato_in_id = ta_plato.in_id', array(), 'left')\n ->join(array('tl' => 'ta_local'), 'tl.in_id = pl.ta_local_in_id', array('va_horario_opcional','de_latitud','va_email', 'de_longitud', 'va_direccion', 'va_horario', 'va_dia', 'va_telefono','va_direccion_referencia'), 'left')\n ->join(array('tr' => 'ta_restaurante'), 'tr.in_id = tl.ta_restaurante_in_id', array('restaurant_id' => 'in_id', 'restaurant_nombre' => 'va_nombre', 'restaurant_img' => 'va_imagen','web'=>'va_web'), 'left')\n ->join(array('ttc' => 'ta_tipo_comida'), 'ttc.in_id=tr.ta_tipo_comida_in_id', array('tipo_comida'=>'va_nombre_tipo'), 'left') \n ->join(array('tu' => 'ta_ubigeo'), 'tu.in_id = tl.ta_ubigeo_in_id', array('pais' => 'ch_pais', 'departamento' => 'ch_departamento', 'provincia' => 'ch_provincia', 'distrito' => 'ch_distrito'), 'left')\n ->join(array('tc' => 'ta_comentario'), 'tc.ta_plato_in_id=ta_plato.in_id', array('estado_comen'=>'en_estado'), 'left')\n// ->join(array('tcli'=>'ta_cliente'),'tcli.in_id=tc.ta_cliente_in_id',array('va_nombre_cliente','va_email'),'left')\n ->where(array('ta_plato.in_id' => $idplato,'ta_plato.en_estado' =>'activo','tr.en_estado'=>'activo'));//'tc.en_estado'=>'aprobado'\n $selecttot->group('ta_plato.in_id');\n\n $selectString = $sql->getSqlStringForSqlObject($selecttot);\n $results = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);\n\n return $results; //->toArray();\n }", "function civicrm_api3_property_contract_loadkov() {\n set_time_limit(0);\n /*\n * retrieve file name (incl. path) from dgw_config table\n */\n $sourceFile = CRM_Utils_DgwUtils::getDgwConfigValue(\"kov bestandsnaam\").\"kov_\".date(\"Ymd\").\".csv\";\n /*\n * check if source file exists\n */\n if (!file_exists($sourceFile)) {\n throw new CiviCRM_API3_Exception(\"Bronbestand $sourceFile niet gevonden, laden koopovereenkomsten mislukt\");\n } else {\n /*\n * import data and load header\n */\n $dataLoaded = _load_source_data($sourceFile);\n if ($dataLoaded == FALSE) {\n throw new API_Exception(\"Kon brongegevens niet importeren, laden koopovereenkomsten mislukt\");\n } else {\n $returnValues = array(\n 'is_error' => 0,\n 'message' => 'Koopovereenkomsten succesvol geladen in tijdelijke tabellen.'\n );\n unlink($sourceFile);\n return civicrm_api3_create_success($returnValues, array(), 'PropertyContract', 'Loadkov');\n }\n }\n}", "function prn_wejscie() {\n global $Cuzytkownik,$db, $_GLOBAL, $L;\n \n $DD[] = \"IT_AKTYWACJA\";\n \n $query = \"select * from \" . dn('kontrahent') . \" where ko_id=\" . $Cuzytkownik->get_id() . \";\";\n $res = $db->query($query);\n $dane= $db->fetch($res);\n $A['{PANELTITLE}'] = $dane['ko_nazwa'];\n \n // <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/dlaciebie/\"><div>' . $L['{T_SPECJALNIE_DLA_CIEBIE}'] . '</div></a></div>\n $A['{PANELMENU}'] = '<div class=\"steps\">\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/rabat/\"><div>' . $L['{T_TWOJ_RABAT}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/obserwowane/\"><div>' . $L['{T_OBSERWOWANE}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/uzytkownik/dane/\"><div>' . $L['{T_MOJE_DANE}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/zamowienie/\"><div>' . $L['{T_HISTORIA_ZAMOWIEN}'] . '</div></a></div>\n <div class=\"panelmenu\"><a href=\"' . $_GLOBAL['page_url'] . $_GLOBAL['lang'] . '/koszyk/\"><div>' . $L['{T_PRZEJDZ_DO_KOSZYKA}'] . '</div></a></div>\n </div>';\n\n $query = \"select * from \" . dn('cms') . \" where st_id=72;\";\n $res = $db->query($query);\n $dane= $db->fetch($res);\n \n if ($_GLOBAL['langid'] == 2) {\n $A['{PANELCONTENTSTART}'] = str_replace('\\\"','\"',$dane['st_tresc_en']);\n } else {\n $A['{PANELCONTENTSTART}'] = str_replace('\\\"','\"',$dane['st_tresc']); \n }\n \n return get_template(\"user_enter\",$A,$DD);\n }", "public function dajStatusSvomPredvidjanju()\n {\n $korisnik=$this->session->get(\"korisnik\");\n $idPred=$_COOKIE['idTek'];\n setcookie(\"idTek\", \"\", time() - 3600);\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanje=$predvidjanjeModel->dohvati_predvidjanja_id($idPred);\n $danas=date(\"Y-m-d H:i:s\");\n //moze da se podeli u tri ifa, radi lepseg ispisa, ali ovde mislim da su svi slucajevi\n if ($danas<$predvidjanje->DatumEvaluacije || $predvidjanje->Status!=\"CEKA\" || $korisnik->IdK!=$predvidjanje->IdK)//ne sme jos da mu daje status\n {\n echo \"GRESKA\";\n return;\n }\n $statusV=$this->request->getVar(\"dane\");\n if($statusV=='DA') $status=\"ISPUNJENO\";\n else $status=\"NEISPUNJENO\";\n $predvidjanjeModel->postavi_status($predvidjanje, $status);\n if ($status==\"ISPUNJENO\")\n {\n $korisnikModel=new KorisnikModel();\n $korisnikModel->uvecaj_skor($korisnik, $predvidjanje->Tezina);\n }\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n \n }", "function getdataRwyt($skpd_id, $AsetId, $tglakhirperolehan, $tglawalperolehan, $param, $tglpembukuan)\n{\n\n if($param == '01') {\n $tabel_log = 'log_tanah';\n\n $tabel = 'tanah';\n $tabel_view = 'view_mutasi_tanah';\n } elseif($param == '02') {\n $tabel_log = 'log_mesin';\n $tabel = 'mesin';\n $tabel_view = 'view_mutasi_mesin';\n } elseif($param == '03') {\n $tabel_log = 'log_bangunan';\n $tabel = 'bangunan';\n $tabel_view = 'view_mutasi_bangunan';\n } elseif($param == '04') {\n $tabel_log = 'log_jaringan';\n $tabel = 'jaringan';\n $tabel_view = 'view_mutasi_jaringan';\n } elseif($param == '05') {\n $tabel_log = 'log_asetlain';\n $tabel = 'asetlain';\n $tabel_view = 'view_mutasi_asetlain';\n } elseif($param == '06') {\n $tabel_log = 'log_kdp';\n $tabel = 'kdp';\n $tabel_view = 'view_mutasi_kdp';\n }\n\n /*Kode Riwayat\n 0 = Data baru\n 2 = Ubah Kapitalisasi\n 7 = Penghapusan Sebagian\n 21 = Koreksi Nilai\n 26 = Penghapusan Pemindahtanganan\n 27 = Penghapusan Pemusnahan\n */\n/* $paramLog = \"l.TglPerubahan >'$tglawalperolehan' and l.TglPerubahan <='$tglakhirperolehan' and l.TglPembukuan>='$tglpembukuan'\n AND l.Kd_Riwayat in (0,1,2,3,7,21,26,27,28,50,51,29) and l.Kd_Riwayat != 77 \n and l.Aset_ID = '{$AsetId}' \n order by l.Aset_ID ASC\";*/\n\n $paramLog = \"l.TglPerubahan >'$tglawalperolehan' and l.TglPerubahan <='$tglakhirperolehan' \n AND l.Kd_Riwayat in (0,1,2,3,7,21,26,27,28,50,51,29,30,281,291,36) and l.Kd_Riwayat != 77 \n and l.Aset_ID = '{$AsetId}' \n order by l.Aset_ID ASC\";\n\n\n $log_data = \"select l.* from {$tabel_log} as l \n inner join {$tabel} as t on l.Aset_ID = t.Aset_ID \n where $paramLog\";\n //pr($log_data);\n $splitKodeSatker = explode ('.', $skpd_id);\n if(count ($splitKodeSatker) == 4) {\n $paramSatker = \"kodeSatker = '$skpd_id'\";\n $paramSatker_mts_tr = \"SatkerAwal = '$skpd_id'\";\n $paramSatker_mts_rc = \"SatkerTujuan = '$skpd_id'\";\n\n } else {\n $paramSatker = \"kodeSatker like '$skpd_id%'\";\n $paramSatker_mts_tr = \"SatkerAwal like '$skpd_id%'\";\n $paramSatker_mts_rc = \"SatkerTujuan like '$skpd_id%'\";\n\n }\n $queryALL = array( $log_data );\n for ($i = 0; $i < count ($queryALL); $i++) {\n $result = mysql_query ($queryALL[ $i ]) or die ($param.\"---\".$queryALL[ $i ].\" \".mysql_error());\n if($result) {\n while ($dataAll = mysql_fetch_object ($result)) {\n if($dataAll->Kd_Riwayat == 3 && $dataAll->kodeSatker != $skpd_id) {\n\n } else {\n $getdata[] = $dataAll;\n }\n\n }\n }\n\n }\n if($getdata) {\n return $getdata;\n }\n}", "function MajesticSeo($url, $mode = 'url')\n {\n // ВАЖНО $res <> \"\" - это если нулевое значени евозвращается\n // если без HTTP тоэта функция будет выдавть отчетыи типа РУТДОМЕН\n if ($mode == 'url')\n $url = ProxyBrowser::url_http_adding($url);\n else\n $url = ProxyBrowser::domain_from_url($url);\n\n $sak = Yii::$app->get('settings')->get('system.MajesticSEO_API');\n\n $browser = new ProxyBrowser();\n $browser->interface_lang = 'en';\n $browser->use_my_external_php_proxy = true;\n $uri = 'http://simpleapi.majesticseo.com/sapi/GetBacklinkStats?datasource=fresh&items=1&item0=' . urlencode($url) . '&sak=' . $sak . '';\n $out = $browser->get_http($uri);\n\n if ($out['error']) {\n $out['description'] .= \" Скорей всего слетел API Key MajesticSeo или IP заблокировали : \" . $out['raw'];\n SystemMessagesLogController::Save(\n //0 просто мессадж серым\n //1 ключевое сообщение зеленым\n //2 красный варанинг\n //3 красный ЖИРНЫМ фатал\n 3,\n \"MajesticSeo_forURL\",\n $out['description']\n );\n// echo \"<textarea>\";\n print_r($out);\n// echo \"</textarea>\";\n\n }\n $out['result_array'] = json_decode($out['raw'], true);\n $out['result_array'] = $out['result_array']['Data'][0];\n // расчитаем траст по Кокшарову Деваке\n $out['result_array']['KTrustRank'] = $this->MajesticSeo_forURL_KokshkarovTrustRank($out['result_array']['CitationFlow'], $out['result_array']['TrustFlow']);\n $out['result'] = true;\n return $out;\n }", "public function jalan() {\n echo \"method jalan() berisi : Hewan ini terbang\";\n }", "function lebih($slug) {\n\n\t\t/* ---- PREPARE VARIABLE ------*/\n\t\t$arr_slug\t\t= explode('_', $slug);\n\t\t$pegawai_result = $this->db->get_where('pegawai', array('id_pegawai' => $arr_slug[1]))->result();\n\t\t$pegawai \t\t= $pegawai_result['0']->nama_pegawai;\n\t\t$jabatan\t\t= $pegawai_result['0']->jabatan_pegawai;\n\t\t$nip \t\t= $pegawai_result['0']->nip_pegawai;\n\t\t$surat_result \t= $this->db->get_where('data_rinci', array('id_surat' => $arr_slug[0],\n\t\t\t'id_pegawai' => $arr_slug[1]))->result();\n\t\t$nomor \t\t\t= $surat_result['0']->nomor;\n\n\t\t//Get data rinci\n\t\t$data_rinci_all\t= $this->db->get_where('data_rinci',\n\t\t\tarray('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$id_tiket = $data_rinci_all['0']->id_tiket;\n\t\t$id_transport2 = $data_rinci_all['0']->id_transport2;\n\t\t\t\n\t\t//get data uang tiket\n\t\tif ($id_tiket == 0) {\n\t\t\t$sbu_tiket = 0;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$transport2 = $this->db->get_where('biaya_transport',array('id' => $id_transport2))->result();\n\t\t\t$rute = $transport2['0']->provinsi;\n\n\t\t} else {\n\t\t\t$tiket_result = $this->db->get_where('tiket_pesawat',array('id' => $id_tiket))->result();\n\t\t\t$sbu_tiket = $tiket_result['0']->biaya_tiket;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$rute = $tiket_result['0']->rute;\n\t\t}\n\n\t\t//get real pengeluaran untuk tiket\n\t\t$r_tiket_result = $this->db->get_where('spd_rampung', array('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$r_tiket = $r_tiket_result != NULL ? $r_tiket_result['0']->tiket : 0;\n\n\t\t$ppk \t\t\t= $this->db->get_where('pejabat_administratif',\n\t\t\tarray('jabatan' => 'Pejabat Pembuat Komitmen'))->result();\n\t\t$nama_ppk \t\t\t\t= $ppk['0']->nama;\n\t\t$nip_ppk \t\t\t\t= $ppk['0']->nip;\n\n\t\t$var_tgl_skrg = $this->tanggal_indo(date('Y').'-'.date('m').'-'.date('d'), '-');\n\t\t$var_tgl_surat \t= $this->tanggal_indo($surat_result['0']->tgl_surat,'/');\n\n\t\t/* -----------------------------*/\n\t\tif(empty($r_tiket_result)) {\n\t\t\techo \"<script> \t\n \talert('Anda belum mengisi SPD Rampung!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t}\n\n\t\tif($sbu_tiket<$r_tiket) {\n\t\t\t$pdf = new PDF_MC_Table('p','mm','A4');\n\t\t\t$pdf->AddPage();\n\t\t\t$pdf->SetFont('Arial','B',14);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->MultiCell(0,25,\"SURAT PERNYATAAN\",0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(25,7,'',0,0);\n\t\t\t$pdf->MultiCell(0,6,\"Yang bertandatangan di bawah ini :\",0,'L');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Nama',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$pegawai,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'NIP',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$nip,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Jabatan',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$jabatan,0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Berdasarkan Surat Tugas Nomor:'.$nomor.' tanggal '.$var_tgl_surat.' dengan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sesungguhnya bahwa : input alasan lebih here',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'1. Tiket '.$rute.' (PP) dengan jumlah tiket pesawat di bawah ini melebihi dengan',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'SBU tahun '.date('Y').', meliputi :',0,1);\n\t\t\t$pdf->Ln();\n\n\t\t\t//here is table\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'No.',1,0,'C',0);\n\t\t\t$pdf->Cell(70,5,'Uraian',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Nilai SBU',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Pengeluaran Rill',1,0,'C',0);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\n\t\t\t$counterrr = 1;\n\t\t\t\t$pdf->SetWidths(array(10, 70, 40, 40));\n\t\t\t\tfor($i=0;$i<1;$i++) {\n\t\t\t\t\t$pdf->Row(array($counterrr,\"Tiket Pesawat \".$rute. \" (PP)\",\"Rp \".$sbu_tiket_ena, \"Rp \".number_format($r_tiket,2,',','.')));\n\t\t\t\t\t$counterrr++;\n\t\t\t\t}\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'','LB',0,'L',0);\n\t\t\t$pdf->Cell(70,5,'Jumlah','LRB',0,'C',0);\n\t\t\t$pdf->Cell(7,5,'Rp ','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Cell(7,5,'Rp ','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Ln();\n\t\t\t\n\t\t\t//end of table\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'2. Bahwa tiket '.$rute.' (PP) dengan jumlah uang tersebut pada angka (1)',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'melebihi jumlah SBU dan benar - benar dikeluarkan dengan bukti rill kuitansi tiket',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Perjalanan Dinas dimaksud.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Demikian pernyataan ini kami buat dengan sebenarnya, untuk dipergunakan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sebagaimana mestinya.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t//Footer Surat\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(10,6,\"\",0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'L');\n\t\t\t$pdf->Cell(15,6,'',0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'R');\n\t\t\t$pdf->Cell(20,6,'',0,0,'C');\n\t\t\t$pdf->MultiCell(60,6,'Jakarta, '.$var_tgl_skrg,0,'R');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(18,6,'',0,0,'L');\n\t\t\t$pdf->MultiCell(55,6,'Mengetahui/Menyetujui',0,'R');\n\t\t\t$pdf->Cell(100,6,'Pejabat Pembuat Komitmen',0, 0,'C');\n\t\t\t$pdf->MultiCell(50,6,'Pelaksana SPD',0,'R');\n\t\t\t$pdf->Cell(100,6,' Pusat Data Informasi dan Humas',0, 0,'C');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','BU',12);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(100,6,$nama_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(72.5,6,$pegawai,0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(100,6,\"NIP. \".$nip_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(72.5,6,'NIP. '.$nip,0,'C');\n\n\t\t\t//Cetak gans\n\t\t\t$filename = \"Lebih - \".$arr_slug[0].\" - \".$pegawai.$this->extension;\n\t\t\t$pdf->setTitle($filename);\n\t\t\t$pdf->Output(\"I\", $filename);\n\t\t} else {\n\t\t\techo \"<script> \t\n \talert('Tidak bisa mencetak karena biaya tiket tidak lebih dari SBU!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t}\n\t}", "function waltook_get_messages($status=null,$tid=0,$format=1,$flag=1)\n{\n\t\n\t\n\t$tid=intval($tid);\n\t\n\t//Construye el array con los parámetros de la consulta\n\t\n\t$w_data['client_id']=WALTOOK_API_CLIENT_ID;\n\t\n\t$w_data['format']=$format;\n\t\n\t$w_data['tid']=$tid;\n\t\n\t$w_data['status']=$status;\n\t\n\t$w_data['flag']=$flag;\n\t\n\t\n\t\n\t$qstr=waltook_build_messagequery($w_data);\n\t\t\n\t\n\t\t\n\t$resp=@waltook_api_connect(\"q=get&client_id=\".WALTOOK_API_CLIENT_ID.\"&w_qstr=\".urlencode($qstr));\n\t\n\t\n\tif($resp)\n\t{\n\t\t\n\t\treturn waltook_decrypt($resp);\n\t\t\n\t}else\n\t{\n\t\treturn false; \n\t}\n\t\n}", "function dodajKorisnika(Korisnik $k);", "public function leer(){\n }", "function export()\n\t{\n\t\t//-----------------------------------------\n\t\t// check\n\t\t//-----------------------------------------\n\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Невозможно определить ID языка\");\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get data from DB\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'languages', 'where' => \"lid='\".$this->ipsclass->input['id'].\"'\" ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\tif ( ! $row = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Невозможно найти язык по введенному ID\");\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get xml mah-do-dah\n\t\t//-----------------------------------------\n\n\t\trequire_once( KERNEL_PATH.'class_xml.php' );\n\n\t\t$xml = new class_xml();\n\n\t\t//-----------------------------------------\n\t\t// Set Doctype if not using ISO-8859-1\n\t\t//-----------------------------------------\n\t\t$xml->doc_type = $this->ipsclass->vars['gb_char_set'];\n\t\t$xml->class_xml();\n\n\t\t//-----------------------------------------\n\t\t// Set up..\n\t\t//-----------------------------------------\n\n\t\t$lang_dir = ROOT_PATH.\"cache/lang_cache/\".$row['ldir'];\n\n\t\tif ( ! is_dir($lang_dir) )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Невозможно найти директорию '$lang_dir', проверьте существует ли эта директория?\");\n\t\t}\n\n\t\t$lang_files = array( 'lang_boards.php', 'lang_buddy.php', 'lang_calendar.php', 'lang_emails.php', 'lang_email_content.php', 'lang_error.php',\n\t\t\t\t\t\t\t\t'lang_forum.php', 'lang_global.php', 'lang_help.php', 'lang_legends.php', 'lang_login.php', 'lang_mlist.php',\n\t\t\t\t\t\t\t \t'lang_mod.php', 'lang_msg.php', 'lang_online.php', 'lang_portal.php', 'lang_post.php', 'lang_printpage.php',\n\t\t\t\t\t\t\t \t'lang_profile.php', 'lang_register.php', 'lang_search.php', 'lang_stats.php', 'lang_subscriptions.php',\n\t\t\t\t\t\t\t \t'lang_topic.php', 'lang_ucp.php', 'lang_chatpara.php' , 'lang_editors.php', 'lang_chatsigma.php', 'lang_javascript.js',\n\t\t\t\t\t\t\t \t'acp_lang_acpperms.php', 'acp_lang_member.php', 'acp_lang_portal.php', 'lang_gallery.php', 'lang_gallery_location.php',\n\t\t\t\t\t\t\t \t'lang_blog.php', 'lang_blog_emails.php', 'lang_blog_location.php', 'lang_blog_portal.php', 'lang_blog_ucp.php', 'lang_downloads.php'\n\t\t\t\t\t\t );\n\n\t\t//-----------------------------------------\n\t\t// Start XML\n\t\t//-----------------------------------------\n\n\t\t$xml->xml_set_root( 'languageexport', array( 'exported' => time(), 'author' => $row['lauthor'], 'email' => $row['lemail'] ) );\n\n\t\t$xml->xml_add_group( 'languagegroup' );\n\n\t\t//-----------------------------------------\n\t\t// Get all the lang bits\n\t\t//-----------------------------------------\n\n\t\tforeach( $lang_files as $file )\n\t\t{\n\t\t\tif ( @is_file( $lang_dir.'/'.$file ) )\n\t\t\t{\n\t\t\t\t$lang = array();\n\n\t\t\t\tif( $file == 'lang_javascript.js' )\n\t\t\t\t{\n\t\t\t\t\t$content = array();\n\n\t\t\t\t\t$js_contents = file_get_contents( $lang_dir.'/'.$file );\n\n\t\t\t\t\t$content[]\t= $xml->xml_build_simple_tag( 'key' , 'blah' );\n\t\t\t\t\t$content[]\t= $xml->xml_build_simple_tag( 'value' , base64_encode( $js_contents ) );\n\t\t\t\t\t$content[]\t= $xml->xml_build_simple_tag( 'file' , $file );\n\t\t\t\t\t$entry[] \t= $xml->xml_build_entry( 'langbit', $content );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\trequire( $lang_dir.'/'.$file );\n\n\t\t\t\tforeach( $lang as $k => $v )\n\t\t\t\t{\n\t\t\t\t\t$content = array();\n\n\t\t\t\t\t$content[] = $xml->xml_build_simple_tag( 'key' , $k );\n\t\t\t\t\t$content[] = $xml->xml_build_simple_tag( 'value', $v );\n\t\t\t\t\t$content[] = $xml->xml_build_simple_tag( 'file' , $file );\n\n\t\t\t\t\t$entry[] = $xml->xml_build_entry( 'langbit', $content );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t}\n\n\t\t$xml->xml_add_entry_to_group( 'languagegroup', $entry );\n\n\t\t$xml->xml_format_document();\n\n\t\t//-----------------------------------------\n\t\t// Send to browser.\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->admin->show_download( $xml->xml_document, 'ipb_language.xml' );\n\t}", "function all_get(){\n $akhir = $this->get('akhir');\n\n $allwaktu = $this->db->query(\"SELECT id_waktu FROM waktu WHERE mulai <= \".$akhir.\"-1 AND selesai > \".$akhir.\"-1\")->result();\n $this->response(array('result' => $allwaktu));\n }", "public function list_wilayah()\n\t{\n\t\tif($this->is_login){\n\t\t\t$products = $this->M_region->getAll();\n\t\t\t// Set Response\n\t\t\t$this->response_code = 200;\n\t\t\t$this->response['status'] = TRUE;\n\t\t\t$this->response['data'] = $products;\n\t\t}\n\n\t\t// Run the Application\n\t\t$this->run(SECURED);\n\t}", "function cl_db_projetoscliente() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_projetoscliente\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function obtener_informados_get(){\n \n //\"calle enviada: \".$this->get('calle')\n $calle = $this->get('calle');\n $this->load->model('pcd_upload_model');\n try {\n $respuesta = $this->pcd_upload_model->obtener_informados($calle);\n echo json_encode($respuesta);\n } catch (MY_BdExcepcion $e) {\n $msg = 'Error Interno de servidor.';\n echo json_encode(array('codigo' => 400, 'mensaje' =>$msg ,'valor' =>json_encode('')));\n }\n }" ]
[ "0.58881027", "0.5767705", "0.57463026", "0.5723991", "0.55401945", "0.55041087", "0.5450933", "0.5442134", "0.54097146", "0.5392099", "0.5381406", "0.5373449", "0.53617686", "0.5355803", "0.5355335", "0.5350063", "0.5349428", "0.53378177", "0.53183466", "0.53086555", "0.5302035", "0.5254406", "0.5245606", "0.52449906", "0.5237076", "0.5236397", "0.52349937", "0.52278006", "0.5224858", "0.52147704", "0.5210202", "0.5201081", "0.5194925", "0.51899076", "0.5188745", "0.51779884", "0.51653737", "0.51623", "0.51589674", "0.5149935", "0.5149798", "0.5149293", "0.51486963", "0.5148152", "0.5143144", "0.5138957", "0.51282376", "0.5114985", "0.511009", "0.5103553", "0.51013404", "0.5098438", "0.5098287", "0.5097019", "0.50892377", "0.5077557", "0.50716114", "0.5067154", "0.5065573", "0.5062057", "0.5054284", "0.5053299", "0.50483644", "0.5045256", "0.504417", "0.5035758", "0.5035728", "0.50283635", "0.5027986", "0.5021362", "0.5019855", "0.50177246", "0.50168407", "0.5016656", "0.5016202", "0.5011499", "0.5010042", "0.5005576", "0.5003886", "0.49962258", "0.4995012", "0.49939018", "0.4993293", "0.49889058", "0.4984174", "0.4984027", "0.498217", "0.49800315", "0.49777564", "0.4973529", "0.4973116", "0.49716946", "0.49709302", "0.49671397", "0.49651057", "0.4964961", "0.49645644", "0.49633023", "0.49599862", "0.49582595", "0.49577114" ]
0.0
-1
/ Transport zwrotny zawiera dane jednego pracownika
public function employee() { return $this->belongsTo('App\Employee', 'employee_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function transport() {\n return 'uregrem';\n }", "function transaccion(){\n\t\t\t$this->conexion = new conexion();\n\t\t\t$this->conn = $this->conexion->enlace();\n\t\t}", "Function DokumentZalozeniRequest($UdalostiPredchazejici, $ProfilDokumentu, $Autorizace) {\r\n //nastaveni parametru\r\n global $server, $soap;\r\n $server->responseMethodname = str_replace(\"Request\", \"\", $server->methodname).'Response';\r\n $server->methodURI = $soap[\"methodURI\"];\r\n \r\n //print_r($server->methodparams);\r\n //print_r($UdalostiPredchazejici);\r\n //print_r($ProfilDokumentu);\r\n //print_r($Autorizace);\r\n\r\n// ob_start;\r\n// print_r($ProfilDokumentu);\r\n// print_r($Autorizace);\r\n// eb_end_flush; Die();\r\n\r\n if (VratReferenta($Autorizace)==0) \r\n return VratChybu($log,'Nepovedlo se identifikovat uzivatele v parametru ProvedlKdo');\r\n\r\n //response null\r\n Response_Dokument($response_ProfilDokumentu, false, 'f');\r\n\r\n //Zalozeni dokumentu\r\n $res = DokumentZalozeni($ProfilDokumentu, 'f', $Autorizace, $id, $msg_popis);\r\n\r\n\r\n //Nacteni dokumentu\r\n if ($id>0) Response_Dokument($response_ProfilDokumentu, $id, 'f');\r\n\r\n Response_Dokument($response_Dokument, $id, 't');\r\n \r\n //response \r\n Response_OperaceStatus($response_OperaceStatus, $msg_popis[\"Kod\"], $msg_popis[\"Popis\"]);\r\n NastavLog($log, $msg_popis[\"Kod\"].': '.$msg_popis[\"Popis\"].($msg_popis[\"ErrSql\"] ? ' | '.$msg_popis[\"ErrSql\"] : '') , 'DokumentZalozeniRequest', $msg_popis[\"Kod\"]);\r\n \r\n\r\n $result = array(\r\n 'ProfilDokumentu' => $response_Dokument,\r\n 'OperaceStatus' => $response_OperaceStatus\r\n );\r\n \r\n ZapisLog($log); \r\n\r\n return $result;\r\n}", "abstract public function getPasiekimai();", "public function trasnaction(){\n\n\t}", "abstract function doSend();", "public function postSend()\n {\n }", "public function sendRequest( ) {\n\n }", "public function serch()\n {\n }", "public function __construct()\n {\n $this->Sendws = 'http://celmediainfo.cl/celmedia_chile/2138_WSDLCLOPCorpbanca/WS_MensajeriaCLOPCorpbanca.php?wsdl';\n $this->CanjeWs = 'http://190.196.23.186/clop/ws/server.php?wsdl';\n $this->OpUrlWs = 'http://200.68.3.74/toolsbkp/WSDLGetOper/wsdl.php?wsdl';\n\n /* WebService Server Route For Prestashop */\n $this->WebServiceServer = 'http://190.196.23.184/clop_otpc_web_prestashop_desa/wscl/wsclotpc_server_ps.php?wsdl';\n\n /* Promo Service */\n $this->WebServiceUser = 'tienda_ps';\n $this->WebServicePassword = '0x552A6798E1F1BCF715EFDB1E1DDC0874';\n $this->WebServiceOrigen = 'Login WEB OTPC';\n $this->WebServiceIdProveedor = '8';\n\n /* Ecommerce Home Url for Redirects */\n $this->ecommerceHomeUrl = 'http://ecorpbancadesa.celmedia.cl/';\n\n /* Urls consumibles for Transbank */\n $this->urlReturn = \"http://192.168.1.192/getResult\";\n $this->urlFinal = \"http://192.168.1.192/end\";\n $this->urlFracaso = \"http://ecorpbancadesa.celmedia.cl/fracaso\";\n $this->urlExito = \"http://ecorpbancadesa.celmedia.cl/module/celmediapago/validation\";\n $this->urlApi = \"http://192.168.1.192\";\n\n /* Celmedia Pago */\n $this->WebServiceUserCelPago = 'celmediapago';\n $this->WebServicePasswordCelPago = '0x552A6798E1F1BCF715EFDB1E1DDC0874';\n $this->WebServiceOrigenCelPago = 'ECOMMERCE_CELMEDIAPAGO';\n $this->WebServiceIdProveedorCelPago = '9';\n $this->WebServiceUniCanjeCelPago = '0';\n $this->WebServiceIdGrupoCelPago = '10';\n $this->WebServiceIdCategoriaCelPago = '36';\n $this->WebServiceIdSubCategoriaCelPago = '187';\n $this->WebServiceTdvOtpcCelPago = '31';\n $this->WebServiceTpTransactionCelPago = 'TR_NORMAL_WS';\n\n /* Other WebServices Credentials */\n $this->WSCLOTPC_Tiempo_OTPC = 30;\n\n $this->WSDL_SEND_ABOUT = 'Clave acceso canje on-line CORPUNTOS.';\n $this->WSDL_SEND_FROM = 'Canje on-line CORPUNTOS';\n $this->WSDL_SEND_HOST = 'mail.misp.cl';\n\n $this->WSDL_SEND_USER = '[email protected]';\n $this->WSDL_SEND_PASS = 'p$qg5*/';\n $this->WSDL_SEND_MAIL = '[email protected]';\n\n $this->WSDL_SEND_USER_PS = '[email protected]';\n $this->WSDL_SEND_PASS_PS = '8a4_27j';\n $this->WSDL_SEND_MAIL_PS = '[email protected]';\n\n /* Points by pesos */\n $this->tasa_conv_CI = '3';\n\n /* Keys And Variables for Transbank */\n $this->TransbankEnvironment = \"INTEGRACION\";\n $this->TransbankCommerceCode = \"597020000541\";\n\n $this->TransbankPrivateKey =\n \"-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEA0ClVcH8RC1u+KpCPUnzYSIcmyXI87REsBkQzaA1QJe4w/B7g\n6KvKV9DaqfnNhMvd9/ypmGf0RDQPhlBbGlzymKz1xh0lQBD+9MZrg8Ju8/d1k0pI\nb1QLQDnhRgR2T14ngXpP4PIQKtq7DsdHBybFU5vvAKVqdHvImZFzqexbZjXWxxhT\n+/sGcD4Vs673fc6B+Xj2UrKF7QyV5pMDq0HCCLTMmafWAmNrHyl6imQM+bqC12gn\nEEAEkrJiSO6P/21m9iDJs5KQanpJby0aGW8mocYRHDMHZjtTiIP0+JAJgL9KsH+r\nXdk2bT7aere7TzOK/bEwhkYEXnMMt/65vV6AfwIDAQABAoIBAHnIlOn6DTi99eXl\nKVSzIb5dA747jZWMxFruL70ifM+UKSh30FGPoBP8ZtGnCiw1ManSMk6uEuSMKMEF\n5iboVi4okqnTh2WSC/ec1m4BpPQqxKjlfrdTTjnHIxrZpXYNucMwkeci93569ZFR\n2SY/8pZV1mBkZoG7ocLmq+qwE1EaBEL/sXMvuF/h08nJ71I4zcclpB8kN0yFrBCW\n7scqOwTLiob2mmU2bFHOyyjTkGOlEsBQxhtVwVEt/0AFH/ucmMTP0vrKOA0HkhxM\noeR4k2z0qwTzZKXuEZtsau8a/9B3S3YcgoSOhRP/VdY1WL5hWDHeK8q1Nfq2eETX\njnQ4zjECgYEA7z2/biWe9nDyYDZM7SfHy1xF5Q3ocmv14NhTbt8iDlz2LsZ2JcPn\nEMV++m88F3PYdFUOp4Zuw+eLJSrBqfuPYrTVNH0v/HdTqTS70R2YZCFb9g0ryaHV\nTRwYovu/oQMV4LBSzrwdtCrcfUZDtqMYmmZfEkdjCWCEpEi36nlG0JMCgYEA3r49\no+soFIpDqLMei1tF+Ah/rm8oY5f4Wc82kmSgoPFCWnQEIW36i/GRaoQYsBp4loue\nvyPuW+BzoZpVcJDuBmHY3UOLKr4ZldOn2KIj6sCQZ1mNKo5WuZ4YFeL5uyp9Hvio\nTCPGeXghG0uIk4emSwolJVSbKSRi6SPsiANff+UCgYEAvNMRmlAbLQtsYb+565xw\nNvO3PthBVL4dLL/Q6js21/tLWxPNAHWklDosxGCzHxeSCg9wJ40VM4425rjebdld\nDF0Jwgnkq/FKmMxESQKA2tbxjDxNCTGv9tJsJ4dnch/LTrIcSYt0LlV9/WpN24LS\n0lpmQzkQ07/YMQosDuZ1m/0CgYEAu9oHlEHTmJcO/qypmu/ML6XDQPKARpY5Hkzy\ngj4ZdgJianSjsynUfsepUwK663I3twdjR2JfON8vxd+qJPgltf45bknziYWvgDtz\nt/Duh6IFZxQQSQ6oN30MZRD6eo4X3dHp5eTaE0Fr8mAefAWQCoMw1q3m+ai1PlhM\nuFzX4r0CgYEArx4TAq+Z4crVCdABBzAZ7GvvAXdxvBo0AhD9IddSWVTCza972wta\n5J2rrS/ye9Tfu5j2IbTHaLDz14mwMXr1S4L39UX/NifLc93KHie/yjycCuu4uqNo\nMtdweTnQt73lN2cnYedRUhw9UTfPzYu7jdXCUAyAD4IEjFQrswk2x04=\n-----END RSA PRIVATE KEY-----\";\n $this->TransbankPublicCert=\"-----BEGIN CERTIFICATE-----\nMIIDujCCAqICCQCZ42cY33KRTzANBgkqhkiG9w0BAQsFADCBnjELMAkGA1UEBhMC\nQ0wxETAPBgNVBAgMCFNhbnRpYWdvMRIwEAYDVQQKDAlUcmFuc2JhbmsxETAPBgNV\nBAcMCFNhbnRpYWdvMRUwEwYDVQQDDAw1OTcwMjAwMDA1NDExFzAVBgNVBAsMDkNh\nbmFsZXNSZW1vdG9zMSUwIwYJKoZIhvcNAQkBFhZpbnRlZ3JhZG9yZXNAdmFyaW9z\nLmNsMB4XDTE2MDYyMjIxMDkyN1oXDTI0MDYyMDIxMDkyN1owgZ4xCzAJBgNVBAYT\nAkNMMREwDwYDVQQIDAhTYW50aWFnbzESMBAGA1UECgwJVHJhbnNiYW5rMREwDwYD\nVQQHDAhTYW50aWFnbzEVMBMGA1UEAwwMNTk3MDIwMDAwNTQxMRcwFQYDVQQLDA5D\nYW5hbGVzUmVtb3RvczElMCMGCSqGSIb3DQEJARYWaW50ZWdyYWRvcmVzQHZhcmlv\ncy5jbDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANApVXB/EQtbviqQ\nj1J82EiHJslyPO0RLAZEM2gNUCXuMPwe4OirylfQ2qn5zYTL3ff8qZhn9EQ0D4ZQ\nWxpc8pis9cYdJUAQ/vTGa4PCbvP3dZNKSG9UC0A54UYEdk9eJ4F6T+DyECrauw7H\nRwcmxVOb7wClanR7yJmRc6nsW2Y11scYU/v7BnA+FbOu933Ogfl49lKyhe0MleaT\nA6tBwgi0zJmn1gJjax8peopkDPm6gtdoJxBABJKyYkjuj/9tZvYgybOSkGp6SW8t\nGhlvJqHGERwzB2Y7U4iD9PiQCYC/SrB/q13ZNm0+2nq3u08ziv2xMIZGBF5zDLf+\nub1egH8CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAdgNpIS2NZFx5PoYwJZf8faze\nNmKQg73seDGuP8d8w/CZf1Py/gsJFNbh4CEySWZRCzlOKxzmtPTmyPdyhObjMA8E\nAdps9DtgiN2ITSF1HUFmhMjI5V7U2L9LyEdpUaieYyPBfxiicdWz2YULVuOYDJHR\nn05jlj/EjYa5bLKs/yggYiqMkZdIX8NiLL6ZTERIvBa6azDKs6yDsCsnE1M5tzQI\nVVEkZtEfil6E1tz8v3yLZapLt+8jmPq1RCSx3Zh4fUkxBTpUW/9SWUNEXbKK7bB3\nzfB3kGE55K5nxHKfQlrqdHLcIo+vdShATwYnmhUkGxUnM9qoCDlB8lYu3rFi9w==\n-----END CERTIFICATE-----\";\n $this->TransbankWebpayCert=\"-----BEGIN CERTIFICATE-----\nMIIDKTCCAhECBFZl7uIwDQYJKoZIhvcNAQEFBQAwWTELMAkGA1UEBhMCQ0wxDjAMBgNVBAgMBUNo\naWxlMREwDwYDVQQHDAhTYW50aWFnbzEMMAoGA1UECgwDa2R1MQwwCgYDVQQLDANrZHUxCzAJBgNV\nBAMMAjEwMB4XDTE1MTIwNzIwNDEwNloXDTE4MDkwMjIwNDEwNlowWTELMAkGA1UEBhMCQ0wxDjAM\nBgNVBAgMBUNoaWxlMREwDwYDVQQHDAhTYW50aWFnbzEMMAoGA1UECgwDa2R1MQwwCgYDVQQLDANr\nZHUxCzAJBgNVBAMMAjEwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAizJUWTDC7nfP\n3jmZpWXFdG9oKyBrU0Bdl6fKif9a1GrwevThsU5Dq3wiRfYvomStNjFDYFXOs9pRIxqX2AWDybjA\nX/+bdDTVbM+xXllA9stJY8s7hxAvwwO7IEuOmYDpmLKP7J+4KkNH7yxsKZyLL9trG3iSjV6Y6SO5\nEEhUsdxoJFAow/h7qizJW0kOaWRcljf7kpqJAL3AadIuqV+hlf+Ts/64aMsfSJJA6xdbdp9ddgVF\noqUl1M8vpmd4glxlSrYmEkbYwdI9uF2d6bAeaneBPJFZr6KQqlbbrVyeJZqmMlEPy0qPco1TIxrd\nEHlXgIFJLyyMRAyjX9i4l70xjwIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQBn3tUPS6e2USgMrPKp\nsxU4OTfW64+mfD6QrVeBOh81f6aGHa67sMJn8FE/cG6jrUmX/FP1/Cpbpvkm5UUlFKpgaFfHv+Kg\nCpEvgcRIv/OeIi6Jbuu3NrPdGPwzYkzlOQnmgio5RGb6GSs+OQ0mUWZ9J1+YtdZc+xTga0x7nsCT\n5xNcUXsZKhyjoKhXtxJm3eyB3ysLNyuL/RHy/EyNEWiUhvt1SIePnW+Y4/cjQWYwNqSqMzTSW9TP\n2QR2bX/W2H6ktRcLsgBK9mq7lE36p3q6c9DtZJE+xfA4NGCYWM9hd8pbusnoNO7AFxJZOuuvLZI7\nJvD7YLhPvCYKry7N6x3l\n-----END CERTIFICATE-----\";\n\n }", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "protected function send() {}", "function _traertransaczip($fecha=null){\n\t\tset_time_limit(600);\n\t\t$this->load->library('Sqlinex');\n\t\t$sucu = $this->db->escape($this->sucu);\n\t\t$query = $this->db->query(\"SELECT * FROM sucu WHERE codigo<>$sucu\");\n\t\tif(empty($fecha)) $fecha = date('Ymd');\n\t\t$dir ='./uploads/traspasos/';\n\n\t\tif ($query->num_rows() > 0){\n\t\t\tforeach ($query->result() as $row){\n\t\t\t\t$url=$row->url;\n\t\t\t\t$url=$row->url.'/'.$row->proteo.'/ventas/exportar/transacciones/'.$fecha;\n\t\t\t\t$url=reduce_double_slashes($url);\n\t\t\t\t//echo $url;\n\t\t\t\t$ch = curl_init('http://'.$url);\n\t\t\t\t$tmpfname = tempnam($dir, \"ve\");\n\n\t\t\t\t$fp = fopen($tmpfname, \"w\");\n\t\t\t\tcurl_setopt($ch, CURLOPT_FILE, $fp);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\t\t\tcurl_exec($ch);\n\t\t\t\tcurl_close($ch);\n\t\t\t\tfclose($fp);\n\t\t\t\t$nombre=basename($tmpfname);\n\t\t\t\t$error=$this->_cargazip($nombre);\n\t\t\t\tif(!empty($error)){\n\t\t\t\t\t$data['padre'] ='S';\n\t\t\t\t\t$data['prioridad'] ='5';\n\t\t\t\t\t$data['usuario'] ='TRANF';\n\t\t\t\t\t$data['contenido'] =\"Error en transferencia: Sucursal: $this->sucu, Url: $url, Fecha: $fecha, Mensaje: $error\";\n\t\t\t\t\t$data['estado'] ='N';\n\t\t\t\t\t$mSQL = $this->db->insert_string('tiket', $data);\n\n\t\t\t\t\t$this->db->simple_query($mSQL);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function partirAuTravail(): void\n\t{\n\t}", "public function AggiornaPrezzi(){\n\t}", "public function getMovimientoCamion(){\n log_message('DEBUG', \"#TRAZA | #TRAZ-PROD-TRAZASOFT | Camion | getMovimientoCamion()\");\n \n $motr_id = $this->input->post(\"motr_id\");\n $resp = $this->Camiones->getMovimientoTransporte($motr_id);\n\n echo json_encode($resp);\n }", "public function sendRequest()\n {\n }", "public function correu(){\n echo \" correu !\";\n }", "public function send()\n {\n }", "public function send()\n {\n }", "public function send()\n {\n }", "public function __construct()\n {\n header('Content-Type: application/json;charset=UTF-8'); \n $this->timezone = 'GMT';\n $this->type = \"direct\";\n parent::__construct();\n }", "public function send() {}", "public function send() {}", "public function send() {}", "public function send() {}", "public function send() {}", "private function initializeTransport() {}", "public function save_info_pointeuse() {\n $this->autoRender = false;\n header('Cache-Control: no-cache, must-revalidate');\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\n header('Content-type: application/json');\n header('Access-Control-Allow-Origin: *');\n header(\"Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS\");\n header(\"Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With\");\n if ($this->request->is('post')) {\n $data = $this->request->data;\n require APP . 'Vendor/autoload.php';\n require_once APP . 'Vendor' . DS . 'lib/TADFactory.php';\n require_once APP . 'Vendor' . DS . 'lib/TAD.php';\n require_once APP . 'Vendor' . DS . 'lib/TADResponse.php';\n require_once APP . 'Vendor' . DS . 'lib/Providers/TADSoap.php';\n require_once APP . 'Vendor' . DS . 'lib/Providers/TADZKLib.php';\n require_once APP . 'Vendor' . DS . 'lib/Exceptions/ConnectionError.php';\n require_once APP . 'Vendor' . DS . 'lib/Exceptions/FilterArgumentError.php';\n require_once APP . 'Vendor' . DS . 'lib/Exceptions/UnrecognizedArgument.php';\n require_once APP . 'Vendor' . DS . 'lib/Exceptions/UnrecognizedCommand.php';\n $date = date('Y-m-d');\n if (!empty($data['Pointage']['date'])) {\n $date = $data['Pointage']['date'];\n }\n $tad = (new TADFactory(['ip' => '192.168.1.201', 'encoding' => 'utf-8']))->get_instance();\n // list pointage in date [$date]\n $att_logs = $tad->get_att_log();\n $filtered_att_logs = $att_logs->filter_by_date(\n ['start' => $date, 'end' => $date]\n );\n $all_pointages = $filtered_att_logs->to_array();\n // list user pointer\n $list_user_point = array();\n $list_user_point_name = array();\n $list_user_point_id = array();\n// $ap = current($all_pointages);\n $ap = $all_pointages['Row'];\n foreach ($ap as $k => $point):\n if (!in_array($point['PIN'], $list_user_point_id)):\n array_push($list_user_point_id, $point['PIN']);\n $user_info = $tad->get_user_info(['pin' => $point['PIN']]);\n $full_name_xml = simplexml_load_string(\"<?xml version='1.0' encoding='UTF-8'?>\" . utf8_encode($user_info->get_response_body())) or die(\"Error: Cannot create object\");\n $full_name_array = (array) $full_name_xml;\n $full_name_row = (array) $full_name_array['Row'];\n $full_name = $full_name_row['Name'];\n array_push($list_user_point, array('full_name' => $full_name));\n array_push($list_user_point_name, $full_name);\n endif;\n $user_info = $tad->get_user_info(['pin' => $point['PIN']]);\n $full_name_xml = simplexml_load_string(\"<?xml version='1.0' encoding='UTF-8'?>\" . utf8_encode($user_info->get_response_body())) or die(\"Error: Cannot create object\");\n $full_name_array = (array) $full_name_xml;\n $full_name_row = (array) $full_name_array['Row'];\n $full_name = $full_name_row['Name'];\n $point['full_name'] = $full_name;\n $point['isAbsent'] = FALSE;\n $point['date'] = explode(\" \", $point['DateTime'])[0];\n $ap[$k] = $point;\n endforeach;\n $pointage_not_absent = $this->_group_by($ap, 'full_name');\n $pointage_notabsent = array();\n $times = array();\n foreach ($pointage_not_absent as $k => $pointage):\n array_push($pointage_notabsent, array($k => $pointage));\n array_push($times, $pointage);\n endforeach;\n // Get attendance logs for all users;\n $all_user_info = $tad->get_all_user_info();\n $full_user = simplexml_load_string(\"<?xml version='1.0' encoding='UTF-8'?>\" . utf8_encode($all_user_info->get_response_body())) or die(\"Error: Cannot create object\");\n $rowUser = (array) $full_user;\n $all_user = current($rowUser);\n $user_absent_name = array();\n $user_absent = array();\n $pointage_absent = array();\n foreach ($all_user as $user):\n $user_array = (array) $user;\n if (!empty($user_array['Name'])):\n if (!in_array($user_array['Name'], $list_user_point_name)) {\n array_push($user_absent_name, $user_array['Name']);\n array_push($user_absent, array('full_name' => $user_array['Name']));\n array_push($pointage_absent, array($user_array['Name'] => array(\n 'full_name' => ucwords($user_array['Name']),\n 'pin' => NULL,\n 'isAbsent' => TRUE,\n 'datetime' => NULL,\n 'date' => NULL,\n 'verified' => NULL,\n 'status' => NULL,\n 'workCode' => NULL\n )));\n }\n endif;\n endforeach;\n header(\"HTTP/1.1 200 OK\");\n echo json_encode(array(\n 'absent' => $pointage_absent,\n 'notabsent' => $pointage_notabsent,\n 'names' => $list_user_point,\n 'names_absent' => $user_absent,\n 'status' => 200,\n 'times' => $times,\n 'type' => 'success'\n ));\n die();\n }\n }", "abstract function send();", "Function send_file($session_id,$dokument_id,$file) {\n if (!$dokument_id) return VratChybu($session_id,'send_file','Není zadán dokument_id');\n $stav=$GLOBALS[\"KONEKTOR\"][$software_id][\"STAV\"]+2; //stav+1 = pozaduje se k vyrizeni v ext. programu\n $q=new DB_POSTA;\n if ($dokument_id) $sql=\"SELECT * FROM posta WHERE id = '\".$dokument_id.\"'\";\n// $sql.=\" AND stav in (\".$stav.\")\";\n $q->query($sql);\n $pocet=$q->Num_Rows();\n if ($pocet<1) return VratChybu($session_id,'send_file','Nenalezen odpovídající dokument_id');\n $q->Next_Record();\n// if ($q->Record[\"STAV\"]<>$stav) return VratChybu($session_id,'send_files','Nemáte přístup k tomuto souboru (stav není 2)');\n\n $counter=0;\n $counter2=0;\n $uplobj=Upload(array('create_only_objects'=>true,'agenda'=>'POSTA','noshowheader'=>true));\n //if (is_array($files[soubor][0])) $soubory=$files[soubor];\n //else \n if ($file['item']['FILE_NAME']) $soubory['item'][0]=$file['item']; else $soubory['item'][0]=$file;\n //$soubory=$files[soubor];\n while (list($key,$val)=each($soubory['item']))\n {\n if (!$val[\"FILE_NAME\"]) return VratChybu($session_id,'send_file','Není zadán název souboru');\n $upload_records = $uplobj['table']->GetRecordsUploadForAgenda($q->Record[\"ID\"]);\n $tmp_soubor = $GLOBALS[CONFIG_POSTA][HLAVNI][tmp_adresar].$val[\"FILE_NAME\"]; \n $GLOBALS['DESCRIPTION'] = TxtEncodingFromSoap($val[FILE_DESC]);\n $GLOBALS['LAST_USER_ID'] = $GLOBALS[\"KONEKTOR\"][$software_id][\"LAST_USER_ID\"];\n\n while (list($key1,$val1)=each($upload_records))\n {\n if ($val[FILE_ID]==$val1[ID]) \n {\n $val[FILE_NAME]=$val1[NAME];\n $GLOBALS[\"ID\"]=$val1[ID];\n $GLOBALS[\"FILE_ID\"]=$val1[ID];\n $GLOBALS[\"UPL_FILE\"]=$val[FILE_NAME];\n $GLOBALS[\"LAST_DATE\"]=Date('Y-m-d');\n $GLOBALS[\"UPL_DIR\"]='.';\n $GLOBALS['archiv_file_system']=true;\n $tmp_soubor='/tmp/upload/'.$val[FILE_NAME];\n $GLOBALS['COSTIM']='archiv_a'; //archivuj puvodni\n $GLOBALS['show_typ']=2;\n $GLOBALS['EDIT_ID']=$val[FILE_ID];\n\n }\n }\n\n //$tmp_soubor=TxtEcondingFromSoap(FileSystemConvertFNToFS($tmp_soubor));\n if (is_file($tmp_soubor)) unlink($tmp_soubor);\n $data=base64_decode($val[\"FILE_DATA\"]);\n if (strlen($data)<1) return VratChybu($session_id,'send_file','Není k dispozici obsah souboru '.$val[\"FILE_NAME\"]);\n if (!$fp=fopen($tmp_soubor,'w')) return VratChybu($session_id,'send_file','Chyba pri ulozeni tmp souboru '.$tmp_soubor);\n fwrite($fp,$data);\n fclose($fp);\n \n if (JePodepsanyDokument($data, 0)) {\n $GLOBALS['DESCRIPTION'] = 'el. podepsano';\n }\n \n $tmp_soubor_2=TxtEncodingFromSoap($tmp_soubor);\n //$tmp_soubor_2=$tmp_soubor;\n //echo $tmp_soubor_2;\n $ret = $uplobj['table']->SaveFileToAgendaRecord($tmp_soubor_2, $dokument_id);\n if ($ret[err_msg]>0) return VratChybu($session_id,'send_file','Chyba pri ulozeni souboru '.$val[\"FILE_NAME\"].': '.$ret[err_msg]);\n //print_r($ret);\n $file_ident=$ret[file_id];\n $text='(SEND_FILE) - k dokumentu ('.$dokument_id.') byl vložen soubor '.$val[\"FILE_NAME\"].' - ID: ('.$file_ident.')';\n WriteLog($software_id,$text,$session_id);\n $file[$counter2][FILE_ID]=$file_ident;\n $file[$counter2][FILE_NAME]=$val[\"FILE_NAME\"];\n $file[$counter2][FILE_DESC]=TxtEncoding4Soap($GLOBALS['DESCRIPTION']);\n $file[$counter2][FILE_SIZE]=' ';\n $file[$counter2][BIND_TYPE]=' ';\n $file[$counter2][FILE_DATA]=' ';\n if (is_file($tmp_soubor)) unlink($tmp_soubor);\n\n $counter2++;\n \n }\n// print_r($file);\n $text='Operace proběhla v pořádku';\n $value = array('RESULT'=>'OK','DESCRIPTION'=>TxtEncoding4Soap($text));\n $vysledek = array(\n 'return'=>new soapval('Result', 'tns:Result', $value),\n 'soubory'=>new soapval('soubor', 'tns:soubory',$file),\n );\n return VratVysledek($vysledek);\n}", "function SolicitarContrato(){\n $this->procedimiento = 'adq.f_cotizacion_ime';\n $this->transaccion = 'ADQ_SOLCON_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function masodik()\n {\n }", "public function testSend()\n {\n }", "public function testSend()\n {\n }", "abstract public function request();", "function get_cost($from, $to,$weight)\r\n{\r\n require_once 'REST_Ongkir.php';\r\n \r\n $rest = new REST_Ongkir(array(\r\n 'server' =&amp;gt; 'http://api.ongkir.info/'\r\n ));\r\n \r\n//ganti API-Key dibawah ini sesuai dengan API Key yang anda peroleh setalah mendaftar di ongkir.info\r\n $result = $rest-&amp;gt;post('cost/find', array(\r\n 'from' =&amp;gt; $from,\r\n 'to' =&amp;gt; $to,\r\n 'weight' =&amp;gt; $weight.'000',\r\n 'courier' =&amp;gt; 'jne',\r\n'API-Key' =&amp;gt;'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456'\r\n ));\r\n \r\n try\r\n {\r\n $status = $result['status'];\r\n \r\n // Handling the data\r\n if ($status-&amp;gt;code == 0)\r\n {\r\n $prices = $result['price'];\r\n $city = $result['city'];\r\n \r\n echo 'Ongkos kirim dari ' . $city-&amp;gt;origin . ' ke ' . $city-&amp;gt;destination . '&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';\r\n \r\n foreach ($prices-&amp;gt;item as $item)\r\n {\r\n echo 'Layanan: ' . $item-&amp;gt;service . ', dengan harga : Rp. ' . $item-&amp;gt;value . ',- &amp;lt;br /&amp;gt;';\r\n }\r\n }\r\n else\r\n {\r\n echo 'Tidak ditemukan jalur pengiriman dari surabaya ke jakarta';\r\n }\r\n \r\n }\r\n catch (Exception $e)\r\n {\r\n echo 'Processing error.';\r\n }\r\n}", "public function sendContent();", "public function estado(){\n log_message('DEBUG', \"#TRAZA | #TRAZ-PROD-TRAZASOFT | Camion | estado()\");\n $post = $this->input->post();\n $rsp['estadoMovimiento'] = $this->Camiones->estado($post['patente'], $post['estado'], $post['estadoFinal']);\n if($rsp['estadoMovimiento']['status'] && $post['estadoFinal'] == 'DESCARGADO')\n $rsp['datos_movimiento'] = $this->Camiones->actualizaDatosMovimientoTransporte($post);\n echo json_encode($rsp);\n }", "function alta_transferencia(){\n\t\t$u= new Cl_pedido();\n\t\t$u->empresas_id=$GLOBALS['empresa_id'];\n\t\t$u->cclientes_id=$GLOBALS['empresa_id'];\n\t\t$u->fecha_alta=date(\"Y-m-d H:i:s\");\n\t\t//Sincronizar con fecha de salida&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\n\t\t$u->ccl_estatus_pedido_id=2;\n\t\t$u->corigen_pedido_id=3;\n\t\t$u->ccl_tipo_pedido_id=2;\n\t\t// save with the related objects\n\t\tif($_POST['id']>0){\n\t\t\t$u->get_by_id($_POST['id']);\n\t\t\t$insert_traspaso_salida=0;\n\t\t} else {\n\t\t\t$insert_traspaso_salida=1;\n\t\t}\n\t\t$u->trans_begin();\n\t\tif($u->save()) {\n\t\t\t$cl_pedido_id=$u->id;\n\t\t\tif($insert_traspaso_salida==1) {\n\t\t\t\t//Dar de alta el traspaso\n\t\t\t\t$t= new Traspaso();\n\t\t\t\t$t->cl_pedido_id=$cl_pedido_id;\n\t\t\t\t$t->traspaso_estatus=1;\n\t\t\t\t$t->ubicacion_entrada_id=$_POST['ubicacion_entrada_id'];\n\t\t\t\t$t->ubicacion_salida_id=$_POST['ubicacion_salida_id'];\n\t\t\t\t$t->trans_begin();\n\t\t\t\t$t->save();\n\t\t\t\tif ($t->trans_status() === FALSE) {\n\t\t\t\t\t// Transaction failed, rollback\n\t\t\t\t\t$t->trans_rollback();\n\t\t\t\t\t$u->trans_rollback();\n\t\t\t\t\t// Add error message\n\t\t\t\t\techo form_hidden('id', \"$u->id\");\n\t\t\t\t\techo '<button type=\"submit\" style=\"display:none;\" id=\"boton1\">Intentar de nuevo</button><br/>';\n\t\t\t\t\techo \"El alta del traspaso no pudo registrarse, intente de nuevo\";\n\t\t\t\t} else {\n\t\t\t\t\t// Transaction successful, commit\n\t\t\t\t\t$u->trans_commit();\n\t\t\t\t\t$t->trans_commit();\n\t\t\t\t\techo form_hidden('id', \"$u->id\");\n\t\t\t\t\techo '<p id=\"response\">Capturar los detalles del pedido</p><button type=\"submit\" id=\"boton1\" style=\"display:none;\" id=\"boton1\">';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//Actualisar unicamente la tabla de los detalles\n\t\t\t\t$u->trans_commit();\n\t\t\t\techo form_hidden('id', \"$u->id\");\n\t\t\t\techo '<p id=\"response\">Capturar los detalles del pedido</p><button type=\"submit\" id=\"boton1\" style=\"display:none;\" id=\"boton1\">';\n\t\t\t}\n\t\t} else {\n\t\t\t$u->trans_rollback();\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "public function tipo_cambio(){\n\n $client = new SoapClient(null, array(\n 'location' =>'http://www.banxico.org.mx:80/DgieWSWeb/DgieWS?WSDL',\n 'uri'=>'http://DgieWSWeb/DgieWS?WSDL',\n 'encoding'=> 'UTF-8'\n ));\n\n try {\n\n $result = $client->tiposDeCambioBanxico();\n\n } catch (SoapFault $ex) {\n\n return $this->error($ex->getMessage());\n\n }\n\n if( !$result) {\n\n return false;\n\n }\n\n $dom = new DomDocument();\n $dom->loadXML($result);\n\n $xmlDatos = $dom->getElementsByTagName('Obs');\n\n if( !$xmlDatos->length) {\n\n return false;\n\n }\n\n $itemDolar = $xmlDatos->item(0);\n $itemEuro = $xmlDatos->item(2);\n $itemDolarCanadiense = $xmlDatos->item(3);\n $itemYenCanadiense = $xmlDatos->item(4);\n\n if( !$itemDolar || !$itemDolarCanadiense || !$itemEuro || !$itemYenCanadiense) {\n\n return false;\n\n }\n\n $data = array(\n 'USD' => array(\n 'moneda'=>'USD',\n 'descripcion'=>'Dolar',\n 'time'=>$itemDolar->getAttribute('TIME_PERIOD'),\n 'valor'=>$itemDolar->getAttribute('OBS_VALUE')\n ),\n 'EUR' => array(\n 'moneda'=>'EUR',\n 'descripcion'=>'Euro',\n 'time'=>$itemEuro->getAttribute('TIME_PERIOD'),\n 'valor'=>$itemEuro->getAttribute('OBS_VALUE')\n ),\n 'CAN' => array(\n 'moneda'=>'USD CAN',\n 'descripcion'=>'Dolar Canadiense',\n 'time'=>$itemDolarCanadiense->getAttribute('TIME_PERIOD'),\n 'valor'=>$itemDolarCanadiense->getAttribute('OBS_VALUE')\n ),\n 'YEN' => array(\n 'moneda'=>'YEN CAN',\n 'descripcion'=>'YEN Canadiense',\n 'time'=>$itemYenCanadiense->getAttribute('TIME_PERIOD'),\n 'valor'=>$itemYenCanadiense->getAttribute('OBS_VALUE')\n )\n );\n return $data;\n }", "public function send()\n {\n }", "function postdatapuntosextrasteoricopractico($url, $termino, $anio)\n\t{\n\t\tset_time_limit(500);\n\t\t$target_url = $url; \n\t\t$post = array \n\t\t(\n\t\t\t'termino' => $termino,\n\t\t\t'anio' => $anio\n\t\t); \n\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $target_url);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/4.0 (compatible;)\"); \n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER,array('Content-Type: multipart/form-data'));\n\t\tcurl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); \n\t\tcurl_setopt($ch, CURLOPT_FORBID_REUSE, 1); \n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 0);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t\n\t\t$resultadoExec = curl_exec ($ch);\n\t\t\n\t\tif ($resultadoExec === FALSE) {\n\t\t\t$response = \"Error sending\" . \" \" . curl_error($ch);\n\t\t\tcurl_close ($ch);\n\t\t}else{\n\t\t\tcurl_close ($ch);\n\t\t\t$response = \"Result: \" . $resultadoExec;\n\t\t}\n\t\t\n\t\treturn $response;\n\t}", "public function cetakOrdernya()\n\t{\n\t\t\t// --------------------------------------\n\t\t$result = array(); \n\t\t$key1 = \"c67536e59042f4f7049d441a3a5f71e1\";\n\t\t$key2 = \"cd187b9bff4a84415908698f9793098d\";\n\t\t$tgl=date('Ymd') ;\n\t\t$password=\"05144f4e12aaa402aeb51ef2c7dde527\";//MD5($key1 + $tgl + \"201\" + \"3171030101710005\" + $key2);\n\t\t$username=\"ecom\";\n\t\t$gab=base64_encode($username.$password);\n\t\t//-----------------------------------------------------------------------------------\t\n\t\t//$kodepossip=$_POST['kodepossip'];\n\t\t$messtype=\"301\";//\"201\";\t\n\t\t$userid=\"dede123\";\n\t\t//$param1=$_POST['IdOrder'];//\"3171030101710005\";\n\t\t$param1=$idordernya;//\"3171030101710005\";\n\t\t//$param1=$_POST['idorder'];//\"3171030101710005\";\n\t\t\n\t\t//$param1=\"3171030101710005\";\n\t\t$param2=\"\";\n\t\t$param3=\"\";\n\t\t$param4=\"\";\n\t\t$param5=\"\";\n\t\t//------------------------------------------------------------------------------------\n\t\t\n\t\t// $messtype=\"202\";\t\n\t\t// $userid=\"dede123\";\n\t\t// $param1=\"0000000158\";\n\t\t// $param2=\"\";\n\t\t// $param3=\"\";\n\t\t// $param4=\"\";\n\t\t// $param5=\"\";\n\t\t//------------------------------------------------------------------------------------\n\t\t\n\t\t$hash=strtolower (MD5($key1.$tgl.$messtype.$param1.$key2));\n\t\t\t$data_string = '{\n\t\t\t\t\"messtype\":\"'.$messtype.'\",\n\t\t\t\t\"param1\":\"'.$param1.'\",\n\t\t\t\t\"userid\":\"'.$userid.'\",\n\t\t\t\t\"param2\":\"'.$param2.'\",\n\t\t\t\t\"param3\":\"'.$param3.'\",\n\t\t\t\t\"param4\":\"'.$param4.'\",\n\t\t\t\t\"param5\":\"'.$param5.'\",\n\t\t\t\t\"hashing\":\"'.$hash.'\"}';\n\t\t\t\n\t\n\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, \"https://magenpos.posindonesia.co.id:6466/a767e8eec95442bda80c4e35e0660dbb\"); \n\t\t\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);\n\t\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\"); \n\t\t\t\tcurl_setopt($ch, CURLOPT_POST, true); \n\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); \n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true); \n\t\t\t\tcurl_setopt($ch, CURLOPT_USERPWD, $username.':'.$password);\n\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); \n\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array( \n\t\t\t\t\t'Accept: application/json',\n\t\t\t\t\t'Content-Type: application/x-www-form-urlencoded') \n\t\t\t\t);\n\t\n\t\t\n\t\t$response1 = curl_exec($ch);\n\t\t$err1 = curl_error($ch);\n\t\t//print_r(\"<br>\".$response1.\"<br>\");\n\t\t\n\t\t\n\t\tcurl_close($ch);\n\t\t//$response1=htmlspecialchars($response1,ENT_QUOTES);\n\t\t$response = json_decode($response1, true);\n\t\t//print_r($response);\n\t\t$code = $response['rc_mess']; \n//\t\t$code =$response['rc_mess'];\n\t\t//print_r(\"<br>Hasil\".$code);\n//\t\tprint_r(\"<br>\".$hash);\n\t\t//print_r(\"<br>\".$data_string);\n\t\t\n\t\tif ($response =='') {\n\t\t\t$result[\"success\"] = false;\n\t\t\t$result[\"errors\"][\"iderror\"] = \"801\";\n\t\t\t$result[\"errors\"][\"error\"] = \"Data tidak ditemukan\";\n\t\t} \n\t\telse{\n\t\t\t\n\t\t\tif($code<>'00') {\n\t\t\t\t$result[\"success\"] = false;\n\t\t\t\t// $result[\"errors\"][\"iderror\"] = $code;\n\t\t\t\t// $result[\"errors\"][\"error\"] = $response['desk_mess'] ; \n\t\t\t\t\n\t\t\t\t$result = array('rc_mess'=> $response['rc_mess'],'desk_mess'=>$response['desk_mess']\n\t\t\t\t);\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\t$result[\"success\"] = true;\n\t\t\t\t//240|QOB1221717741|-|200|16831.68|1090.91|168.32|109.09|-|500000|-|-\n\t\t\t\t$par2= $response['response_data2'];\n\t\t\t\t$par3= $response['response_data3'];\n\t\t\t\t$par4= $response['response_data4'];\n\t\t\t\t//response_data2\":\"447|QOB1405072375|-|3400|71287.13|2000.0|712.87|200.0|-|900000|-|-\n\t\t\t\t$datakiriman=explode(\"|\",$response['response_data2']);\n\t\t\t\t$produk=$datakiriman[0].\"-\".\"QCOMM\";\n\t\t\t\t$pelanggan=$datakiriman[1];\n\t\t\t\t$backsheet=$datakiriman[2];\n\t\t\t\t$berat=$datakiriman[3];\n\t\t\t\t$beadasar=$datakiriman[4];\n\t\t\t\t$htnb=$datakiriman[5];\n\t\t\t\t\n\t\t\t\t$ppn=$datakiriman[6];\n\t\t\t\t$ppnhtnb=$datakiriman[7];\n\t\t\t\t$isikiriman=$datakiriman[8];\n\t\t\t\t$nilaibarang=$datakiriman[9];\n\t\t\t\t$total=number_format($beadasar+$htnb+$ppn+$ppnhtnb,0, ',', '.');\n\t\t\t\t//kurniawan|rt 03 rw 04 rt 03 rw 04 - Kel. Kebagusan Kec. Pasar Minggu KOTA ADM. JAKARTA SELATAN DKI JAKARTA 12520|-|-|-|-|-|12520|081231214|[email protected]\n\t\t\t\t\n\t\t\t\t$datasip=explode(\"|\",$response['response_data3']);\n\t\t\t\t$nmsip=$datasip[0];\n\t\t\t\t$almsip=$datasip[1];\n\t\t\t\t$kdposip=$datasip[7];\n\t\t\t\t$tlpsip=$datasip[8];\n\t\t\t\t// $nmsip=$datasip[0];\n\t\t\t\t// $nmsip=$datasip[0];\n\t\t\t\t// $nmsip=$datasip[0];\n\t\t\t\t//-||rw 04 rt 01 rw 04 rt 01 - Kel. Pulau Harapan Kec. Kepulauan Seribu Utara KAB. ADM. KEP. SERIBU DKI JAKARTA 14550|-|-|-|-|-|14550|\n\t\t\t\t\n\t\t\t\t$datasial=explode(\"|\",$response['response_data4']);\n\t\t\t\t$nmsial=$datasial[1];\n\t\t\t\t$almsial=$datasial[2];\n\t\t\t\t$kdposial=$datasial[8];\n\t\t\t\t$tlpsial=$datasial[9];\n\t\t\t\t\n\t\t\t\t$datalain=explode(\"|\",$response['response_data5']);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//number_format(round($ppnhtnb), 0, ',', '.')\n\t\t\t\t$datatarif=\"Bea Dasar :\".number_format($beadasar,0, ',', '.').\"\\n\".\n\t\t\t\t\t \"htnb : \".number_format($htnb,0, ',', '.').\"\\n\".\n\t\t\t\t\t\t \"ppn :\".number_format($ppn,0, ',', '.').\"\\n\".\t\n\t\t\t\t\t\t \"ppnhtnb :\".number_format($ppnhtnb,0, ',', '.');\n\t\t\t\t\n\t\t\t\t$datapengirim=\"Nama :\".$nmsip.\"\\n\".\n\t\t\t\t\t \"Alamat : \".$almsip.\"\\n\".\n\t\t\t\t\t\t \"Tlp :\".$tlpsip.\"\\n\".\t\n\t\t\t\t\t\t \"Kodepos :\".$kdposip;\n\t\t\t\t$datapenerima=\"Nama :\".$nmsial.\"\\n\".\n\t\t\t\t\t \"Alamat : \".$almsial.\"\\n\".\n\t\t\t\t\t\t \"Tlp :\".$tlpsial.\"\\n\".\t\n\t\t\t\t\t\t \"Kodepos :\".$kdposial;\n\t\t\t\t\n\t\t\t\n\t\t\t\t$result = array('rc_mess'=> $response['rc_mess'],'desk_mess'=>$response['desk_mess'],\n\t\t\t\t 'userid'=> $response['userid'],'response_data1'=>$response['response_data1'],\n\t\t\t\t\t\t\t\t'response_data2'=> $response['response_data2'],'response_data3'=> $response['response_data3'],\n\t\t\t\t\t\t\t\t'response_data4'=> $response['response_data4']);\n\t\t\t\t\t\t\t\t\n\n\t\t\t}\n\t\t}\n\t\t//echo json_encode($result);\n\t\treturn json_encode($result);\n\t\t//echo json_encode($response);\n\t\t//return $response1;\n\t}", "function transport()\n {\n return 'distrib';\n }", "function sendFaildVer(){\n\n}", "function cl_rhconsignadomovimentoservidorrubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhconsignadomovimentoservidorrubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function getTransmissor()\r\n {\r\n }", "public function patentePublicidad($codigo_licencia){\n\n $curl = curl_init();\n $url = \"http://192.168.104.117/servicio/consulta-servicios/webservice.php\"; //develope\n \n curl_setopt($curl, CURLOPT_POST, 1); //en caso sea post\n //curl_setopt($curl, CURLOPT_POSTFIELDS, $data); //asumiendo que $data: array(\"parametro\" => \"valor\") submit:publicidad, codigo_licencia:01G50110000008\n curl_setopt($curl, CURLOPT_POSTFIELDS, \"submit=publicidad&codigo_licencia=\".$codigo_licencia);\n \n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n \n $result = curl_exec($curl);\n curl_close($curl);\n\n $jsonFur = json_decode($result);\n //echo \"******************************\";\n print_r($jsonFur);\n exit;\n /*if(!is_null($jsonFur) && $jsonFur.status){\n\n }*/\n if($jsonFur->status)\n return $jsonFur->data;\n }", "function sendDataDichVuCong($username, $password,$mahoso,$madichvu,$xml){\r\n\tWriteLog('sendDataDichViCong','Call');\t\r\n\tif(checkAuthentication($username, $password)){\r\n\t\tWriteLog('sendDataDichViCong','Login Sucess');\r\n if(checkMaDichVu($madichvu) == false){\r\n WriteLog('sendDataDichVuCong failed : ','madichvu is invalid ('.$madichvu.') ');\r\n return 0;\r\n }\r\n \r\n\t\t$id = 0;\r\n if($xml == \"\"){\r\n WriteLog(\"sendDataDichVuCong : \", \"XML NULL\");\r\n return 0;\r\n\t\t}\r\n $sql = sprintf(\"\r\n\t\t\tselect count(*) as DEM from adapter_luutru where MAHOSO = '%s'\r\n\t\t\",mysql_real_escape_string($mahoso));\r\n\t\t\r\n\t\t$re = query($sql);\r\n\t\t$row = mysql_fetch_assoc($re);\r\n\t\t$xml = str_replace(\"'\",'\"',$xml);\r\n\t\tif((int)$row[\"DEM\"]){\r\n\t\t\t/* cap nhat */\r\n $sql = sprintf(\"\r\n update adapter_luutru\r\n SET `SOURCEXML` = '%s' ,`MADICHVU` = '%s',`IS_GET` = 0 \r\n WHERE MAHOSO = '%s'\r\n \",$xml,$madichvu,$mahoso);\t\t\r\n\t\t\tquery($sql);\r\n\t\t\t/* Lay cac thong tin de gui mail*/\r\n\t\t\t$sql1 = sprintf(\"select TENLOAI,SONGAYXULY from adapter_loai_hoso where CODE = '%s'\",$madichvu);\r\n\t\t\t$re = query($sql1);\r\n\t\t\t$row = mysql_fetch_assoc($re);\r\n\t\t\t \r\n\t\t\t$tenloaihoso = $row[\"TENLOAI\"];\r\n\t\t\t$soNgayXuLy = $row[\"SONGAYXULY\"];\r\n $ngayNhanToTime = BussinessDateModel::addDate(strtotime(date('Y-m-d')),(int)$soNgayXuLy);\r\n $ngayNhan = date('Y-m-d',$ngayNhanToTime); \r\n\t\t\t/*Lay ngay nhan ho so*/\r\n\t\t\t$today = date(\"d/m/Y\");\r\n\t\t\t/*Mang cac thong tin ho so*/\r\n\t\t\t$arrayInfo = XmlToArray($xml);\r\n \r\n try{\r\n $sqlTrangThai = sprintf(\"Insert into adapter_trangthaihoso(MASOHOSO, TENTOCHUCCANHAN, TENHOSO, TRANGTHAI,DIENTHOAI,NGAYNOP,NGAYNHAN) VALUES ('%s', '%s','%s',%d,'%s','%s','%s') \",$mahoso,base64_decode($arrayInfo['TENTOCHUCCANHAN']),$tenloaihoso,0,base64_decode($arrayInfo['DIENTHOAI']),date('Y-m-d H:i:s'),$ngayNhan);\r\n $id = query($sqlTrangThai);\r\n }catch(Exception $ex)\r\n {\r\n WriteLog('sendDataDichVuCong failed to adapter_trangthaihoso : ',$ex->getMessage());\r\n }\r\n \r\n try{\r\n\t\t\t//$mailerstatus = sendMail($mahoso,$tenloaihoso,$today,$arrayInfo);\r\n\t\t\t}catch(Exception $ex)\r\n {\r\n WriteLog('sendMail failed: ',$ex->getMessage());\r\n }\r\n return $id;\r\n\t\t}\r\n\t}else{\r\n\t\tWriteLog('sendDataDichViCong','Login Failed');\r\n\t\treturn -1;\r\n\t}\r\n}", "public function getUr() {}", "function wtsProPaiement($ar){\n $p = new XParam($ar, array());\n $orderoid = $p->get('orderoid');\n // verification du client de la commande et du compte connecte\n list($okPaiement, $mess) = $this->paiementEnCompte($orderoid);\n if (!$okPaiement){\n XLogs::critical(get_class($this), 'paiement pro refusé '.$orderoid.' '.$mess);\n XShell::setNext($GLOBALS['TZR_SESSION_MANAGER']::complete_self(true, true).'&alias='.$this->aliasvente.'&moid='.$this->_moid.'&function=wtsLireOffres');\n return;\n }\n // traitement post commande std\n clearSessionVar('caddie');\n XLogs::critical(get_class($this), 'enregistrement paiement en compte '.$orderoid);\n // traitement standards après validation\n $this->postOrderActions($orderoid, true);\n\n // traitement post order - devrait être dans postOrderActions\n $this->proPostOrderActions($orderoid);\n\n // retour \n if (defined('EPL_ALIAS_PAIEMENT_ENCOMPTE')){\n XShell::setNext($GLOBALS['TZR_SESSION_MANAGER']::complete_self().'alias='.EPL_ALIAS_PAIEMENT_ENCOMPTE);} else {\n XShell::setNext($GLOBALS['TZR_SESSION_MANAGER']::complete_self(true, true).'&alias='.$this->aliasvente.'&moid='.$this->_moid.'&function=wtsLireOffres');\n }\n }", "function SOAP_call($body, $controle){\n $location_URL = 'https://api.go4you.com.br/Consultas/Pedidos/Acoes.asmx?wsdl';\n $action_URL = \"http://www.go4you.com.br/webservices/InserirPedidoSemBag\";\n \n $client = new SoapClient(null, array(\n \"Content-type: text/xml;charset=\\\"utf-8\\\"\",\n \"Accept: text/xml\",\n \"Cache-Control: no-cache\",\n \"Pragma: no-cache\",\n \"SOAPAction: \\\"run\\\"\",\n 'location' => $location_URL,\n 'host' => \"api.go4you.com.br\",\n 'uri' => \"api.go4you.com.br\",\n 'trace' => \"1\",\n \"Content-length: \".strlen($body)\n ));\n \n return $client->__doRequest($body ,$location_URL, $action_URL, 1); \n \n}", "public function truycapvao_private_cha(){\n }", "function adjudicarTodo(){\n $this->procedimiento='adq.f_cotizacion_ime';\n $this->transaccion='ADQ_ADJTODO_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function siguienteEstadoBoleta(){\r\n $this->procedimiento='leg.ft_boleta_garantia_dev_ime';\r\n $this->transaccion='LG_POBODEV_IME';\r\n $this->tipo_procedimiento='IME';\r\n \r\n //Define los parametros para la funcion\r\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4'); \r\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\r\n\t\t$this->setParametro('id_anexo','id_anexo','int4');\r\n\t\t\r\n\t\t\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "function redirecionaClienteParaDepartamentoTecnologia($cliente)\n{\n\n # montando URL\n $url =\n \"index.php/por/chat/startchat/(leaveamessage)/true?prefill%5Busername%5D={$cliente['razao_social']}&value_items_admin[0]={$cliente['duvida']}&value_items_admin[1]={$cliente['nome_usuario']}&value_items_admin[2]={$cliente['conta_contrato']}&value_items_admin[3]={$cliente['razao_social']}&value_items_admin[4]={$cliente['cnpj']}&value_items_admin[5]=0&nome_departamento=Tecnologia&codigo_ticket=0&novo_erp={$cliente['novo_erp']}&prefill%5Bphone%5D=2&value_items_admin[6]={$cliente['telefone']}&value_items_admin[7]=0\";\n\n # redirecionando cliente para o colaborador no chat teste\n echo json_encode(['url' => 'http://192.168.0.47:9999/' . $url], JSON_UNESCAPED_UNICODE);\n\n # redirecionando cliente para o colaborador no chat produção\n #echo json_encode(['url' => 'https://chat.avancoinfo.net/' . $url], JSON_UNESCAPED_UNICODE);\n\n exit;\n}", "public function HTTPRequest(){\n\t}", "function postToZibal($path, $parameters)\n{\n $url = 'https://gateway.zibal.ir/v1/'.$path;\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n curl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n curl_setopt($ch, CURLOPT_POSTFIELDS,json_encode($parameters));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($ch);\n curl_close($ch);\n return json_decode($response);\n}", "function autorizar_esp_pm_acumulado_servicio_tecnico($id_mov){\r\n\r\nglobal $db;\t\r\n \r\n $db->starttrans();\r\n \r\n //traigo el deposito origen\r\n $sql = \"select deposito_origen from movimiento_material where id_movimiento_material = $id_mov\"; \r\n $res = sql($sql) or fin_pagina();\r\n $id_deposito_oriden = $res->fields[\"deposito_origen\"];\r\n \t \r\n //traigo el detalle de los movimientos a liberar \t \r\n $sql=\"select * from detalle_movimiento where id_movimiento_material=$id_mov\";\r\n $res = sql($sql) or fin_pagina();\r\n\r\n $comentario = \" Autorizacion de PM acumulado de servicio tecnico nro: $id_mov\";\r\n $id_tipo_movimiento = 7;\r\n\r\n //por cada detalle voy liberando las reservas del pm autorizado \r\n for($i=0;$i<$res->recordcount();$i++) {\r\n \t $id_prod_esp = $res->fields[\"id_prod_esp\"];\r\n $cantidad = $res->fields[\"cantidad\"];\r\n $id_detalle_movimiento = $res->fields[\"id_detalle_movimiento\"];\r\n descontar_reserva($id_prod_esp,$cantidad,$id_deposito_oriden,$comentario,$id_tipo_movimiento,\"\",$id_detalle_movimiento,\"\");\r\n $res->movenext(); \r\n }//del for\r\n \t \r\n \t \r\n //Inserto la Mercaderia entrante en el stock BS AS \r\n \r\n $sql = \"select * from mercaderia_entrante where id_movimiento_material = $id_mov\";\r\n $res = sql($sql) or fin_pagina();\r\n\t\t\t \r\n\t\t\t \r\n $comentario = \"Producto de lista de mercaderia entrante del PM nro: $id_mov, a travez de una Autorizacion Especial\";\r\n\t\t\t \r\n for($i=0;$i<$res->recordcount();$i++){\r\n\t $id_prod_esp = $res->fields[\"id_prod_esp\"];\r\n\t $cantidad = $res->fields[\"cantidad\"];\r\n\t $descripcion = $res->fields[\"descripcion\"]; \r\n\t //el deposito origen es Buenos Aires que es igual a 2 segun la tabla general.depositos \r\n\t $deposito_origen='2';\r\n\t //el id_tipo_movimiento le hardcodeo uno de la tabla stock.tipo_movimiento\r\n\t $id_tipo_movimiento='13';\r\n\t //el ingreso del producto es a \"disponible\" por lo tanto la funcion no toma en cuenta los parametros que siguen\r\n\t $a_stock='disponible';\r\n\t agregar_stock($id_prod_esp,$cantidad,$deposito_origen,$comentario,$id_tipo_movimiento,$a_stock,$id_tipo_reserva,\"\",$id_detalle_movimiento,$id_licitacion,$nro_caso);\r\n\t $res->movenext();\r\n }//del for\r\n $db->completetrans();\r\n\r\n }", "public function leeDatosZonaVW() {\n\t\t$zona = new ZonaBSN ();\n\t\t$this->zona = $zona->leeDatosForm ($_POST);\n\t}", "public function cercaProvvedimenti() {\r\n $operatore = $_SESSION[\"op\"];\r\n $ruolo = $operatore->getFunzione();\r\n \r\n $offset = isset($_REQUEST[\"offset\"]) ? $_REQUEST[\"offset\"] : 0;\r\n $numero = isset($_REQUEST[\"numero\"]) ? $_REQUEST[\"numero\"] : 15;\r\n \r\n\r\n $numeroProvvedimenti = ProvvedimentoFactory::numeroTotaleProvvedimenti();\r\n\r\n if ($offset >= $numeroProvvedimenti) {\r\n $offset = 0;\r\n }\r\n if ($offset < 1) {\r\n $offset = 0;\r\n }\r\n\r\n $href = '<a href=\"index.php?page=operatore&cmd=elencoProvvedimenti&id=';\r\n $href2 = '<a href=\"index.php?page=operatore&cmd=firmaP&numeroP=';\r\n\r\n $provvedimenti = ProvvedimentoFactory::elencoP($offset, $numero);\r\n $x = count($provvedimenti);\r\n $data = \"\";\r\n for ($i = 0; $i < $x; $i++) {\r\n $data.= \"<tr class=\\\"\" . ($i % 2 == 1 ? \"a\" : \"b\") . \"\\\"><td>\" . $href\r\n . $provvedimenti[$i]->getId() . \"\\\">\" . $provvedimenti[$i]->getNumeroProvvedimento() . \"</a></td>\"\r\n . \"<td>\" . $provvedimenti[$i]->getDataProvvedimento(true) . \"</td>\"\r\n . \"<td>\" . $provvedimenti[$i]->getNumeroProtocollo() . \"</td>\"\r\n . \"<td>\" . $provvedimenti[$i]->getDataProtocollo(true) . \"</td>\"\r\n . \"<td>\". $href2 . $provvedimenti[$i]->getPraticaCollegata() . \"\\\">\" . $provvedimenti[$i]->getPraticaCollegata() . \"</a></td>\";\r\n }\r\n\r\n header('Cache-Control: no-cache, must-revalidate');\r\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\r\n header('Content-type: application/json');\r\n $json = array();\r\n $json[\"testo\"] = $data;\r\n $json[\"numeroProvvedimenti\"] = $numeroProvvedimenti;\r\n $json[\"numRow\"] = $x;\r\n echo json_encode($json);\r\n }", "public function run(){\n\n\t\ttry{\n\n\t\t\t# On récupère la route correspondant a la requete\n\t\t\t$route = $this->router->dispatch(\n\t\t\t\t$this->request,\n\t\t\t\t$this->root\n\t\t\t);\n\n\t\t\t# Si il n'y a pas de route on lance une exception\n\t\t\tif(!$route){\n\n\t\t\t\tthrow new Exception('Pas de route trouvée pour cette adresse.');\n\n\t\t\t}\n\n\t\t\t# On execute la route et on récupère la valeur retournée\n\t\t\t$retour = $route->execute(\n\t\t\t\t$this->request,\n\t\t\t\t$this->response\n\t\t\t);\n\n\t\t\t# Si la valeur de retour n'est pas vide\n\t\t\tif($retour){\n\n\t\t\t\t# Si c'est une vue qui a été retournée, on la\n\t\t\t\t# rend\n\t\t\t\tif($retour instanceOf View){\n\n\t\t\t\t\t$retour = $retour->render();\n\n\t\t\t\t}\n\n\t\t\t\t# On attribue la valeur de retour au corps de\n\t\t\t\t# la réponse\n\t\t\t\t$this->response->setBody($retour);\n\n\t\t\t}\n\n\t\t\t# Si la réponse n'a pas été envoyée, on l'envoit\n\t\t\tif(!$this->response->isSent()){\n\n\t\t\t\t$this->response->send();\n\n\t\t\t}\n\n\t\t}catch(Exception $e){\n\n\t\t\techo $e->getMessage();\n\n\t\t}\n\n\t}", "public function preSend()\n {\n }", "public function DetalharNotaTranporte($_id)\n {\n $sql = new Sql();\n $sql->select('SELECT * FROM notatransporte WHERE id = :id',\n array\n (\n ':id' = $_id\n ));\n }", "public function edytujPunktAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$this->_helper->viewRenderer('form', null, true);\n\n\t\t\t// Odczytanie id\n\t\t\t$id = (int)$this->getRequest()->getParam('id');\n\t\t\t$id_inwest = (int)$this->_request->getParam('inwestycja');\n\t\t\t$this->view->back = '<div class=\"back\"><a href=\"'.$this->view->baseUrl.'/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/\">Wróć do listy</a></div>';\n\t\t\t$this->view->info = '<div class=\"info\">Wymiary obrazka: szerokość <b>1165px</b> / wysokość <b>655px</b></div>';\n\t\t\t\n\t\t\t$wpis = $this->view->mapa = $db->fetchRow($db->select()->from('inwestycje_markery')->where('id = ?', $id));\n\t\t\t$this->view->pagename = \" - Edytuj lokalizacje: \".$wpis->nazwa;\n\t\t\t$this->view->tinymce = \"1\";\n\n\t\t\t$form = new Form_LokalizacjaForm();\n\t\t\t$this->view->form = $form;\n\n\t\t\t// Załadowanie do forma\n\t\t\t$array = json_decode(json_encode($wpis), true);\n\t\t\t$form->populate($array);\n\n\t\t\t\t//Akcja po wcisnieciu Submita\n\t\t\t\tif ($this->_request->getPost()) {\n\n\t\t\t\t\t//Odczytanie wartosci z inputów\n\t\t\t\t\t$formData = $this->_request->getPost();\n\t\t\t\t\tunset($formData['MAX_FILE_SIZE']);\n\t\t\t\t\tunset($formData['obrazek']);\n\t\t\t\t\tunset($formData['submit']);\n\t\t\t\t\t$formData['id_inwest'] = $id_inwest;\n\t\t\t\t\t\n\t\t\t\t\t$obrazek = $_FILES['obrazek']['name'];\n\t\t\t\t\t$plik = zmiana($formData['nazwa']).'_'.$id_inwest.'.'.zmiennazwe($obrazek);\n\n\n\t\t\t\t\t//Sprawdzenie poprawnosci forma\n\t\t\t\t\tif ($form->isValid($formData)) {\n\n\t\t\t\t\t$db->update('inwestycje_markery', $formData, 'id = '.$id);\n\n\t\t\t\t\tif ($obrazek) {\n\t\t\t\t\t\tunlink(FILES_PATH.\"/inwestycje/lokalizacja/\".$wpis->plik);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tmove_uploaded_file($_FILES['obrazek']['tmp_name'], FILES_PATH.'/inwestycje/lokalizacja/'.$plik);\n\t\t\t\t\t\t$upfile = FILES_PATH.'/inwestycje/lokalizacja/'.$plik;\n\t\t\t\t\t\tchmod($upfile, 0755);\n\t\t\t\t\t\t\n\t\t\t\t\t\trequire_once 'kCMS/Thumbs/ThumbLib.inc.php';\n\n\t\t\t\t\t\t$options = array('jpegQuality' => 80);\n\t\t\t\t\t\t$thumb = PhpThumbFactory::create($upfile, $options)->adaptiveResizeQuadrant(1165, 655)->save($upfile);\n\n\t\t\t\t\t\t$dataImg = array('plik' => $plik);\n\t\t\t\t\t\t$db->update('inwestycje_markery', $dataImg, 'id = '.$id);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$this->_redirect('/admin/inwestycje/lokalizacja/id/'.$id_inwest.'/');\n\n\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t//Wyswietl bledy\t\n\t\t\t\t\t$this->view->message = '<div class=\"error\">Formularz zawiera błędy</div>';\n\t\t\t\t\t$form->populate($formData);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function sendData()\n \t{\n \t\t$data = $this->m_admin->getData(\"siswa\")->result();\n \t\techo json_encode($data) ;\n \t}", "public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }", "public function pasaje_abonado();", "public function pokazPietroAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\n\t\t\t$id_inwestycja = (int)$this->getRequest()->getParam('inwestycja');\n\t\t\t$id_budynek = (int)$this->getRequest()->getParam('budynek');\n\t\t\t$id_pietro = (int)$this->getRequest()->getParam('id');\n\t\t\t\n\t\t\t$this->view->inwestycja = $inwest = $db->fetchRow($db->select()->from('inwestycje')->where('id = ?', $id_inwestycja));\n\n\t\t\tif($inwest->typ == 1) {\n\t\t\t\t$this->view->budynek = $budynek = $db->fetchRow($db->select()->from('inwestycje_budynki')->where('id = ?', $id_budynek));\n\t\t\t}\n\t\t\t\n\t\t\t$this->view->pietro = $pietro = $db->fetchRow($db->select()->from('inwestycje_pietro')->where('id = ?', $id_pietro));\n\n\t\t\t$this->view->lista = $db->fetchAll($db->select()->from('inwestycje_powierzchnia')->where('id_budynek = ?', $id_budynek)->where('id_inwest = ?', $id_inwestycja)->where('id_pietro = ?', $pietro->id)->where('typ = ?', $pietro->typ)->order('sort ASC'));\n\t\t}", "function Nuevo() {\n /**\n * Crear instancia de EstacionHidrometrica\n */\n $EstacionHidrometrica = new EstacionHidrometrica();\n /**\n * Colocar los datos del POST por medio de los metodos SET\n */\n $EstacionHidrometrica->setIdEstacion(filter_input(INPUT_GET, 'clave'));\n $EstacionHidrometrica->setNombre(filter_input(INPUT_GET, 'nombre'));\n $EstacionHidrometrica->setCuenca_id(filter_input(INPUT_GET, 'cuenca_id'));\n $EstacionHidrometrica->setCorriente(filter_input(INPUT_GET, 'corriente'));\n $EstacionHidrometrica->setRegion_id(filter_input(INPUT_GET, 'id_reg_hidrologica'));\n $EstacionHidrometrica->setEstado_id(filter_input(INPUT_GET, 'estado_id'));\n $EstacionHidrometrica->setLatitud(filter_input(INPUT_GET, 'latitud'));\n $EstacionHidrometrica->setLongitud(filter_input(INPUT_GET, 'longitud'));\n if ($EstacionHidrometrica->Insert() != null) {\n echo 'OK';\n } else {\n echo 'Algo salío mal :(';\n }\n}", "public function request();", "public function cercaDaNome(){\n if(($_SERVER['REQUEST_METHOD']==\"POST\")){\n $view = new VRisultati();\n $nome = $view->recuperaNome(); //nome inserito nella barra di ricerca\n $pm = FPersistentManager::getInstance();\n $ricette = $pm->search(\"ricetta\", $nome, \"nome\");\n if($ricette!=null){\n $msg = \"\";\n } else {\n $msg = \"Non ci sono ricette che soddisfano questi parametri\";\n }\n $view->mostraRisultati($ricette, $msg);\n\n }\n else{\n header('HTTP/1.1 405 Method Not Allowed');\n header('Allow: POST');\n }\n\n\n }", "public static function ws() : void {\n $mode = 0;\n if(isset($_POST['mode']))\n $mode = intval($_POST['mode']);\n \n switch($mode) {\n case 1: // Liste des EC\n // #RIGHTS# : aucun\n $json = [];\n $json['liste'] = ECModel::getList();\n if($json['liste'] === null) {\n $json['code'] = -1;\n $json['msg'] = \"Erreur lors de la récupération de la liste des EC.\";\n }\n else\n $json['code'] = 1;\n Controller::JSONpush($json);\n break;\n case 2: // Liste des étudiants d'une EC\n // #RIGHTS# : intervenant d'EC\n $data['etudiants'] = [];\n if(isset($_SESSION['current']['EC']) && UserModel::estIntEC($_SESSION['current']['EC'])) {\n if(isset($_POST['groupe'])) {\n if(intval($_POST['groupe']) == -1) {\n if(isset($_SESSION['current']['EC']))\n $data['etudiants'] = InscriptionECModel::getListeEtudiants($_SESSION['current']['EC']);\n }\n else {\n $data['etudiants'] = InscriptionGroupeECModel::getListe(intval($_POST['groupe']));\n }\n }\n }\n Controller::push(\"\", \"./view/ecs/etudiants_liste.php\", $data, \"\");\n break;\n default:\n Controller::goTo();\n }\n }", "function post_HostCreate($json){\n //Posterior se establecen los metodos: POST.\n //Se establecen lo headers.\n $peticion = curl_init('http://10.21.211.105/zabbix/api_jsonrpc.php'); \n curl_setopt($peticion, CURLOPT_CUSTOMREQUEST, \"POST\"); \n curl_setopt($peticion, CURLOPT_POSTFIELDS, $json); \n curl_setopt($peticion, CURLOPT_RETURNTRANSFER, true); \n curl_setopt($peticion, CURLOPT_HTTPHEADER, array( \n 'Content-Type: application/json', \n 'Content-Length: ' . strlen($json)) \n ); \n //Se ejecuta el curl de la peticion y se guarda la respuesta del servidor \n //en la variable response que es retornada por la funcion Post_HostCreate \n $response = curl_exec($peticion);\n return json_decode($response, true);\n}", "protected function _request() {}", "public function request()\n {\n }", "public function request()\n {\n }", "public function TraspasoData(){\r\n\t\t$this->idorigen = \"\";\r\n\t\t$this->iddestino = \"\";\r\n\t\t$this->idusuario = \"\";\r\n\t\t$this->fecha = \"NOW()\";\r\n\r\n\t\t#Realizar el traspaso de cada producto\r\n\t\t$this->idtraspaso = \"\";\r\n\t\t$this->idproducto = \"\";\r\n\t\t$this->cantidad = \"\";\r\n\t}", "function en_send_transdata() {\n\t// Handle sending of data\n}", "function autorizar_esp_ckd_pm_acumulado_servicio_tecnico($id_mov){\r\n\r\nglobal $db;\t\r\n \r\n $db->starttrans();\r\n \r\n //traigo el deposito origen\r\n $sql = \"select deposito_origen from movimiento_material where id_movimiento_material = $id_mov\"; \r\n $res = sql($sql) or fin_pagina();\r\n $id_deposito_oriden = $res->fields[\"deposito_origen\"];\r\n \t \r\n //traigo el detalle de los movimientos a liberar \t \r\n $sql=\"select * from detalle_movimiento where id_movimiento_material=$id_mov\";\r\n $res = sql($sql) or fin_pagina();\r\n\r\n $comentario = \" Autorizacion de PM acumulado de servicio tecnico nro: $id_mov\";\r\n $id_tipo_movimiento = 7;\r\n\r\n //por cada detalle voy liberando las reservas del pm autorizado \r\n for($i=0;$i<$res->recordcount();$i++) {\r\n \t $id_prod_esp = $res->fields[\"id_prod_esp\"];\r\n $cantidad = $res->fields[\"cantidad\"];\r\n $id_detalle_movimiento = $res->fields[\"id_detalle_movimiento\"];\r\n descontar_reserva($id_prod_esp,$cantidad,$id_deposito_oriden,$comentario,$id_tipo_movimiento,\"\",$id_detalle_movimiento,\"\");\r\n $res->movenext(); \r\n }//del for\r\n \t \r\n \t \r\n //Inserto la Mercaderia entrante en el stock BS AS \r\n \r\n $sql = \"select * from mercaderia_entrante where id_movimiento_material = $id_mov\";\r\n $res = sql($sql) or fin_pagina();\r\n\t\t\t \r\n\t\t\t \r\n $comentario = \"Producto de lista de mercaderia entrante del PM nro: $id_mov, a travez de una Autorizacion Especial\";\r\n\t\t\t \r\n for($i=0;$i<$res->recordcount();$i++){\r\n\t $id_prod_esp = $res->fields[\"id_prod_esp\"];\r\n\t $cantidad = $res->fields[\"cantidad\"];\r\n\t $descripcion = $res->fields[\"descripcion\"]; \r\n\t //el deposito origen es San Luis que es igual a 1 segun la tabla general.depositos \r\n\t $deposito_origen='1';\r\n\t //el id_tipo_movimiento le hardcodeo uno de la tabla stock.tipo_movimiento\r\n\t $id_tipo_movimiento='13';\r\n\t //el ingreso del producto es a \"disponible\" por lo tanto la funcion no toma en cuenta los parametros que siguen\r\n\t $a_stock='disponible';\r\n\t agregar_stock($id_prod_esp,$cantidad,$deposito_origen,$comentario,$id_tipo_movimiento,$a_stock,$id_tipo_reserva,\"\",$id_detalle_movimiento,$id_licitacion,$nro_caso);\r\n\t $res->movenext();\r\n }//del for\r\n $db->completetrans();\r\n\r\n }", "public function __construct()\n {\n // se definen los parametros de la funcion contrutor\n parent::__construct($this->host,$this->user,$this->past,$this->db_guardar_ejemplos);\n // se utiliza set_charset(\"utf8\") para el formato de decodificacion de caracteres \n $this->set_charset(\"utf8\");\n // se realiza para ver si hay algun problema con la conexion y muestre el error correspondiente\n $this->connect_errno ? die('Error en la conexion:'. mysqli_connect_error()):\n //o por el contrario que si se conecto de manera indicada\n $e =\"conectado:)\";\n // se muestra a partir de un echo\n //echo ($e);\n }", "public function hapus_toko(){\n\t}", "public function jsonToService()\n {\n $debug = false;\n $continua = true;\n \n $this->loadComponent('QueueJson');\n\n $queuesCode = Configure::read('Gdxp.queue.code');\n $organization_id = $this->Authentication->getIdentity()->organization->id;\n\n $q = $this->request->getQuery('q'); // q = per cosa ricercare (id / vat)\n $w = $this->request->getQuery('w'); // w = parola da ricercare\n $service = $this->request->getQuery('service');\n if(empty($service)) \n $service='ECONOMIASOLIDALE';\n\n if($debug) debug($w);\n\n $url = '';\n switch ($service) {\n case 'ECONOMIASOLIDALE':\n $url = Configure::read('Gdxp.articles.index.url').'?'.$q.'='.$w;\n $url = Configure::read('Gdxp.articles.index.url').'/'.$w;\n break; \n default:\n $continua = false;\n die('valore service ['.$service.'] non previsto');\n break;\n }\n if($debug) debug($url);\n $this->set(compact('url'));\n\n if($continua) {\n $http = new Client();\n $response = $http->get($url);\n //$file_content = $response->body();\n $file_content = $response->getStringBody(); // getJson()/getXml() \n\n if(empty($file_content)) {\n $continua = false;\n $this->Flash->error('dati da '.$url.' non pervenuti'); \n }\n }\n\n if($continua) {\n $json = json_decode($file_content);\n // if($debug) debug($json);\n if(empty($json)) {\n $continua = false;\n $this->Flash->error('dati da '.$url.' non in formato json corretto'); \n } \n }\n\n if($continua) {\n $schema_json = $this->_getGdxpSchemaJson();\n // if($debug) debug($schema_json);\n\n $results = $this->QueueJson->validateSchema($json, $schema_json);\n if($debug) debug($results);\n if(isset($results['esito']) && !$results['esito']) {\n $continua = false;\n $this->Flash->error($results['msg']); \n }\n\n } // end if($continua)\n\n /*\n * import dati queue\n */\n if($continua) {\n\n $request['code'] = $queuesCode; \n $request['organization_id'] = $organization_id;\n $request['id'] = $json; \n\n $results = $this->QueueJson->queue($request, $debug);\n // debug($results);\n if(isset($results['esito']) && !$results['esito']) {\n $continua = false;\n // debug($results); \n if(!empty($results['msg']))\n $msg = $results['msg'];\n else\n $msg = __('Gdxp-ServiceJsonValidateKo');\n $this->Flash->error($msg);\n\n $this->set('errors', $results['results']);\n } // if(isset($results['esito']) && !$results['esito']) \n\n } // end if($continua)\n\n if($continua) {\n\n /*\n * ricerco il produttore appena salvato\n */\n $suppliersTable = TableRegistry::get('Suppliers');\n\n $supplier = $suppliersTable->findByPiva($w)\n ->contain(['SuppliersOrganizations' => function($q) use ($organization_id) {\n return $q\n ->where(['organization_id' => $organization_id]);\n }])\n ->first();\n // debug($supplier);\n $this->set(compact('supplier'));\n \n $this->Flash->success(__('Gdxp-ServiceJsonValidateOk'));\n }\n }", "public function request()\n {\n $this->setParams();\n\n $jsondata = json_encode($this->getData(), JSON_UNESCAPED_SLASHES);\n\n if(!$this->is_JSON($jsondata)){\n $this->log(\"Sending parameters must be JSON.\",'Exiting process.');\n $this->error_message('Sending parameters must be JSON.');\n }\n $lenght = strlen($jsondata);\n if($lenght<=0){\n $this->log(\"Length must be more than zero.\",'Exiting process.');\n $this->error_message(\"Length must be more than zero.\");\n }else{\n $lenght = $lenght <= 999 ? \"0\" . $lenght : $lenght;\n }\n\n $this->response_json = $this->oxd_socket_request(utf8_encode($lenght . $jsondata));\n\n $this->response_json = str_replace(substr($this->response_json, 0, 4), \"\", $this->response_json);\n if ($this->response_json) {\n $object = json_decode($this->response_json);\n if ($object->status == 'error') {\n $this->error_message($object->data->error . ' : ' . $object->data->error_description);\n } elseif ($object->status == 'ok') {\n $this->response_object = json_decode($this->response_json);\n }\n } else {\n $this->log(\"Response is empty...\",'Exiting process.');\n $this->error_message('Response is empty...');\n }\n }", "public function download() {\n\n $this->loginToWigle();\n $query = $this->downloadQueue->getRandomNotDownloadedRecord();\n if(!$query) {\n return;\n }\n $id_download_request = $query->id_download_request;\n $coords = new Coords($query['lat_start'],$query['lat_end'],$query['lon_start'],$query['lon_end']);\n $results = $this->getDataFromWigle($coords, (int) $query[\"from\"]);\n $results_decoded = json_decode($results,true);\n if($results_decoded[\"success\"] == true) {\n\n // rozparsovat data\n $data = $this->parseData($results_decoded);\n $mac_addresses = array();\n // vybrat vsechny mac adresy a body nastavit jako hrube\n foreach($data as $w) {\n $mac_addresses[] = $w->getMac();\n $w->setCalculated(1);\n }\n\n // ulozit mac adresy k dalsimu zpracovani\n $this->saveAll2WigleAps($query['id'],$mac_addresses);\n // ulozit vypoctene body\n $this->saveAll($data);\n\n // transakcne vlozime\n $this->database->beginTransaction();\n $query->update(array(\n \"downloaded\"=>1,\n \"downloaded_nets_count\"=>count($mac_addresses),\n \"count_downloaded_observations\"=>0,\n ));\n\n if((int)$results_decoded[\"resultCount\"] >= self::WIGLE_MAXIMUM_ROWS) {\n $this->downloadQueue->addRecord($coords, 0, $id_download_request, (int)$results_decoded[\"last\"]);\n $this->database->table('download_request')\n ->where('id',$id_download_request)\n ->update(array('total_count'=>new SqlLiteral('total_count + 1')));\n }\n $this->database->commit();\n }\n else {\n $this->logger->addLog(new Log(Log::TYPE_WARNING,'WIGLE DOWNLOAD','moc pozadavku'));\n }\n }", "function siguienteEstadoCotizacion(){\n $this->procedimiento='adq.f_cotizacion_ime';\n $this->transaccion='ADQ_SIGECOT_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n $this->setParametro('operacion','operacion','varchar');\n \n $this->setParametro('id_tipo_estado','id_tipo_estado','integer');\n $this->setParametro('id_funcionario','id_funcionario','integer');\n $this->setParametro('obs','obs','varchar');\n $this->setParametro('fecha_oc','fecha_oc','date');\n \n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function enviarPeticion( $comando ) {\n SocketClass::client_reply($comando);\n }", "function notificacionAprobacionAgetic_sss() {\n\t\t$datoJSONAgetic = file_get_contents(\"php://input\");\n\t\t// $arrayAgetic = json_decode($datoJSONAgetic, true);\n\t\t// $this->objParam->addParametro('aceptado', $arrayAgetic['aceptado']);\n\t\t// $this->objParam->addParametro('introducido', $arrayAgetic['introducido']);\n\t\t// $this->objParam->addParametro('request_uuid', $arrayAgetic['requestUuid']);\n\t\t// $this->objParam->addParametro('codigo_operacion', $arrayAgetic['codigoOperacion']);\n\t\t// $this->objParam->addParametro('mensaje', $arrayAgetic['mensaje']);\n\t\t// $this->objParam->addParametro('transaction_id', $arrayAgetic['transaction_id']);\n\t\t// $this->objParam->addParametro('fecha_hora_solicitud', $arrayAgetic['fechaHoraSolicitud']);\n\t\t// $this->objParam->addParametro('hash_datos', $arrayAgetic['hashDatos']);\n\t\t// $this->objParam->addParametro('ci', $arrayAgetic['ci']);\n\n\t\t$curl = curl_init();\n\n\t\tcurl_setopt_array($curl, array(\n\t\t CURLOPT_URL => \"https://erp.obairlines.bo/lib/rest/ciudadania_digital/NotificacionSolicitudAprobacion/notificacionAprobacionAgetic\",\n\t\t CURLOPT_RETURNTRANSFER => true,\n\t\t CURLOPT_ENCODING => \"\",\n\t\t CURLOPT_MAXREDIRS => 10,\n\t\t CURLOPT_TIMEOUT => 0,\n\t\t CURLOPT_FOLLOWLOCATION => true,\n\t\t CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t CURLOPT_CUSTOMREQUEST => \"POST\",\n\t\t CURLOPT_POSTFIELDS => $datoJSONAgetic,\n\t\t CURLOPT_HTTPHEADER => array(\n\t\t \"Php-Auth-User: U6H4vXSf2pNP2GI+Fahh9kxAOCbibL07XZI/r3c2FE0=\",\n\t\t \"Pxp-user: breydi.vasquez\",\n\t\t \"Content-Type: application/json\"\n\t\t ),\n\t\t));\n\n\t\t$response = curl_exec($curl);\n\t\t$error = curl_error($curl);\n\n\t\tcurl_close($curl);\n\n\t\t if ($error) {\n\t\t\t $error_service = array('finalizado' => false, 'mensaje' => $err);\n\t\t\t echo json_encode($error_service);\n\t\t } else {\n\t\t\t $data_erp = json_decode($response);\n\t\t\t $data_error = $data_erp->ROOT->error;\n\n\t\t\t if (!$data_error){\n\t\t\t\t $sucess = array('finalizado' => true, 'mensaje' =>$data_erp->ROOT->datos->mensaje);\n\t\t\t\t \techo json_encode($sucess);\n\t\t\t }else{\n\t\t\t\t $error_service = array('finalizado' => false, 'mensaje' => 'Registro de notificacion: '.$data_erp->ROOT->detalle->mensaje);\n\t\t\t\t echo json_encode($error_service);\n\t\t\t }\n\t\t }\n\t}", "function postRespuestasEncuestaDemografica($url, $ruta, $data, $termino, $sistema, $tipoEstudiante, $tipo)\n\t{\n\t\tset_time_limit(500);\n\t\t$target_url = $url; \n\t\t$fname = $ruta.$data; \n\t\t$cfile = new CURLFile(realpath($fname)); \n\t\t$post = array \n\t\t(\n\t\t\t'archivo' => $cfile,\n\t\t\t'termino' => $termino,\n\t\t\t'sistema' => $sistema,\n\t\t\t'tipo' => $tipo,\n\t\t\t'tipoEstudiante' => $tipoEstudiante\n\t\t); \n\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $target_url);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/4.0 (compatible;)\"); \n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER,array('Content-Type: multipart/form-data'));\n\t\tcurl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); \n\t\tcurl_setopt($ch, CURLOPT_FORBID_REUSE, 1); \n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 0);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t\n\t\t$resultadoExec = curl_exec ($ch);\n\t\t\n\t\tif ($resultadoExec === FALSE) {\n\t\t\t$response = \"Error sending\" . $fname . \" \" . curl_error($ch);\n\t\t\tcurl_close ($ch);\n\t\t}else{\n\t\t\tcurl_close ($ch);\n\t\t\t$response = \"Result: \" . $resultadoExec;\n\t\t}\n\t\t\n\t\treturn $response;\n\t}", "public function enviarPeticion( $comando ) {\n\t\n SocketClass::client_reply($comando);\n\n }" ]
[ "0.59352565", "0.58047545", "0.57636946", "0.57522947", "0.56787497", "0.56667715", "0.56466097", "0.56046563", "0.5603866", "0.55985093", "0.55806375", "0.55806375", "0.55806375", "0.55806375", "0.55806375", "0.55806375", "0.55806375", "0.55806375", "0.55806375", "0.55806375", "0.55806375", "0.55309975", "0.5492253", "0.5453946", "0.54504335", "0.5446112", "0.54254913", "0.5412984", "0.5380295", "0.5380295", "0.5380295", "0.5378197", "0.5367447", "0.5367447", "0.5367447", "0.5367447", "0.5367447", "0.53638595", "0.5355852", "0.5355684", "0.534207", "0.5339658", "0.53168243", "0.53116214", "0.53116214", "0.5293553", "0.52802044", "0.52782434", "0.52759796", "0.5264111", "0.5262321", "0.5262221", "0.52499205", "0.52393335", "0.5237207", "0.5234346", "0.52234185", "0.52202183", "0.52179915", "0.52179813", "0.5209153", "0.5203214", "0.51914823", "0.5183384", "0.51833683", "0.5178149", "0.5168888", "0.5158564", "0.5146592", "0.51406586", "0.5138925", "0.51375747", "0.51305753", "0.51244247", "0.51216835", "0.5112965", "0.5112227", "0.51011014", "0.5099801", "0.50885564", "0.5083684", "0.5082589", "0.5081689", "0.50798064", "0.5073073", "0.5072612", "0.5069781", "0.5069781", "0.5065143", "0.5062131", "0.5061552", "0.50584966", "0.50584394", "0.5048109", "0.5046552", "0.50357383", "0.50313264", "0.50312644", "0.503117", "0.503075", "0.50307417" ]
0.0
-1
Find all active news
public function findAllActiveWithLocale($locale) { $queryBuilder = $this->createQueryBuilder('n'); $queryBuilder ->where('n.active = :active') ->setParameter('active', true) ->orderBy('n.date_display', 'DESC') ; $query = $queryBuilder->getQuery(); $query->setHint( Query::HINT_CUSTOM_OUTPUT_WALKER, 'Gedmo\\Translatable\\Query\\TreeWalker\\TranslationWalker' ); $query->setHint(TranslatableListener::HINT_TRANSLATABLE_LOCALE, $locale); return $query->getResult(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getAllNews() {\n $model = new News();\n \n $result= $model->getAll();\n return $result;\n }", "public static function retrieveAllNews() {\n return R::getAll('SELECT * FROM news');\n }", "public function getAllLatestNews() {\n return $this->_latestNews->where ( 'is_active', 1 )->orderBy('id','desc')-> paginate ( 4 )->toArray ();\n }", "public function getNews()\n {\n return News::all();\n }", "protected function actionGetAll() {\n $result= $this->cachedCall('news', 'getAll', 'getAllNews');\n return $result;\n }", "public function findAllActive() {}", "public function getNews()\n {\n $sql = \"SELECT * FROM news \";\n return $this->get($sql, array());\n }", "public function getNewsForFlags(){\n\t\t//$news = DB::table('news')->orderBy('new_id', 'desc');\n\t\t$news = DB::table('news')\n\t\t\t\t\t\t\t\t->orderBy('new_id', 'desc')\n\t\t\t\t\t\t\t\t->skip(0)->take(100)\n\t\t\t\t\t\t\t\t->get();\n\t\treturn $news;\n\t}", "function getAllNews(){\n $response=getAllNews();\n $all_awp_news = awp_convertObjToArray($response->return->newsList);\n $allnews=array();\n $currentdate = gmdate(DATE_ATOM,mktime());\n if( count($all_awp_news)>0){\n\t foreach($all_awp_news as $news)\n\t {\n\t\t if(strtotime($news->startDate)<=strtotime($currentdate) && strtotime($news->endDate)>=strtotime($currentdate)){\n\t\t array_push($allnews,$news);\n\t\t }\n\t }\n }\n return $allnews;\n }", "public static function news(){\r\n\r\n $news = static::whereHas('category', function($query){\r\n $query->where('name','NOT LIKE','A venir');\r\n })\r\n ->where('featured',1)\r\n ->get();\r\n return $news;\r\n }", "public static function getAllNews()\n {\n $newsList = DB::table('news')\n ->select('*')\n ->orderBy('created_at', 'desc')\n ->paginate(10);\n\n return $newsList;\n }", "public function getNews() {\n\n $list_news = [];\n $sql = \"SELECT * FROM news\";\n $resultados = $this->ExecuteQuery($sql, array());\n foreach ($resultados as $linha) {\n $list_news[] = new Noticia(\n $linha['title'], $linha['text'], null,$linha['id_news']);\n }\n return $list_news;\n }", "public static function retrieveRecentNews() {\n return R::findAll( 'news' , ' ORDER BY date_added DESC LIMIT 10 ' );\n }", "public function getAllActive() {}", "private function getItems()\n\t{\n\t\tglobal $objPage;\n\t\t$objDatabase = \\Database::getInstance();\n\t\t\n\t\t$time = time();\n\t\t$strBegin;\n\t\t$strEnd;\n\t\t$arrArticles = array();\n\t\t\n\t\t// Create a new data Object\n\t\t$objDate = new \\Date();\n\t\t\n\t\t// Set scope of pagination\n\t\tif($this->pagination_format == 'news_year')\n\t\t{\n\t\t\t// Display current year only\n\t\t\t$strBegin = $objDate->__get('yearBegin');\n\t\t\t$strEnd = $objDate->__get('yearEnd');\n\t\t}\n\t\telseif ($this->pagination_format == 'news_month')\t\n\t\t{\n\t\t\t// Display current month only\n\t\t\t$strBegin = $objDate->__get('monthBegin');\n\t\t\t$strEnd = $objDate->__get('monthEnd');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Display all\n\t\t}\n\t\t\n\t\t$strCustomWhere = '';\n\t\t// HOOK: allow other extensions to modify the sql WHERE clause\n\t\tif (isset($GLOBALS['TL_HOOKS']['readerpagination']['customsql_where']) && count($GLOBALS['TL_HOOKS']['readerpagination']['customsql_where']) > 0)\n\t\t{\n\t\t\tforeach($GLOBALS['TL_HOOKS']['readerpagination']['customsql_where'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$strCustomWhere = $this->$callback[0]->$callback[1]('news',$this);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fetch all news that fit in the scope\n\t\t$objArticlesStmt = $objDatabase->prepare(\"\n \tSELECT * FROM tl_news\n \tWHERE \n \t\tpid IN(\" . implode(',', $this->archives) . \") AND published=1 AND hide_in_pagination!=1\n \t\t\" . (!BE_USER_LOGGED_IN ? \" AND (start='' OR start<$time) AND (stop='' OR stop>$time)\" : \"\") . \"\n \t\t\" . ($strBegin ? \" AND (date>$strBegin) AND (date<$strEnd)\" : \"\" ) .\" \".$strCustomWhere. \"\n \tORDER BY date DESC\");\n\t \n\t\t$objArticles = $objArticlesStmt->execute();\n\t\t\n\t\tif ($objArticles->numRows < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// get all articles\n\t\t$arrArticles = $objArticles->fetchAllAssoc();\n\t\t\n\t\t// HOOK: allow other extensions to modify the items\n\t\tif (isset($GLOBALS['TL_HOOKS']['readerpagination']['getItems']) && count($GLOBALS['TL_HOOKS']['readerpagination']['getItems']) > 0)\n\t\t{\n\t\t\tforeach($GLOBALS['TL_HOOKS']['readerpagination']['getItems'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$arrArticles = $this->$callback[0]->$callback[1]('news',$arrArticles,$this);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(count($arrArticles) < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// add keys for pagination (title, href)\n\t\tforeach($arrArticles as $i => $article)\n\t\t{\n\t\t\t// get alias\n \t\t$strAlias = (!$GLOBALS['TL_CONFIG']['disableAlias'] && $article['alias'] != '') ? $article['alias'] : $article['id'];\n \t\t\t\n \t\t\t$arrTmp = array\n \t\t\t(\n \t\t\t\t'href' => ampersand($this->generateFrontendUrl($objPage->row(), ((isset($GLOBALS['TL_CONFIG']['useAutoItem']) && $GLOBALS['TL_CONFIG']['useAutoItem']) ? '/' : '/items/') . $strAlias)),\n 'title' => specialchars($article['headline']),\n \t);\n \t\t\t\n \t\t\t$arrResult[] = array_merge($arrArticles[$i], $arrTmp);\n \t\t\tunset($arrTmp);\n\t\t}\n\t\t$arrArticles = $arrResult;\n\t\tunset($arrResult);\n\t\t\n\t\tif(count($arrArticles) < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// Higher the keys of the array by 1\n\t\t$arrTmp = array();\n\t\tforeach($arrArticles as $key => $value)\n\t\t{\n\t\t\t$arrTmp[$key+1] = $value;\n\t\t}\n\t\tksort($arrTmp);\n\t\t\n\t\t$arrArticles = $arrTmp;\n\t\tunset($arrTmp);\n\t\t\n\t\treturn $arrArticles;\n\t}", "public function searchNews (){\n $this->news = $this->daoJson->searchFeedDate($this->keyword, \"2014-09-01\", \"2014-11-30\");\n }", "public function retrieveNews()\n {\n return News::simplePaginate(5);\n }", "function get_news()\n {\n $query = \"SELECT * FROM `news` ORDER BY `date` DESC\";\n $result = $this->db->query($query);\n\n return $result->fetchAll();\n }", "public function get_allNews($where_news)\t\n\t{\n\t\t$query = $this->db->get_where('announcement',$where_news);\n\n\t\t$result = $query->result_array();\n\n\t\tif(!empty($result))\n\t\t{\n\t\t\treturn $result;\n\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t}", "public function allOnline()\n {\n return $this->model->where('active', '=', true)\n ->orderBy('created_at', 'DESC')\n ->get();\n }", "public function get_all_news_and_event()\n\t{\n\t\t$result = $this->db->order_by('id', 'desc')->get('news_events')->result();\n\n\t\tif($result): return $result; else: return FALSE; endif;\n\t}", "public function all()\n {\n $res['news'] = $this->db->get($this->table)->result();\n $res['featured'] = $this->getFeatured();\n\n $this->formatFields($res['news']);\n\n return $res;\n }", "public function index()\n {\n return News::all();\n }", "function get_all_news()\n {\n $this->db->order_by('news_id', 'desc');\n return $this->db->get('news')->result_array();\n }", "private function getDashboardNews(){\n $this->dashboard->findDashboardNewsData();\n }", "public function allRecordsByDate(){\n\t\t\t$news = collect(DB::table('news')->get());\n\t\t\treturn $news->sortBy('createdat');\n\t\t}", "public function getAllData(){\n return News::all();\n\n }", "public function getNewsList()\n {\n return $this->newsList;\n }", "public static function getAllNewsFromDB(){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n $query = \"SELECT *\r\n FROM \t NEWS;\";\r\n $resQuery = $db->executeQuery($query);\r\n\r\n $i=0;\r\n $allNews= array();\r\n foreach($resQuery[\"response\"] as $row ){\r\n $news = News($row[0],$row[1],$row[2],$row[3],$row[4]);\r\n $allNews[$i] = $news;\r\n $i++;\r\n }\r\n return $allNews;\r\n }", "public function getAllItems() {\n\n $select = $this->select()\n ->setIntegrityCheck(false)\n ->from(\n array('ni' => $this->_name)\n )\n ->join(\n array('nc' => 'NewsCategory'),\n 'ni.id_nc = nc.id',\n array('nc_id' => 'nc.id', 'nc_name' => 'nc.name')\n )\n ->join(\n array('ns' => 'NewsSource'),\n 'nc.id_ns = ns.id',\n array('ns_id' => 'ns.id', 'ns_name' => 'ns.name')\n )\n ->order('pubDate DESC')\n ->limit($this->_params->fetchItemsMax);\n\n $newsItems = $this->fetchAll($select);\n $returnVal = array();\n foreach ($newsItems as $newsItemRow) {\n $returnVal[] = $this->_populateItemObject($newsItemRow);\n }\n\n return $returnVal;\n }", "public function news() {\n return $this->morphedByMany(News::class, 'taggable');\n }", "public function getNewsLettertList()\n { \n $widgets = HomePageWidget::where('status', HomePageWidget::ACTIVE)->where('type', HomePageWidget::TYPE_NEWS_LETTER)->first();\n return $widgets;\n }", "public function showAllActive()\n {\n return $this->processQuery($this->buildQuery());\n }", "public function articles()\n {\n return Board::where('news', 1)->first()->threads;\n }", "public function getNewsListAction(){\n if(I(\"get.status\") == -1) {\n $data[\"status\"] = -1;\n }else{\n $want = array(\"menuid\" => \"menu_id\", \"title\" => \"title\");\n $other = array(\"status\");\n $data = getdata(I(\"post.\", \"\", \"htmlspecialchars\"), $want, $other);\n }\n $page = $_REQUEST[\"p\"] ? $_REQUEST[\"p\"] : 1;\n $pageSize = 5;\n $result = D('News') -> getList($data,$page,$pageSize);\n $count = D('News') -> getAllCount($data);\n $Page= new \\Think\\Page($count,5);// 实例化分页类 传入总记录数和每页显示的记录数(25)\n $Page = setPage($Page);\n $Page->lastSuffix = false;\n $show = bootstrap_page_style($Page->show());\n $menulist = D('Menu') -> getList();\n $positionlist = D('Position')->getList();\n if(is_numeric($data[\"menu_id\"])){\n $this -> assign(\"menuid\",$data[\"menu_id\"]);\n }\n $this -> assign(\"positionlist\",$positionlist);\n $this -> assign(\"menulist\",$menulist);\n $this -> assign(\"page\",$show);\n $this -> assign(\"newslist\",$result);\n $this -> display();\n }", "function getAllNews() {\n global $pdo;\n $statement = $pdo->prepare('SELECT * FROM `news` ORDER BY `timestamp`;');\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n}", "public function getNews()\n {\n return $this->hasMany(News::className(), ['news_category_id' => 'id']);\n }", "public function publishedArticles()\n {\n return Courses::loadAllPublished();\n }", "function getAll() {\r\n\t\t$cond = new Criteria();\r\n\t\t$alls = NewsletterSchedulePeer::doSelect($cond);\r\n\t\treturn $alls;\r\n }", "function fetch_all_news() {\n $conn = connectionObject();\n $query = $conn->prepare( 'SELECT * FROM news ORDER BY creationdate DESC' );\n $query->execute();\n return $query->fetchAll(PDO::FETCH_ASSOC);\n}", "function get_news($news_id)\n {\n return $this->db->get_where('news',array('news_id'=>$news_id))->row_array();\n }", "public function get_news()\n\t{\n\t\t$this->db->where('blog_category_id = 5');\n\t \t$this->db->order_by('last_modified','ASC');\n\t\t$query = $this->db->get('post');\n\t\t\n\t\treturn $query;\n\t}", "public function index(News $news)\n {\n return $news->articles->load(['author', 'tags']);\n }", "protected function _show_news()\n {\n $this->load->model('news_model', 'news');\n\n // fetch the last 5 news items\n $news = $this->news->get_news_items(5, $this->session->userdata('userid'));\n\n if ($news->num_rows() > 0) {\n $i = 1;\n $datestring = $this->options['date_format'];\n\n foreach ($news->result() as $row) {\n $date = gmt_to_local($row->news_date, $this->timezone, $this->dst);\n\n $items[$i]['id'] = $row->news_id;\n $items[$i]['title'] = $row->news_title;\n $items[$i]['content'] = $row->news_content;\n $items[$i]['date'] = mdate($datestring, $date);\n $items[$i]['category'] = $row->newscat_name;\n $items[$i]['author'] = $this->char->get_character_name($row->news_author_character, true, false, true);\n\n ++$i;\n }\n\n return $items;\n }\n\n return false;\n }", "public static function getAvailableNews($limit = false)\n {\n $q = self::find()\n ->andWhere(['is_online' => true, 'is_archived' => false])\n ->orderBy('timestamp_create DESC');\n \n if ($limit) {\n $q->limit($limit);\n }\n \n $articles = $q->all();\n\n return $articles;\n }", "public static function getNewsList(){\n\t\t// $host = '192.168.0.158';\n\t\t// $dbname = 'polimorfizm';\n\t\t// $user = 'root';\n\t\t// $password ='';\n\t\t// $db = new PDO(\"mysql:host=$host;dbname=$dbname\", $user, $password);\n\t\t\t\n\t\t\t$db = Db::getConnection();\n\t\t\t\n\t\t## Создай пустой массив в который ты будешь складывать результаты\n\t\t$newsList = array();\n\t\t\n\t\t## Выбрать 10 последних новостей из таблицы новости\n\t\t$result = $db->query('SELECT id, title, date, short_content'\n\t\t\t\t. ' FROM publication '\n\t\t\t\t. ' ORDER BY date DESC '\n\t\t\t\t. ' LIMIT 10 ');\n\techo'<pre>';\n\tvar_dump($result);\n\techo'</pre>';\n\t$i=0;\n\t## обращаемся к методу(функции)fetch переменной $result\n\twhile($row = $result->fetch()){\n\t\t$newsList[$i]['id']=$row['id'];\n\t\t$newsList[$i]['title']=$row['title'];\n\t\t$newsList[$i]['date']=$row['date'];\n\t\t$newsList[$i]['short_content']=$row['short_content'];\n\t\t$i++;\n\t\t}\n\t\treturn $newsList;\n\t}", "function get_news($cursus=null, $course=null) {\n\n $user_rights = is_connected() ? user()->getRank() : 0;\n\n $q = NewsQuery::create()\n ->where('Access_Rights <= ?', $user_rights, PDO::PARAM_INT)\n ->limit(10)\n ->orderByDate('desc');\n\n if ($cursus) {\n $q = $q->filterByCursus($cursus);\n }\n\n if ($course) {\n $q = $q->filterByCourse($course);\n }\n\n return $q->find();\n}", "public static function ReadFromDB()\n {\n return News::search();\n }", "function GetNews($num=false){\n\t\tif($num){\n\t\t\t$return = $this->db->query(\"SELECT * FROM news WHERE (langs=? OR langs LIKE ?) AND (user_groups=? OR user_groups LIKE ?) AND (users=? OR users LIKE ?) AND not_langs NOT LIKE ? AND user_groups NOT LIKE ? AND users NOT LIKE ? ORDER by id DESC LIMIT 0,?\",array('','%|'.$_SESSION['language'].'|%','','%|'.$_SESSION['user_group'].'|%','','%|'.$_SESSION['id'].'|%', '%|'.$_SESSION['language'].'|%','%|'.$_SESSION['user_group'].'|%','%|'.$_SESSION['id'].'|%', intval($num)))->result_array();\n\t\t}else{\n\t\t\t$return = $this->db->query(\"SELECT * FROM news WHERE (langs=? OR langs LIKE ?) AND (user_groups=? OR user_groups LIKE ?) AND (users=? OR users LIKE ?) AND not_langs NOT LIKE ? AND user_groups NOT LIKE ? AND users NOT LIKE ? ORDER by id DESC\",array('','%|'.$_SESSION['language'].'|%','','%|'.$_SESSION['user_group'].'|%','','%|'.$_SESSION['id'].'|%', '%|'.$_SESSION['language'].'|%','%|'.$_SESSION['user_group'].'|%','%|'.$_SESSION['id'].'|%'))->result_array();\n\t\t}\n\t\treturn $return;\n\t}", "public function allRecordsByTitle(){\n\t $news = collect(DB::table('news')->get());\n\t return $news->sortBy('title');\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function index(Request $request){\n\n $news_date = $request->get('news_date');\n\n $ActiveStatus = $request->get('active_status');\n\n $culturalNews = DB::table('BA_CULTURAL_NEWS')\n ->select('*')\n ->where('ACTIVE_STATUS',$ActiveStatus)\n ->where('EVENT_DATE','like','%'.$news_date.'%')\n ->where('NEWS_TITLE', 'like','%'.$request->get('news_name').'%')\n ->paginate(1000)\n ->appends(['news_name' => $request->get('news_name') , 'news_date' => $news_date ]);\n \n return view('admin.culturalNews.culturalNews_list',compact('culturalNews'))->with('page','culturalNews'); // in order to get active class;\n }", "function get_news(){\n\t\tif($result = $this->db->query('SELECT * FROM news WHERE id<>1 ORDER BY add_date DESC LIMIT 50')){\n\t\t\t$return = '';\n\t\t\twhile($r = $result->fetch_object()){\n\t\t\t\t$return .= '<p>id: '.$r->id.' | '.htmlspecialchars($r->title).'</p>';\n\t\t\t\t$return .= '<hr/>';\n\t\t\t}\n\t\t\treturn $return;\n\t\t}\n\t}", "public function getAllActivities(){\n $this->db->query('SELECT * FROM activity WHERE disabled = 0 ORDER BY name ASC');\n\n //assign result set\n $results = $this->db->resultSet();\n\n return $results;\n }", "private function showAllNews($news_id = NULL) {\n //Standard output\n $return = 'No news Found';\n $newsitemview = new View_model('news_item');\n\n $published = TRUE;\n if (userLoggedIn()){\n $published = FALSE;\n $loggedin = TRUE;\n $newsitemview->assign('loggedin', $loggedin);\n }\n\n //For security we check if the input is correct.\n //If not. Make it Null. All Newsitems wil be returned.\n if (!is_null($news_id)) {\n $news_id = (int) $news_id;\n if ($news_id == 0) {\n $news_id = NULL;\n }\n }\n $newsitems = $this->newsModel->getAllNews($published, $news_id);\n\n if($loggedin) {\n $newsitemview->assign('unseen', $this->countUnseenNewsItems());\n //If the user is logged in all items will be updated to seen\n $this->newsModel->newsSetAllSeen();\n }\n\n //Render if there are more then zero items\n if (count($newsitems) > 0) {\n $newsitemview->assign('news', $newsitems);\n $return = $newsitemview->render(FALSE);\n }\n\n return $return;\n }", "public function index()\n {\n return Resource::collection(News::paginate(10));\n }", "public function getAllActiveArticleByDeevonaute()\n\t{\n\t\t$q = Doctrine_Query::create()\n\t\t\t\t->from('tdArticle td_a')\n\t\t\t\t->where('td_a.active = false')\n\t\t\t\t->leftJoin('td_a.Author a')\n\t\t\t\t->where('a.id = ?', $this->getId());\n\t\t\t\t\n\t\t// return Doctrine_Core::getTable('tdArticle')->listAllArticles($q);\n\t\treturn $q->execute();\n\t}", "public function all()\n {\n return $this->onlinetrack->all();\n }", "private function getOneNews() {\n $this->news->findOne();\n }", "public function actionIndex()\n {\n $searchModel = new NewsSearch();\n\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n\n }", "public function actionIndex()\n {\n\n $db = Yii::$app->db;\n $news_count = $db->createCommand('call news_count_in_sections()')\n ->queryAll();\n\n // $a = $db->createCommand('call news_count_in_sections()')\n // ->queryOne();\n \n // $a = $db->createCommand('call news_count_in_sections()')\n // ->queryColumn();\n \n // $a = $db->createCommand('call news_count_in_sections()')\n // ->queryScalar();\n\n // echo \"<pre>\";\n // print_r($a);\n // die;\n\n $searchModel = new NewsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'news_count' => $news_count,\n ]);\n }", "public static function getNewsSummary()\n {\n $data['all_news'] = DB::table('content_news')->count();\n $data['published'] = DB::table('content_news')\n ->select(DB::raw('count(published) as published'))\n ->where('published', '=', 1)\n ->count();\n \n $data['featured'] = DB::table('content_news')\n ->select(DB::raw('count(`featured`) as featured'))\n ->where('featured', '=', 1)\n ->count();\n return $data;\n }", "private function getAllNewsGalleryByNewsId(){\n $this->news_gallery->findAllByNewsId();\n }", "public function list_news(){\n\t\t\t$recordPerPage = 15;\n\t\t\t//----\n\t\t\t//phan trang\t\n\t\t\t//tinh tong so ban ghi\n\t\t\t$total = $this->model_total();\t\t\t\n\t\t\t//tinh tong so trang\n\t\t\t$numPage = ceil($total/$recordPerPage);//ham ceil de lay tran\n\t\t\t//lay bien p truyen tu url -> bien nay the hien la dang o may\n\t\t\t$p = isset($_GET[\"p\"])&&is_numeric($_GET[\"p\"])? $_GET[\"p\"]-1:0;\n\t\t\t$fromRecord = $p*$recordPerPage;\t\t\t\n\t\t\t//----\n\t\t\t//goi ham model_get() trong class newsModel de lay du lieu\n\t\t\t$data = $this->model_get($fromRecord,$recordPerPage);\n\t\t\t$this->renderHTML(\"views/backend/list_news.php\", array(\"data\"=>$data,\"numPage\"=>$numPage));\n\t\t}", "public function actionIndex()\n {\n $searchModel = new NewsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getAllOnline()\n {\n return $this->query()->online()->get();\n }", "public function activeBookmarks() {\n $sql = \"SELECT * FROM bookmarks WHERE active = 1 ORDER BY created DESC\";\n return $this->db->select($sql);\n }", "public function allActive()\n {\n return Guests::where(array('is_active' => 1))->get();\n }", "public function newsAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$id = (int)$this->getRequest()->getParam('id');\n\t\t\t$this->view->news = $db->fetchAll($db->select()->from('inwestycje_news')->order('data DESC')->where('id_inwest = ?', $id));\n\t\t\t$this->view->inwestycja = $db->fetchRow($db->select()->from('inwestycje')->where('id = ?', $id));\n\t\t}", "public function getAllPublished();", "public function getNewsCross(){\n\t\t//$news = DB::table('news')->orderBy('new_id', 'desc');\n\t\t$news = DB::table('news')\n\t\t\t\t\t\t\t\t->orderBy('new_id', 'desc')\n\t\t\t\t\t\t\t\t->skip(0)->take(20)\n\t\t\t\t\t\t\t\t->get();\n\t\treturn $news;\n\t}", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => News::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public static function getNewsList() {\r\n/*\t\t$host = 'localhost';\r\n\t\t$dbname = 'php_base';\r\n\t\t$user = 'root';\r\n\t\t$password = '';\r\n\t\t$db = new PDO(\"mysql:host=$host;dbname=$dbname\", $user, $password);*/\r\n\r\n\t\t$db = Db::getConnection();\r\n\t\t$newsList = array();\r\n\r\n\t\t$result = $db->query('SELECT id, film_title, film_about, quality, viewing_time, country, year, genre, in_roles, img, vote, voters, video FROM films LIMIT 11');\r\n\r\n\t\t$i = 0;\r\n\t\twhile($row = $result->fetch()) {\r\n\t\t\t$newsList[$i]['id'] = $row['id'];\r\n\t\t\t$newsList[$i]['film_title'] = $row['film_title'];\r\n\t\t\t$newsList[$i]['film_about'] = $row['film_about'];\r\n\t\t\t$newsList[$i]['quality'] = $row['quality'];\r\n\t\t\t$newsList[$i]['viewing_time'] = $row['viewing_time'];\r\n\t\t\t$newsList[$i]['country'] = $row['country'];\r\n\t\t\t$newsList[$i]['year'] = $row['year'];\r\n\t\t\t$newsList[$i]['genre'] = $row['genre'];\r\n\t\t\t$newsList[$i]['in_roles'] = $row['in_roles'];\r\n\t\t\t$newsList[$i]['img'] = $row['img'];\r\n\t\t\t$newsList[$i]['vote'] = $row['vote'];\r\n\t\t\t$newsList[$i]['voters'] = $row['voters'];\r\n\t\t\t$newsList[$i]['video'] = $row['video'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn $newsList;\r\n\t\r\n}", "public function connectedNews($title = 'Related news') {\n return array(\n 'title' => $title,\n 'items' => $this->connected(News::postType()),\n 'postType' => News::postType()\n );\n }", "public function actionIndex() {\n $query = News::find();\n $user = User::find();\n $pagination = new Pagination(\n [\n 'defaultPageSize' => 5,\n 'totalCount' => $query->count(),\n ]);\n $News = News::find()->limit(5)->orderBy('date ASC')\n ->all();\n\n return $this->render('index', [\n 'News' => $News,\n 'pagination' => $pagination,\n ]);\n }", "function bigbluebutton_news() {\n\tglobal $db, $enrolled_courses, $system_courses;\n\t$news = array();\n\tif ($enrolled_courses == ''){\n\t\treturn $news;\n\t} \n\n $sql = 'SELECT * FROM %sbigbluebutton WHERE course_id IN %s';\n\t$rows_meetings = queryDB($sql, array(TABLE_PREFIX, $enrolled_courses));\n\t\n\tif(count($rows_meetings) > 0){\n\t\tforeach($rows_meetings as $row){\n\t\t\t$news[] = array('time'=>htmlentities_utf8($row['course_timing']), \n\t\t\t\t\t\t\t'object'=>$row, \n\t\t\t\t\t\t\t'alt'=>_AT('bigbluebutton'),\n\t\t\t\t\t\t\t'course'=>$system_courses[$row['course_id']]['title'],\n\t\t\t\t\t\t\t'thumb'=>'mods/bigbluebutton/bigbluebutton_sm.png',\n\t\t\t\t\t\t\t'link'=>htmlentities_utf8($row['message']));\n\t\t}\n\t}\n\treturn $news;\n}", "public function innactiveBookmarks() {\n $sql = \"SELECT * FROM bookmarks WHERE active = 0 ORDER BY created DESC\";\n return $this->db->select($sql);\n }", "public function fullList()\n \t{\n \t\treturn $this->with(['pages' => function($q) {\n $q->select('id', 'name', 'menu_id', 'is_active', 'updated_at', 'created_at', 'activate_at', 'deactivate_at');\n }])->withCount( 'pages' )\n ->orderBy( 'position', 'asc' )\n ->get();\n \t}", "public function getAllActive()\n {\n\n $qb = $this->createQueryBuilder('u')->select('u')\n ->andWhere('u.isDeleted =:is_deleted')\n ->andWhere('u.status =:status')\n ->setParameters(array(\n 'is_deleted' => false,\n 'status' => $this->sm->active()\n ));\n $qb->orderBy('u.company', 'DESC');\n return $qb->getQuery()->getResult();\n }", "public function updateNews()\r\n\t{\r\n\t\t$this->newsScraper->all();\r\n\t}", "protected function getSystemNews() {}", "public function getNews()\n {\t\n \t$news = News::all();\n \treturn response()->json([ 'news' => $news ]);\n }", "public function getNews()\r\n\t{\r\n\t\treturn $this->makeRequest('/news');\r\n\t}", "public function index()\n {\n return Article::where('visible',1)->with(['user:id,name','category:id,visible,category_title'])->get();\n }", "public function get_times_news()\n\t\t{\n\t\t\t// this api gets the most popular news from New York Times\n\t\t\t// json_decode with parameter true returns an array\n\t\t\t$api_data = json_decode(file_get_contents('http://api.nytimes.com/svc/mostpopular/v2/mostviewed/all-sections/1.json?api-key=cb5c634bda4ef7d5d97fbd397289f88b%3A9%3A72015177'), true);\n\n\t\t\t// put the data from api to db\n\t\t\t$this->news_model->set_news_from_array($api_data['results']);\n\t\t\t\n\t\t\t$data['news'] = $this->news_model->get_news();\n\t\t\t$data['title'] = 'News archive';\n\t\t\t\n\t\t\techo \"{$api_data['num_results']} news were fetched from New York Times!\";\n\t\t\t\n\t\t\t$this->load->view('templates/header', $data);\n\t\t\techo \"{$api_data['num_results']} news were fetched from New York Times!\";\n\t\t\t//$this->load->view('news/index', $data);\n\t\t\t$this->load->view('templates/footer');\n\t\t}", "public function search($params)\n {\n $query = News::find()->with(['category', 'creater', 'updater', 'deleter', 'relatedLabels'])->asArray(true);\n $query->where('[[tenant_id]] = :tenantId AND [[category_id]] IN (SELECT [[category_id]] FROM {{%user_auth_category}} WHERE [[user_id]] = :userId)', [\n ':tenantId' => Yad::getTenantId(),\n ':userId' => Yii::$app->getUser()->getId()\n ]);\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'sort' => [\n 'defaultOrder' => [\n 'updated_at' => SORT_DESC,\n ]\n ]\n ]);\n\n if (!($this->load($params) && $this->validate())) {\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'id' => $this->id,\n 'status' => $this->status,\n 'enabled' => $this->enabled,\n 'enabled_comment' => $this->enabled_comment,\n 'published_at' => $this->published_at,\n ]);\n if ($this->category_id) {\n $nodeId = $this->category_id;\n if (is_array($nodeId)) {\n $allIdList = [];\n foreach ($nodeId as $id) {\n $allIdList += Category::getChildrenIds($id);\n $allIdList[] = $id;\n }\n } else {\n $allIdList = Category::getChildrenIds($this->category_id);\n $allIdList[] = $this->category_id;\n }\n\n $query->andWhere([\n 'category_id' => $allIdList\n ]);\n }\n\n if ($this->entityLabelId) {\n $query->andWhere(['in', 'id', (new Query())->select(['entity_id'])->from('{{%entity_label}}')->where(['label_id' => $this->entityLabelId, 'entity_name' => self::className2Id(get_parent_class())])]);\n }\n\n $query->andFilterWhere(['like', 'title', $this->title])\n ->andFilterWhere(['like', 'author', $this->author])\n ->andFilterWhere(['like', 'source', $this->source]);\n\n return $dataProvider;\n }", "public function queryNews($query){\n\t\t\treturn $this->query('News',$query);\n\t\t}", "public function get_articles_latest_coming_data( )\n {\n $field = \"*\";\n \n $orderby = \" ArticleId DESC \";\n $result = $this->db->select( $field, TBL_ARTICLE, ' `DeleteFlag` = 0 AND `ArticleStatus` = 2', $orderby , '2');\n return $result;\n }", "public function page_news($offset)//每頁顯示的新聞列表\r\n {\r\n $query = $this->db->order_by('date_time','DESC')->get_where('news',array('state' => '0'),11,$offset);\r\n return $query->result_array();\r\n }", "public function index()\n {\n $this->data['rows'] = DB::table('news')\n ->leftJoin('categories', 'news.category_id', 'categories.id')\n ->leftJoin('subcategories', 'news.subcategory_id', 'subcategories.id')\n ->select(\n 'news.*',\n 'categories.name as category',\n 'subcategories.name as subcategory'\n )\n ->where([\n 'news.status'=>1\n ])\n ->orderby('news.id', 'desc')\n ->get();\n\n return view('backend.pages.news.all')->with($this->data);\n }", "function getActiveChannels() {\n global $debug, $logdir, $logfile, $app;\n\n $channels = null;\n $model = $app->bootstrap->getModel('channels');\n\n $now = date(\"Y-m-d H:i:s\");\n $query = \"SELECT\"\n .\" ch.id,\"\n .\" ch.starttimestamp,\"\n .\" ch.endtimestamp,\"\n .\" ch.title,\"\n .\" ch.isliveevent,\"\n .\" lf.id AS locationid,\"\n .\" lf.name AS locationname,\"\n .\" lf.issecurestreamingforced,\"\n .\" lf.indexphotofilename,\"\n .\" lfs.id AS livefeedstreamid,\"\n .\" lfs.qualitytag AS streamname,\"\n .\" lfs.keycode AS streamid,\"\n .\" lfs.contentkeycode AS contentstreamid\"\n .\" FROM\"\n .\" channels AS ch,\"\n .\" livefeeds AS lf,\"\n .\" livefeed_streams AS lfs\"\n .\" WHERE\"\n .\" ch.starttimestamp <= '\" . $now . \"' AND\"\n .\" ch.endtimestamp >= '\" . $now . \"' AND\"\n .\" ch.id = lf.channelid AND\"\n .\" lf.id = lfs.livefeedid AND\"\n .\" lf.issecurestreamingforced = 0\"\n .\" ORDER BY\"\n .\" ch.id\";\n\n try {\n $rs_channels = $model->safeExecute($query);\n $channels = $rs_channels->GetArray();\n } catch (Exception $err) {\n $debug->log($logdir, $logfile, \"[ERROR] SQL query failed (\". $err->getTraceAsString() .\")\\nSQL QUERY:\\n'\". trim($query) .\"'\", false);\n return false;\n }\n\n // Check if any record returned\n if (count($channels) < 1) { return false; }\n\n return $channels;\n}", "public static function All()\n {\n $result = &get_instance()->db->order_by(\"posted_on\", \"DESC\")->get_where(\"Announcements\", array());\n $ret = array();\n foreach($result->result() as $r)\n $ret[] = Announcement_model::LoadWithData($r);\n return $ret;\n }", "public function newsletterList()\n {\n return $this->ozioma->newsletter->list();\n }", "public function get_all_active()\n\t{\n\t\t// Clean cache for testing\n\t\t//@$this->cache->delete('active_deals');\n\t\t\n\t\tif ($active_deals = $this->cache->get('active_deals'))\n\t\t{\n\t\t\tforeach ($active_deals as $key=>$active_deal)\n\t\t\t{\n\t\t\t\t$active_deals[$key] = $this->prepare($active_deal);\n\t\t\t}\n\t\t\t\n\t\t\treturn $active_deals;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Get 'em \n\t\t\t$active_deals = $this->db->from($this->deal_table.' AS e')\n\t\t\t ->where('e.f_expires_at > UNIX_TIMESTAMP()')\n\t\t\t\t\t\t\t ->where('published_at <=', now())\n\t\t\t ->order_by('published_at', 'DESC')\n\t\t\t ->get()->result()\n\t\t\t ;\n\t\t\t\n\t\t\t// Prepare the data\n\t\t\tif ($active_deals)\n\t\t\t{\n\t\t\t\tforeach ($active_deals as $active_deal)\n\t\t\t\t{\n\t\t\t\t\t$active_deal = $this->prepare($active_deal);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $active_deals;\n\t\t}\n\t\t\n\t\treturn null;\n\t\t\t\n\t}", "function getAll() {\r\n\t\t$cond = new Criteria();\r\n\t\t$alls = NewsletterUserPeer::doSelect($cond);\r\n\t\treturn $alls;\r\n }", "public function get_news_by_id($id)\n {\n $query = $this->db->get_where('news', array('id' => $id));\n return $query->row_array();\n }", "public function findAll() {\r\n\t\t$stmt = $this->db->query(\"SELECT * FROM activities\");\r\n\t\t$activities_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n\t\t$activities = array();\r\n\r\n\t\tforeach ($activities_db as $activity) {\r\n\t\t\tarray_push($activities, new Activity($activity[\"id\"], $activity[\"nombre\"], $activity[\"descripcion\"], $activity[\"dia\"], $activity[\"hora_inicio\"], $activity[\"hora_fin\"], $activity[\"plazas\"], $activity[\"entrenador\"]));\r\n\t\t}\r\n\r\n\t\treturn $activities;\r\n\t}", "public function getNews() {\n\t\treturn $this->news;\n\t}", "public function newslist()\n {\n $this -> load -> model('news_model');\n $news_result = $this -> news_model -> get_all_news();\n $data = array(\n 'list' => $news_result,\n );\n $this->load->view('home/newslist', $data);\n }", "public function listAction()\n {\n // category argument override targetedCategories settings\n if ($this->request !== null) {\n $args = $this->request->getArguments();\n $categoryUid = $args['category'];\n\n\n if ($categoryUid !==null && !empty($categoryUid)) {\n $this->settings['targetedCategories'] = $categoryUid;\n }\n\n $news = $this->newsRepository->findAllBySettings($this->settings);\n }\n $this->view->assign('news', $news)\n ->assign('settings', $this->settings);\n }", "public function newsFlagBlock(){\n\t\t\n\t\t$newsFlag = DB::table('news')\n\t\t\t\t\t\t\t\t->where('flag', 'flag')\n\t\t\t\t\t\t\t\t->orderBy('new_id', 'desc')->skip(0)->take(15)\n\t\t\t\t\t\t\t\t->get();\n\t\t\n\t\treturn $newsFlag;\n\t\t\n\t}" ]
[ "0.7518104", "0.73903733", "0.7366696", "0.6982576", "0.6933417", "0.6922599", "0.6922392", "0.68945146", "0.6867027", "0.6812509", "0.680573", "0.6785688", "0.6783361", "0.67239946", "0.66640234", "0.6618863", "0.65677136", "0.6567114", "0.65522915", "0.6539534", "0.6527947", "0.6524424", "0.64987993", "0.6489156", "0.64869875", "0.6473444", "0.6457184", "0.6441909", "0.6381109", "0.63181466", "0.6302786", "0.62841016", "0.62263334", "0.6190454", "0.6186952", "0.6170496", "0.6168066", "0.6165988", "0.6159845", "0.61472756", "0.61076266", "0.60967654", "0.60951805", "0.6077051", "0.60502845", "0.6028259", "0.60112894", "0.60089755", "0.6008635", "0.6005992", "0.6001821", "0.5962638", "0.59575814", "0.59500617", "0.5932437", "0.5925779", "0.59203994", "0.5912339", "0.59012675", "0.58970135", "0.58841425", "0.5881037", "0.5880369", "0.58683676", "0.58674717", "0.5866504", "0.58526903", "0.583916", "0.5835331", "0.5834217", "0.5813181", "0.5770205", "0.5769232", "0.5766455", "0.5762426", "0.57573694", "0.5751435", "0.5747652", "0.574084", "0.5732196", "0.5727509", "0.5724379", "0.5719972", "0.57178944", "0.5708744", "0.5697688", "0.5696885", "0.56934035", "0.56862974", "0.5678915", "0.5672142", "0.56695926", "0.5666997", "0.56653684", "0.5660689", "0.56589174", "0.5656175", "0.56538856", "0.5652343", "0.5651438", "0.5651039" ]
0.0
-1
Find all active news
public function findAllWithLocale($locale) { $queryBuilder = $this->createQueryBuilder('n'); $queryBuilder ->orderBy('n.date_display', 'DESC') ; $query = $queryBuilder->getQuery(); $query->setHint( Query::HINT_CUSTOM_OUTPUT_WALKER, 'Gedmo\\Translatable\\Query\\TreeWalker\\TranslationWalker' ); $query->setHint(TranslatableListener::HINT_TRANSLATABLE_LOCALE, $locale); return $query->getResult(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getAllNews() {\n $model = new News();\n \n $result= $model->getAll();\n return $result;\n }", "public static function retrieveAllNews() {\n return R::getAll('SELECT * FROM news');\n }", "public function getAllLatestNews() {\n return $this->_latestNews->where ( 'is_active', 1 )->orderBy('id','desc')-> paginate ( 4 )->toArray ();\n }", "public function getNews()\n {\n return News::all();\n }", "protected function actionGetAll() {\n $result= $this->cachedCall('news', 'getAll', 'getAllNews');\n return $result;\n }", "public function findAllActive() {}", "public function getNews()\n {\n $sql = \"SELECT * FROM news \";\n return $this->get($sql, array());\n }", "public function getNewsForFlags(){\n\t\t//$news = DB::table('news')->orderBy('new_id', 'desc');\n\t\t$news = DB::table('news')\n\t\t\t\t\t\t\t\t->orderBy('new_id', 'desc')\n\t\t\t\t\t\t\t\t->skip(0)->take(100)\n\t\t\t\t\t\t\t\t->get();\n\t\treturn $news;\n\t}", "function getAllNews(){\n $response=getAllNews();\n $all_awp_news = awp_convertObjToArray($response->return->newsList);\n $allnews=array();\n $currentdate = gmdate(DATE_ATOM,mktime());\n if( count($all_awp_news)>0){\n\t foreach($all_awp_news as $news)\n\t {\n\t\t if(strtotime($news->startDate)<=strtotime($currentdate) && strtotime($news->endDate)>=strtotime($currentdate)){\n\t\t array_push($allnews,$news);\n\t\t }\n\t }\n }\n return $allnews;\n }", "public static function news(){\r\n\r\n $news = static::whereHas('category', function($query){\r\n $query->where('name','NOT LIKE','A venir');\r\n })\r\n ->where('featured',1)\r\n ->get();\r\n return $news;\r\n }", "public static function getAllNews()\n {\n $newsList = DB::table('news')\n ->select('*')\n ->orderBy('created_at', 'desc')\n ->paginate(10);\n\n return $newsList;\n }", "public function getNews() {\n\n $list_news = [];\n $sql = \"SELECT * FROM news\";\n $resultados = $this->ExecuteQuery($sql, array());\n foreach ($resultados as $linha) {\n $list_news[] = new Noticia(\n $linha['title'], $linha['text'], null,$linha['id_news']);\n }\n return $list_news;\n }", "public static function retrieveRecentNews() {\n return R::findAll( 'news' , ' ORDER BY date_added DESC LIMIT 10 ' );\n }", "public function getAllActive() {}", "private function getItems()\n\t{\n\t\tglobal $objPage;\n\t\t$objDatabase = \\Database::getInstance();\n\t\t\n\t\t$time = time();\n\t\t$strBegin;\n\t\t$strEnd;\n\t\t$arrArticles = array();\n\t\t\n\t\t// Create a new data Object\n\t\t$objDate = new \\Date();\n\t\t\n\t\t// Set scope of pagination\n\t\tif($this->pagination_format == 'news_year')\n\t\t{\n\t\t\t// Display current year only\n\t\t\t$strBegin = $objDate->__get('yearBegin');\n\t\t\t$strEnd = $objDate->__get('yearEnd');\n\t\t}\n\t\telseif ($this->pagination_format == 'news_month')\t\n\t\t{\n\t\t\t// Display current month only\n\t\t\t$strBegin = $objDate->__get('monthBegin');\n\t\t\t$strEnd = $objDate->__get('monthEnd');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Display all\n\t\t}\n\t\t\n\t\t$strCustomWhere = '';\n\t\t// HOOK: allow other extensions to modify the sql WHERE clause\n\t\tif (isset($GLOBALS['TL_HOOKS']['readerpagination']['customsql_where']) && count($GLOBALS['TL_HOOKS']['readerpagination']['customsql_where']) > 0)\n\t\t{\n\t\t\tforeach($GLOBALS['TL_HOOKS']['readerpagination']['customsql_where'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$strCustomWhere = $this->$callback[0]->$callback[1]('news',$this);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fetch all news that fit in the scope\n\t\t$objArticlesStmt = $objDatabase->prepare(\"\n \tSELECT * FROM tl_news\n \tWHERE \n \t\tpid IN(\" . implode(',', $this->archives) . \") AND published=1 AND hide_in_pagination!=1\n \t\t\" . (!BE_USER_LOGGED_IN ? \" AND (start='' OR start<$time) AND (stop='' OR stop>$time)\" : \"\") . \"\n \t\t\" . ($strBegin ? \" AND (date>$strBegin) AND (date<$strEnd)\" : \"\" ) .\" \".$strCustomWhere. \"\n \tORDER BY date DESC\");\n\t \n\t\t$objArticles = $objArticlesStmt->execute();\n\t\t\n\t\tif ($objArticles->numRows < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// get all articles\n\t\t$arrArticles = $objArticles->fetchAllAssoc();\n\t\t\n\t\t// HOOK: allow other extensions to modify the items\n\t\tif (isset($GLOBALS['TL_HOOKS']['readerpagination']['getItems']) && count($GLOBALS['TL_HOOKS']['readerpagination']['getItems']) > 0)\n\t\t{\n\t\t\tforeach($GLOBALS['TL_HOOKS']['readerpagination']['getItems'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$arrArticles = $this->$callback[0]->$callback[1]('news',$arrArticles,$this);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(count($arrArticles) < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// add keys for pagination (title, href)\n\t\tforeach($arrArticles as $i => $article)\n\t\t{\n\t\t\t// get alias\n \t\t$strAlias = (!$GLOBALS['TL_CONFIG']['disableAlias'] && $article['alias'] != '') ? $article['alias'] : $article['id'];\n \t\t\t\n \t\t\t$arrTmp = array\n \t\t\t(\n \t\t\t\t'href' => ampersand($this->generateFrontendUrl($objPage->row(), ((isset($GLOBALS['TL_CONFIG']['useAutoItem']) && $GLOBALS['TL_CONFIG']['useAutoItem']) ? '/' : '/items/') . $strAlias)),\n 'title' => specialchars($article['headline']),\n \t);\n \t\t\t\n \t\t\t$arrResult[] = array_merge($arrArticles[$i], $arrTmp);\n \t\t\tunset($arrTmp);\n\t\t}\n\t\t$arrArticles = $arrResult;\n\t\tunset($arrResult);\n\t\t\n\t\tif(count($arrArticles) < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// Higher the keys of the array by 1\n\t\t$arrTmp = array();\n\t\tforeach($arrArticles as $key => $value)\n\t\t{\n\t\t\t$arrTmp[$key+1] = $value;\n\t\t}\n\t\tksort($arrTmp);\n\t\t\n\t\t$arrArticles = $arrTmp;\n\t\tunset($arrTmp);\n\t\t\n\t\treturn $arrArticles;\n\t}", "public function searchNews (){\n $this->news = $this->daoJson->searchFeedDate($this->keyword, \"2014-09-01\", \"2014-11-30\");\n }", "public function retrieveNews()\n {\n return News::simplePaginate(5);\n }", "function get_news()\n {\n $query = \"SELECT * FROM `news` ORDER BY `date` DESC\";\n $result = $this->db->query($query);\n\n return $result->fetchAll();\n }", "public function get_allNews($where_news)\t\n\t{\n\t\t$query = $this->db->get_where('announcement',$where_news);\n\n\t\t$result = $query->result_array();\n\n\t\tif(!empty($result))\n\t\t{\n\t\t\treturn $result;\n\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t}", "public function allOnline()\n {\n return $this->model->where('active', '=', true)\n ->orderBy('created_at', 'DESC')\n ->get();\n }", "public function get_all_news_and_event()\n\t{\n\t\t$result = $this->db->order_by('id', 'desc')->get('news_events')->result();\n\n\t\tif($result): return $result; else: return FALSE; endif;\n\t}", "public function all()\n {\n $res['news'] = $this->db->get($this->table)->result();\n $res['featured'] = $this->getFeatured();\n\n $this->formatFields($res['news']);\n\n return $res;\n }", "public function index()\n {\n return News::all();\n }", "function get_all_news()\n {\n $this->db->order_by('news_id', 'desc');\n return $this->db->get('news')->result_array();\n }", "private function getDashboardNews(){\n $this->dashboard->findDashboardNewsData();\n }", "public function allRecordsByDate(){\n\t\t\t$news = collect(DB::table('news')->get());\n\t\t\treturn $news->sortBy('createdat');\n\t\t}", "public function getAllData(){\n return News::all();\n\n }", "public function getNewsList()\n {\n return $this->newsList;\n }", "public static function getAllNewsFromDB(){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n $query = \"SELECT *\r\n FROM \t NEWS;\";\r\n $resQuery = $db->executeQuery($query);\r\n\r\n $i=0;\r\n $allNews= array();\r\n foreach($resQuery[\"response\"] as $row ){\r\n $news = News($row[0],$row[1],$row[2],$row[3],$row[4]);\r\n $allNews[$i] = $news;\r\n $i++;\r\n }\r\n return $allNews;\r\n }", "public function getAllItems() {\n\n $select = $this->select()\n ->setIntegrityCheck(false)\n ->from(\n array('ni' => $this->_name)\n )\n ->join(\n array('nc' => 'NewsCategory'),\n 'ni.id_nc = nc.id',\n array('nc_id' => 'nc.id', 'nc_name' => 'nc.name')\n )\n ->join(\n array('ns' => 'NewsSource'),\n 'nc.id_ns = ns.id',\n array('ns_id' => 'ns.id', 'ns_name' => 'ns.name')\n )\n ->order('pubDate DESC')\n ->limit($this->_params->fetchItemsMax);\n\n $newsItems = $this->fetchAll($select);\n $returnVal = array();\n foreach ($newsItems as $newsItemRow) {\n $returnVal[] = $this->_populateItemObject($newsItemRow);\n }\n\n return $returnVal;\n }", "public function news() {\n return $this->morphedByMany(News::class, 'taggable');\n }", "public function getNewsLettertList()\n { \n $widgets = HomePageWidget::where('status', HomePageWidget::ACTIVE)->where('type', HomePageWidget::TYPE_NEWS_LETTER)->first();\n return $widgets;\n }", "public function showAllActive()\n {\n return $this->processQuery($this->buildQuery());\n }", "public function articles()\n {\n return Board::where('news', 1)->first()->threads;\n }", "public function getNewsListAction(){\n if(I(\"get.status\") == -1) {\n $data[\"status\"] = -1;\n }else{\n $want = array(\"menuid\" => \"menu_id\", \"title\" => \"title\");\n $other = array(\"status\");\n $data = getdata(I(\"post.\", \"\", \"htmlspecialchars\"), $want, $other);\n }\n $page = $_REQUEST[\"p\"] ? $_REQUEST[\"p\"] : 1;\n $pageSize = 5;\n $result = D('News') -> getList($data,$page,$pageSize);\n $count = D('News') -> getAllCount($data);\n $Page= new \\Think\\Page($count,5);// 实例化分页类 传入总记录数和每页显示的记录数(25)\n $Page = setPage($Page);\n $Page->lastSuffix = false;\n $show = bootstrap_page_style($Page->show());\n $menulist = D('Menu') -> getList();\n $positionlist = D('Position')->getList();\n if(is_numeric($data[\"menu_id\"])){\n $this -> assign(\"menuid\",$data[\"menu_id\"]);\n }\n $this -> assign(\"positionlist\",$positionlist);\n $this -> assign(\"menulist\",$menulist);\n $this -> assign(\"page\",$show);\n $this -> assign(\"newslist\",$result);\n $this -> display();\n }", "function getAllNews() {\n global $pdo;\n $statement = $pdo->prepare('SELECT * FROM `news` ORDER BY `timestamp`;');\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n}", "public function getNews()\n {\n return $this->hasMany(News::className(), ['news_category_id' => 'id']);\n }", "public function publishedArticles()\n {\n return Courses::loadAllPublished();\n }", "function getAll() {\r\n\t\t$cond = new Criteria();\r\n\t\t$alls = NewsletterSchedulePeer::doSelect($cond);\r\n\t\treturn $alls;\r\n }", "function fetch_all_news() {\n $conn = connectionObject();\n $query = $conn->prepare( 'SELECT * FROM news ORDER BY creationdate DESC' );\n $query->execute();\n return $query->fetchAll(PDO::FETCH_ASSOC);\n}", "function get_news($news_id)\n {\n return $this->db->get_where('news',array('news_id'=>$news_id))->row_array();\n }", "public function get_news()\n\t{\n\t\t$this->db->where('blog_category_id = 5');\n\t \t$this->db->order_by('last_modified','ASC');\n\t\t$query = $this->db->get('post');\n\t\t\n\t\treturn $query;\n\t}", "public function index(News $news)\n {\n return $news->articles->load(['author', 'tags']);\n }", "protected function _show_news()\n {\n $this->load->model('news_model', 'news');\n\n // fetch the last 5 news items\n $news = $this->news->get_news_items(5, $this->session->userdata('userid'));\n\n if ($news->num_rows() > 0) {\n $i = 1;\n $datestring = $this->options['date_format'];\n\n foreach ($news->result() as $row) {\n $date = gmt_to_local($row->news_date, $this->timezone, $this->dst);\n\n $items[$i]['id'] = $row->news_id;\n $items[$i]['title'] = $row->news_title;\n $items[$i]['content'] = $row->news_content;\n $items[$i]['date'] = mdate($datestring, $date);\n $items[$i]['category'] = $row->newscat_name;\n $items[$i]['author'] = $this->char->get_character_name($row->news_author_character, true, false, true);\n\n ++$i;\n }\n\n return $items;\n }\n\n return false;\n }", "public static function getAvailableNews($limit = false)\n {\n $q = self::find()\n ->andWhere(['is_online' => true, 'is_archived' => false])\n ->orderBy('timestamp_create DESC');\n \n if ($limit) {\n $q->limit($limit);\n }\n \n $articles = $q->all();\n\n return $articles;\n }", "public static function getNewsList(){\n\t\t// $host = '192.168.0.158';\n\t\t// $dbname = 'polimorfizm';\n\t\t// $user = 'root';\n\t\t// $password ='';\n\t\t// $db = new PDO(\"mysql:host=$host;dbname=$dbname\", $user, $password);\n\t\t\t\n\t\t\t$db = Db::getConnection();\n\t\t\t\n\t\t## Создай пустой массив в который ты будешь складывать результаты\n\t\t$newsList = array();\n\t\t\n\t\t## Выбрать 10 последних новостей из таблицы новости\n\t\t$result = $db->query('SELECT id, title, date, short_content'\n\t\t\t\t. ' FROM publication '\n\t\t\t\t. ' ORDER BY date DESC '\n\t\t\t\t. ' LIMIT 10 ');\n\techo'<pre>';\n\tvar_dump($result);\n\techo'</pre>';\n\t$i=0;\n\t## обращаемся к методу(функции)fetch переменной $result\n\twhile($row = $result->fetch()){\n\t\t$newsList[$i]['id']=$row['id'];\n\t\t$newsList[$i]['title']=$row['title'];\n\t\t$newsList[$i]['date']=$row['date'];\n\t\t$newsList[$i]['short_content']=$row['short_content'];\n\t\t$i++;\n\t\t}\n\t\treturn $newsList;\n\t}", "function get_news($cursus=null, $course=null) {\n\n $user_rights = is_connected() ? user()->getRank() : 0;\n\n $q = NewsQuery::create()\n ->where('Access_Rights <= ?', $user_rights, PDO::PARAM_INT)\n ->limit(10)\n ->orderByDate('desc');\n\n if ($cursus) {\n $q = $q->filterByCursus($cursus);\n }\n\n if ($course) {\n $q = $q->filterByCourse($course);\n }\n\n return $q->find();\n}", "public static function ReadFromDB()\n {\n return News::search();\n }", "function GetNews($num=false){\n\t\tif($num){\n\t\t\t$return = $this->db->query(\"SELECT * FROM news WHERE (langs=? OR langs LIKE ?) AND (user_groups=? OR user_groups LIKE ?) AND (users=? OR users LIKE ?) AND not_langs NOT LIKE ? AND user_groups NOT LIKE ? AND users NOT LIKE ? ORDER by id DESC LIMIT 0,?\",array('','%|'.$_SESSION['language'].'|%','','%|'.$_SESSION['user_group'].'|%','','%|'.$_SESSION['id'].'|%', '%|'.$_SESSION['language'].'|%','%|'.$_SESSION['user_group'].'|%','%|'.$_SESSION['id'].'|%', intval($num)))->result_array();\n\t\t}else{\n\t\t\t$return = $this->db->query(\"SELECT * FROM news WHERE (langs=? OR langs LIKE ?) AND (user_groups=? OR user_groups LIKE ?) AND (users=? OR users LIKE ?) AND not_langs NOT LIKE ? AND user_groups NOT LIKE ? AND users NOT LIKE ? ORDER by id DESC\",array('','%|'.$_SESSION['language'].'|%','','%|'.$_SESSION['user_group'].'|%','','%|'.$_SESSION['id'].'|%', '%|'.$_SESSION['language'].'|%','%|'.$_SESSION['user_group'].'|%','%|'.$_SESSION['id'].'|%'))->result_array();\n\t\t}\n\t\treturn $return;\n\t}", "public function allRecordsByTitle(){\n\t $news = collect(DB::table('news')->get());\n\t return $news->sortBy('title');\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function index(Request $request){\n\n $news_date = $request->get('news_date');\n\n $ActiveStatus = $request->get('active_status');\n\n $culturalNews = DB::table('BA_CULTURAL_NEWS')\n ->select('*')\n ->where('ACTIVE_STATUS',$ActiveStatus)\n ->where('EVENT_DATE','like','%'.$news_date.'%')\n ->where('NEWS_TITLE', 'like','%'.$request->get('news_name').'%')\n ->paginate(1000)\n ->appends(['news_name' => $request->get('news_name') , 'news_date' => $news_date ]);\n \n return view('admin.culturalNews.culturalNews_list',compact('culturalNews'))->with('page','culturalNews'); // in order to get active class;\n }", "function get_news(){\n\t\tif($result = $this->db->query('SELECT * FROM news WHERE id<>1 ORDER BY add_date DESC LIMIT 50')){\n\t\t\t$return = '';\n\t\t\twhile($r = $result->fetch_object()){\n\t\t\t\t$return .= '<p>id: '.$r->id.' | '.htmlspecialchars($r->title).'</p>';\n\t\t\t\t$return .= '<hr/>';\n\t\t\t}\n\t\t\treturn $return;\n\t\t}\n\t}", "public function getAllActivities(){\n $this->db->query('SELECT * FROM activity WHERE disabled = 0 ORDER BY name ASC');\n\n //assign result set\n $results = $this->db->resultSet();\n\n return $results;\n }", "private function showAllNews($news_id = NULL) {\n //Standard output\n $return = 'No news Found';\n $newsitemview = new View_model('news_item');\n\n $published = TRUE;\n if (userLoggedIn()){\n $published = FALSE;\n $loggedin = TRUE;\n $newsitemview->assign('loggedin', $loggedin);\n }\n\n //For security we check if the input is correct.\n //If not. Make it Null. All Newsitems wil be returned.\n if (!is_null($news_id)) {\n $news_id = (int) $news_id;\n if ($news_id == 0) {\n $news_id = NULL;\n }\n }\n $newsitems = $this->newsModel->getAllNews($published, $news_id);\n\n if($loggedin) {\n $newsitemview->assign('unseen', $this->countUnseenNewsItems());\n //If the user is logged in all items will be updated to seen\n $this->newsModel->newsSetAllSeen();\n }\n\n //Render if there are more then zero items\n if (count($newsitems) > 0) {\n $newsitemview->assign('news', $newsitems);\n $return = $newsitemview->render(FALSE);\n }\n\n return $return;\n }", "public function index()\n {\n return Resource::collection(News::paginate(10));\n }", "public function getAllActiveArticleByDeevonaute()\n\t{\n\t\t$q = Doctrine_Query::create()\n\t\t\t\t->from('tdArticle td_a')\n\t\t\t\t->where('td_a.active = false')\n\t\t\t\t->leftJoin('td_a.Author a')\n\t\t\t\t->where('a.id = ?', $this->getId());\n\t\t\t\t\n\t\t// return Doctrine_Core::getTable('tdArticle')->listAllArticles($q);\n\t\treturn $q->execute();\n\t}", "public function all()\n {\n return $this->onlinetrack->all();\n }", "private function getOneNews() {\n $this->news->findOne();\n }", "public function actionIndex()\n {\n $searchModel = new NewsSearch();\n\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n\n }", "public function actionIndex()\n {\n\n $db = Yii::$app->db;\n $news_count = $db->createCommand('call news_count_in_sections()')\n ->queryAll();\n\n // $a = $db->createCommand('call news_count_in_sections()')\n // ->queryOne();\n \n // $a = $db->createCommand('call news_count_in_sections()')\n // ->queryColumn();\n \n // $a = $db->createCommand('call news_count_in_sections()')\n // ->queryScalar();\n\n // echo \"<pre>\";\n // print_r($a);\n // die;\n\n $searchModel = new NewsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'news_count' => $news_count,\n ]);\n }", "public static function getNewsSummary()\n {\n $data['all_news'] = DB::table('content_news')->count();\n $data['published'] = DB::table('content_news')\n ->select(DB::raw('count(published) as published'))\n ->where('published', '=', 1)\n ->count();\n \n $data['featured'] = DB::table('content_news')\n ->select(DB::raw('count(`featured`) as featured'))\n ->where('featured', '=', 1)\n ->count();\n return $data;\n }", "private function getAllNewsGalleryByNewsId(){\n $this->news_gallery->findAllByNewsId();\n }", "public function list_news(){\n\t\t\t$recordPerPage = 15;\n\t\t\t//----\n\t\t\t//phan trang\t\n\t\t\t//tinh tong so ban ghi\n\t\t\t$total = $this->model_total();\t\t\t\n\t\t\t//tinh tong so trang\n\t\t\t$numPage = ceil($total/$recordPerPage);//ham ceil de lay tran\n\t\t\t//lay bien p truyen tu url -> bien nay the hien la dang o may\n\t\t\t$p = isset($_GET[\"p\"])&&is_numeric($_GET[\"p\"])? $_GET[\"p\"]-1:0;\n\t\t\t$fromRecord = $p*$recordPerPage;\t\t\t\n\t\t\t//----\n\t\t\t//goi ham model_get() trong class newsModel de lay du lieu\n\t\t\t$data = $this->model_get($fromRecord,$recordPerPage);\n\t\t\t$this->renderHTML(\"views/backend/list_news.php\", array(\"data\"=>$data,\"numPage\"=>$numPage));\n\t\t}", "public function actionIndex()\n {\n $searchModel = new NewsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getAllOnline()\n {\n return $this->query()->online()->get();\n }", "public function activeBookmarks() {\n $sql = \"SELECT * FROM bookmarks WHERE active = 1 ORDER BY created DESC\";\n return $this->db->select($sql);\n }", "public function allActive()\n {\n return Guests::where(array('is_active' => 1))->get();\n }", "public function newsAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$id = (int)$this->getRequest()->getParam('id');\n\t\t\t$this->view->news = $db->fetchAll($db->select()->from('inwestycje_news')->order('data DESC')->where('id_inwest = ?', $id));\n\t\t\t$this->view->inwestycja = $db->fetchRow($db->select()->from('inwestycje')->where('id = ?', $id));\n\t\t}", "public function getAllPublished();", "public function getNewsCross(){\n\t\t//$news = DB::table('news')->orderBy('new_id', 'desc');\n\t\t$news = DB::table('news')\n\t\t\t\t\t\t\t\t->orderBy('new_id', 'desc')\n\t\t\t\t\t\t\t\t->skip(0)->take(20)\n\t\t\t\t\t\t\t\t->get();\n\t\treturn $news;\n\t}", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => News::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public static function getNewsList() {\r\n/*\t\t$host = 'localhost';\r\n\t\t$dbname = 'php_base';\r\n\t\t$user = 'root';\r\n\t\t$password = '';\r\n\t\t$db = new PDO(\"mysql:host=$host;dbname=$dbname\", $user, $password);*/\r\n\r\n\t\t$db = Db::getConnection();\r\n\t\t$newsList = array();\r\n\r\n\t\t$result = $db->query('SELECT id, film_title, film_about, quality, viewing_time, country, year, genre, in_roles, img, vote, voters, video FROM films LIMIT 11');\r\n\r\n\t\t$i = 0;\r\n\t\twhile($row = $result->fetch()) {\r\n\t\t\t$newsList[$i]['id'] = $row['id'];\r\n\t\t\t$newsList[$i]['film_title'] = $row['film_title'];\r\n\t\t\t$newsList[$i]['film_about'] = $row['film_about'];\r\n\t\t\t$newsList[$i]['quality'] = $row['quality'];\r\n\t\t\t$newsList[$i]['viewing_time'] = $row['viewing_time'];\r\n\t\t\t$newsList[$i]['country'] = $row['country'];\r\n\t\t\t$newsList[$i]['year'] = $row['year'];\r\n\t\t\t$newsList[$i]['genre'] = $row['genre'];\r\n\t\t\t$newsList[$i]['in_roles'] = $row['in_roles'];\r\n\t\t\t$newsList[$i]['img'] = $row['img'];\r\n\t\t\t$newsList[$i]['vote'] = $row['vote'];\r\n\t\t\t$newsList[$i]['voters'] = $row['voters'];\r\n\t\t\t$newsList[$i]['video'] = $row['video'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn $newsList;\r\n\t\r\n}", "public function connectedNews($title = 'Related news') {\n return array(\n 'title' => $title,\n 'items' => $this->connected(News::postType()),\n 'postType' => News::postType()\n );\n }", "public function actionIndex() {\n $query = News::find();\n $user = User::find();\n $pagination = new Pagination(\n [\n 'defaultPageSize' => 5,\n 'totalCount' => $query->count(),\n ]);\n $News = News::find()->limit(5)->orderBy('date ASC')\n ->all();\n\n return $this->render('index', [\n 'News' => $News,\n 'pagination' => $pagination,\n ]);\n }", "function bigbluebutton_news() {\n\tglobal $db, $enrolled_courses, $system_courses;\n\t$news = array();\n\tif ($enrolled_courses == ''){\n\t\treturn $news;\n\t} \n\n $sql = 'SELECT * FROM %sbigbluebutton WHERE course_id IN %s';\n\t$rows_meetings = queryDB($sql, array(TABLE_PREFIX, $enrolled_courses));\n\t\n\tif(count($rows_meetings) > 0){\n\t\tforeach($rows_meetings as $row){\n\t\t\t$news[] = array('time'=>htmlentities_utf8($row['course_timing']), \n\t\t\t\t\t\t\t'object'=>$row, \n\t\t\t\t\t\t\t'alt'=>_AT('bigbluebutton'),\n\t\t\t\t\t\t\t'course'=>$system_courses[$row['course_id']]['title'],\n\t\t\t\t\t\t\t'thumb'=>'mods/bigbluebutton/bigbluebutton_sm.png',\n\t\t\t\t\t\t\t'link'=>htmlentities_utf8($row['message']));\n\t\t}\n\t}\n\treturn $news;\n}", "public function innactiveBookmarks() {\n $sql = \"SELECT * FROM bookmarks WHERE active = 0 ORDER BY created DESC\";\n return $this->db->select($sql);\n }", "public function fullList()\n \t{\n \t\treturn $this->with(['pages' => function($q) {\n $q->select('id', 'name', 'menu_id', 'is_active', 'updated_at', 'created_at', 'activate_at', 'deactivate_at');\n }])->withCount( 'pages' )\n ->orderBy( 'position', 'asc' )\n ->get();\n \t}", "public function getAllActive()\n {\n\n $qb = $this->createQueryBuilder('u')->select('u')\n ->andWhere('u.isDeleted =:is_deleted')\n ->andWhere('u.status =:status')\n ->setParameters(array(\n 'is_deleted' => false,\n 'status' => $this->sm->active()\n ));\n $qb->orderBy('u.company', 'DESC');\n return $qb->getQuery()->getResult();\n }", "public function updateNews()\r\n\t{\r\n\t\t$this->newsScraper->all();\r\n\t}", "protected function getSystemNews() {}", "public function getNews()\n {\t\n \t$news = News::all();\n \treturn response()->json([ 'news' => $news ]);\n }", "public function getNews()\r\n\t{\r\n\t\treturn $this->makeRequest('/news');\r\n\t}", "public function index()\n {\n return Article::where('visible',1)->with(['user:id,name','category:id,visible,category_title'])->get();\n }", "public function get_times_news()\n\t\t{\n\t\t\t// this api gets the most popular news from New York Times\n\t\t\t// json_decode with parameter true returns an array\n\t\t\t$api_data = json_decode(file_get_contents('http://api.nytimes.com/svc/mostpopular/v2/mostviewed/all-sections/1.json?api-key=cb5c634bda4ef7d5d97fbd397289f88b%3A9%3A72015177'), true);\n\n\t\t\t// put the data from api to db\n\t\t\t$this->news_model->set_news_from_array($api_data['results']);\n\t\t\t\n\t\t\t$data['news'] = $this->news_model->get_news();\n\t\t\t$data['title'] = 'News archive';\n\t\t\t\n\t\t\techo \"{$api_data['num_results']} news were fetched from New York Times!\";\n\t\t\t\n\t\t\t$this->load->view('templates/header', $data);\n\t\t\techo \"{$api_data['num_results']} news were fetched from New York Times!\";\n\t\t\t//$this->load->view('news/index', $data);\n\t\t\t$this->load->view('templates/footer');\n\t\t}", "public function search($params)\n {\n $query = News::find()->with(['category', 'creater', 'updater', 'deleter', 'relatedLabels'])->asArray(true);\n $query->where('[[tenant_id]] = :tenantId AND [[category_id]] IN (SELECT [[category_id]] FROM {{%user_auth_category}} WHERE [[user_id]] = :userId)', [\n ':tenantId' => Yad::getTenantId(),\n ':userId' => Yii::$app->getUser()->getId()\n ]);\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'sort' => [\n 'defaultOrder' => [\n 'updated_at' => SORT_DESC,\n ]\n ]\n ]);\n\n if (!($this->load($params) && $this->validate())) {\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'id' => $this->id,\n 'status' => $this->status,\n 'enabled' => $this->enabled,\n 'enabled_comment' => $this->enabled_comment,\n 'published_at' => $this->published_at,\n ]);\n if ($this->category_id) {\n $nodeId = $this->category_id;\n if (is_array($nodeId)) {\n $allIdList = [];\n foreach ($nodeId as $id) {\n $allIdList += Category::getChildrenIds($id);\n $allIdList[] = $id;\n }\n } else {\n $allIdList = Category::getChildrenIds($this->category_id);\n $allIdList[] = $this->category_id;\n }\n\n $query->andWhere([\n 'category_id' => $allIdList\n ]);\n }\n\n if ($this->entityLabelId) {\n $query->andWhere(['in', 'id', (new Query())->select(['entity_id'])->from('{{%entity_label}}')->where(['label_id' => $this->entityLabelId, 'entity_name' => self::className2Id(get_parent_class())])]);\n }\n\n $query->andFilterWhere(['like', 'title', $this->title])\n ->andFilterWhere(['like', 'author', $this->author])\n ->andFilterWhere(['like', 'source', $this->source]);\n\n return $dataProvider;\n }", "public function queryNews($query){\n\t\t\treturn $this->query('News',$query);\n\t\t}", "public function get_articles_latest_coming_data( )\n {\n $field = \"*\";\n \n $orderby = \" ArticleId DESC \";\n $result = $this->db->select( $field, TBL_ARTICLE, ' `DeleteFlag` = 0 AND `ArticleStatus` = 2', $orderby , '2');\n return $result;\n }", "public function page_news($offset)//每頁顯示的新聞列表\r\n {\r\n $query = $this->db->order_by('date_time','DESC')->get_where('news',array('state' => '0'),11,$offset);\r\n return $query->result_array();\r\n }", "public function index()\n {\n $this->data['rows'] = DB::table('news')\n ->leftJoin('categories', 'news.category_id', 'categories.id')\n ->leftJoin('subcategories', 'news.subcategory_id', 'subcategories.id')\n ->select(\n 'news.*',\n 'categories.name as category',\n 'subcategories.name as subcategory'\n )\n ->where([\n 'news.status'=>1\n ])\n ->orderby('news.id', 'desc')\n ->get();\n\n return view('backend.pages.news.all')->with($this->data);\n }", "function getActiveChannels() {\n global $debug, $logdir, $logfile, $app;\n\n $channels = null;\n $model = $app->bootstrap->getModel('channels');\n\n $now = date(\"Y-m-d H:i:s\");\n $query = \"SELECT\"\n .\" ch.id,\"\n .\" ch.starttimestamp,\"\n .\" ch.endtimestamp,\"\n .\" ch.title,\"\n .\" ch.isliveevent,\"\n .\" lf.id AS locationid,\"\n .\" lf.name AS locationname,\"\n .\" lf.issecurestreamingforced,\"\n .\" lf.indexphotofilename,\"\n .\" lfs.id AS livefeedstreamid,\"\n .\" lfs.qualitytag AS streamname,\"\n .\" lfs.keycode AS streamid,\"\n .\" lfs.contentkeycode AS contentstreamid\"\n .\" FROM\"\n .\" channels AS ch,\"\n .\" livefeeds AS lf,\"\n .\" livefeed_streams AS lfs\"\n .\" WHERE\"\n .\" ch.starttimestamp <= '\" . $now . \"' AND\"\n .\" ch.endtimestamp >= '\" . $now . \"' AND\"\n .\" ch.id = lf.channelid AND\"\n .\" lf.id = lfs.livefeedid AND\"\n .\" lf.issecurestreamingforced = 0\"\n .\" ORDER BY\"\n .\" ch.id\";\n\n try {\n $rs_channels = $model->safeExecute($query);\n $channels = $rs_channels->GetArray();\n } catch (Exception $err) {\n $debug->log($logdir, $logfile, \"[ERROR] SQL query failed (\". $err->getTraceAsString() .\")\\nSQL QUERY:\\n'\". trim($query) .\"'\", false);\n return false;\n }\n\n // Check if any record returned\n if (count($channels) < 1) { return false; }\n\n return $channels;\n}", "public static function All()\n {\n $result = &get_instance()->db->order_by(\"posted_on\", \"DESC\")->get_where(\"Announcements\", array());\n $ret = array();\n foreach($result->result() as $r)\n $ret[] = Announcement_model::LoadWithData($r);\n return $ret;\n }", "public function newsletterList()\n {\n return $this->ozioma->newsletter->list();\n }", "public function get_all_active()\n\t{\n\t\t// Clean cache for testing\n\t\t//@$this->cache->delete('active_deals');\n\t\t\n\t\tif ($active_deals = $this->cache->get('active_deals'))\n\t\t{\n\t\t\tforeach ($active_deals as $key=>$active_deal)\n\t\t\t{\n\t\t\t\t$active_deals[$key] = $this->prepare($active_deal);\n\t\t\t}\n\t\t\t\n\t\t\treturn $active_deals;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Get 'em \n\t\t\t$active_deals = $this->db->from($this->deal_table.' AS e')\n\t\t\t ->where('e.f_expires_at > UNIX_TIMESTAMP()')\n\t\t\t\t\t\t\t ->where('published_at <=', now())\n\t\t\t ->order_by('published_at', 'DESC')\n\t\t\t ->get()->result()\n\t\t\t ;\n\t\t\t\n\t\t\t// Prepare the data\n\t\t\tif ($active_deals)\n\t\t\t{\n\t\t\t\tforeach ($active_deals as $active_deal)\n\t\t\t\t{\n\t\t\t\t\t$active_deal = $this->prepare($active_deal);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $active_deals;\n\t\t}\n\t\t\n\t\treturn null;\n\t\t\t\n\t}", "function getAll() {\r\n\t\t$cond = new Criteria();\r\n\t\t$alls = NewsletterUserPeer::doSelect($cond);\r\n\t\treturn $alls;\r\n }", "public function get_news_by_id($id)\n {\n $query = $this->db->get_where('news', array('id' => $id));\n return $query->row_array();\n }", "public function findAll() {\r\n\t\t$stmt = $this->db->query(\"SELECT * FROM activities\");\r\n\t\t$activities_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n\t\t$activities = array();\r\n\r\n\t\tforeach ($activities_db as $activity) {\r\n\t\t\tarray_push($activities, new Activity($activity[\"id\"], $activity[\"nombre\"], $activity[\"descripcion\"], $activity[\"dia\"], $activity[\"hora_inicio\"], $activity[\"hora_fin\"], $activity[\"plazas\"], $activity[\"entrenador\"]));\r\n\t\t}\r\n\r\n\t\treturn $activities;\r\n\t}", "public function getNews() {\n\t\treturn $this->news;\n\t}", "public function newslist()\n {\n $this -> load -> model('news_model');\n $news_result = $this -> news_model -> get_all_news();\n $data = array(\n 'list' => $news_result,\n );\n $this->load->view('home/newslist', $data);\n }", "public function listAction()\n {\n // category argument override targetedCategories settings\n if ($this->request !== null) {\n $args = $this->request->getArguments();\n $categoryUid = $args['category'];\n\n\n if ($categoryUid !==null && !empty($categoryUid)) {\n $this->settings['targetedCategories'] = $categoryUid;\n }\n\n $news = $this->newsRepository->findAllBySettings($this->settings);\n }\n $this->view->assign('news', $news)\n ->assign('settings', $this->settings);\n }", "public function newsFlagBlock(){\n\t\t\n\t\t$newsFlag = DB::table('news')\n\t\t\t\t\t\t\t\t->where('flag', 'flag')\n\t\t\t\t\t\t\t\t->orderBy('new_id', 'desc')->skip(0)->take(15)\n\t\t\t\t\t\t\t\t->get();\n\t\t\n\t\treturn $newsFlag;\n\t\t\n\t}" ]
[ "0.7518104", "0.73903733", "0.7366696", "0.6982576", "0.6933417", "0.6922599", "0.6922392", "0.68945146", "0.6867027", "0.6812509", "0.680573", "0.6785688", "0.6783361", "0.67239946", "0.66640234", "0.6618863", "0.65677136", "0.6567114", "0.65522915", "0.6539534", "0.6527947", "0.6524424", "0.64987993", "0.6489156", "0.64869875", "0.6473444", "0.6457184", "0.6441909", "0.6381109", "0.63181466", "0.6302786", "0.62841016", "0.62263334", "0.6190454", "0.6186952", "0.6170496", "0.6168066", "0.6165988", "0.6159845", "0.61472756", "0.61076266", "0.60967654", "0.60951805", "0.6077051", "0.60502845", "0.6028259", "0.60112894", "0.60089755", "0.6008635", "0.6005992", "0.6001821", "0.5962638", "0.59575814", "0.59500617", "0.5932437", "0.5925779", "0.59203994", "0.5912339", "0.59012675", "0.58970135", "0.58841425", "0.5881037", "0.5880369", "0.58683676", "0.58674717", "0.5866504", "0.58526903", "0.583916", "0.5835331", "0.5834217", "0.5813181", "0.5770205", "0.5769232", "0.5766455", "0.5762426", "0.57573694", "0.5751435", "0.5747652", "0.574084", "0.5732196", "0.5727509", "0.5724379", "0.5719972", "0.57178944", "0.5708744", "0.5697688", "0.5696885", "0.56934035", "0.56862974", "0.5678915", "0.5672142", "0.56695926", "0.5666997", "0.56653684", "0.5660689", "0.56589174", "0.5656175", "0.56538856", "0.5652343", "0.5651438", "0.5651039" ]
0.0
-1
/ Get FieldTypes that aren't supported by DashCols
public function getUnsupportedFieldTypes() { return array( 'Rich Text', 'Table', 'Matrix' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_field_types()\n {\n }", "public static function getFieldTypes() {\n\t\treturn self::$FIELD_TYPES;\n\t}", "public static function getFieldTypes() {\n\t\treturn self::$FIELD_TYPES;\n\t}", "public static function getFieldTypes() {\n\t\treturn self::$FIELD_TYPES;\n\t}", "public function getColumnTypes();", "public static function fieldTypes()\n {\n $types = [\n 'label' => _MA_XMARTICLE_FIELDTYPE_LABEL,\n 'vs_text' => _MA_XMARTICLE_FIELDTYPE_VSTEXT,\n 's_text' => _MA_XMARTICLE_FIELDTYPE_STEXT,\n 'm_text' => _MA_XMARTICLE_FIELDTYPE_MTEXT,\n 'l_text' => _MA_XMARTICLE_FIELDTYPE_LTEXT,\n 'text' => _MA_XMARTICLE_FIELDTYPE_TEXT,\n 'select' => _MA_XMARTICLE_FIELDTYPE_SELECT,\n 'select_multi' => _MA_XMARTICLE_FIELDTYPE_SELECTMULTI,\n 'radio_yn' => _MA_XMARTICLE_FIELDTYPE_RADIOYN,\n 'radio' => _MA_XMARTICLE_FIELDTYPE_RADIO,\n 'checkbox' => _MA_XMARTICLE_FIELDTYPE_CHECKBOX,\n 'number' => _MA_XMARTICLE_FIELDTYPE_NUMBER\n ];\n\n return $types;\n }", "public function columnTypes()\n {\n return \\array_merge(\\array_filter(parent::columnTypes(), function($elem) {\n if ($elem[0] === Schema::TYPE_JSON) {\n return false;\n }\n return true;\n }), [\n [\n Schema::TYPE_JSON,\n $this->json(),\n \"json\",\n \"json CHECK ([[{name}]] is null or json_valid([[{name}]]))\"\n ]\n ]);\n }", "public function getFieldTypes() {\n\t\treturn array(crud::TYPE_STRING);\n\t}", "function SupportedFields($dataType) { return []; }", "private function getUsedChannelFieldtypes()\n {\n $channel_fields = ee()->db->select('field_type')->order_by('field_type')->get('channel_fields');\n $data = [];\n foreach ($channel_fields->result_array() as $ft) {\n $data[$ft['field_type']] = ['exp_channel_fields'];\n }\n\n return $data;\n }", "public function getExtendedColumnTypes();", "function acf_get_field_types($args = array())\n{\n}", "public static function getColumnTypes()\n {\n return array(\n 'bookId' => 'int',\n 'title' => 'istring',\n 'bindingId' => 'int',\n 'minYear' => 'int',\n 'maxYear' => 'int',\n 'preciseDate' => 'date',\n 'placePublished' => 'istring',\n 'publisher' => 'istring',\n 'printVersion' => 'istring',\n 'firstPage' => 'int',\n 'lastPage' => 'int'\n );\n }", "public function get_custom_field_types() {\n\n\t\t$custom_field_types = array(\n\t\t\t'' => __( 'Default', 'codepress-admin-columns' ),\n\t\t\t'checkmark' => __( 'Checkmark (true/false)', 'codepress-admin-columns' ),\n\t\t\t'color' => __( 'Color', 'codepress-admin-columns' ),\n\t\t\t'count' => __( 'Counter', 'codepress-admin-columns' ),\n\t\t\t'date' => __( 'Date', 'codepress-admin-columns' ),\n\t\t\t'excerpt' => __( 'Excerpt' ),\n\t\t\t'image' => __( 'Image', 'codepress-admin-columns' ),\n\t\t\t'library_id' => __( 'Media Library', 'codepress-admin-columns' ),\n\t\t\t'link' => __( 'Url', 'codepress-admin-columns' ),\n\t\t\t'array' => __( 'Multiple Values', 'codepress-admin-columns' ),\n\t\t\t'numeric' => __( 'Numeric', 'codepress-admin-columns' ),\n\t\t\t'title_by_id' => __( 'Post Title (Post ID\\'s)', 'codepress-admin-columns' ),\n\t\t\t'user_by_id' => __( 'Username (User ID\\'s)', 'codepress-admin-columns' ),\n\t\t\t'term_by_id' => __( 'Term Name (Term ID\\'s)', 'codepress-admin-columns' ),\n\t\t);\n\n\t\t// deprecated. do not use, will be removed.\n\t\t$custom_field_types = apply_filters( 'cpac_custom_field_types', $custom_field_types );\n\n\t\t/**\n\t\t * Filter the available custom field types for the meta (custom field) field\n\t\t *\n\t\t * @since 2.0\n\t\t *\n\t\t * @param array $custom_field_types Available custom field types ([type] => [label])\n\t\t */\n\t\t$custom_field_types = apply_filters( 'cac/column/meta/types', $custom_field_types );\n\n\t\treturn $custom_field_types;\n\t}", "function acf_get_grouped_field_types()\n{\n}", "protected function get_array_field_types() {\n\t\treturn array( 'multicheck' );\n\t}", "function acf_get_field_types_info($args = array())\n{\n}", "public function getTypes()\n\t{\n\t\t$keys = array_keys( ColumnHelper::getAvailableTypes() );\n\t\t$labels = Sort::pluck( ColumnHelper::getAvailableTypes(), 'name' );\n\n\t\t$response = [];\n\t\t$types = array_combine( $keys, $labels );\n\t\t$allowed = $this->section->allowedColumns;\n\t\t$allowed = apply_filters( 'chef_sections_default_allowed_columns', $allowed, $this, $this->section );\n\n\t\tforeach( $types as $key => $type ){\n\t\t\tif( in_array( $key, $allowed ) )\n\t\t\t\t$response[ $key ] = $type;\n\t\t}\n\n\t\treturn $response;\n\n\t}", "public static function getColumnTypes() {\n\t\tstatic $types = array(\n\t\t\t'char' => 'CHAR',\n\t\t\t'string' => 'VARCHAR',\n\t\t\t'text' => 'TEXT',\n\t\t\t'mediumText' => 'MEDIUMTEXT',\n\t\t\t'longText' => 'LONGTEXT',\n\t\t\t'enum' => 'ENUM',\n\t\t\t'tinyBlob' => 'TINYBLOB',\n\t\t\t'blob' => 'BLOB',\n\t\t\t'mediumBlob' => 'MEDIUMBLOB',\n\t\t\t'longBlob' => 'LONGBLOB',\n\t\t\t'binary' => 'BINARY',\n\t\t\t'varbinary' => 'VARBINARY',\n\t\t\t'json' => 'JSON',\n\t\t\t'integer' => 'INT',\n\t\t\t'tinyInteger' => 'TINYINT',\n\t\t\t'smallInteger' => 'SMALLINT',\n\t\t\t'mediumInteger' => 'MEDIUMINT',\n\t\t\t'bigInteger' => 'BIGINT',\n\t\t\t'float' => 'FLOAT',\n\t\t\t'double' => 'DOUBLE',\n\t\t\t'decimal' => 'DECIMAL',\n\t\t\t'boolean' => 'BOOLEAN',\n\t\t\t'date' => 'DATE',\n\t\t\t'dateTime' => 'DATETIME',\n\t\t\t'time' => 'TIME',\n\t\t\t'timestamp' => 'TIMESTAMP',\n\t\t\t'year' => 'YEAR'\n\t\t);\n\n\t\treturn $types;\n\t}", "static public function fieldTypes()\n {\n if (!empty(self::$_fieldTypes)) {\n return self::$_fieldTypes;\n }\n\n /* Fetch all declared classes. */\n $classes = get_declared_classes();\n\n /* Filter for the Horde_Form_Type classes. */\n $blacklist = array('invalid', 'addresslink', 'spacer', 'description',\n 'captcha', 'figlet', 'header');\n foreach ($classes as $class) {\n if (stripos($class, 'horde_form_type_') !== false) {\n $field_type = substr($class, 16);\n /* Don't bother including the types that cannot be handled\n * usefully. */\n if (in_array($field_type, $blacklist)) {\n continue;\n }\n self::$_fieldTypes[$field_type] = @call_user_func(\n array('Horde_Form_Type_' . $field_type, 'about'));\n }\n }\n\n return self::$_fieldTypes;\n }", "public function getFieldtypesFromTable()\n {\n $used_fieldtypes = ee()->db->select('name')->order_by('name')->get('fieldtypes');\n\n return array_column($used_fieldtypes->result_array(), 'name');\n }", "function FieldTypeList ( ) { return $this->_FieldTypeList; }", "function _getTypes()\n {\n $types = array(\n 0 => \"null\",\n 1 => \"bool\",\n 2 => \"int\",\n 3 => \"float\",\n 4 => \"varchar\",\n 5 => \"text\",\n 6 => \"blob\"\n );\n $tLeast = $this->table->count() < 2 ? 4 : 0;\n if ($this->GET('override')) {\n $types[1] = \"int\";\n $types[4] = \"text\";\n $types[6] = \"text\";\n }\n foreach ($this->table->fields as $field) {\n $t[$field] = strcasecmp($field, \"id\") ? $tLeast : 2;\n }\n while ($row = $this->table->each()) {\n foreach ($row as $field => $value) {\n if (preg_match('/[\\x00-\\x06\\x08\\x0B-\\x0C\\x0E-\\x13\\x16-\\x1F]/', $value))\n $t[$field] = 6;\n elseif (strlen($value) > 255 || strpos($value, \"\\n\"))\n $t[$field] = max($t[$field], 5);\n elseif (! empty($value) && ! is_numeric($value))\n $t[$field] = max($t[$field], 4);\n elseif (! preg_match('/^[+-]?\\d{0,10}$/s', $value))\n $t[$field] = max($t[$field], 3);\n elseif (! preg_match('/^[01]?$/s', $value))\n $t[$field] = max($t[$field], 2);\n elseif (strlen($value))\n $t[$field] = max($t[$field], 1);\n }\n }\n foreach ($this->table->fields as $field) {\n $this->types[$field] = $types[$t[$field]];\n }\n $this->table->reset();\n }", "public function getAllFieldTypes(): array\n {\n Craft::$app->getDeprecator()->log('craft.fields.getAllFieldTypes()', 'craft.fields.getAllFieldTypes() has been deprecated. Use craft.app.fields.allFieldTypes instead.');\n\n return Craft::$app->getFields()->getAllFieldTypes();\n }", "function FieldTypesArray() {}", "public static function getColumnTypes()\n {\n return array(\n 'bindingId' => 'int',\n 'libraryId' => 'int',\n 'signature' => 'istring',\n 'summary' => 'istring',\n 'status' => 'int',\n );\n }", "function get_field_mapping_types() {\n return drupal_map_assoc([\n 'string',\n 'keyword',\n 'date',\n 'long',\n 'double',\n 'boolean',\n 'ip',\n 'object',\n 'nested',\n 'geo_point',\n 'geo_shape',\n 'completion',\n ]);\n}", "public static function getColumnTypes()\n {\n return array(\n 'bookId' => 'int',\n 'languageId' => 'int'\n );\n }", "public function getDbFieldType()\n {\n }", "function acadp_get_custom_field_types() {\n\n\t$types = array(\n\t\t'text' => __( 'Text', 'advanced-classifieds-and-directory-pro' ),\n\t\t'textarea' => __( 'Text Area', 'advanced-classifieds-and-directory-pro' ),\n\t\t'select' => __( 'Select', 'advanced-classifieds-and-directory-pro' ),\n\t\t'checkbox' => __( 'Checkbox', 'advanced-classifieds-and-directory-pro' ),\n\t\t'radio' => __( 'Radio Button', 'advanced-classifieds-and-directory-pro' ),\n\t\t'url' => __( 'URL', 'advanced-classifieds-and-directory-pro' )\n\t);\n\n\t// Return\n\treturn apply_filters( 'acadp_custom_field_types', $types );\n\n}", "public abstract function get_supported_datatypes();", "protected function _getDataTypes(){\n\t\treturn ActiveRecordMetaData::getDataTypes($this->_source, $this->_schema);\n\t}", "public function getFields() {\n $columns = $this->schema();\n if (empty($columns)) {\n trigger_error(__d('cake_dev', '(Model::getColumnTypes) Unable to build model field data. If you are using a model without a database table, try implementing schema()'), E_USER_WARNING);\n }\n\n $results = array();\n foreach ($columns as $key => $col) {\n $results[] = $key;\n }\n unset($columns);\n return $results;\n }", "public static function get_survey_field_types() {\n\n\t\treturn apply_filters(\n\t\t\t'wpforms_surveys_reporting_fields_get_survey_field_types',\n\t\t\tarray( 'text', 'textarea', 'select', 'radio', 'checkbox', 'rating', 'likert_scale' )\n\t\t);\n\t}", "static public function fieldTypeNames()\n {\n /* Fetch the field type information from the Horde_Form classes. */\n $fields = self::fieldTypes();\n\n /* Strip out the name element from the array. */\n $available_fields = array();\n foreach ($fields as $field_type => $info) {\n $available_fields[$field_type] = $info['name'];\n }\n\n /* Sort for display purposes. */\n asort($available_fields);\n\n return $available_fields;\n }", "abstract public function getColsFields();", "protected function getColumns(){\n\t\ttry {\n\t\t\t$_db = init::getInstance()->dbh();\n\n\t\t\t$res = $_db->prepare(\"SHOW FIELDS FROM \".$this->_table);\n\n\t\t\t$res->execute();\n\n\t\t\twhile( $r = $res->fetch() ){\n\n\t\t\t\tself::$_fields[$this->_table][] = $r['Field'];\n\n\t\t\t\t//get the type\n\t\t\t\tif( strpos($r['Type'], '(') !== false ){\n\t\t\t\t\t$type = substr($r['Type'], 0, strpos($r['Type'],'('));\n\t\t\t\t} else {\n\t\t\t\t\t$type = $r['Type'];\n\t\t\t\t}\n\n\t\t\t\t//inizialize the default value\n\t\t\t\tif( !empty($r['Default']) ){\n\t\t\t\t\tself::$_defvalues[$this->_table][ $r['Field'] ] = $r['Default'];\n\n\t\t\t\t} elseif( $r['Null'] == 'YES' ){\n\t\t\t\t\tself::$_defvalues[$this->_table][ $r['Field'] ] = null;\n\n\t\t\t\t} else {\n\t\t\t\t\tswitch( strtoupper($type) ){\n\t\t\t\t\t\t//numeric\n\t\t\t\t\t\tcase \"BIT\":\n\t\t\t\t\t\tcase \"TINYINT\":\n\t\t\t\t\t\tcase \"BOOL\":\n\t\t\t\t\t\tcase \"BOOLEAN\":\n\t\t\t\t\t\tcase \"SMALLINT\":\n\t\t\t\t\t\tcase \"MEDIUMINT\":\n\t\t\t\t\t\tcase \"INT\":\n\t\t\t\t\t\tcase \"INTEGER\":\n\t\t\t\t\t\tcase \"BIGINT\":\n\t\t\t\t\t\tcase \"FLOAT\":\n\t\t\t\t\t\tcase \"DOUBLE\":\n\t\t\t\t\t\tcase \"DECIMAL\":\n\t\t\t\t\t\tcase \"DEC\":\n\t\t\t\t\t\t\t\tself::$_defvalues[$this->_table][ $r['Field'] ] = 0;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t//string\n\t\t\t\t\t\tcase \"CHAR\":\n\t\t\t\t\t\tcase \"VARCHAR\":\n\t\t\t\t\t\tcase \"BINARY\":\n\t\t\t\t\t\tcase \"VARBINARY\":\n\t\t\t\t\t\tcase \"TINYBLOB\":\n\t\t\t\t\t\tcase \"TINYTEXT\":\n\t\t\t\t\t\tcase \"BLOB\":\n\t\t\t\t\t\tcase \"TEXT\":\n\t\t\t\t\t\tcase \"MEDIUMBLOB\":\n\t\t\t\t\t\tcase \"MEDIUMTEXT\":\n\t\t\t\t\t\tcase \"LONGBLOB\":\n\t\t\t\t\t\tcase \"LONGTEXT\":\n\t\t\t\t\t\tcase \"ENUM\":\n\t\t\t\t\t\tcase \"SET\":\n\t\t\t\t\t\t\t\tself::$_defvalues[$this->_table][ $r['Field'] ] = '';\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t//date\n\t\t\t\t\t\tcase \"DATE\":\n\t\t\t\t\t\t\t\tself::$_defvalues[$this->_table][ $r['Field'] ] = '0000-00-00';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"DATETIME\":\n\t\t\t\t\t\t\t\tself::$_defvalues[$this->_table][ $r['Field'] ] = '0000-00-00 00:00:00';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"TIMESTAMP\":\n\t\t\t\t\t\t\t\tself::$_defvalues[$this->_table][ $r['Field'] ] = '0000-00-00 00:00:00';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"TIME\":\n\t\t\t\t\t\t\t\tself::$_defvalues[$this->_table][ $r['Field'] ] = '00:00:00';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"YEAR\":\n\t\t\t\t\t\t\t\tself::$_defvalues[$this->_table][ $r['Field'] ] = '0000';\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tthrow new Exception('unknow column type');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch ( PDOException $e ){\n\t\t\terreur_pdo( $e, get_class( $this ), __FUNCTION__ );\n\t\t}\n\t}", "abstract public function supported_fields();", "function is_field_type($name)\n {\n }", "public function getFieldType(){\n \treturn $this->field_type;\n }", "public function getFieldDataType() {\n\t\t$fieldDataType = '';\n\t\t$uitype = $this->get('uitype');\n\t\tif ($uitype == '9') {\n\t\t\t$fieldDataType = 'percent';\n\t\t}\n\n\t\tif (!$fieldDataType) {\n\t\t\t$webserviceField = $this->getWebserviceFieldObject();\n\t\t\t$fieldDataType = $webserviceField->getFieldDataType();\n\t\t\tswitch($fieldDataType) {\n\t\t\t\tcase 'text' : $fieldDataType = 'textArea'; break;\n\t\t\t\tcase 'boolean' : $fieldDataType = 'checkBox'; break;\n\t\t\t case 'multipicklist' : $fieldDataType = 'multiSelectCombo'; break;\n\t\t\t}\n\t\t}\n\t\treturn $fieldDataType;\n\t}", "function get_known_types()\n {\n return array_keys($this->object->_forms);\n }", "public function guessAllUsedFieldtypes()\n {\n static $used_fts;\n\n if (empty($used_fts)) {\n $used_fts = $this->getUsedChannelFieldtypes();\n $db_tables = ee()->db->list_tables();\n foreach ($db_tables as $table) {\n $columns = ee()->db->query(\"SHOW COLUMNS FROM \" . $table);\n foreach ($columns->result_array() as $row) {\n $column = $row['Field'];\n if (strrpos($column, 'col_type') === strlen($column) - 8) {\n $fts_q = ee()->db->select($column)->get($table);\n foreach ($fts_q->result_array() as $ft_row) {\n if (!isset($used_fts[$ft_row[$column]])) {\n $used_fts[$ft_row[$column]] = [$table];\n } else {\n $used_fts[$ft_row[$column]][$table] = $table;\n }\n }\n }\n }\n }\n }\n\n return $used_fts;\n }", "protected function getFieldType()\n {\n if (strstr($this->sColumn, 'textarea')) {\n $sType = 'Textarea';\n } elseif (strstr($this->sColumn, 'editor')) {\n $sType = 'CKEditor';\n } elseif (strstr($this->sColumn, 'email')) {\n $sType = 'Email';\n } elseif (strstr($this->sColumn, 'password')) {\n $sType = 'Password';\n } elseif (strstr($this->sColumn, 'url')) {\n $sType = 'Url';\n } elseif (strstr($this->sColumn, 'phone')) {\n $sType = 'Phone';\n } elseif (strstr($this->sColumn, 'date')) {\n $sType = 'Date';\n } elseif (strstr($this->sColumn, 'color')) {\n $sType = 'Color';\n } elseif (strstr($this->sColumn, 'number')) {\n $sType = 'Number';\n } elseif (strstr($this->sColumn, 'range')) {\n $sType = 'Range';\n } elseif (stripos($this->sColumn, 'height') !== false) {\n $sType = 'Height';\n } elseif (stripos($this->sColumn, 'weight') !== false) {\n $sType = 'Weight';\n } else {\n $sType = 'Textbox';\n }\n\n return $sType;\n }", "public function getFieldTypeAllowableValues()\n {\n return [\n self::FIELD_TYPE_BIT,\n self::FIELD_TYPE_DATE_TIME,\n self::FIELD_TYPE_INT,\n self::FIELD_TYPE_FLOAT,\n self::FIELD_TYPE_STRING,\n self::FIELD_TYPE_GUID,\n ];\n }", "public function test_retrieving_all_available_field_types_returns_types_when_available()\n {\n $this->setupTextAndPasswordFieldTypes();\n $types = $this->fieldManager->availableTypes();\n $this->assertTrue(is_array($types));\n $this->assertCount(2, $types);\n $this->assertArrayHasKey('password', $types);\n $this->assertArrayHasKey('text', $types);\n $this->assertContains(\\LaravelFlare\\Fields\\Types\\PasswordField::class, $types);\n $this->assertContains(\\LaravelFlare\\Fields\\Types\\TextField::class, $types);\n }", "function get_fields_in_table( ){\n\t\t\t\t $result = mysql_query(\"SHOW COLUMNS FROM \".$this->db.\".\".$this->table.\"\");\n\t\t\t\tif (!$result) {\n\t\t\t\t echo 'Could not run query: ' . mysql_error();\n\t\t\t\t exit;\n\t\t\t\t}\n\t\t\t\tif (mysql_num_rows($result) > 0) {\n\t\t\t\t while ($row = mysql_fetch_assoc($result)) {\n\t\t\t\t \n\t\t\t\t //$a_fields[]=$row;\n\t\t\t\t $a_fields[]=$row['Field'].\" | \".$row['Type'];\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\treturn $a_fields;\n\t\t\t }", "public function getDataWithTypeField() {}", "public function getFieldType($fieldname);", "function get_field_type($name)\n {\n }", "protected function metaFieldDefinitions()\n {\n return [\n [\n \"name\" => \"type\",\n \"required\" => true,\n \"type\" => \"string\",\n \"label\" => \"Field type\",\n \"editable\" => false,\n ],\n [\n \"name\" => \"label\",\n \"type\" => \"string\",\n \"label\" => \"Label\"\n ],\n [\n \"name\" => \"protected\",\n \"type\" => \"boolean\",\n \"default\" => false,\n \"editable\" => false,\n \"label\" => \"Schema protected\"\n ],\n [\n \"name\" => \"editable\",\n \"type\" => \"boolean\",\n \"default\" => true,\n \"label\" => \"Field value can be altered\",\n \"editable\" => false\n ],\n [\n \"name\" => \"description\",\n \"type\" => \"string\",\n \"label\" => \"Description\"\n ],\n [\n \"name\" => \"required\",\n \"type\" => \"boolean\",\n \"label\" => \"Required\",\n \"default\" => false\n ],\n [\n \"name\" => \"mode\",\n \"type\" => \"option\",\n \"label\" => \"Data mode\",\n \"options\" => \"prefer_local|Use local data, failing that use external data\\nprefer_external|Use external data, failing that use local data\\nonly_local|Only use local data\\nonly_external|Only use external data\"\n ],\n [\n \"name\" => \"script\",\n \"type\" => \"string\", # should be a special type later on.\n \"label\" => \"Calculated value script\",\n # \"config\" => $documentRevision->configRecordType()\n ],\n [\n \"name\" => \"external_column\",\n \"type\" => \"string\",\n \"label\" => \"External data column\"\n ],\n [\n \"name\" => \"external_table\",\n \"type\" => \"string\",\n \"label\" => \"External Data Table\"\n ],\n [\n \"name\" => \"external_key\",\n \"type\" => \"string\",\n \"label\" => \"External Data Key\"\n ],\n [\n \"name\" => \"external_local_key\",\n \"type\" => \"string\",\n \"label\" => \"External Data Local Key\"\n ],\n [\n \"name\" => \"prefix\",\n \"type\" => \"string\",\n \"label\" => \"Prefix text\"\n ],\n [\n \"name\" => \"suffix\",\n \"type\" => \"string\",\n \"label\" => \"Suffix text\"\n ]\n\n ];\n }", "function acf_is_field_type($name = '')\n{\n}", "public function get_desired_types();", "public function getDataTypes() {\n return $this->dataTypes;\n }", "public function getFieldColumns()\n {\n $options = [];\n foreach ($this->fields as $field) {\n $select = [];\n $type = 'text';\n if ($field == 'from_date' || $field == 'to_date') {\n $type = 'date';\n }\n if ($field == 'rule_id' || $field == 'website_ids') {\n $type = 'int';\n }\n if ($field == 'is_active') {\n $type = 'select';\n $select[] = ['label' => __('Yes'), 'value' => 1];\n $select[] = ['label' => __('No'), 'value' => 0];\n }\n $options[$this->getEntityTypeCode()][] = [\n 'field' => $field,\n 'type' => $type,\n 'select' => $select\n ];\n }\n return $options;\n }", "function mysql_field_type_array( $query ) {\r\n\t\t\t$field = mysql_num_fields( $query );\r\n\t\t\tfor ( $i = 0; $i < $field; $i++ ) {\r\n\t\t\t\t$types[] = mysql_field_type( $query, $i );\r\n\t\t\t}\r\n\t\t\treturn $types;\t\r\n\t\t}", "public function getInstalledFieldtypes()\n {\n static $installed_fts;\n\n if (empty($installed_fts)) {\n $installed_fts = array();\n foreach (ee('Addon')->all() as $name => $info) {\n $info = ee('Addon')->get($name);\n\n if ($info->isInstalled()) {\n $installed_fts = array_merge($installed_fts, $info->getFieldtypeNames());\n }\n }\n }\n\n return $installed_fts;\n }", "function acf_get_field_type($name)\n{\n}", "public function registerColumnTypes();", "function getFieldsTypes()\n {\n return array(\n'id' =>'integer',\n'paypalid'=>'string',\n'notifyid'=>'string',\n\n\t\t\t\n\t );\n }", "protected static function _getDataTypes()\n {\n return [];\n }", "public function types() : array\n {\n $types = [];\n\n for ($i = 0; $i < $this->numColumns(); $i++) {\n $types[] = $this->columnType($i);\n }\n\n return $types;\n }", "function PMA_isTablefieldChar($field)\n{\n // If check to ensure types such as \"enum('one','two','char',..)\" or\n // \"enum('one','two','varchar',..)\" are not categorized as char.\n if (stripos($field['Type'], 'char') === 0\n || stripos($field['Type'], 'varchar') === 0\n ) {\n return stristr($field['Type'], 'char');\n } else {\n return false;\n }\n}", "public function test_retrieving_all_available_field_types_returns_none_when_empty()\n {\n $this->setupNoFieldTypes();\n $types = $this->fieldManager->availableTypes();\n $this->assertTrue(is_array($types));\n $this->assertEmpty($types);\n }", "public function invalidPropertyTypes()\n {\n return [\n ['string<string>'],\n ['int<Neos\\Flow\\Baz>']\n ];\n }", "public function getCustomFieldTypes()\n {\n return $this->_customFieldTypes;\n }", "public function getTypeList__600(){\n $query = new Query ( \"SELECT\" );\n\n $type = TypeBean::select ( $query );\n if (! $type) {\n return false;\n }\n return $type;\n }", "public function getValidTypes()\r\n\t{\r\n\t\treturn array(\"Float\", \"Integer\", \"Location\", \"Text\", \"Boolean\", \r\n\t\t\t\"MultiText\", \"Date\", \"DateTime\", \"Enum\", \"MultiEnum\", \"Group\");\t\r\n\t}", "public function getFieldColumns()\n {\n $options = [];\n foreach ($this->fields as $field) {\n $type = 'text';\n $options[$this->getEntityTypeCode()][] = [\n 'field' => $field,\n 'type' => $type,\n 'select' => []\n ];\n }\n return $options;\n }", "public function getfieldsetTypes(): array\n {\n return ! empty($this->fieldsetTypes) ? $this->fieldsetTypes : $this->getDefaultTypes();\n }", "function getFieldType() {\n\t\treturn 'field';\n\t}", "function pg_field_type($result, $field_number)\n{\n}", "function FieldType ( $cFieldType=null )\n{\n if ( isset($cFieldType) ) {\n if ( $this->_FieldTypeStr != $cFieldType || $this->_inLoading_ ) {\n $this->_FieldTypeStr = $cFieldType;\n $this->_FieldTypeList = preg_split('/\\s*[,;]\\s*/',$cFieldType,-1,PREG_SPLIT_NO_EMPTY);\n }\n return true;\n } else {\n return join(',',$this->_FieldTypeList);\n }\n}", "public static function columnTypes()\n {\n return [\n 'bigInteger' => 'Bigint',\n 'bigPrimaryKey' => 'BigPK',\n 'binary' => 'Binary',\n 'boolean' => 'Boolean',\n 'date' => 'Date',\n 'dateTime' => 'Datetime',\n 'decimal' => 'Decimal',\n 'double' => 'Double',\n 'float' => 'Float',\n 'integer' => 'Integer',\n 'money' => 'Money',\n 'primaryKey' => 'PK',\n 'smallInteger' => 'Smallint',\n 'string' => 'String',\n 'text' => 'Text',\n 'time' => 'Time',\n 'timestamp' => 'Timestamp',\n ];\n }", "public function getDataTypes(){\n\t\t$this->_connect();\n\t\treturn $this->_getDataTypes();\n\t}", "protected function types()\n {\n return [\n 'bigint',\n 'blob',\n 'boolean',\n 'date',\n 'decimal',\n 'integer',\n 'longText',\n 'smallint',\n 'text',\n 'time',\n 'timestamp',\n 'timestamptz',\n ];\n }", "function getFieldType($fieldName) {\n\t\tswitch ($fieldName) {\n\t\t\tcase 'date':\n\t\t\t\t$returner = FIELD_TYPE_DATE;\n\t\t\t\tbreak;\n\t\t\tcase 'language':\n\t\t\t\t$returner = FIELD_TYPE_SELECT;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$returner = FIELD_TYPE_STRING;\n\t\t\t\tbreak;\n\t\t}\n\t\tHookRegistry::call('DublinCorePlugin::getFieldType', array(&$this, $fieldName, &$returner));\n\t\treturn $returner;\n\t}", "function linkit_allowed_field_types() {\n $allowed_field_types = array(\n 'text',\n 'text_long',\n 'link_field',\n );\n drupal_alter('linkit_allowed_field_types', $allowed_field_types);\n return $allowed_field_types;\n}", "function _drush_behat_get_entity_field_types($entity_type) {\n $return = array();\n $fields = \\Drupal::entityManager()->getFieldStorageDefinitions($entity_type);\n foreach ($fields as $field_name => $field) {\n if (_drush_behat_is_field($entity_type, $field_name)) {\n $return[$field_name] = $field->getType();\n }\n }\n return $return;\n}", "public static function getAllFieldsWithTypes(): array\n {\n $className = get_called_class();\n $table = with(new $className)->getTable();\n\n\n $cache_key = self::$cache_prefix.'.ALLFIELDS.WITH.TYPES.' . strtoupper($table);\n\n return self::$use_cache ? Cache::remember($cache_key, 5 * 60, function () use ($table) {\n return self::getArrayTableInfo($table);\n }) : self::getArrayTableInfo($table);\n }", "function checkForDataTypes($modifyModel = false) {\n $res = true;\n foreach ($this->listFields() as $fieldName) {\n $fieldInfo = $this->getFieldInfo($fieldName);\n $res = $this->_checkForDataType($fieldName, $fieldInfo, $modifyModel) && $res; \n }\n return $res;\n }", "public function getFieldType()\n {\n return self::TYPE_PARAMETERIZED;\n }", "public function getTypes()\n {\n $return = $this->dsn->types;\n\n if ($return === null) {\n return;\n }\n return explode(',', $return);\n }", "protected function get_column_type($data, $grid = false)\n {\n $column = ($grid) ? 'col' : 'field';\n\n $settings = ($grid) ? $data : $data[$column . '_settings'];\n $field_content_type = isset($settings['db_column_type']) ? $settings['db_column_type'] : 'text';\n\n $fields = [\n $column . '_id_' . $data[$column . '_id'] => [\n 'type' => $field_content_type,\n 'null' => true\n ]\n ];\n\n return $fields;\n }", "function wp_get_ext_types()\n {\n }", "function get_column_type ($table_name, $column_name) { \n\n\t$column_row_arr = NULL;\n\t\n\t// Get the array of meta data for the table\n\tlist($errArr, $columns_arr) = show_columns($table_name);\n if ( count($columns_arr) > 0) {\n \t// Loop through metadata\n \tforeach ($columns_arr as $columns_row)\n \t{\n \t\tif ($columns_row[DFT_FIELD] == $column_name) {\n \t\t\t$column_row_arr = $columns_row;\n \t\t\tbreak; // column name is found in meta data \n \t\t}\n \t}\n }\n\treturn $column_row_arr;\n}", "protected abstract function get_rest_field_type();", "abstract protected function getDataTypesToExclude();", "private function getColumnsType($result){\n\n $data=$result['result'];\n $types=$result['columns'];\n $fields=$result['fields'];\n $list=[];\n if($fields!==null && $data!==false){\n foreach ($fields as $key=>$value) {\n foreach($data as $dkey=>$dvalue){\n if(array_key_exists($key,$types['type'])){\n if(preg_match('@int@is',$types['type'][$key])){\n $list[$dkey][$key]=(int)$dvalue->$key;\n }\n elseif(preg_match('@float@is',$types['type'][$key])){\n $list[$dkey][$key]=(float)$dvalue->$key;\n }\n elseif(preg_match('@bool@is',$types['type'][$key])){\n $list[$dkey][$key]=(bool)$dvalue->$key;\n }\n else{\n $list[$dkey][$key]=$dvalue->$key;\n }\n }\n else{\n if(preg_match('@groupBy.*Total@is',$key)){\n $list[$dkey][$key]=(int)$dvalue->$key;\n }\n }\n\n }\n }\n }\n\n return $this->resultRelationObjectGrouping($result,$list);\n\n\n }", "public function getFieldType()\n {\n return self::TYPE_DATE;\n }", "public function getFieldType()\n {\n return self::TYPE_DATE;\n }", "protected function getTableTypes(): array\n {\n // are not detected unless the corresponding table type flag is added.\n /*if (DatabaseUtil.checkDatabaseType(DbSqlSessionFactory.POSTGRES)) {\n return PG_DBC_METADATA_TABLE_TYPES;\n }\n return DBC_METADATA_TABLE_TYPES;*/\n return self::PG_DBC_METADATA_TABLE_TYPES;\n }", "function voyage_mikado_blog_grid_types() {\n\n $types = array('standard', 'standard-date-on-side', 'masonry', 'split-column', 'standard-whole-post');\n\n return $types;\n\n }", "public function getAllowedFields() {\n\t\treturn array('date', 'amount');\n\t}", "function awmInputFieldsTypes()\n {\n return apply_filters('awmInputFieldsTypes_filter', array(\n 'text' => array('label' => __('Text', 'extend-wp')),\n 'email' => array('label' => __('Email', 'extend-wp')),\n 'checkbox' => array('label' => __('Checkbox', 'extend-wp')),\n 'url' => array('label' => __('Url', 'extend-wp')),\n 'number' => array('label' => __('Number', 'extend-wp')),\n 'file' => array('label' => __('File', 'extend-wp')),\n 'color' => array('label' => __('Color', 'extend-wp')),\n 'submit' => array('label' => __('Submit', 'extend-wp')),\n ));\n }", "function ywccp_get_field_type() {\r\n\t\t$types = array(\r\n\t\t\t'text' => __( 'Text', 'yith-woocommerce-checkout-manager' ),\r\n\t\t\t'password' => __( 'Password', 'yith-woocommerce-checkout-manager' ),\r\n\t\t\t'tel' => __( 'Phone', 'yith-woocommerce-checkout-manager' ),\r\n\t\t\t'textarea' => __( 'Textarea', 'yith-woocommerce-checkout-manager' ),\r\n\t\t\t'radio' => __( 'Radio', 'yith-woocommerce-checkout-manager' ),\r\n\t\t\t'checkbox' => __( 'Checkbox', 'yith-woocommerce-checkout-manager' ),\r\n\t\t\t'select' => __( 'Select', 'yith-woocommerce-checkout-manager' ),\r\n\t\t\t'multiselect' => __( 'Multi select', 'yith-woocommerce-checkout-manager' ),\r\n\t\t\t'datepicker' => __( 'Date', 'yith-woocommerce-checkout-manager' ),\r\n\t\t\t'timepicker' => __( 'Time', 'yith-woocommerce-checkout-manager' ),\r\n\t\t\t'heading' => __( 'Heading', 'yith-woocommerce-checkout-manager' )\r\n\t\t);\r\n\r\n\t\treturn apply_filters( 'ywccp_field_types', $types );\r\n\t}", "public function getFieldType()\r\n {\r\n return self::TYPE_DATE;\r\n }", "public function columnTypes(): array\n {\n return [\n 'id' => '{{ name }} INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE',\n 'varchar' => '{{ name }} TEXT {{ null }} {{ default }} {{ unique }}',\n 'text' => '{{ name }} TEXT {{ null }} {{ default }} {{ unique }}',\n 'int' => '{{ name }} INTEGER {{ null }} {{ default }} {{ unique }}',\n 'timestamp' => '{{ name }} INTEGER {{ null }} {{ default }} {{ unique }}'\n ];\n }", "protected function allowedDoktypeList()\n\t{\n\t\tif (TRUE === isset($this->arguments['doktypes']) && FALSE === empty($this->arguments['doktypes'])) {\n\t\t\tif (TRUE === is_array($this->arguments['doktypes'])) {\n\t\t\t\t$types = $this->arguments['doktypes'];\n\t\t\t} else {\n\t\t\t\t$types = GeneralUtility::trimExplode(',', $this->arguments['doktypes']);\n\t\t\t}\n\t\t\tforeach ($types as $index => $type) {\n\t\t\t\tif (FALSE === ctype_digit($type)) {\n\t\t\t\t\t$types[$index] = constant('t3lib_pageSelect::DOKTYPE_' . strtoupper($type));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$types = array(\n\t\t\t\tconstant('t3lib_pageSelect::DOKTYPE_DEFAULT'),\n\t\t\t\tconstant('t3lib_pageSelect::DOKTYPE_LINK'),\n\t\t\t\tconstant('t3lib_pageSelect::DOKTYPE_SHORTCUT'),\n\t\t\t\tconstant('t3lib_pageSelect::DOKTYPE_MOUNTPOINT')\n\t\t\t);\n\t\t}\n\t\tif ($this->arguments['includeSpacers'] && FALSE === in_array(constant('t3lib_pageSelect::DOKTYPE_SPACER'), $types)) {\n\t\t\tarray_push($types, constant('t3lib_pageSelect::DOKTYPE_SPACER'));\n\t\t}\n\t\treturn $types;\n\t}", "public static function getDatatypeBlackList()\n {\n $datatypeBlacklist = array();\n if ( eZINI::instance( 'ocopendata.ini' )->hasVariable( 'ContentSettings', 'DatatypeBlackListForExternal' ) )\n {\n $datatypeBlacklist = array_fill_keys(\n eZINI::instance( 'ocopendata.ini' )->variable( 'ContentSettings', 'DatatypeBlackListForExternal' ),\n true\n );\n }\n return $datatypeBlacklist;\n }" ]
[ "0.7281465", "0.6923287", "0.6923287", "0.6923287", "0.6826621", "0.6812844", "0.67540234", "0.6718503", "0.668403", "0.6551885", "0.6538861", "0.6472996", "0.64675003", "0.6444275", "0.640267", "0.6374321", "0.6368725", "0.63615316", "0.6361297", "0.6358128", "0.63580394", "0.6330985", "0.6317427", "0.6316406", "0.6304218", "0.62716293", "0.6258614", "0.62224853", "0.62122977", "0.6192486", "0.61636895", "0.6065942", "0.60208577", "0.600899", "0.5989369", "0.5977982", "0.5977094", "0.5935829", "0.59148526", "0.591375", "0.59040606", "0.58970064", "0.58868444", "0.586585", "0.5843674", "0.58375436", "0.58315486", "0.58308977", "0.58308434", "0.58303905", "0.58207464", "0.58163065", "0.5807673", "0.5790699", "0.5788808", "0.57551736", "0.5748851", "0.5746189", "0.5742574", "0.57361764", "0.57248724", "0.57211906", "0.57087904", "0.56982017", "0.56932443", "0.56871194", "0.5684639", "0.56750065", "0.5670871", "0.5667809", "0.5665387", "0.5663501", "0.56605035", "0.56604844", "0.56573933", "0.5648487", "0.5647353", "0.56422096", "0.56409836", "0.56266624", "0.56205463", "0.5614531", "0.560854", "0.56042343", "0.56016517", "0.5598953", "0.5596216", "0.55769634", "0.55749327", "0.5569741", "0.5569741", "0.5568767", "0.55656284", "0.5555091", "0.555241", "0.5551669", "0.5544324", "0.55395776", "0.55386144", "0.551492" ]
0.74431455
0
/ Return map of default fields in Craft
public function getDefaultFields( $target = false ) { $defaultFields = array( 'uri' => Craft::t( 'URI' ), 'postDate' => Craft::t( 'Post Date' ), 'expiryDate' => Craft::t( 'Expiry Date' ), 'section' => Craft::t( 'Section' ), ); switch ( $target ) { case 'singles' : case 'categoryGroup' : return array_intersect_key( $defaultFields, array_flip( array( 'uri' ) ) ); break; case 'section' : return array_intersect_key( $defaultFields, array_flip( array( 'uri', 'postDate', 'expiryDate' ) ) ); break; default : return $defaultFields; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function field_default() {\n\t\t\treturn array(\n\t\t\t\t'settings' => array(\n\t\t\t\t\t'theme' => 'monolith',\n\t\t\t\t),\n\t\t\t\t'options' => array(),\n\t\t\t);\n\t\t}", "protected function field_default() {\n\t\t\treturn array(\n\t\t\t\t'inputmask' => false,\n\t\t\t\t'placeholder' => false,\n\t\t\t\t'prefix' => false,\n\t\t\t\t'options' => false,\n\t\t\t\t'surfix' => false,\n\t\t\t);\n\t\t}", "protected function getDefaultFields()\n\t{\n\t\tif (empty($this->_default_fields))\n\t\t{\n\t\t\t$default_fields = array(\n\t\t\t\t'title' => array(\n\t\t\t\t\t'field_id'\t\t\t\t=> 'title',\n\t\t\t\t\t'field_label'\t\t\t=> lang('title'),\n\t\t\t\t\t'field_required'\t\t=> 'y',\n\t\t\t\t\t'field_show_fmt'\t\t=> 'n',\n\t\t\t\t\t'field_instructions'\t=> '',\n\t\t\t\t\t'field_text_direction'\t=> 'ltr',\n\t\t\t\t\t'field_type'\t\t\t=> 'text',\n\t\t\t\t\t'field_maxl'\t\t\t=> 200\n\t\t\t\t),\n\t\t\t\t'url_title' => array(\n\t\t\t\t\t'field_id'\t\t\t\t=> 'url_title',\n\t\t\t\t\t'field_label'\t\t\t=> lang('url_title'),\n\t\t\t\t\t'field_required'\t\t=> 'y',\n\t\t\t\t\t'field_instructions'\t=> lang('alphadash_desc'),\n\t\t\t\t\t'field_show_fmt'\t\t=> 'n',\n\t\t\t\t\t'field_text_direction'\t=> 'ltr',\n\t\t\t\t\t'field_type'\t\t\t=> 'text',\n\t\t\t\t\t'field_maxl'\t\t\t=> 200\n\t\t\t\t),\n\t\t\t\t'entry_date' => array(\n\t\t\t\t\t'field_id'\t\t\t\t=> 'entry_date',\n\t\t\t\t\t'field_label'\t\t\t=> lang('entry_date'),\n\t\t\t\t\t'field_required'\t\t=> 'y',\n\t\t\t\t\t'field_type'\t\t\t=> 'date',\n\t\t\t\t\t'field_text_direction'\t=> 'ltr',\n\t\t\t\t\t'field_instructions'\t=> lang('entry_date_desc'),\n\t\t\t\t\t'field_show_fmt'\t\t=> 'n',\n\t\t\t\t\t'always_show_date'\t\t=> 'y',\n\t\t\t\t\t'default_offset'\t\t=> 0,\n\t\t\t\t\t'selected'\t\t\t\t=> 'y',\n\t\t\t\t),\n\t\t\t\t'expiration_date' => array(\n\t\t\t\t\t'field_id'\t\t\t\t=> 'expiration_date',\n\t\t\t\t\t'field_label'\t\t\t=> lang('expiration_date'),\n\t\t\t\t\t'field_required'\t\t=> 'n',\n\t\t\t\t\t'field_type'\t\t\t=> 'date',\n\t\t\t\t\t'field_text_direction'\t=> 'ltr',\n\t\t\t\t\t'field_instructions'\t=> lang('expiration_date_desc'),\n\t\t\t\t\t'field_show_fmt'\t\t=> 'n',\n\t\t\t\t\t'default_offset'\t\t=> 0,\n\t\t\t\t\t'selected'\t\t\t\t=> 'y',\n\t\t\t\t),\n\t\t\t\t'comment_expiration_date' => array(\n\t\t\t\t\t'field_id'\t\t\t\t=> 'comment_expiration_date',\n\t\t\t\t\t'field_label'\t\t\t=> lang('comment_expiration_date'),\n\t\t\t\t\t'field_required'\t\t=> 'n',\n\t\t\t\t\t'field_type'\t\t\t=> 'date',\n\t\t\t\t\t'field_text_direction'\t=> 'ltr',\n\t\t\t\t\t'field_instructions'\t=> lang('comment_expiration_date_desc'),\n\t\t\t\t\t'field_show_fmt'\t\t=> 'n',\n\t\t\t\t\t'default_offset'\t\t=> 0,\n\t\t\t\t\t'selected'\t\t\t\t=> 'y',\n\t\t\t\t\t'populateCallback'\t\t=> array($this, 'populateCommentExpiration')\n\t\t\t\t),\n\t\t\t\t'channel_id' => array(\n\t\t\t\t\t'field_id'\t\t\t\t=> 'channel_id',\n\t\t\t\t\t'field_label'\t\t\t=> lang('channel'),\n\t\t\t\t\t'field_required'\t\t=> 'n',\n\t\t\t\t\t'field_show_fmt'\t\t=> 'n',\n\t\t\t\t\t'field_instructions'\t=> lang('channel_desc'),\n\t\t\t\t\t'field_text_direction'\t=> 'ltr',\n\t\t\t\t\t'field_type'\t\t\t=> 'select',\n\t\t\t\t\t'field_list_items' => array(),\n\t\t\t\t\t'field_maxl'\t\t\t=> 100,\n\t\t\t\t\t'populateCallback'\t\t=> array($this, 'populateChannels')\n\t\t\t\t),\n\t\t\t\t'status' => array(\n\t\t\t\t\t'field_id'\t\t\t\t=> 'status',\n\t\t\t\t\t'field_label'\t\t\t=> lang('entry_status'),\n\t\t\t\t\t'field_required'\t\t=> 'n',\n\t\t\t\t\t'field_show_fmt'\t\t=> 'n',\n\t\t\t\t\t'field_instructions'\t=> lang('entry_status_desc'),\n\t\t\t\t\t'field_text_direction'\t=> 'ltr',\n\t\t\t\t\t'field_type'\t\t\t=> 'select',\n\t\t\t\t\t'field_list_items' => array(),\n\t\t\t\t\t'field_maxl'\t\t\t=> 100,\n\t\t\t\t\t'populateCallback'\t\t=> array($this, 'populateStatus')\n\t\t\t\t),\n\t\t\t\t'author_id' => array(\n\t\t\t\t\t'field_id'\t\t\t\t=> 'author_id',\n\t\t\t\t\t'field_label'\t\t\t=> lang('author'),\n\t\t\t\t\t'field_required'\t\t=> 'n',\n\t\t\t\t\t'field_show_fmt'\t\t=> 'n',\n\t\t\t\t\t'field_instructions'\t=> lang('author_desc'),\n\t\t\t\t\t'field_text_direction'\t=> 'ltr',\n\t\t\t\t\t'field_type'\t\t\t=> 'select',\n\t\t\t\t\t'field_list_items' => array(),\n\t\t\t\t\t'field_maxl'\t\t\t=> 100,\n\t\t\t\t\t'populateCallback'\t\t=> array($this, 'populateAuthors')\n\t\t\t\t),\n\t\t\t\t'sticky' => array(\n\t\t\t\t\t'field_id'\t\t\t\t=> 'sticky',\n\t\t\t\t\t'field_label'\t\t\t=> lang('sticky'),\n\t\t\t\t\t'field_required'\t\t=> 'n',\n\t\t\t\t\t'field_show_fmt'\t\t=> 'n',\n\t\t\t\t\t'field_instructions'\t=> lang('sticky_desc'),\n\t\t\t\t\t'field_text_direction'\t=> 'ltr',\n\t\t\t\t\t'field_type'\t\t\t=> 'radio',\n\t\t\t\t\t'field_list_items' => array('y' => lang('yes'), 'n' => lang('no')),\n\t\t\t\t\t'field_maxl'\t\t\t=> 100\n\t\t\t\t),\n\t\t\t\t'allow_comments' => array(\n\t\t\t\t\t'field_id'\t\t\t\t=> 'allow_comments',\n\t\t\t\t\t'field_label'\t\t\t=> lang('allow_comments'),\n\t\t\t\t\t'field_required'\t\t=> 'n',\n\t\t\t\t\t'field_show_fmt'\t\t=> 'n',\n\t\t\t\t\t'field_instructions'\t=> lang('allow_comments_desc'),\n\t\t\t\t\t'field_text_direction'\t=> 'ltr',\n\t\t\t\t\t'field_type'\t\t\t=> 'radio',\n\t\t\t\t\t'field_list_items' => array('y' => lang('yes'), 'n' => lang('no')),\n\t\t\t\t\t'field_maxl'\t\t\t=> 100,\n\t\t\t\t\t'populateCallback'\t\t=> array($this, 'populateAllowComments')\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif ($this->Channel && $this->Channel->enable_versioning)\n\t\t\t{\n\t\t\t\t$default_fields['versioning_enabled'] = array(\n\t\t\t\t\t'field_id'\t\t\t\t=> 'versioning_enabled',\n\t\t\t\t\t'field_label'\t\t\t=> lang('versioning_enabled'),\n\t\t\t\t\t'field_required'\t\t=> 'n',\n\t\t\t\t\t'field_show_fmt'\t\t=> 'n',\n\t\t\t\t\t'field_instructions'\t=> sprintf(lang('versioning_enabled_desc'), $this->Channel->max_revisions),\n\t\t\t\t\t'field_text_direction'\t=> 'ltr',\n\t\t\t\t\t'field_type'\t\t\t=> 'radio',\n\t\t\t\t\t'field_list_items' => array('y' => lang('yes'), 'n' => lang('no')),\n\t\t\t\t\t'field_maxl'\t\t\t=> 100\n\t\t\t\t);\n\t\t\t\t$default_fields['revisions'] = array(\n\t\t\t\t\t'field_id'\t\t\t\t=> 'revisions',\n\t\t\t\t\t'field_label'\t\t\t=> lang('revisions'),\n\t\t\t\t\t'field_required'\t\t=> 'n',\n\t\t\t\t\t'field_show_fmt'\t\t=> 'n',\n\t\t\t\t\t'field_instructions'\t=> '',\n\t\t\t\t\t'field_text_direction'\t=> 'ltr',\n\t\t\t\t\t'field_type'\t\t\t=> 'text',\n\t\t\t\t\t'field_maxl'\t\t\t=> 100,\n\t\t\t\t\t'field_wide' => TRUE\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ($this->Channel)\n\t\t\t{\n\t\t\t\t$cat_groups = ee('Model')->get('CategoryGroup')\n\t\t\t\t\t->filter('group_id', 'IN', explode('|', $this->Channel->cat_group))\n\t\t\t\t\t->all();\n\n\t\t\t\tforeach ($cat_groups as $cat_group)\n\t\t\t\t{\n\t\t\t\t\t$metadata = $cat_group->getFieldMetadata();\n\t\t\t\t\t$metadata['categorized_object'] = $this;\n\n\t\t\t\t\tif ($cat_groups->count() == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$metadata['field_label'] = lang('categories');\n\t\t\t\t\t}\n\n\t\t\t\t\t$default_fields['categories[cat_group_id_'.$cat_group->getId().']'] = $metadata;\n\t\t\t\t}\n\n\t\t\t\tif ( ! $this->Channel->comment_system_enabled OR ! bool_config_item('enable_comments'))\n\t\t\t\t{\n\t\t\t\t\tunset($default_fields['comment_expiration_date'], $default_fields['allow_comments']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$module_tabs = $this->getTabFields();\n\n\t\t\tforeach ($module_tabs as $tab_id => $fields)\n\t\t\t{\n\t\t\t\tforeach ($fields as $key => $field)\n\t\t\t\t{\n\t\t\t\t\t$default_fields[$tab_id . '__' . $key] = $field;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->_default_fields = $default_fields;\n\t\t}\n\n\t\treturn $this->_default_fields;\n\t}", "public static function get_default_fields() {\n\t\t$default_fields = array(\n\t\t\t'enter_attributes' => array(\n\t\t\t\t'caption' => 'Enter Attributes',\n\t\t\t\t'type' => 'title'\n\t\t\t),\n\t\t\t'ID' => array(\n\t\t\t\t'name' => 'ID',\n\t\t\t\t'required' => true,\n\t\t\t\t'type' => 'barcode',\n\t\t\t\t'grid_element' => 'hidden',\n\t\t\t\t'disabled' => true\n\t\t\t),\n\t\t\t'post_title' => array(\n\t\t\t\t'name' => 'post_title',\n\t\t\t\t'caption' => 'Title',\n\t\t\t\t'required' => true,\n\t\t\t\t'exportable' => true,\n\t\t\t\t'filterable' => true,\n\t\t\t\t'searchable' => true,\n\t\t\t\t'sortable' => true\n\t\t\t),\n\t\t\t'post_content' => array(\n\t\t\t\t'name' => 'post_content',\n\t\t\t\t'caption' => 'Description',\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'grid_element' => 'hidden',\n\t\t\t\t'exportable' => true,\n\t\t\t\t'searchable' => true\n\t\t\t),\n\t\t\t'post_status' =>array(\n\t\t\t\t'name' => 'post_status',\n\t\t\t\t'required' => true,\n\t\t\t\t'type' => 'radio',\n\t\t\t\t'default' => 'publish',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'publish' => 'Published',\n\t\t\t\t\t'private' => 'Private',\n\t\t\t\t\t'pending' => 'Pending',\n\t\t\t\t\t'draft' => 'Draft'\n\t\t\t\t),\n\t\t\t\t'style' => 'width:150px',\n\t\t\t\t'grid_element' => 'hidden'\n\t\t\t),\n\t\t\t'_thumbnail_id' =>array(\n\t\t\t\t'name' => '_thumbnail_id',\n\t\t\t\t'caption' => 'Post Thumbnail',\n\t\t\t\t'foreignkey' => true,\n\t\t\t\t'type' => 'file',\n\t\t\t\t'default' => 'Select an existing picture...',\n\t\t\t\t'parent_term' => 'media',\n\t\t\t\t'connect_table' => 'people',\n\t\t\t\t'file_types' => 'images',\n\t\t\t\t'show_in_admin' => false\n\t\t\t),\n\t\t\t'tags_input' =>array(\n\t\t\t\t'name' => 'tags_input',\n\t\t\t\t'caption' => 'Tags',\n\t\t\t\t'type' => 'tags'\n\t\t\t),\n\t\t\t'categories_input' => array(\n\t\t\t\t'name' => 'categories_input',\n\t\t\t\t'caption' => 'Categories',\n\t\t\t\t'type' => 'categories'\n\t\t\t)\n\t\t);\n\n\t\treturn $default_fields;\n\t}", "public function getDefaultFields(){\n return $this->dbFields;\n }", "function MyMod_Data_Groups_Defaults_Defs()\n {\n return array\n (\n \"Name\" => \"\",\n \"Actions\" => array(),\n \"ShowData\" => array(),\n\n \"Data\" => array(),\n \"Admin\" => TRUE,\n \"Person\" => FALSE,\n \"Public\" => FALSE,\n \"Single\" => FALSE,\n \"NoTitleRow\" => FALSE,\n \"SqlWhere\" => \"\",\n \"Sort\" => \"\",\n \"SubTable\" => NULL,\n \"TitleData\" => NULL,\n \"GenTableMethod\" => \"\", //arguments:\n // singular: $edit,$item,$group\n // plural: $edit\n \"OtherClass\" => FALSE,\n \"OtherGroup\" => FALSE,\n \"PreMethod\" => FALSE,\n \"NItemsPerPage\" => FALSE,\n \"Visible\" => 1,\n );\n\n }", "function MyMod_Data_Groups_Defaults_Defs()\n {\n return array\n (\n \"Name\" => \"\",\n \"Actions\" => array(),\n \"ShowData\" => array(),\n\n \"Data\" => array(),\n \"Admin\" => TRUE,\n \"Person\" => FALSE,\n \"Public\" => FALSE,\n \"Single\" => FALSE,\n \"NoTitleRow\" => FALSE,\n \"SqlWhere\" => \"\",\n \"Sort\" => \"\",\n \"SubTable\" => NULL,\n \"TitleData\" => NULL,\n \"GenTableMethod\" => \"\",\n \"OtherClass\" => FALSE,\n \"OtherGroup\" => FALSE,\n \"PreMethod\" => FALSE,\n \"NItemsPerPage\" => FALSE,\n );\n\n }", "function defaults() {\n\t\t$ret = array();\n\t\tforeach($this->schema() as $key => $field) {\n\t\t\tif(!$field['primary'] && !is_null($field['default'])) {\n\t\t\t\t$ret[$key] = $field['default'];\n\t\t\t}\n\t\t}\n\n\t\treturn $ret;\n\t}", "public function getDefaultSettings() {\n $defaults = array();\n $fields = $this->getFields();\n foreach ($fields as $field) {\n $default = '';\n if (array_key_exists('default', $field) && $field['default']) {\n $default = $field['default'];\n }\n $defaults[$field['name']] = $default;\n }\n return $defaults;\n }", "function _simplerdf_content_mappers_default_fields($content_field) {\n $field = array(\n 'title' => $content_field['widget']['label'],\n );\n return array($content_field['field_name'] => $field);\n}", "public function getDefaultFields()\n {\n /*\n $defaultFields = array(\n array(\n 'gtf_field_name' => 'Treatment',\n 'gtf_field_code' => 'treatment',\n 'gtf_field_description' => 'Enter the shorthand code for the treatment here',\n 'gtf_field_values' => null,\n 'gtf_field_type' => 'text',\n 'gtf_required' => 1,\n 'gtf_readonly' => 0\n ),\n array(\n 'gtf_field_name' => 'Physician',\n 'gtf_field_code' => 'physicion',\n 'gtf_field_description' => '',\n 'gtf_field_values' => null,\n 'gtf_field_type' => 'text',\n 'gtf_required' => 0,\n 'gtf_readonly' => 0\n )\n );\n return $defaultFields;\n */\n\n return [];\n }", "private function getDefault(){\n\t\treturn array(\n\t\t\t'id' => \t'', \n\t\t\t'name' => \t'',\n\t\t\t'date' => \t'', \n\t\t\t'lvl' => \t'', \n\t\t\t'exp' => \t''\n\t\t);\n\t}", "protected function getDefaultFields()\n {\n $fields = parent::getDefaultFields();\n unset($fields['unread']);\n unset($fields['total']);\n unset($fields['outdated']);\n\n return $fields;\n }", "protected function getDefaultFields()\n {\n try {\n\n $default = array(\n 'brand',\n 'categories',\n 'category_names',\n 'date_add',\n 'description',\n 'id',\n 'image',\n 'in_stock',\n 'list_price',\n 'name',\n 'on_sale',\n 'price',\n 'qty',\n 'sku',\n 'stock',\n 'url'\n );\n\n if (Configuration::get('CLERK_INCLUDE_VARIANT_REFERENCES', $this->language_id, null, $this->shop_id) == '1') {\n array_push($default, 'variant_images');\n }\n\n //Get custom fields from configuration\n $fieldsConfig = Configuration::get('CLERK_DATASYNC_FIELDS', $this->getLanguageId(), null, $this->getShopId());\n\n $fields = explode(',', $fieldsConfig);\n\n return array_merge($default, $fields);\n\n } catch (Exception $e) {\n\n $this->logger->error('ERROR getDefaultFields', ['error' => $e->getMessage()]);\n\n }\n }", "public function defaultChoiceObjMap()\n {\n return [\n 'value' => 'id',\n 'label' => 'name:title:label'\n ];\n }", "protected function _getFields()\r\n {\r\n return array(\r\n 'xf_bible' => array(\r\n 'bible_id' => array(\r\n 'type' => self::TYPE_STRING,\r\n 'required' => true\r\n ),\r\n 'name' => array(\r\n 'type' => self::TYPE_STRING,\r\n 'required' => true\r\n ),\r\n 'copyright' => array(\r\n 'type' => self::TYPE_STRING,\r\n 'default' => ''\r\n ),\r\n 'abbreviation' => array(\r\n 'type' => self::TYPE_STRING,\r\n 'default' => ''\r\n ),\r\n 'language' => array(\r\n 'type' => self::TYPE_STRING,\r\n 'default' => 'eng'\r\n ),\r\n 'note' => array(\r\n 'type' => self::TYPE_STRING,\r\n 'default' => ''\r\n ),\r\n 'last_modified' => array(\r\n 'type' => self::TYPE_UINT,\r\n 'default' => XenForo_Application::$time\r\n )\r\n )\r\n );\r\n }", "protected function baseFields() {\n $fields = [\n 'nid' => $this->t('Node ID'),\n //'vid' => $this->t('Version ID'),\n 'type' => $this->t('Type'),\n 'title' => $this->t('Title'),\n 'format' => $this->t('Format'),\n 'teaser' => $this->t('Teaser'),\n 'uid' => $this->t('Authored by (uid)'),\n 'created' => $this->t('Created timestamp'),\n 'changed' => $this->t('Modified timestamp'),\n 'status' => $this->t('Published'),\n 'promote' => $this->t('Promoted to front page'),\n 'sticky' => $this->t('Sticky at top of lists'),\n 'language' => $this->t('Language (fr, en, ...)'),\n ];\n return $fields;\n }", "protected function defaultSearchFields()\n {\n return [\n 'name' => '',\n 'device_imei' => '',\n 'province' => ''\n ];\n }", "public static function getMap()\n\t{\n\t\treturn [\n\t\t\t(new StringField('EXTERNAL_HASH'))\n\t\t\t\t->configurePrimary()\n\t\t\t\t->configureAutocomplete()\n\t\t\t\t->configureSize(128)\n\t\t\t,\n\t\t\tnew IntegerField('OBJECT_ID'),\n\t\t\tnew IntegerField('VERSION_ID'),\n\t\t\t(new IntegerField('OWNER_ID'))\n\t\t\t\t->configureRequired()\n\t\t\t,\n\t\t\t(new DatetimeField('CREATE_TIME'))\n\t\t\t\t->configureRequired()\n\t\t\t\t->configureDefaultValue(function() {\n\t\t\t\t\treturn new DateTime();\n\t\t\t\t})\n\t\t\t,\n\t\t\t(new DatetimeField('UPDATE_TIME'))\n\t\t\t\t->configureRequired()\n\t\t\t\t->configureDefaultValue(function() {\n\t\t\t\t\treturn new DateTime();\n\t\t\t\t})\n\t\t\t,\n\t\t\t(new IntegerField('USERS'))\n\t\t\t\t->configureDefaultValue(0)\n\t\t\t,\n\t\t\t(new IntegerField('CONTENT_STATUS'))\n\t\t\t\t->configureDefaultValue(self::CONTENT_STATUS_INIT)\n\t\t\t,\n\t\t];\n\t}", "public static function set_default_values() {\n\t\t?>\n\t\tcase \"nu_phone\" :\n\t\t\tfield.label = \"Phone\";\n\t\t\tfield.isRequired = true;\n\t\t\tfield.description = \"Numbers only. e.g. 8885551212\";\n\t\t\tbreak;\n\t\t<?php\n\t}", "public function getFields(){ return $this->field_map; }", "public function get_column_defaults() {\n\t\treturn array(\n\t\t\t'user_id' => 0,\n\t\t\t'email' => '',\n\t\t\t'username' => '',\n\t\t\t'name' => '',\n\t\t\t'product_count' => 0,\n\t\t\t'sales_count'\t => 0,\n\t\t\t'sales_value'\t => 0.00,\n\t\t\t'status'\t\t => 'pending',\n\t\t\t'notes' => '',\n\t\t\t'date_created' => date( 'Y-m-d H:i:s' ),\n\t\t);\n\t}", "protected function defaultAttributes(){\n return [\n 'parentId' => 0, \n 'projectId' => 0, \n 'done' => 0, \n 'potion' => 0, \n 'notes' => array(), \n 'name' => '', \n ];\n }", "public function getDefaultResponseFields()\n {\n return [\n 'url',\n 'title',\n 'locations',\n 'company',\n 'salary',\n 'date',\n 'description',\n 'site',\n ];\n }", "public function fields_for_feed_mapping() {\n\t\t\n\t\treturn array(\n\t\t\tarray(\t\n\t\t\t\t'name' => 'email',\n\t\t\t\t'label' => esc_html__( 'Email Address', 'gravityformsicontact' ),\n\t\t\t\t'required' => true,\n\t\t\t\t'field_type' => array( 'email' ),\n\t\t\t\t'default_value' => $this->get_first_field_by_type( 'email' )\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'prefix',\n\t\t\t\t'label' => esc_html__( 'Prefix', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'first_name',\n\t\t\t\t'label' => esc_html__( 'First Name', 'gravityformsicontact' ),\n\t\t\t\t'default_value' => $this->get_first_field_by_type( 'name', 3 )\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'last_name',\n\t\t\t\t'label' => esc_html__( 'Last Name', 'gravityformsicontact' ),\n\t\t\t\t'default_value' => $this->get_first_field_by_type( 'name', 6 )\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'suffix',\n\t\t\t\t'label' => esc_html__( 'Suffix', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'street',\n\t\t\t\t'label' => esc_html__( 'Address: Street Address', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'street2',\n\t\t\t\t'label' => esc_html__( 'Address: Line 2', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'city',\n\t\t\t\t'label' => esc_html__( 'Address: City', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'state',\n\t\t\t\t'label' => esc_html__( 'Address: State', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'postal_code',\n\t\t\t\t'label' => esc_html__( 'Address: Postal Code', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'phone',\n\t\t\t\t'label' => esc_html__( 'Phone Number', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'fax',\n\t\t\t\t'label' => esc_html__( 'Fax Number', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'business',\n\t\t\t\t'label' => esc_html__( 'Business Number', 'gravityformsicontact' ),\n\t\t\t),\n\t\t);\n\t\t\n\t}", "protected function baseFields() {\n $fields = array(\n 'nid' => $this->t('Node ID'),\n 'vid' => $this->t('Version ID'),\n 'uuid' => $this->t('UUID'),\n 'type' => $this->t('Type'),\n 'langcode' => $this->t('Language (fr, en, ...)'),\n 'default_langcode' => $this->t('Default Language (fr, en, ...)'),\n 'title' => $this->t('Title'),\n 'uid' => $this->t('Node author UID'),\n 'status' => $this->t('Published or not'),\n 'created' => $this->t('Created timestamp'),\n 'changed' => $this->t('Modified timestamp'),\n 'promote' => $this->t('Promoted to front page'),\n 'sticky' => $this->t('Sticky at top of lists'),\n 'revision' => $this->t('Create new revision'),\n 'timestamp' => $this->t('The timestamp the latest revision of this node was created.'),\n );\n return $fields;\n\n }", "protected function getDefaultValues() {\n\t\treturn array(\n\t\t\t'name' => '',\n\t\t\t'email' => '',\n\t\t\t'isEnabled' => true);\n\t}", "public static function getFormFieldMap() {\n return array(\n 'name' => 'title',\n 'blurb' => 'blurb',\n 'image' => 'image',\n 'link' => 'link',\n );\n }", "public function get_default_config() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'key' => 'name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'label' => esc_html__( 'Name', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'required',\n\t\t\t\t'placeholder' => esc_html__( 'Name', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'email',\n\t\t\t\t'type' => 'email',\n\t\t\t\t'label' => esc_html__( 'Email', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'required',\n\t\t\t\t'placeholder' => esc_html__( 'Email', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'phone',\n\t\t\t\t'type' => 'number',\n\t\t\t\t'label' => esc_html__( 'Phone', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'optional',\n\t\t\t\t'placeholder' => esc_html__( 'Phone', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'message',\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'label' => esc_html__( 'Message', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'required',\n\t\t\t\t'placeholder' => esc_html__( 'Message', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t);\n\t}", "private function getDefaultAttributes()\n {\n return [\n 'name' => [\n 'type' => 'varchar',\n 'label' => 'Name',\n 'input' => 'text',\n 'sort_order' => 1,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'is_active' => [\n 'type' => 'int',\n 'label' => 'Is Active',\n 'input' => 'select',\n 'source' => Boolean::class,\n 'sort_order' => 2,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'url_key' => [\n 'type' => 'varchar',\n 'label' => 'URL Key',\n 'input' => 'text',\n 'required' => false,\n 'sort_order' => 3,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'description' => [\n 'type' => 'text',\n 'label' => 'Description',\n 'input' => 'textarea',\n 'required' => false,\n 'sort_order' => 4,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'wysiwyg_enabled' => true,\n 'is_html_allowed_on_front' => true,\n 'group' => 'General',\n ],\n 'image' => [\n 'type' => 'varchar',\n 'label' => 'Image',\n 'input' => 'image',\n 'backend' => Image::class,\n 'required' => false,\n 'sort_order' => 5,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n ];\n }", "public function defaultKeys() {\n return [\n 'enabled',\n 'url',\n 'severity_level',\n 'environment_uuid',\n ];\n }", "protected function _getDefaultAttributes()\r\n {\r\n return array(\r\n 'entity_type_id',\r\n 'attribute_set_id',\r\n 'created_at',\r\n 'updated_at',\r\n 'increment_id',\r\n 'store_id',\r\n 'website_id'\r\n );\r\n }", "private function get_default_meta_data() {\n $default_meta_data = array(\n 'product_id' => 0,\n 'title' => '',\n 'from' => '',\n 'to' => '',\n 'duration' => 1,\n 'duration_unit' => '',\n 'persons' => 1,\n 'person_types' => array(),\n 'order_id' => 0,\n 'order_item_id' => 0,\n 'user_id' => 0,\n 'services' => array(),\n 'service_quantities' => array(),\n 'can_be_cancelled' => false,\n 'cancelled_duration' => 0,\n 'cancelled_unit' => 'month',\n 'activities' => array(),\n 'location' => '',\n 'all_day' => 'no',\n 'has_persons' => '',\n 'google_calendar_last_update' => ''\n\n );\n\n return $default_meta_data;\n }", "protected function metaFieldDefinitions()\n {\n return [\n [\n \"name\" => \"type\",\n \"required\" => true,\n \"type\" => \"string\",\n \"label\" => \"Field type\",\n \"editable\" => false,\n ],\n [\n \"name\" => \"label\",\n \"type\" => \"string\",\n \"label\" => \"Label\"\n ],\n [\n \"name\" => \"protected\",\n \"type\" => \"boolean\",\n \"default\" => false,\n \"editable\" => false,\n \"label\" => \"Schema protected\"\n ],\n [\n \"name\" => \"editable\",\n \"type\" => \"boolean\",\n \"default\" => true,\n \"label\" => \"Field value can be altered\",\n \"editable\" => false\n ],\n [\n \"name\" => \"description\",\n \"type\" => \"string\",\n \"label\" => \"Description\"\n ],\n [\n \"name\" => \"required\",\n \"type\" => \"boolean\",\n \"label\" => \"Required\",\n \"default\" => false\n ],\n [\n \"name\" => \"mode\",\n \"type\" => \"option\",\n \"label\" => \"Data mode\",\n \"options\" => \"prefer_local|Use local data, failing that use external data\\nprefer_external|Use external data, failing that use local data\\nonly_local|Only use local data\\nonly_external|Only use external data\"\n ],\n [\n \"name\" => \"script\",\n \"type\" => \"string\", # should be a special type later on.\n \"label\" => \"Calculated value script\",\n # \"config\" => $documentRevision->configRecordType()\n ],\n [\n \"name\" => \"external_column\",\n \"type\" => \"string\",\n \"label\" => \"External data column\"\n ],\n [\n \"name\" => \"external_table\",\n \"type\" => \"string\",\n \"label\" => \"External Data Table\"\n ],\n [\n \"name\" => \"external_key\",\n \"type\" => \"string\",\n \"label\" => \"External Data Key\"\n ],\n [\n \"name\" => \"external_local_key\",\n \"type\" => \"string\",\n \"label\" => \"External Data Local Key\"\n ],\n [\n \"name\" => \"prefix\",\n \"type\" => \"string\",\n \"label\" => \"Prefix text\"\n ],\n [\n \"name\" => \"suffix\",\n \"type\" => \"string\",\n \"label\" => \"Suffix text\"\n ]\n\n ];\n }", "protected function get_default() {\n\t\treturn array(\n\t\t\t'ownerID' => 0,\n\t\t\t'accountID' => '',\n\t\t\t'adsenseLinked' => false,\n\t\t\t'adsConversionID' => '',\n\t\t\t'anonymizeIP' => true,\n\t\t\t'internalWebPropertyID' => '',\n\t\t\t'profileID' => '',\n\t\t\t'propertyID' => '',\n\t\t\t'trackingDisabled' => array( 'loggedinUsers' ),\n\t\t\t'useSnippet' => true,\n\t\t\t'canUseSnippet' => true,\n\t\t\t'dashboardView' => Analytics::DASHBOARD_VIEW,\n\t\t);\n\t}", "protected function _getDefaultAttributes()\n {\n return ['entity_type_id', 'attribute_set_id', 'created_at', 'updated_at'];\n }", "public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew StringField('ID', [\n\t\t\t\t'required' => true,\n\t\t\t\t'primary' => true,\n\t\t\t\t'validation' => [__CLASS__, 'validateString'],\n\t\t\t]),\n\t\t\tnew DatetimeField('DATE_CREATE', [\n\t\t\t\t'default_value' => [__CLASS__, 'getCurrentDate'],\n\t\t\t]),\n\t\t\tnew DatetimeField('LOCK_TIME', [\n\t\t\t\t'required' => true,\n\t\t\t]),\n\t\t\tnew StringField('PID', [\n\t\t\t\t'validation' => [__CLASS__, 'validateString']\n\t\t\t]),\n\t\t];\n\t}", "public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_ID_FIELD'),\n ),\n 'TIMESTAMP_X' => new Main\\Entity\\DatetimeField('TIMESTAMP_X', array(\n 'default_value' => new Main\\Type\\DateTime(),\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_TIMESTAMP_X_FIELD'),\n )),\n 'SOCIAL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateSocial'),\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_SOCIAL_FIELD'),\n ),\n 'USER_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_USER_ID_FIELD'),\n ),\n 'SOCIALTEXT' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_SOCIALTEXT_FIELD'),\n ),\n );\n }", "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\t'ORDER_NEW_TASK' => new Entity\\StringField('ORDER_NEW_TASK', array(\n\t\t\t\t'required' => true\n\t\t\t))\n\t\t);\n\t}", "public function get_default_options() {\n\n return array(\n 'name' => 'rcw-metabox-field-media-name',\n 'id' => 'rcw-metabox-field-media-name',\n 'value' => null,\n 'required' => false,\n );\n }", "public function default_data() : array {\n\t\treturn [\n\t\t\t'meta' => [\n\t\t\t\t'title' => '',\n\t\t\t\t'permalink' => '',\n\t\t\t\t'cta_text' => '',\n\t\t\t\t'cta_url' => '',\n\t\t\t],\n\t\t\t'curate' => [\n\t\t\t\t'post_ids' => [],\n\t\t\t],\n\t\t\t'filters' => [\n\t\t\t\t'filter' => [],\n\t\t\t],\n\t\t];\n\t}", "public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => new ORM\\Fields\\IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'NAME' => new ORM\\Fields\\StringField(\n\t\t\t\t'NAME',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\tnew ORM\\Fields\\Validators\\LengthValidator(null, 50),\n\t\t\t\t\t\t];\n\t\t\t\t\t},\n\t\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_NAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERCENTAGE' => new ORM\\Fields\\FloatField(\n\t\t\t\t'PERCENTAGE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_PERCENTAGE_FIELD'),\n\t\t\t\t]\n\t\t\t)\n\t\t];\n\t}", "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'IBLOCK_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_IBLOCK_ID_FIELD'),\n\t\t\t),\n\t\t\t'FIELD_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'primary' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateFieldId'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_FIELD_ID_FIELD'),\n\t\t\t),\n\t\t\t'IS_REQUIRED' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N','Y'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_IS_REQUIRED_FIELD'),\n\t\t\t),\n\t\t\t'DEFAULT_VALUE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_DEFAULT_VALUE_FIELD'),\n\t\t\t),\n\t\t\t'IBLOCK' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Iblock\\Iblock',\n\t\t\t\t'reference' => array('=this.IBLOCK_ID' => 'ref.ID')\n\t\t\t),\n\t\t);\n\t}", "function addingRecordDefaultSettings(){\n\n $settings = parent::addingRecordDefaultSettings();\n\n for($i=0; $i< count($settings); $i++){\n\n switch($settings[$i][\"name\"]){\n\n case \"reportTitle\":\n $settings[$i][\"defaultValue\"] = \"Packing List\";\n\n }//endswitch\n\n }//end foreach\n\n return $settings;\n\n }", "private function get_api_fields() {\n\t\treturn array(\n\t\t\t'short_description' => true,\n\t\t\t'active_installs' => true,\n\t\t\t'icons' => true,\n\t\t\t'sections' => false,\n\t\t);\n\t}", "public function fields(){\n\t\treturn array();\n\t}", "public static function fields()\n\t{\n\t\t// Site id for multi-site installations\n\t\treturn array(\n\t\t\t'id' => array('type' => 'int', 'primary' => true, 'serial' => true),\n \t'site_id' => array('type' => 'int', 'index' => true, 'default' => 0)\n\t\t);\n\t}", "public function getDefaultFields()\n {\n $fields = [];\n\n $customerAttributes = $this->customerMetadata->getAllAttributesMetadata();\n $addressAttributes = $this->addressMetadata->getAllAttributesMetadata();\n $notNeeded = [\n 'created_in',\n 'disable_auto_group_change',\n 'website_id',\n 'group_id',\n 'created_at',\n 'updated_at',\n 'default_billing',\n 'default_shipping',\n 'password_hash',\n 'rp_token',\n 'rp_token_created_at',\n 'store_id',\n 'confirmation',\n 'vat_is_valid',\n 'vat_request_date',\n 'vat_request_id',\n 'vat_request_success',\n 'region_id', //this is merged with region\n 'failures_num',\n 'first_failure',\n 'lock_expires'\n ];\n\n foreach ($customerAttributes as $attribute) {\n if (! in_array($attribute->getAttributeCode(), $notNeeded)) {\n $fields['customer'][$attribute->getAttributeCode()] = [\n 'required' => (int)$attribute->isRequired()\n\n ];\n }\n }\n\n foreach ($addressAttributes as $attribute) {\n if (! in_array($attribute->getAttributeCode(), $notNeeded)) {\n $lines = $attribute->getMultilineCount();\n if ($lines > 0) {\n for ($i = 0; $i <= ($lines-1); $i++) {\n $fields['address'][$attribute->getAttributeCode(). '.' . $i] = [\n 'required' => (int)$attribute->isRequired()\n ];\n }\n } else {\n $fields['address'][$attribute->getAttributeCode()] = [\n 'required' => (int)$attribute->isRequired()\n ];\n }\n }\n }\n\n if (! empty($fields['address']) && $fields['customer']) {\n $fields['merged'] = array_merge($fields['address'], $fields['customer']);\n }\n\n return $fields;\n }", "protected function get_default_settings()\n {\n return [\n 'default' => [\n 'id' => '',\n 'url' => '',\n 'size' => '',\n 'name' => '',\n ],\n ];\n }", "public function get_field_props() {\n $defaults = $this->default_attributes();\n\n $props = array(\n 'input_type' => 'qr_code',\n 'template' => 'qr_code',\n 'required' => 'no',\n 'label' => __( 'QR Code', 'wpuf-pro' ),\n 'name' => '',\n 'is_meta' => 'yes',\n 'help' => '',\n 'css' => '',\n 'id' => 0,\n 'is_new' => true,\n 'show_in_post' => 'yes',\n 'hide_field_label' => 'no',\n 'qr_type' => array( 'url', 'text' )\n );\n\n return array_merge( $defaults, $props );\n }", "public static function getMap()\n {\n return [\n (new Fields\\StringField('HASH'))\n ->configurePrimary(true),\n\n new Fields\\IntegerField('RELIABILITY'),\n new Fields\\StringField('ADDRESS'),\n new Fields\\StringField('FULL_NAME'),\n new Fields\\StringField('PHONE'),\n new Fields\\DatetimeField('UPDATED_AT')\n ];\n }", "public function get_default_value()\n {\n return [\n 'id' => '',\n 'url' => '',\n 'size' => '',\n 'name' => '',\n ];\n }", "protected function getDefaultMapping()\n\t{\n\t\treturn array(\n\t\t\t'subscription' => array(\n\t\t\t\t2 => 'subscription.interval',\n\t\t\t\t3 => 'subscription.datenext',\n\t\t\t\t4 => 'subscription.dateend',\n\t\t\t),\n\t\t\t'address' => array(\n\t\t\t\t2 => 'subscription.base.address.type',\n\t\t\t\t3 => 'subscription.base.address.salutation',\n\t\t\t\t4 => 'subscription.base.address.company',\n\t\t\t\t5 => 'subscription.base.address.vatid',\n\t\t\t\t6 => 'subscription.base.address.title',\n\t\t\t\t7 => 'subscription.base.address.firstname',\n\t\t\t\t8 => 'subscription.base.address.lastname',\n\t\t\t\t9 => 'subscription.base.address.address1',\n\t\t\t\t10 => 'subscription.base.address.address2',\n\t\t\t\t11 => 'subscription.base.address.address3',\n\t\t\t\t12 => 'subscription.base.address.postal',\n\t\t\t\t13 => 'subscription.base.address.city',\n\t\t\t\t14 => 'subscription.base.address.state',\n\t\t\t\t15 => 'subscription.base.address.countryid',\n\t\t\t\t16 => 'subscription.base.address.languageid',\n\t\t\t\t17 => 'subscription.base.address.telephone',\n\t\t\t\t18 => 'subscription.base.address.telefax',\n\t\t\t\t19 => 'subscription.base.address.email',\n\t\t\t\t20 => 'subscription.base.address.website',\n\t\t\t\t21 => 'subscription.base.address.longitude',\n\t\t\t\t22 => 'subscription.base.address.latitude',\n\t\t\t),\n\t\t\t'product' => array(\n\t\t\t\t2 => 'subscription.base.product.type',\n\t\t\t\t3 => 'subscription.base.product.stocktype',\n\t\t\t\t4 => 'subscription.base.product.suppliercode',\n\t\t\t\t5 => 'subscription.base.product.prodcode',\n\t\t\t\t6 => 'subscription.base.product.productid',\n\t\t\t\t7 => 'subscription.base.product.quantity',\n\t\t\t\t8 => 'subscription.base.product.name',\n\t\t\t\t9 => 'subscription.base.product.mediaurl',\n\t\t\t\t10 => 'subscription.base.product.price',\n\t\t\t\t11 => 'subscription.base.product.costs',\n\t\t\t\t12 => 'subscription.base.product.rebate',\n\t\t\t\t13 => 'subscription.base.product.taxrate',\n\t\t\t\t14 => 'subscription.base.product.status',\n\t\t\t\t15 => 'subscription.base.product.position',\n\t\t\t\t16 => 'subscription.base.product.attribute.type',\n\t\t\t\t17 => 'subscription.base.product.attribute.code',\n\t\t\t\t18 => 'subscription.base.product.attribute.name',\n\t\t\t\t19 => 'subscription.base.product.attribute.value',\n\t\t\t),\n\t\t);\n\t}", "public function getDefaultFieldsName(): array\n {\n $defaultFieldsForCreate = $this->getDefaultFields();\n\n return $this->getFields($defaultFieldsForCreate);\n }", "public function get_fields() {\n\t\treturn array(\n\t\t\t'map_latitude',\n 'map_longitude',\n 'pin_title',\n 'pin_desc'\n\t\t);\n\t}", "protected function _getFields()\n\t{\n\t\t$parent = parent::_getFields();\n\n\t\t$parent['xf_user']['xengallery_media_count'] = array(\n\t\t\t'type' => self::TYPE_UINT, 'default' => 0\n\t\t);\n\n\t\t$parent['xf_user']['xengallery_album_count'] = array(\n\t\t\t'type' => self::TYPE_UINT, 'default' => 0\n\t\t);\n\n\t\t$parent['xf_user_option']['xengallery_default_media_watch_state'] = array(\n\t\t\t'type' => self::TYPE_STRING, 'default' => 'watch_no_email'\n\t\t);\n\n\t\t$parent['xf_user_option']['xengallery_default_album_watch_state'] = array(\n\t\t\t'type' => self::TYPE_STRING, 'default' => 'watch_no_email'\n\t\t);\n\n\t\t$parent['xf_user_option']['xengallery_default_category_watch_state'] = array(\n\t\t\t'type' => self::TYPE_STRING, 'default' => 'watch_no_email'\n\t\t);\n\n\t\t$parent['xf_user_option']['xengallery_unviewed_media_count'] = array(\n\t\t\t'type' => self::TYPE_BOOLEAN, 'default' => true\n\t\t);\n\n\t\treturn $parent;\n\t}", "public function addDefaultEntriesAndValues() {}", "protected function getDefaults(){\n\t\treturn array();\n\t}", "protected function _fields()\n\t{\n\t\treturn array(\n\t\t\t\t'name',\n\t\t\t 'intro', 'sort_order',\n\t\t\t 'status', 'feature',\n\t\t);\n\t}", "public function getDefaults() {\n\n\t\treturn [\n\t\t\t'module' => $this->_defaultModule,\n\t\t\t'controller' => $this->_defaultController,\n\t\t\t'action' => $this->_defaultAction,\n\t\t\t'params' => $this->_defaultParams\n\t\t];\n\t}", "private function get_defaults() {\n\t\treturn array(\n\t\t\t'phpbb_path' \t\t\t\t=> '',\n\t\t\t'integrateLogin' \t\t\t=> 0, \n\t\t\t'showHdrFtr' \t\t\t\t=> 'NONE',\n\t\t\t'wpSimpleHdr' \t\t\t\t=> 1,\n\t\t\t'dtdSwitch' \t\t\t\t=> 0,\n\t\t\t'phpbbCensor' \t\t\t\t=> 1,\n\t\t\t'wpPageName' \t\t\t\t=> 'page.php',\n\t\t\t'phpbbPadding' \t\t\t\t=> '6-12-6-12',\n\t\t\t'xposting' \t\t\t\t\t=> 0,\n\t\t\t'phpbbSmilies' \t\t\t\t=> 0,\n\t\t\t'avatarsync'\t\t\t\t=> 1,\n\t\t\t'integcreatewp'\t\t\t\t=> 1,\n\t\t\t'integcreatephpbb'\t\t\t=> 1,\n\t\t\t'xpostautolink' \t\t\t=> 0,\n\t\t\t'xpostspam' \t\t\t\t=> 'all',\n\t\t\t'xpostforce' \t\t\t\t=> -1,\n\t\t\t'xposttype' \t\t\t\t=> 'excerpt',\n\t\t\t'xpostprefix'\t\t\t\t=> '[BLOG] ',\n\t\t\t'cssMagic' \t\t\t\t\t=> 1,\n\t\t\t'templateVoodoo' \t\t\t=> 1,\n\t\t\t'useForumPage' \t\t\t\t=> 1\n\t\t);\n\t}", "public function defaultData();", "public function getDefaults();", "protected function get_default_format_fields() {\n\t\treturn null;\n\t}", "abstract public function getSettingsFields();", "function _get_fields_map_simple() {\n\t\t$cache_name = \"fields_map_simple\";\n\t\t// Get from local cache\n\t\tif ($this->CACHE_IN_MEMORY && isset($this->$cache_name)) {\n\t\t\treturn $this->$cache_name;\n\t\t}\n\t\t// Create array of fields in tables\n\t\tif (main()->USE_SYSTEM_CACHE) {\n\t\t\t$db_cols = cache_get($cache_name);\n\t\t}\n\t\tif (empty($db_cols)) {\n\t\t\t$Q = db()->query(\"SHOW COLUMNS FROM \".db('user').\"\");\n\t\t\twhile ($A = db()->fetch_assoc($Q)) {\n\t\t\t\tif ($A[\"Field\"] == \"id\") {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\t\n\t\t\t\t$db_cols[$A[\"Field\"]] = $A[\"Field\"];\n\t\t\t}\n\t\t\tif (main()->USE_SYSTEM_CACHE) {\n\t\t\t\tcache_set($cache_name, $db_cols);\n\t\t\t}\n\t\t}\n\t\t// Put to local cache\n\t\tif ($this->CACHE_IN_MEMORY && !isset($this->$cache_name)) {\n\t\t\t$this->$cache_name\t= $db_cols;\n\t\t}\n\n\t\treturn $db_cols;\n\t}", "public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'TYPE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => [__CLASS__, 'validateType'],\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_TYPE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'TITLE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => [__CLASS__, 'validateTitle'],\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_TITLE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'PUBLIC_CODE',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePublicCode'],\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_PUBLIC_CODE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t];\n\t}", "protected function _getFields()\n {\n return array(\n 'xf_handler' => array(\n 'handler_id' => array('type' => self::TYPE_UINT, 'autoIncrement' => true), \n 'content_type' => array('type' => self::TYPE_STRING, 'maxLength' => 255, 'required' => true), \n 'handler_type_id' => array('type' => self::TYPE_STRING, 'required' => true), \n 'object_class_id' => array('type' => self::TYPE_UINT, 'required' => true), \n 'extra_data_cache' => array('type' => self::TYPE_SERIALIZED, 'default' => ''), \n ), \n );\n }", "public function init_fields() {\n $fields = [];\n\n $fields['type'] = [\n 'type' => Controls_Manager::TEXT,\n 'label' => __('Text', 'chaman_addons')\n ];\n\n return $fields;\n }", "private static function default_settings() {\n\t\treturn array(\n\t\t\t'module_ga' => true,\n\t\t\t'module_ip' => true,\n\t\t\t'module_log' => true,\n\t\t\t'sent_data' => false,\n\t\t\t'api_key' => '',\n\t\t\t'mark_as_approved' => true,\n\t\t);\n\t}", "static function custom_get_creatable_fields() {\n # use this functionality to get a list of all field in the table\n return self::default_get_updatable_fields();\n }", "protected function get_default_params() {\n\t\t$defaults = [];\n\t\t$schema = $this->get_public_item_schema();\n\t\tforeach ( $schema['properties'] as $arg => $options ) {\n\t\t\tif ( isset( $options['default'] ) ) {\n\t\t\t\t$defaults[ $arg ] = $options['default'];\n\t\t\t}\n\t\t}\n\t\treturn $defaults;\n\t}", "protected function get_default() {\n\t\treturn array( 'ownerID' => 0 );\n\t}", "public function getDefaultProperties () {\n return array(\n 'deleted' => 0,\n 'published' => 1,\n 'active' => 1,\n 'only_check_permissions' => 0,\n 'checkCustomPermissions' => 0,\n 'checkByRelatedObjects' => 1,\n 'needCounters' => 0,\n );\n }", "function merchant_promos_metabox_defaults() {\n\t\treturn array(\n\t\t\t'amount' => 0,\n\t\t\t'type' => 'fixed',\n\t\t\t'max' => -1,\n\t\t\t'expiration' => '',\n\t\t\t'notify' => '',\n\t\t\t'count' => 0,\n\t\t\t'total' => 0,\n\t\t\t'valid_on' => array(),\n\t\t);\n\t}", "public function getFieldsMap()\n {\n return $this->fields_map;\n }", "public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => new IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_TYPE' => new EnumField(\n\t\t\t\t'PERSON_TYPE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'values' => static::getTypes(),\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_TYPE_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_NAME' => new StringField(\n\t\t\t\t'PERSON_NAME',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePersonName'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_NAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_LASTNAME' => new StringField(\n\t\t\t\t'PERSON_LASTNAME',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePersonLastname'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_LASTNAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_MIDDLENAME' => new StringField(\n\t\t\t\t'PERSON_MIDDLENAME',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePersonMiddlename'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_MIDDLENAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'EMAIL' => new StringField(\n\t\t\t\t'EMAIL',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateEmail'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_EMAIL_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PHONE' => new StringField(\n\t\t\t\t'PHONE',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePhone'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PHONE_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'POST_INDEX' => new StringField(\n\t\t\t\t'POST_INDEX',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePostIndex'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_POST_INDEX_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'COUNTRY' => new StringField(\n\t\t\t\t'COUNTRY',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateCountry'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_COUNTRY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'CITY' => new StringField(\n\t\t\t\t'CITY',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateCity'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_CITY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'COMPANY' => new StringField(\n\t\t\t\t'COMPANY',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateCompany'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_COMPANY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'INN' => new StringField(\n\t\t\t\t'INN',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateInn'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_INN_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'KPP' => new StringField(\n\t\t\t\t'KPP',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateKpp'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_KPP_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'ADDRESS' => new StringField(\n\t\t\t\t'ADDRESS',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateAddress'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_ADDRESS_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'DATE_MODIFY' => new DatetimeField(\n\t\t\t\t'DATE_MODIFY',\n\t\t\t\t[\n\t\t\t\t\t'default' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new DateTime();\n\t\t\t\t\t},\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_DATE_MODIFY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'DATE_CREATE' => new DatetimeField(\n\t\t\t\t'DATE_CREATE',\n\t\t\t\t[\n\t\t\t\t\t'default_value' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new DateTime();\n\t\t\t\t\t},\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_DATE_CREATE_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'CREATED_BY' => new IntegerField(\n\t\t\t\t'CREATED_BY',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_CREATED_BY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'MODIFIED_BY' => new IntegerField(\n\t\t\t\t'MODIFIED_BY',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_MODIFIED_BY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t];\n\t}", "public static function fields()\n {\n return [\n 'name' => 'text',\n 'lastname' => 'text',\n 'password' => 'password',\n 'email' => 'email',\n 'github_username' => 'text',\n ];\n }", "protected function defaults() {\n\t\treturn array(\n\t\t\t'content' => false,\n\t\t\t'content_path' => false,\n\t\t\t'markdown' => false,\n\t\t);\n\t}", "public function getCMSFields() {\n $fields = parent::getCMSFields();\n\n //google map module\n $location = new Location();\n $googlemapfield = new GoogleMapField($location, \"Google Map Field\");\n $Latitude = new ReadonlyField('Latitude', 'Latitude', $googlemapfield->getDefaultValue('Latitude'));\n $Longitude = new ReadonlyField('Longitude', 'Longitude', $googlemapfield->getDefaultValue('Longitude'));\n $fields->addFieldToTab('Root.Map', $googlemapfield);\n $fields->addFieldToTab('Root.Map', $Latitude);\n $fields->addFieldToTab('Root.Map', $Longitude);\n\n return $fields;\n }", "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\tnew Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\tnew Entity\\StringField('EXTERNAL_CHAT_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVarChar')\n\t\t\t)),\n\t\t\tnew Entity\\StringField('CONNECTOR', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVarChar')\n\t\t\t)),\n\t\t\tnew Entity\\StringField('EXTERNAL_MESSAGE_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVarChar')\n\t\t\t)),\n\t\t);\n\t}", "function _get_avail_fields() {\n\t\t$avail_fields = array();\n\t\tif ($this->MODE == \"SIMPLE\") {\n\t\t\t$avail_fields = $this->_get_fields_map_simple();\n\t\t} else {\n\t\t\t$avail_fields = $this->_get_fields_map_dynamic(true);\n\t\t}\n\t\treturn $avail_fields;\n\t}", "protected function getModuleDefaultData() {\n return array(\n 'title'=>ucfirst($this->configModule),\n 'disabled'=>0,\n 'protected'=>0,\n 'search'=>0,\n 'secure'=>0\n );\n }", "private function getDefaultAttributes()\n {\n return array('lastPhotoId' => '', 'lastActionId' => '', 'lastGroupId' => '', 'lastWebhookId' => '', 'password' => '');\n }", "public function getFieldDictionary() {}", "public static function getDefaults () {\n\t\t$configuration = array(\n\t\t\t'xtype' => 'textfield',\n\t\t\t'anchor' => '95%',\n\t\t\t'blankText' =>'fieldMandatory',\n\t\t\t'labelSeparator' => '',\n\t\t\t'selectOnFocus' => TRUE,\n\t\t);\n\t\treturn $configuration;\n\t}", "protected function getDefaultValues() {\n\t\treturn array(\n\t\t\t'name' => $this->getStructureNode()->getName(),\n\t\t\t'title' => $this->getStructureNode()->getTitle());\n\t}", "public function fields() {\n return array(\n 'id' => 'Primary Key',\n 'legId' => 'FAOLEX Identifier',\n 'legYear' => 'Date of text',\n 'legOriginalYear' => 'Consolidation date',\n 'legType_en' => 'Type of document (Legisation, Regulation, Miscellaneous)',\n 'legTitle' => 'Short title',\n 'legLongTitle' => 'Full title',\n 'legAbstract' => 'Abstract',\n 'legCountry_iso' => 'Country ISO code',\n 'legEntryIntoForce' => 'Notes about enter into force',\n 'legGeoArea_en' => 'Geographical area, multivalued',\n // 'legBasin_en' => 'Basin geographical area',\n // 'legLanguage_code' => 'Document language',\n 'legLinkToFullText' => 'Link to document file',\n // 'legModificationDate' => 'Modification date',\n 'legRelatedWebSite' => 'Related website',\n 'legSource' => 'Source of the data input (ie. scanned copy)',\n 'legStatus' => 'Status (i.e. in force)',\n 'legSubject_en' => 'ECOLEX subject',\n 'legTerritorialSubdivision' => 'Territorial subdivision',\n 'legAmends' => 'IDs of the amended legislation',\n 'legImplement' => 'IDs of the implemented legislation',\n 'legRepeals' => 'IDs of the repealed legislation',\n 'legKeyword_en' => 'Tagging keywords',\n 'ecolex_url' => 'Link to ECOLEX',\n 'faolex_url' => 'Link to FAOLEX',\n // 'legEntryDate' => 'Date when record entered into the system',\n // 'legTypeCode' => 'Codification for type of document',\n // 'legSearchDate' => '',\n );\n }", "public function fields()\n {\n return [\n 'id' => [\n 'type' => Type::nonNull(Type::string()),\n 'description' => 'The id of the place'\n ],\n 'cep' => [\n 'type' => Type::string(),\n 'description' => 'The cep of the place'\n ],\n 'name' => [\n 'type' => Type::string(),\n 'description' => 'The name of the place'\n ],\n 'number' => [\n 'type' => Type::string(),\n 'description' => 'The building number of the place'\n ],\n ];\n }", "protected function defaults() {\n\t\treturn array( 'content' => false );\n\t}", "public function meta()\n {\n return array_merge(parent::meta(), [\n 'fields' => 'adasd'\n ]);\n }", "private function get_default_field( $field ) {\n\n $default_field = array(\n 'global' => isset($field['global']) ? $field['global'] : false,\n 'name' => $field['name'],\n 'action' => isset($field['action']) ? $field['action'] : '',\n 'actions' => isset($field['actions']) ? $field['actions'] : array(),\n 'label' => isset($field['label']) ? $field['label'] : str_replace('_', ' ', ucwords($field['name'], '_')),\n 'desc' => isset($field['desc']) ? $field['desc'] : '',\n 'type' => isset($field['type']) ? $field['type'] : 'text',\n 'placeholder' => isset($field['placeholder']) ? $field['placeholder'] : '',\n 'default' => isset($field['default']) ? $field['default'] : '',\n 'sanitize_callback' => isset($field['sanitize_callback']) ? $field['sanitize_callback'] : '',\n );\n\n return $default_field;\n }", "public function toDefaults() {\n return $this->getIndex()->mapWithKeys(function(Field $field, $key){\n // Determine the default value and the reference route\n return [$key => $field->getDefault()];\n });\n }", "public function toDefaults() {\n return $this->getIndex()->mapWithKeys(function(Field $field, $key){\n // Determine the default value and the reference route\n return [$key => $field->getDefault()];\n });\n }", "public static function getMap()\n { \n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_ID_FIELD'),\n ),\n 'DATE_CHANGE' => array(\n 'data_type' => 'datetime',\n 'required' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DATE_CHANGE_FIELD'),\n ),\n 'DATE_CREATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DATE_CREATE_FIELD'),\n ),\n 'ACTIVE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_ACTIVE_FIELD'),\n ),\n 'SORT' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_SORT_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateName'),\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_NAME_FIELD'),\n ),\n 'DESCRIPTION' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DESCRIPTION_FIELD'),\n ),\n 'PARENT_CATEGORY_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_PARENT_CATEGORY_ID_FIELD'),\n ), \n );\n }", "public function database(){\n\t\t// define each field\n\t\t\t$fields[$this->name] = array(\n\t\t\t\t\t'field' => $this->name,\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'option' => array(),\n \t\t\t\t\t'key' => '',\n\t\t\t\t\t'default' => false,\n\t\t\t\t\t'extra' => '',\n\t\t\t\t\t'comment' => 'locales',\n\t\t\t);\n\t\treturn $fields;\n\t}", "public function definition()\n {\n return [\n 'fields' => [\n \"Как вас зовут ?\" => \"Имя\",\n \"Любые контакты для связи\" => \"Cвязь\",\n \"Ваше сообщение\" => \"Cообщение\"\n ],\n ];\n }", "protected function getMap()\n\t{\n\t\treturn array(\n\t\t\t'USE' => new Field\\Checkbox('USE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_USE')\n\t\t\t)),\n\t\t\t'CODE' => new Field\\Textarea('CODE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_CODE'),\n\t\t\t\t'help' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_CODE_HELP2'),\n\t\t\t\t'placeholder' => '<script>\n\tvar googletag = googletag || {};\n\tgoogletag.cmd = googletag.cmd || [];\n</script>'\n\t\t\t))\n\t\t);\n\t}", "function get_map_defaults () {\r\n\t\t$defaults = get_option('agm_google_maps');\r\n\t\tif (!isset($defaults['image_limit'])) $defaults['image_limit'] = 10;\r\n\t\tif (isset($defaults['use_custom_fields'])) unset($defaults['use_custom_fields']);\r\n\t\tif (isset($defaults['custom_fields_map'])) unset($defaults['custom_fields_map']);\r\n\t\tif (isset($defaults['custom_fields_options'])) unset($defaults['custom_fields_options']);\r\n\t\treturn array_filter($defaults);\r\n\t}", "public static function getFieldMap() {\n\n return get_option( 'geb_gfe_field_map' );\n }", "function fields() {\n return array(\n 'title' => 'The title of the content',\n 'fieldname' => t('fieldname'),\n 'title' => t('title'),\n 'label' => t('Label'),\n 'data_type' => t('data type'),\n 'html_type' => t('html_type'),\n );\n }" ]
[ "0.70895034", "0.70774466", "0.70706004", "0.70337105", "0.69641465", "0.69617873", "0.6959067", "0.6901297", "0.6890203", "0.68520916", "0.68091935", "0.6791535", "0.6618248", "0.66087085", "0.65760183", "0.6568707", "0.655304", "0.6550862", "0.6529052", "0.6477395", "0.6456617", "0.6438647", "0.6412929", "0.6403688", "0.64026225", "0.6396109", "0.6390846", "0.63857937", "0.63839173", "0.63340557", "0.632411", "0.6323091", "0.6320257", "0.6318534", "0.6288385", "0.62780476", "0.62724555", "0.62693715", "0.62492365", "0.62431306", "0.62229687", "0.62227476", "0.62158287", "0.62141186", "0.6212335", "0.62120646", "0.6203448", "0.6198279", "0.6192336", "0.61821777", "0.6174713", "0.61739945", "0.6169346", "0.6166833", "0.6164761", "0.6160011", "0.6156881", "0.6154851", "0.6146395", "0.61395514", "0.61307025", "0.6127234", "0.6124304", "0.61150503", "0.6093514", "0.6091867", "0.6087858", "0.6085639", "0.608338", "0.60829765", "0.6079753", "0.6079297", "0.60750073", "0.6073713", "0.6073156", "0.6061083", "0.60604644", "0.60556835", "0.605181", "0.6045871", "0.6043963", "0.60382605", "0.60288525", "0.6008979", "0.60019696", "0.60014665", "0.5999518", "0.5997616", "0.599407", "0.5991341", "0.5989656", "0.5980967", "0.5978421", "0.5978421", "0.59765446", "0.5957377", "0.59567446", "0.5954883", "0.5954866", "0.5954667", "0.5953618" ]
0.0
-1
/ Return map of metadata fields in Craft
public function getMetaFields( $target = false ) { $metaFields = array( 'id' => Craft::t( 'ID' ), 'dateUpdated' => Craft::t( 'Updated Date' ), 'authorId' => Craft::t( 'Author' ), 'typeId' => Craft::t( 'Entry Type' ), ); switch ( $target ) { case 'categoryGroup' : return array_intersect_key( $metaFields, array_flip( array( 'id', 'dateUpdated' ) ) ); break; default : return $metaFields; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function metadataFields()\n {\n return [\n 'first_name',\n 'last_name',\n 'city',\n 'phone_number',\n 'state',\n 'postal_code',\n 'modified_by'\n ];\n }", "public function get_metadata() {\n\t\t$metadata = [];\n\n\t\tforeach ( $this->get_mapping() as $attribute => $meta_key ) {\n\t\t\t$metadata[ $attribute ] = $this->get_meta( $meta_key );\n\t\t}\n\n\t\treturn $metadata;\n\t}", "public function metadata()\r\n\t{\r\n return array(\"nit\" => array(),\r\n \"nombre\" => array(),\r\n \"telefono\" => array(),\r\n \"direccion\" => array(),\r\n \"correo\" => array());\r\n }", "public function metadata()\n\t{\n\t\treturn array(\"id\" => array(), \"dia\" => array(), \"hora\" => array(), \"empleado\" => array()); \n\t}", "function get_fields() {\n global $Tainacan_Item_Metadata;\n return $Tainacan_Item_Metadata->fetch($this, 'OBJECT');\n\n }", "public function meta()\n {\n return array_merge(parent::meta(), [\n 'fields' => 'adasd'\n ]);\n }", "public function getMetaData();", "public function getFieldsMetadata()\n {\n return $this->fieldsMetadata;\n }", "public function getMetaFieldsProperty()\n {\n return collect(config('getcandy-hub.customers.searchable_meta'));\n }", "public function metaFields()\n {\n $metaFields = [];\n foreach ($this->metaFieldDefinitions() as $fieldData) {\n $metaFields[] = Field::createFromData($fieldData);\n }\n return $metaFields;\n }", "protected function metaFieldDefinitions()\n {\n return [\n [\n \"name\" => \"type\",\n \"required\" => true,\n \"type\" => \"string\",\n \"label\" => \"Field type\",\n \"editable\" => false,\n ],\n [\n \"name\" => \"label\",\n \"type\" => \"string\",\n \"label\" => \"Label\"\n ],\n [\n \"name\" => \"protected\",\n \"type\" => \"boolean\",\n \"default\" => false,\n \"editable\" => false,\n \"label\" => \"Schema protected\"\n ],\n [\n \"name\" => \"editable\",\n \"type\" => \"boolean\",\n \"default\" => true,\n \"label\" => \"Field value can be altered\",\n \"editable\" => false\n ],\n [\n \"name\" => \"description\",\n \"type\" => \"string\",\n \"label\" => \"Description\"\n ],\n [\n \"name\" => \"required\",\n \"type\" => \"boolean\",\n \"label\" => \"Required\",\n \"default\" => false\n ],\n [\n \"name\" => \"mode\",\n \"type\" => \"option\",\n \"label\" => \"Data mode\",\n \"options\" => \"prefer_local|Use local data, failing that use external data\\nprefer_external|Use external data, failing that use local data\\nonly_local|Only use local data\\nonly_external|Only use external data\"\n ],\n [\n \"name\" => \"script\",\n \"type\" => \"string\", # should be a special type later on.\n \"label\" => \"Calculated value script\",\n # \"config\" => $documentRevision->configRecordType()\n ],\n [\n \"name\" => \"external_column\",\n \"type\" => \"string\",\n \"label\" => \"External data column\"\n ],\n [\n \"name\" => \"external_table\",\n \"type\" => \"string\",\n \"label\" => \"External Data Table\"\n ],\n [\n \"name\" => \"external_key\",\n \"type\" => \"string\",\n \"label\" => \"External Data Key\"\n ],\n [\n \"name\" => \"external_local_key\",\n \"type\" => \"string\",\n \"label\" => \"External Data Local Key\"\n ],\n [\n \"name\" => \"prefix\",\n \"type\" => \"string\",\n \"label\" => \"Prefix text\"\n ],\n [\n \"name\" => \"suffix\",\n \"type\" => \"string\",\n \"label\" => \"Suffix text\"\n ]\n\n ];\n }", "public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => new ORM\\Fields\\IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'NAME' => new ORM\\Fields\\StringField(\n\t\t\t\t'NAME',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\tnew ORM\\Fields\\Validators\\LengthValidator(null, 50),\n\t\t\t\t\t\t];\n\t\t\t\t\t},\n\t\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_NAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERCENTAGE' => new ORM\\Fields\\FloatField(\n\t\t\t\t'PERCENTAGE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_PERCENTAGE_FIELD'),\n\t\t\t\t]\n\t\t\t)\n\t\t];\n\t}", "public function get_fields() {\n\t\treturn array(\n\t\t\t'map_latitude',\n 'map_longitude',\n 'pin_title',\n 'pin_desc'\n\t\t);\n\t}", "static public function getDataMap()\n {\n return array(\n 'fields' => array(\n 'rev' => array(\n 'type' => 'integer',\n ),\n 'cover' => array(\n 'type' => 'string',\n ),\n 'wiki_id' => array(\n 'type' => 'integer',\n ),\n 'title' => array(\n 'type' => 'string',\n ),\n 'html_cache' => array(\n 'type' => 'string',\n ),\n 'content' => array(\n 'type' => 'string',\n ),\n 'tags' => array(\n 'type' => 'raw',\n ),\n 'comment_tags' => array(\n 'type' => 'raw',\n ),\n 'model' => array(\n 'type' => 'string',\n ),\n 'has_video' => array(\n 'type' => 'integer',\n ),\n 'like_num' => array(\n 'type' => 'integer',\n ),\n 'dislike_num' => array(\n 'type' => 'integer',\n ),\n 'watched_num' => array(\n 'type' => 'integer',\n ),\n 'admin_id' => array(\n 'type' => 'integer',\n ),\n 'do_date' => array(\n 'type' => 'date',\n ),\n 'source' => array(\n 'type' => 'raw',\n ),\n 'tvsou_id' => array(\n 'type' => 'string',\n ),\n 'first_letter' => array(\n 'type' => 'string',\n ),\n 'douban_id' => array(\n 'type' => 'string',\n ),\n 'verify' => array(\n 'type' => 'integer',\n ),\n 'created_at' => array(\n 'type' => 'date',\n ),\n 'updated_at' => array(\n 'type' => 'date',\n ),\n ),\n 'references' => array(\n\n ),\n 'embeddeds' => array(\n\n ),\n 'relations' => array(\n\n ),\n );\n }", "static public function getDataMap()\n {\n return array(\n 'fields' => array(\n 'channel_code' => array(\n 'type' => 'string',\n ),\n 'time' => array(\n 'type' => 'date',\n ),\n ),\n 'references' => array(\n\n ),\n 'embeddeds' => array(\n\n ),\n 'relations' => array(\n\n ),\n );\n }", "public function getFields(){ return $this->field_map; }", "protected function getMetadata()\n {\n // object not working must use array\n $metadata['platform'] = \"Magento 1\";\n $metadata['version'] = Mage::getVersion();\n return $metadata;\n }", "public function getMeta();", "public function getMeta();", "public function metadata() : array;", "public static function getMap()\n\t{\n\t\treturn [\n\t\t\t(new StringField('EXTERNAL_HASH'))\n\t\t\t\t->configurePrimary()\n\t\t\t\t->configureAutocomplete()\n\t\t\t\t->configureSize(128)\n\t\t\t,\n\t\t\tnew IntegerField('OBJECT_ID'),\n\t\t\tnew IntegerField('VERSION_ID'),\n\t\t\t(new IntegerField('OWNER_ID'))\n\t\t\t\t->configureRequired()\n\t\t\t,\n\t\t\t(new DatetimeField('CREATE_TIME'))\n\t\t\t\t->configureRequired()\n\t\t\t\t->configureDefaultValue(function() {\n\t\t\t\t\treturn new DateTime();\n\t\t\t\t})\n\t\t\t,\n\t\t\t(new DatetimeField('UPDATE_TIME'))\n\t\t\t\t->configureRequired()\n\t\t\t\t->configureDefaultValue(function() {\n\t\t\t\t\treturn new DateTime();\n\t\t\t\t})\n\t\t\t,\n\t\t\t(new IntegerField('USERS'))\n\t\t\t\t->configureDefaultValue(0)\n\t\t\t,\n\t\t\t(new IntegerField('CONTENT_STATUS'))\n\t\t\t\t->configureDefaultValue(self::CONTENT_STATUS_INIT)\n\t\t\t,\n\t\t];\n\t}", "public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_ID_FIELD'),\n ),\n 'TIMESTAMP_X' => new Main\\Entity\\DatetimeField('TIMESTAMP_X', array(\n 'default_value' => new Main\\Type\\DateTime(),\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_TIMESTAMP_X_FIELD'),\n )),\n 'SOCIAL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateSocial'),\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_SOCIAL_FIELD'),\n ),\n 'USER_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_USER_ID_FIELD'),\n ),\n 'SOCIALTEXT' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_SOCIALTEXT_FIELD'),\n ),\n );\n }", "public function getmodulemeta()\n {\n return array('displayfunc' => 'view',\n 'titlefield' => 'title',\n 'itemid' => 'pid');\n }", "public function getMetadata();", "public function getMetadata();", "public function getMetadata();", "public static function getMetaData()\n {\n // _deprecated_function( __FUNCTION__, '1.4.1');\n\n global $post;\n\n $meta = new stdClass();\n\n $active = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_ACTIVE, true);\n $meta->active = filter_var($active, FILTER_VALIDATE_BOOLEAN);\n\n $meta->latitude = null;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_LATITUDE, true);\n if ($value != '') {\n $meta->latitude = (float)$value;\n }\n $meta->longitude = null;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_LONGITUDE, true);\n if ($value != '') {\n $meta->longitude = (float)$value;\n }\n\n $meta->mapType = self::MAP_TYPE_DEFAULT;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_MAP_TYPE, true);\n if ($value != '') {\n $meta->mapType = $value;\n }\n\n $meta->zoom = self::MAP_ZOOM_DEFAULT;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_ZOOM, true);\n if ($value != '') {\n $meta->zoom = (int)$value;\n }\n\n $meta->title = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_TITLE, true);\n\n $description = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_DESCRIPTION, true);\n if (!is_admin()) {\n $description = apply_filters('pronamic_google_maps_item_description', $description);\n }\n $meta->description = $description;\n\n $meta->address = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_ADDRESS, true);\n\n $meta = apply_filters('pronamic_google_maps_post_meta', $meta);\n\n return $meta;\n }", "public function getFields() {\r\n\r\n $fields = array();\r\n\r\n $fields['userid'] = $this->userid;\r\n $fields['itemid'] = $this->itemid;\r\n\r\n $fields['type'] = $this->type;\r\n $fields['detail'] = $this->detail;\r\n $fields['date'] = $this->date;\r\n\r\n $fields['location_simple'] = $this->location_simple;\r\n $fields['location_latlong'] = $this->location_latlong;\r\n\r\n foreach ($this->extra as $key => $value) {\r\n $fields[$key] = $value;\r\n }\r\n\r\n return $fields;\r\n }", "private function getMetaData ()\n\t\t{\n\t\t\t$data = file_get_contents (\"META.inf\");\n\t\t\t$o = json_decode ($data,true);\n\t\t\treturn $o;\t\n\t\t}", "public function fields()\n {\n return [\n 'id' => [\n 'type' => Type::nonNull(Type::string()),\n 'description' => 'The id of the place'\n ],\n 'cep' => [\n 'type' => Type::string(),\n 'description' => 'The cep of the place'\n ],\n 'name' => [\n 'type' => Type::string(),\n 'description' => 'The name of the place'\n ],\n 'number' => [\n 'type' => Type::string(),\n 'description' => 'The building number of the place'\n ],\n ];\n }", "public static function getMap()\n { \n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_ID_FIELD'),\n ),\n 'DATE_CHANGE' => array(\n 'data_type' => 'datetime',\n 'required' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DATE_CHANGE_FIELD'),\n ),\n 'DATE_CREATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DATE_CREATE_FIELD'),\n ),\n 'ACTIVE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_ACTIVE_FIELD'),\n ),\n 'SORT' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_SORT_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateName'),\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_NAME_FIELD'),\n ),\n 'DESCRIPTION' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DESCRIPTION_FIELD'),\n ),\n 'PARENT_CATEGORY_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_PARENT_CATEGORY_ID_FIELD'),\n ), \n );\n }", "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\t'ORDER_NEW_TASK' => new Entity\\StringField('ORDER_NEW_TASK', array(\n\t\t\t\t'required' => true\n\t\t\t))\n\t\t);\n\t}", "public function getMap() {\n return [\n 'sku' => 'itemNo',\n 'shortDescription' => 'description',\n 'longDescription' => 'description2',\n 'measurementUnit' => 'unitOfMeasure',\n 'mpn' => 'vendorItemNo',\n 'ean' => 'eanNo',\n ];\n }", "public function getMetaData()\n {\n if (is_null($this->_metaData)) {\n list($app, $name) = explode('/', $this->_config['name']);\n $args = array($name, $this->_config['params']);\n $this->_metaData = $GLOBALS['registry']->callByPackage(\n $app, 'getTableMetaData', $args);\n\n // We need to make vars for the columns.\n foreach ($this->_metaData['sections'] as $secname => $section) {\n foreach ($section['columns'] as $col) {\n $title = isset($col['title']) ? $col['title'] : '';\n $typename = isset($col['type']) ? $col['type'] : 'text';\n $params = isset($col['params']) ? $col['params'] : array();\n // Column types which begin with % are pseudo-types handled\n // directly.\n if (substr($typename, 0, 1) != '%') {\n $type = Horde_Form::getType($typename, $params);\n $var = new Horde_Form_Variable(\n $title, $col['name'], $type, false, true, '');\n $this->_formVars[$secname][$col['name']] = $var;\n }\n }\n }\n }\n\n return $this->_metaData;\n }", "public function metas();", "public static function getMap()\n {\n return [\n (new Fields\\StringField('HASH'))\n ->configurePrimary(true),\n\n new Fields\\IntegerField('RELIABILITY'),\n new Fields\\StringField('ADDRESS'),\n new Fields\\StringField('FULL_NAME'),\n new Fields\\StringField('PHONE'),\n new Fields\\DatetimeField('UPDATED_AT')\n ];\n }", "function getMetaData()\n {\n $meta = parent::getMetaData();\n\n $meta[\"sum_bankcodes\"] = floatval($this->sum_bankcodes);\n $meta[\"sum_accounts\"] = floatval($this->sum_accounts);\n\n return $meta;\n }", "public function getMetaData(): iterable;", "public function getMeta(): array;", "public function getMetadata() {}", "public function getMetadata() {}", "abstract public function getCorrespondingMetaData();", "public function get_fields()\n {\n $l_table = $this->m_cat_dao->get_table();\n $l_properties = $this->m_cat_dao->get_properties();\n\n return [\n $l_table . '__id' => 'ID',\n $l_table . '__key' => $l_properties['key'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE],\n $l_table . '__value' => $l_properties['value'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE],\n $l_table . '__group' => $l_properties['group'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE],\n 'isys_catg_identifier_type__title' => $l_properties['type'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE]\n ];\n }", "public function getFields()\n {\n return array(\n 'id' => array('int', 6, array('primary' => true)),\n 'created' => array('datetime', 255, array('null' => false)),\n 'customer_id' => array('int', 8, array('null' => false)),\n 'device_id' => array('int', 8, array('null' => false)),\n );\n }", "protected function _getFields()\n {\n return array(\n 'xf_handler' => array(\n 'handler_id' => array('type' => self::TYPE_UINT, 'autoIncrement' => true), \n 'content_type' => array('type' => self::TYPE_STRING, 'maxLength' => 255, 'required' => true), \n 'handler_type_id' => array('type' => self::TYPE_STRING, 'required' => true), \n 'object_class_id' => array('type' => self::TYPE_UINT, 'required' => true), \n 'extra_data_cache' => array('type' => self::TYPE_SERIALIZED, 'default' => ''), \n ), \n );\n }", "public function getFieldDictionary() {}", "function awm_basic_meta_structure($fields)\n {\n $metas = array();\n\n foreach ($fields as $field) {\n $meta_key = awm_clean_string($field['key']);\n $metas[$meta_key] = $field;\n $metas[$meta_key]['label'] = __($field['label'], 'extend-wp');\n\n $metas[$meta_key]['class'] = !empty($field['class']) ? explode(',', $field['class']) : array();\n $attributes = array();\n if (isset($field['attributes'])) {\n foreach ($field['attributes'] as $attribute) {\n if (!empty($attribute['label']) && !empty($attribute['value'])) {\n $attributes[$attribute['label']] = $attribute['value'];\n }\n }\n }\n $metas[$meta_key]['attributes'] = $attributes;\n switch ($field['case']) {\n case 'select':\n case 'radio':\n $metas[$meta_key]['options'] = array();\n if (!empty($field['options'])) {\n foreach ($field['options'] as $option) {\n $metas[$meta_key]['options'][$option['option']] = array('label' => __($option['label'], 'extend-wp'));\n }\n }\n break;\n }\n }\n\n return $metas;\n }", "public function getMetaData() {\n\t\treturn $this->arrMetadata;\n\t}", "public function get_metadata() {\n\t\treturn array_merge(parent::get_metadata(), array(\n\t\t\t'friendly_name' => 'List View'\n\t\t));\n\t}", "public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'TYPE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => [__CLASS__, 'validateType'],\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_TYPE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'TITLE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => [__CLASS__, 'validateTitle'],\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_TITLE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'PUBLIC_CODE',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePublicCode'],\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_PUBLIC_CODE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t];\n\t}", "public static function getFormFieldMap() {\n return array(\n 'name' => 'title',\n 'blurb' => 'blurb',\n 'image' => 'image',\n 'link' => 'link',\n );\n }", "public function getMetadata(): array;", "public function getMetaData()\n {\n return [\n 'type' => $this->type,\n 'mimetype' => $this->mimetype,\n 'size' => $this->size,\n 'width' => $this->width,\n 'height' => $this->height\n ];\n }", "public function meta() {\n\t\treturn [\n\t\t\t'name' => 'Info core type',\n\t\t\t'description' => 'This is a Info core type',\n\t\t\t'sort_order' => 500\n\t\t];\n\t}", "public static function getMap()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'SEARCH_CONTENT_ID' => array(\r\n\t\t\t\t'data_type' => 'integer',\r\n\t\t\t\t'primary' => true,\r\n\t\t\t\t'title' => Loc::getMessage('CONTENT_TEXT_ENTITY_SEARCH_CONTENT_ID_FIELD'),\r\n\t\t\t),\r\n\t\t\t'SEARCH_CONTENT_MD5' => array(\r\n\t\t\t\t'data_type' => 'string',\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'validation' => array(__CLASS__, 'validateSearchContentMd5'),\r\n\t\t\t\t'title' => Loc::getMessage('CONTENT_TEXT_ENTITY_SEARCH_CONTENT_MD5_FIELD'),\r\n\t\t\t),\r\n\t\t\t'SEARCHABLE_CONTENT' => array(\r\n\t\t\t\t'data_type' => 'text',\r\n\t\t\t\t'title' => Loc::getMessage('CONTENT_TEXT_ENTITY_SEARCHABLE_CONTENT_FIELD'),\r\n\t\t\t),\r\n\t\t\t'CONTENT' => array(\r\n\t\t\t\t'data_type' => SearchTable::getEntity(),\r\n\t\t\t\t'reference' => array('=this.SEARCH_CONTENT_ID' => 'ref.ID'),\r\n\t\t\t),\r\n\t\t);\r\n\t}", "public function getModelsMetaData() {}", "public function getMetaData()\n {\n return $this->metadata;\n }", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "private function getMeta() {\n $metadata = array(\n 'title' => 'User', \n 'desc' => 'Request URL: ' . Config::get('app.api_url'), \n 'meta' => array( \n 'title' => 'User | Seeties', \n 'description' => 'Sample meta description' \n ),\n 'sidebar' => View::make('user.sidebar')\n );\n\n return $metadata;\n }", "public function getFieldsMap()\n {\n return $this->fields_map;\n }", "protected function _getFields()\r\n {\r\n return array(\r\n 'xf_bible' => array(\r\n 'bible_id' => array(\r\n 'type' => self::TYPE_STRING,\r\n 'required' => true\r\n ),\r\n 'name' => array(\r\n 'type' => self::TYPE_STRING,\r\n 'required' => true\r\n ),\r\n 'copyright' => array(\r\n 'type' => self::TYPE_STRING,\r\n 'default' => ''\r\n ),\r\n 'abbreviation' => array(\r\n 'type' => self::TYPE_STRING,\r\n 'default' => ''\r\n ),\r\n 'language' => array(\r\n 'type' => self::TYPE_STRING,\r\n 'default' => 'eng'\r\n ),\r\n 'note' => array(\r\n 'type' => self::TYPE_STRING,\r\n 'default' => ''\r\n ),\r\n 'last_modified' => array(\r\n 'type' => self::TYPE_UINT,\r\n 'default' => XenForo_Application::$time\r\n )\r\n )\r\n );\r\n }", "public function columnMap()\n {\n //the values their names in the application\n return array(\n 'id' => 'code' ,\n 'the_name' => 'theName' ,\n 'the_type' => 'theType' ,\n 'the_year' => 'theYear'\n );\n }", "public function fields(): array{\n\t\treturn [\n\t\t\t'id' => [\n\t\t\t\t'type' => Type::nonNull(Type::int()),\n\t\t\t\t'description' => 'The id of the user',\n\t\t\t],\n\t\t\t'uid' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The name or value of the setting',\n\t\t\t],\n\t\t\t'name' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The name or value of the setting',\n\t\t\t],\n\t\t\t'description' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'Description of the setting',\n\t\t\t],\n\t\t\t'type' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The type of setting',\n\t\t\t],\n\t\t\t'status' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The type of setting',\n\t\t\t],\n\t\t\t'properties' => [\n\t\t\t\t'type' => GraphQL::type('property'),\n\t\t\t\t'description' => 'A list of the property',\n\t\t\t\t'is_relation' => false,\n\t\t\t],\n\n\t\t];\n\t}", "public function getMetaData()\n {\n $meta = array();\n $meta['displayname'] = $this->__('Static pages');\n $meta['description'] = $this->__('Manager of the static pages of the site.');\n $meta['version'] = '3.0.0';\n //! this defines the module's url\n $meta['url'] = $this->__('pages');\n $meta['core_min'] = '1.4.0'; // requires minimum 1.4.0 or later\n $meta['core_max'] = '1.4.99';\n $meta['capabilities'] = array(HookUtil::SUBSCRIBER_CAPABLE => array('enabled' => true));\n $meta['securityschema'] = array('Pages::' => 'Page name::Page ID',\n 'Pages:category:' => 'Category ID::');\n // Module depedencies\n $meta['dependencies'] = array(\n array('modname' => 'Scribite',\n 'minversion' => '4.3.0',\n 'maxversion' => '',\n 'status' => ModUtil::DEPENDENCY_RECOMMENDED));\n\n return $meta;\n }", "public function get_fields()\n {\n return [\n \"isys_cats_chassis_slot_list__title\" => \"LC__CMDB__LOGBOOK__TITLE\",\n \"isys_chassis_connector_type__title\" => \"LC__CMDB__CATS__CHASSIS__CONNECTOR_TYPE\",\n \"isys_cats_chassis_slot_list__insertion\" => \"LC__CMDB__CATS__CHASSIS__INSERTION\",\n \"assigned_items\" => \"LC__CMDB__CATS__CHASSIS__ASSIGNED_DEVICES\"\n ];\n }", "public function provideMetaDataFieldsDefinition(AbstractCrudForm $form): array;", "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('LOG_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'TIMESTAMP_X' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'required' => false,\n\t\t\t\t'title' => Loc::getMessage('LOG_ENTITY_TIMESTAMP_X_FIELD'),\n\t\t\t),\n\t\t\t'EVENT' => array(\n\t\t\t\t'data_type' => 'text',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('LOG_ENTITY_EVENT_FIELD'),\n\t\t\t),\n\t\t);\n\t}", "public function getMetaData(): array {\n\t\treturn $this->content['metadata'] ?? [];\n\t}", "function metaCourse()\n{\n return array(\n // Every column in the mapped table\n array(\n 'Id', 'Name', 'CourseId'\n ),\n\n // Every column part of the primary key\n array(\n 'Id'\n ),\n\n // Every column and their data types\n array(\n 'Id' => \"Auto_Increment\",\n 'Name' => \"Varchar\",\n 'CourseId' => \"Varchar\"\n ),\n\n // The columns that have numeric data types\n array(\n 'Id'\n )\n\n\n );\n}", "public function get_fields()\n {\n return [\n \"isys_catg_shares_list__title\" => \"LC__CMDB__CATG__SHARES__SHARE_NAME\",\n \"object\" => \"LC__POPUP__BROWSER__SELECTED_OBJECT\",\n \"isys_catg_share_access_list__mountpoint\" => \"LC__CMDB__CATG__SHARE_ACCESS__MOUNTPOINT\"\n ];\n }", "public function fields_for_feed_mapping() {\n\t\t\n\t\treturn array(\n\t\t\tarray(\t\n\t\t\t\t'name' => 'email',\n\t\t\t\t'label' => esc_html__( 'Email Address', 'gravityformsicontact' ),\n\t\t\t\t'required' => true,\n\t\t\t\t'field_type' => array( 'email' ),\n\t\t\t\t'default_value' => $this->get_first_field_by_type( 'email' )\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'prefix',\n\t\t\t\t'label' => esc_html__( 'Prefix', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'first_name',\n\t\t\t\t'label' => esc_html__( 'First Name', 'gravityformsicontact' ),\n\t\t\t\t'default_value' => $this->get_first_field_by_type( 'name', 3 )\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'last_name',\n\t\t\t\t'label' => esc_html__( 'Last Name', 'gravityformsicontact' ),\n\t\t\t\t'default_value' => $this->get_first_field_by_type( 'name', 6 )\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'suffix',\n\t\t\t\t'label' => esc_html__( 'Suffix', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'street',\n\t\t\t\t'label' => esc_html__( 'Address: Street Address', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'street2',\n\t\t\t\t'label' => esc_html__( 'Address: Line 2', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'city',\n\t\t\t\t'label' => esc_html__( 'Address: City', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'state',\n\t\t\t\t'label' => esc_html__( 'Address: State', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'postal_code',\n\t\t\t\t'label' => esc_html__( 'Address: Postal Code', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'phone',\n\t\t\t\t'label' => esc_html__( 'Phone Number', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'fax',\n\t\t\t\t'label' => esc_html__( 'Fax Number', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'business',\n\t\t\t\t'label' => esc_html__( 'Business Number', 'gravityformsicontact' ),\n\t\t\t),\n\t\t);\n\t\t\n\t}", "public function metadata($type);", "function get_meta_keys()\n {\n }", "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\tnew Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\tnew Entity\\StringField('EXTERNAL_CHAT_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVarChar')\n\t\t\t)),\n\t\t\tnew Entity\\StringField('CONNECTOR', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVarChar')\n\t\t\t)),\n\t\t\tnew Entity\\StringField('EXTERNAL_MESSAGE_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVarChar')\n\t\t\t)),\n\t\t);\n\t}", "public function getNonMetadataFields(): array\n\t{\n\t\t$values = $this->fields;\n\t\t$values['name'] = $this->name;\n\t\t$values['slug'] = $this->slug;\n\t\t$values['_archived'] = $this->archived;\n\t\t$values['_draft'] = $this->draft;\n\n\t\treturn $values;\n\t}", "abstract public function fields();", "function get_registered_metadata($object_type, $object_id, $meta_key = '')\n {\n }", "public function getFields(): array\n {\n return [\n 'user_id' => 'text',\n 'api_key' => 'text',\n 'shop_id' => 'text',\n 'secret_key' => 'password',\n ];\n }", "public function columnMap()\n {\n return array(\n 'name' => 'name', \n 'description' => 'description', \n );\n }", "public function getCreateFields()\n {\n\n return array\n (\n 'wbfsys_entity_tag' => array\n (\n 'vid',\n 'id_entity',\n 'id_tag',\n 'm_version',\n ),\n 'embed_tag' => array\n (\n 'name',\n 'access_key',\n 'id_lang',\n 'm_parent',\n 'description',\n ),\n 'wbfsys_tag' => array\n (\n 'name',\n 'access_key',\n 'id_lang',\n 'm_parent',\n 'description',\n ),\n\n );\n\n }", "public function getDataMetas()\n\t {\n\t \treturn get_option('metas-custom');\n\t }", "protected function getFields()\n {\n return array(\n 'user_id',\n 'name',\n 'oauth_user_id',\n 'username',\n 'pic_url',\n 'oauth_provider',\n 'token',\n 'secret'\n );\n }", "public function getCMSFields() {\n $fields = parent::getCMSFields();\n\n //google map module\n $location = new Location();\n $googlemapfield = new GoogleMapField($location, \"Google Map Field\");\n $Latitude = new ReadonlyField('Latitude', 'Latitude', $googlemapfield->getDefaultValue('Latitude'));\n $Longitude = new ReadonlyField('Longitude', 'Longitude', $googlemapfield->getDefaultValue('Longitude'));\n $fields->addFieldToTab('Root.Map', $googlemapfield);\n $fields->addFieldToTab('Root.Map', $Latitude);\n $fields->addFieldToTab('Root.Map', $Longitude);\n\n return $fields;\n }", "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'IBLOCK_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_IBLOCK_ID_FIELD'),\n\t\t\t),\n\t\t\t'FIELD_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'primary' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateFieldId'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_FIELD_ID_FIELD'),\n\t\t\t),\n\t\t\t'IS_REQUIRED' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N','Y'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_IS_REQUIRED_FIELD'),\n\t\t\t),\n\t\t\t'DEFAULT_VALUE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_DEFAULT_VALUE_FIELD'),\n\t\t\t),\n\t\t\t'IBLOCK' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Iblock\\Iblock',\n\t\t\t\t'reference' => array('=this.IBLOCK_ID' => 'ref.ID')\n\t\t\t),\n\t\t);\n\t}", "function metaData( $contentObjectAttribute )\n {\n $content = $contentObjectAttribute->content();\n $result = \"\";\n if ( $content instanceof xrowGISPosition )\n {\n $attributeArray = array( \n 'latitude' , \n 'longitude' , \n 'street' , \n 'zip' , \n 'district' , \n 'city' , \n 'state' , \n 'country' \n );\n $result = array();\n foreach ( $attributeArray as $key )\n {\n $result[] = array( \n 'id' => $key , \n 'text' => $content->$key \n );\n }\n }\n return $result;\n }", "public function get_meta() : array\n {\n return $this->additional['meta'] ?? [];\n }", "public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'TITLE',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateTitle'],\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_TITLE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'YEAR',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateYear'],\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_YEAR_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'COPIES_CNT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_COPIES_CNT_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'PUBLISHINGID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_PUBLISHINGID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew ReferenceField(\n\t\t\t\t'PUBLISHING_ID',\n\t\t\t\t'Listbooks\\PublishingTable',\n\t\t\t\tarray('=this.PUBLISHINGID' => 'ref.ID'),\n\t\t\t)\n\t\t];\n\t}", "public function meta(){\n $table_meta = new \\stdClass();\n\n // get fields in the database table\n if(count($this->_model_meta)==0){\n $this->_meta();\n }\n\n\n foreach ($this->_model_meta as $meta) {\n $table_meta->{$meta->name} = $meta;\n }\n\n return $table_meta;\n }", "public function getFields()\n {\n if ($this->fields) {\n return $this->fields;\n }\n\n $this->fields = array(\n 'data_type_id',\n 'name',\n 'aliases',\n 'description',\n 'driver',\n );\n\n return $this->fields;\n }", "public function &getFields();", "protected function _fields()\n\t{\n\t\treturn array(\n\t\t\t\t'name',\n\t\t\t 'intro', 'sort_order',\n\t\t\t 'status', 'feature',\n\t\t);\n\t}", "public function getFieldMappings()\n\t{\n\t\treturn $this->fieldMappings; \n\n\t}", "public function getContactDataFields();", "public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'USER_LOG_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_USER_LOG_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'USER_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_USER_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'COMMENT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_COMMENT_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t];\n\t}", "static function importMetadata() {\n\t\t\n\t\tself::$file_to_file_map = array();\n\t\t\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/image.php' );\n\t\t\n\t\techo_now( 'Importing metadata...' );\n\t\t\n\t\tself::$files_upload_path = wp_upload_dir();\n\t\t$searched_fields = array();\n\t\t\n\t\t# Add content field meta values as postmeta\n\t\t\n\t\tif( isset( drupal()->content_node_field_instance ) )\n\t\t\t$field_instance_table = 'content_node_field_instance';\n\t\telse if( isset( drupal()->field_config_instance ) )\n\t\t\t$field_instance_table = 'field_config_instance';\n\t\t\n\t\t$nid_field = 'nid';\n\t\t$vid_field = 'vid';\n\t\t\n\t\t$meta_fields = drupal()->$field_instance_table->getRecords();\n\t\t\n\t\tforeach( $meta_fields as $meta_field ) {\n\t\t\t\n\t\t\t// There are two ways of storing metadata -- simply (in the content_type_[node content type] table)\n\t\t\t// and richly (in the content_[field name] table)\n\t\t\t\n\t\t\t$table_name = 'content_' . $meta_field['field_name'];\n\t\t\t\n\t\t\tif( in_array( $meta_field['field_name'], $searched_fields ) )\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t# D7 compatibility\n\t\t\tif( ! array_key_exists( 'type_name', $meta_field ) )\n\t\t\t\t$meta_field['type_name'] = $meta_field['entity_type'];\n\t\t\t\n\t\t\t# D7 compatibility\n\t\t\tif( ! isset( drupal()->$table_name ) ) {\n\t\t\t\t$table_name = 'field_revision_' . $meta_field['field_name'];\n\t\t\t}\n\t\t\t\n\t\t\t# D7 compatibility\n\t\t\tself::$files_table_name = 'files';\n\t\t\tif( ! isset( drupal()->{self::$files_table_name} ) ) {\n\t\t\t\tself::$files_table_name = 'file_managed';\n\t\t\t\t$nid_field = 'entity_id';\n\t\t\t\t$vid_field = 'revision_id';\n\t\t\t\t\n\t\t\t\tself::$files_public_path = trailingslashit( \n\t\t\t\t\t\tunserialize(\n\t\t\t\t\t\tdrupal()->variable->value->getValue(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'name' => 'file_public_path'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n//\t\t\techo_now( 'Searching: ' . $table_name );\n\t\t\t\n\t\t\tif( isset( drupal()->$table_name ) ) {\n\t\t\t\t\n\t\t\t\t// Found a content_field_name table -- add post meta from its columns\n//\t\t\t\techo 'Table - search content table: ' . $table_name . ' for fields' . \"<br>\\n\";\n\t\t\t\t\n\t\t\t\t$meta_records = drupal()->$table_name->getRecords();\n\t\t\t\t\n\t\t\t\tforeach( $meta_records as $meta_record ) {\n\t\t\t\t\t\n\t\t\t\t\t// Import all columns beginning with field_name\n\t\t\t\t\t\n\t\t\t\t\tif( ! array_key_exists( $meta_record[$nid_field], self::$node_to_post_map ) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\tif( $meta_record[$vid_field] != self::$node_to_rev_map[ $meta_record[$nid_field] ] )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\tforeach( $meta_record as $column => $value ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( empty( $value ) )\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( 0 !== strpos( $column, $meta_field['field_name'] ) )\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( strpos( $column, '_fid' ) ) {\n\n\t\t\t\t\t\t\t$value = self::importAttachedFile(\n\t\t\t\t\t\t\t\tself::$node_to_post_map[ $meta_record[$nid_field] ],\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'file_id' => (int)$value\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tadd_post_meta(\n\t\t\t\t\t\t\t\t$value,\n\t\t\t\t\t\t\t\t'_drupal_source',\n\t\t\t\t\t\t\t\t$column\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( array_key_exists( str_replace( '_fid', '_data', $column ), $meta_record ) ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$details = maybe_unserialize( $meta_record[ str_replace( '_fid', '_data', $column ) ] );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( isset( $details['title'] ) ) {\n\t\t\t\t\t\t\t\t\twp_update_post(\n\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t'ID' => $value,\n\t\t\t\t\t\t\t\t\t\t\t'post_excerpt' => $details['title']\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif( isset( $details['alt'] ) ) {\n\t\t\t\t\t\t\t\t\tupdate_post_meta(\n\t\t\t\t\t\t\t\t\t\t$value,\n\t\t\t\t\t\t\t\t\t\t'_wp_attachment_image_alt',\n\t\t\t\t\t\t\t\t\t\t$details['alt']\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tadd_post_meta(\n\t\t\t\t\t\t\tself::$node_to_post_map[ $meta_record[$nid_field] ],\n\t\t\t\t\t\t\t'_drupal_' . $column,\n\t\t\t\t\t\t\t$value\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$searched_fields[] = $column;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t} else {\n\n\t\t\t\t// Search the content_type_[content type] table for this value\n\t\t\t\t$table_name = 'content_type_' . $meta_field['type_name'];\n\t\t\t\tif( ! isset( drupal()->$table_name ) )\n\t\t\t\t\t$table_name = 'field_revision_' . $meta_field['type_name'];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif( isset( drupal()->$table_name ) ) {\n\t\t\t\t\t$meta_records = drupal()->$table_name->getRecords();\n\t\t\t\t\t\n\t\t\t\t\tforeach( $meta_records as $meta_record ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Import all columns beginning with field_name\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( ! array_key_exists( $meta_record['nid'], self::$node_to_post_map ) )\n\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\tif( $meta_record[$vid_field] != self::$node_to_rev_map[ $meta_record[$nid_field] ] )\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t//\t\t\t\t\techo 'Adding metadata for: ' . self::$node_to_post_map[ $meta_record['nid'] ] . ' - ' . $meta_record[ $value_column ] . \"<br>\\n\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach( $meta_record as $column => $value ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( empty( $value ) )\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( 0 !== strpos( $column, $meta_field['field_name'] ) )\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( strpos( $column, '_fid' ) ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$value = self::importAttachedFile(\n\t\t\t\t\t\t\t\t\tself::$node_to_post_map[ $meta_record[$nid_field] ],\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'file_id' => (int)$value\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tadd_post_meta(\n\t\t\t\t\t\t\t\t\t$value,\n\t\t\t\t\t\t\t\t\t'_drupal_source',\n\t\t\t\t\t\t\t\t\t$column\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( array_key_exists( str_replace( '_fid', '_data', $column ), $meta_record ) ) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$details = maybe_unserialize( $meta_record[ str_replace( '_fid', '_data', $column ) ] );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif( isset( $details['title'] ) ) {\n\t\t\t\t\t\t\t\t\t\twp_update_post(\n\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t'ID' => $value,\n\t\t\t\t\t\t\t\t\t\t\t\t'post_excerpt' => $details['title']\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif( isset( $details['alt'] ) ) {\n\t\t\t\t\t\t\t\t\t\tupdate_post_meta(\n\t\t\t\t\t\t\t\t\t\t\t$value,\n\t\t\t\t\t\t\t\t\t\t\t'_wp_attachment_image_alt',\n\t\t\t\t\t\t\t\t\t\t\t$details['alt']\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tupdate_post_meta(\n\t\t\t\t\t\t\t\tself::$node_to_post_map[ $meta_record['nid'] ],\n\t\t\t\t\t\t\t\t'_drupal_' . $column,\n\t\t\t\t\t\t\t\t$value\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t} // End if isset table\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$searched_fields[] = $meta_field['field_name'];\n\t\t\t\t\n\t\t}\n\t\t\n\t\t// Search for table named for the node type\n\t\t$types = drupal()->node->type->getUniqueValues();\n\t\t\n\t\tforeach( $types as $type ) {\n\t\t\t\n\t\t\tif( isset( drupal()->$type ) ) {\n\t\t\t\t\n\t\t\t\t$type_records = drupal()->$type->getRecords();\n\t\t\t\tforeach( $type_records as $type_record ) {\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif( ! array_key_exists( $type_record['nid'], self::$node_to_post_map ) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\tforeach( $type_record as $column => $value ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( empty( $value ) )\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t\tupdate_post_meta(\n\t\t\t\t\t\t\tself::$node_to_post_map[ $type_record['nid'] ],\n\t\t\t\t\t\t\t'_drupal_' . $column,\n\t\t\t\t\t\t\t$value\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}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// Check for uploaded files\n\t\t\n\t\tif( isset( drupal()->upload ) ) {\n\t\t\t\n\t\t\t$uploads = drupal()->getRecords(\n\t\t\t\tdrupal()->query(\n\t\t\t\t\t'SELECT * FROM upload u\n\t\t\t\t\t\tWHERE (nid, vid) IN\n\t\t\t\t\t\t(SELECT nid, MAX(vid) FROM upload GROUP BY nid)'\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\tforeach( $uploads as $upload ) {\n\t\t\t\t\n\t\t\t\t$node = drupal()->node->getRecord(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'nid' => $upload['nid']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tif( apply_filters( 'import_node_skip_node', false, $node ) )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tif( ! array_key_exists( $upload['nid'], self::$node_to_post_map ) )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// Skip records with fid = 0\n\t\t\t\tif( 0 == $upload['fid'] )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t$value = self::importAttachedFile(\n\t\t\t\t\tself::$node_to_post_map[ $upload['nid'] ],\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'file_id' => (int)$upload['fid']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tadd_post_meta(\n\t\t\t\t\t$value,\n\t\t\t\t\t'_drupal_source',\n\t\t\t\t\t'upload'\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tadd_post_meta(\n\t\t\t\t\t$value,\n\t\t\t\t\t'_drupal_list_upload',\n\t\t\t\t\t(int)$upload['list']\n\t\t\t\t);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tdo_action( 'imported_metadata' );\n\t\t\n\t}", "private function get_api_fields() {\n\t\treturn array(\n\t\t\t'short_description' => true,\n\t\t\t'active_installs' => true,\n\t\t\t'icons' => true,\n\t\t\t'sections' => false,\n\t\t);\n\t}", "public function getFields() {\n\t\treturn array(\n\t\t\tself::FIELD_ID,\n\t\t\tself::FIELD_NAME,\n\t\t\tself::FIELD_CREATED_AT,\n\t\t);\n\t}" ]
[ "0.74329007", "0.706743", "0.70280486", "0.6939141", "0.6922535", "0.68534815", "0.6751654", "0.6704475", "0.664099", "0.66284835", "0.66261744", "0.6583168", "0.6556382", "0.65314096", "0.6530841", "0.65199614", "0.65049535", "0.6490468", "0.6490468", "0.6484237", "0.64699125", "0.64440364", "0.6441449", "0.64401567", "0.64401567", "0.64401567", "0.64169234", "0.63522446", "0.6342274", "0.63376135", "0.6330596", "0.6320654", "0.63028616", "0.6298404", "0.62915415", "0.6289248", "0.62780225", "0.6271524", "0.6261739", "0.6260284", "0.6260284", "0.6252469", "0.6248747", "0.6241429", "0.6237751", "0.623738", "0.622122", "0.62121713", "0.6208841", "0.6204398", "0.6202852", "0.6199743", "0.6193524", "0.6193008", "0.6167165", "0.61239624", "0.61165273", "0.6111687", "0.6111687", "0.6111687", "0.6111687", "0.6111687", "0.6109813", "0.61091876", "0.6097323", "0.6089948", "0.6089503", "0.6077132", "0.60766375", "0.60678595", "0.6067352", "0.6064098", "0.6060631", "0.60569876", "0.6054624", "0.6045022", "0.6042148", "0.6041573", "0.60345966", "0.603232", "0.60306656", "0.60221225", "0.60191905", "0.6006577", "0.59977543", "0.59907657", "0.598593", "0.5982336", "0.59737253", "0.5973405", "0.59724325", "0.59690183", "0.5956638", "0.59565204", "0.59545684", "0.5950889", "0.59454584", "0.594308", "0.5941486", "0.59392065", "0.5938968" ]
0.0
-1
/ Get all custom fields
public function getCustomFields() { return $this->_customFields ?: array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllCustomFields() : array\n {\n return $this->getAll();\n }", "public function getCustomFields() {\n }", "public function getCustomFields() {\n }", "public function getFormCustomFields(){\n\t}", "public function getCustomFields()\n {\n return $this->customFields;\n }", "public function getCustomFields()\n {\n return $this->customFields;\n }", "public function get_fields() {\n\t\treturn apply_filters( 'wpcd_get_custom_fields', $this->custom_fields );\n\t}", "public function getCustomFields()\n\t{\n\t\t$all_customs = array();\n\t\t$results = $this->grApiInstance->getCustomFields();\n\t\tif ( !empty($results))\n\t\t{\n\t\t\tforeach ($results as $ac)\n\t\t\t{\n\t\t\t\tif (isset($ac->name) && isset($ac->customFieldId)) {\n\t\t\t\t\t$all_customs[$ac->name] = $ac->customFieldId;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $all_customs;\n\t}", "public function get_custom_fields() {\n\t\treturn apply_filters( 'dev_get_custom_fields', $this->options );\n\t}", "function ywccp_get_all_custom_fields(){\r\n\t\t\r\n\t\t$fields = array();\r\n\t\t// get billing\r\n\t\t$fields['billing'] = ywccp_get_custom_fields('billing');\r\n\t\t// get shipping\r\n\t\t$fields['shipping'] = ywccp_get_custom_fields('shipping');\r\n\t\t// get additional\r\n\t\t$fields['additional'] = ywccp_get_custom_fields('additional');\r\n\t\t\r\n\t\treturn $fields;\r\n\t}", "public function get_custom_fields(){\n $items = array();\n $success = $this->new_request( \"GET\", \"$this->account_id/custom_field_identifiers\" );\n if( ! $success ){\n return array();\n }\n $response = json_decode( $this->ironman->get_response_body(), true );\n $fields = isset( $response['custom_field_identifiers'] ) ? $response['custom_field_identifiers'] : array();\n foreach( $fields as $field ){\n $items[$field] = $field;\n }\n return $items;\n }", "public function getCustomFields() {\n return Doctrine::getTable('ArticleCustomFieldValue')->getCustomFields($this);\n }", "public function getAll() : array\n {\n if (!empty($listOfCustomFields = $this->getAllFromRedis())) {\n return $listOfCustomFields;\n }\n\n $companyId = $this->companies_id ?? 0;\n\n $result = Di::getDefault()->get('db')->prepare('\n SELECT name, value \n FROM apps_custom_fields\n WHERE\n companies_id = ?\n AND model_name = ?\n AND entity_id = ?\n ');\n\n $result->execute([\n $companyId,\n get_class($this),\n $this->getId()\n ]);\n\n $listOfCustomFields = [];\n\n while ($row = $result->fetch()) {\n $listOfCustomFields[$row['name']] = Str::jsonToArray($row['value']);\n }\n\n return $listOfCustomFields;\n }", "public function getAllFields();", "protected function get_registered_fields()\n {\n }", "public function getCustomFields($page=null, $per_page=null){\n\t\treturn CustomField::all($page, $per_page);\n\t\t\n }", "public function getAllCustomFields()\n\t{\n\t\t$fields = $this->CustomFields->indexBy('field_name');\n\n\t\t$cache_key = \"ChannelFieldGroups/{$this->getId()}/\";\n\t\tif (($field_groups = ee()->session->cache(__CLASS__, $cache_key, FALSE)) == FALSE)\n\t\t{\n\t\t\t$field_groups = $this->FieldGroups;\n\t\t}\n\n\t\tforeach ($field_groups as $field_group)\n\t\t{\n\t\t\tforeach($field_group->ChannelFields as $field)\n\t\t\t{\n\t\t\t\t$fields[$field->field_name] = $field;\n\t\t\t}\n\t\t}\n\n\t\tee()->session->set_cache(__CLASS__, $cache_key, $field_groups);\n\n\t\treturn new Collection($fields);\n\t}", "public function getFrontendFields();", "public function get_custom_fields(){\n $real_fields = array();\n $fields = $this->service->doRequest( 'subscribers_list/getFields', array( 'hash' => $this->list_id ) )['fields'];\n if( $fields ){\n foreach( $fields as $field ){\n $real_fields[$field['hash']] = $field['tag'];\n }\n }\n return $real_fields;\n }", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "private function addCustomFields() {\n if (function_exists('get_fields')) {\n foreach (self::getPostTypes() as $post_type) {\n register_rest_field($post_type, 'fields', [\n 'get_callback' => function ($post) {\n if (is_object($post)) {\n return get_fields($post->id);\n } elseif (is_array($post) && array_key_exists('id', $post)) {\n return get_fields($post['id']);\n }\n },\n ]);\n }\n }\n }", "public static function get_custom_fields() {\n\n\t\t$custom_fields = [];\n\t\t$fields = self::get_meta_keys_alt();\n\n\t\tforeach ( $fields as $field ) {\n\t\t\t$custom_fields[$field] = ucfirst( str_replace( '_', ' ', $field ) );\n\t\t}\n\n\t\treturn $custom_fields;\n\n\t}", "public function getFields() {}", "public function getFields() {}", "public function getFields() {}", "public static function get_fields()\n {\n }", "protected function get_fields() {\n\t\treturn rwmb_get_registry( 'field' )->get_by_object_type( 'post' );\n\t}", "public function customFields()\n {\n return $this->morphMany('App\\Models\\MemberCustomFields', 'fieldable');\n }", "public function getCustomFields( $params = array() ) {\n\t\treturn $this->call( 'custom-fields?' . $this->setParams( $params ) );\n\t}", "public static function custom_fields()\r\n {/*{{{*/\r\n $f = array();\r\n\t $file = self::custom_fields_file();\r\n\t if(!file_exists($file)) \r\n return false;\r\n\r\n\t $data = getXML($file);\r\n\t $items = $data->item;\r\n\t if(count($items) <= 0) \r\n\t return false;\r\n\t foreach($items as $item) \r\n\t {\r\n\t\t $cf = array();\r\n\t\t $cf['key'] = (string)$item->desc;\r\n\t\t $cf['label'] = (string)$item->label;\r\n\t\t $cf['type'] = (string)$item->type;\r\n\t\t $cf['value'] = (string)$item->value;\r\n\t\t if($cf['type'] == 'dropdown') \r\n\t\t {\r\n\t\t $cf['options'] = array();\r\n\t\t\t foreach ($item->option as $option) \r\n\t\t\t\t $cf['options'][] = (string)$option;\r\n\t\t }\r\n\t\t $f[] = $cf;\r\n\t }\r\n return $f;\r\n }", "function getFields();", "public function getListFields();", "public function getAllFields()\n {\n return $this->fields;\n }", "final public function getAllFields()\r\n {\r\n return array($this->_field);\r\n }", "public function getFieldsList(){\n return $this->_get(1);\n }", "public function getCustomFields()\n {\n # GET /accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields\n }", "public static function get_track_custom_fields() {\n global $DB;\n\n if (static::require_elis_dependencies() === true) {\n // Get custom fields.\n $sql = 'SELECT shortname, name, datatype, multivalued\n FROM {'.field::TABLE.'} f\n JOIN {'.field_contextlevel::TABLE.'} fctx ON f.id = fctx.fieldid AND fctx.contextlevel = ?';\n $sqlparams = array(CONTEXT_ELIS_TRACK);\n return $DB->get_records_sql($sql, $sqlparams);\n } else {\n return array();\n }\n }", "public function getFields() : FieldCollection;", "public function raasGetCustomFields()\n {\n $url = RAAS_DOMAIN . \"/api/v2/userprofile/fields?apikey=\" . RAAS_API_KEY . \"&apisecret=\" . RAAS_SECRET_KEY;\n $response = $this->raasGetResponseFromRaas($url);\n return isset($response->CustomFields) ? $response->CustomFields : '';\n }", "public function get_all_custom_fields( $force ) {\n\n\t\t$custom_data = array();\n\n\t\t// Serve from cache if exists and requested\n\t\t$cached_data = $this->get_cached_custom_fields();\n\t\tif ( false === $force && ! empty( $cached_data ) ) {\n\t\t\treturn $cached_data;\n\t\t}\n\n\t\t// Build custom fields for every list\n\t\t$lists = $this->get_lists( $force );\n\n\t\tforeach ( $lists as $list ) {\n\t\t\tif ( ! empty( $list['id'] ) ) {\n\t\t\t\t$custom_data[ $list['id'] ] = $this->get_custom_fields_for_list( $list['id'] );\n\t\t\t}\n\t\t}\n\n\t\t$this->_save_custom_fields( $custom_data );\n\n\t\treturn $custom_data;\n\t}", "static function custom_get_creatable_fields() {\n # use this functionality to get a list of all field in the table\n return self::default_get_updatable_fields();\n }", "public function all_fields() {\n\t\t$general_fields = $this->general_fields();\n\t\t$promo_fields = $this->promotional_fields();\n\t\t$script_fields = $this->scripts_fields();\n\t\t$all_fields = array_merge( $general_fields, $promo_fields, $script_fields );\n\t\treturn $all_fields;\n\t}", "public function custom_fields_for_feed_setting() {\n\t\t\n\t\t$fields = array();\n\t\t\n\t\t/* If iContact API credentials are invalid, return the fields array. */\n\t\tif ( ! $this->initialize_api() ) {\n\t\t\treturn $fields;\n\t\t}\n\t\t\n\t\t/* Get available iContact fields. */\n\t\t$icontact_fields = $this->api->get_custom_fields();\n\t\t\n\t\t/* If no iContact fields exist, return the fields array. */\n\t\tif ( empty( $icontact_fields ) || is_wp_error( $icontact_fields ) || ! is_array( $icontact_fields ) ) {\n\t\t\treturn $fields;\n\t\t}\n\t\t\t\n\t\t/* Add iContact fields to the fields array. */\n\t\tforeach ( $icontact_fields as $field ) {\n\t\t\t\n\t\t\t$fields[] = array(\n\t\t\t\t'label' => $field['publicName'],\n\t\t\t\t'value' => $field['customFieldId']\n\t\t\t);\n\t\t\t\n\t\t}\n\n\t\t/* Add new custom fields to the fields array. */\n\t\tif ( ! empty( $this->_new_custom_fields ) ) {\n\t\t\t\n\t\t\tforeach ( $this->_new_custom_fields as $new_field ) {\n\t\t\t\t\n\t\t\t\t$found_custom_field = false;\n\t\t\t\tforeach ( $fields as $field ) {\n\t\t\t\t\t\n\t\t\t\t\tif ( $field['value'] == $new_field['value'] )\n\t\t\t\t\t\t$found_custom_field = true;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( ! $found_custom_field )\n\t\t\t\t\t$fields[] = array(\n\t\t\t\t\t\t'label' => $new_field['label'],\n\t\t\t\t\t\t'value' => $new_field['value']\t\n\t\t\t\t\t);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif ( empty( $fields ) ) {\n\t\t\treturn $fields;\n\t\t}\n\t\t\t\t\t\t\n\t\t/* Add \"Add Custom Field\" to array. */\n\t\t$fields[] = array(\n\t\t\t'label' => esc_html__( 'Add Custom Field', 'gravityformsicontact' ),\n\t\t\t'value' => 'gf_custom'\t\n\t\t);\n\t\t\n\t\treturn $fields;\n\t\t\n\t}", "function get_fields() {\n global $Tainacan_Item_Metadata;\n return $Tainacan_Item_Metadata->fetch($this, 'OBJECT');\n\n }", "function get_fields( ) {\n\t\treturn $this->fields_list;\n\t\t}", "public function get_custom_fields($args = [])\n {\n global $db, $system;\n $fields = [];\n /* prepare \"for\" [user|page|group|event] - default -> user */\n $args['for'] = (isset($args['for'])) ? $args['for'] : \"user\";\n if (!in_array($args['for'], array('user', 'page', 'group', 'event'))) {\n _error(400);\n }\n /* prepare \"get\" [registration|profile|settings] - default -> registration */\n $args['get'] = (isset($args['get'])) ? $args['get'] : \"registration\";\n if (!in_array($args['get'], array('registration', 'profile', 'settings'))) {\n _error(400);\n }\n /* prepare where_query */\n $where_query = \"WHERE field_for = '\" . $args['for'] . \"'\";\n if ($args['get'] == \"registration\") {\n $where_query .= \" AND in_registration = '1'\";\n } elseif ($args['get'] == \"profile\") {\n $where_query .= \" AND in_profile = '1'\";\n }\n $get_fields = $db->query(\"SELECT * FROM custom_fields \" . $where_query . \" ORDER BY field_order ASC\") or _error(\"SQL_ERROR_THROWEN\");\n if ($get_fields->num_rows > 0) {\n while ($field = $get_fields->fetch_assoc()) {\n if ($field['type'] == \"selectbox\") {\n $field['options'] = explode(PHP_EOL, $field['select_options']);\n }\n if ($args['get'] == \"registration\") {\n /* no value neeeded */\n $fields[] = $field;\n } else {\n /* valid node_id */\n if (!isset($args['node_id'])) {\n _error(400);\n }\n /* get the custom field value */\n $get_field_value = $db->query(sprintf(\"SELECT value FROM custom_fields_values WHERE field_id = %s AND node_id = %s AND node_type = %s\", secure($field['field_id'], 'int'), secure($args['node_id'], 'int'), secure($args['for']))) or _error(\"SQL_ERROR_THROWEN\");\n $field_value = $get_field_value->fetch_assoc();\n if ($field['type'] == \"selectbox\") {\n $field['value'] = $field['options'][$field_value['value']];\n } else {\n $field['value'] = $field_value['value'];\n }\n if ($args['get'] == \"profile\" && is_empty($field['value'])) {\n continue;\n }\n $fields[$field['place']][] = $field;\n }\n }\n }\n return $fields;\n }", "public function form_fields() {\n\t\treturn apply_filters( \"appthemes_{$this->box_id}_metabox_fields\", $this->form() );\n\t}", "protected function getSchemaFieldsForCustomFields()\n {\n $schemaPartialForCustomFields = [];\n foreach ($this->getWrapper()->getCustomFieldsCached() as $customField) {\n $dataTypeClassName = end(explode('\\\\', get_class($customField->getDataType())));\n $schemaPartialForCustomFields[$customField->apiName] = $dataTypeClassName;\n }\n return $schemaPartialForCustomFields;\n }", "function get_fields()\n\t{\n\t\trequire_code('ocf_members');\n\n\t\t$indexes=collapse_2d_complexity('i_fields','i_name',$GLOBALS['FORUM_DB']->query_select('db_meta_indices',array('i_fields','i_name'),array('i_table'=>'f_member_custom_fields'),'ORDER BY i_name'));\n\n\t\t$fields=array();\n\t\tif (has_specific_permission(get_member(),'view_profiles'))\n\t\t{\n\t\t\t$rows=ocf_get_all_custom_fields_match(NULL,1,1);\n\t\t\trequire_code('fields');\n\t\t\tforeach ($rows as $row)\n\t\t\t{\n\t\t\t\tif (!array_key_exists('field_'.strval($row['id']),$indexes)) continue;\n\n\t\t\t\t$ob=get_fields_hook($row['cf_type']);\n\t\t\t\t$temp=$ob->get_search_inputter($row);\n\t\t\t\tif (is_null($temp))\n\t\t\t\t{\n\t\t\t\t\t$type='_TEXT';\n\t\t\t\t\t$special=make_string_tempcode(get_param('option_'.strval($row['id']),''));\n\t\t\t\t\t$display=$row['trans_name'];\n\t\t\t\t\t$fields[]=array('NAME'=>strval($row['id']),'DISPLAY'=>$display,'TYPE'=>$type,'SPECIAL'=>$special);\n\t\t\t\t} else $fields=array_merge($fields,$temp);\n\t\t\t}\n\n\t\t\t$age_range=get_param('option__age_range',get_param('option__age_range_from','').'-'.get_param('option__age_range_to',''));\n\t\t\t$fields[]=array('NAME'=>'_age_range','DISPLAY'=>do_lang_tempcode('AGE_RANGE'),'TYPE'=>'_TEXT','SPECIAL'=>$age_range);\n\t\t}\n\n\t\t$map=has_specific_permission(get_member(),'see_hidden_groups')?array():array('g_hidden'=>0);\n\t\t$group_count=$GLOBALS['FORUM_DB']->query_value('f_groups','COUNT(*)');\n\t\tif ($group_count>300) $map['g_is_private_club']=0;\n\t\tif ($map==array()) $map=NULL;\n\t\t$rows=$GLOBALS['FORUM_DB']->query_select('f_groups',array('id','g_name'),$map,'ORDER BY g_order');\n\t\t$groups=form_input_list_entry('',true,'---');\n\t\t$default_group=get_param('option__user_group','');\n\t\t$group_titles=array();\n\t\tforeach ($rows as $row)\n\t\t{\n\t\t\t$row['text_original']=get_translated_text($row['g_name'],$GLOBALS['FORUM_DB']);\n\n\t\t\tif ($row['id']==db_get_first_id()) continue;\n\t\t\t$groups->attach(form_input_list_entry(strval($row['id']),strval($row['id'])==$default_group,$row['text_original']));\n\t\t\t$group_titles[$row['id']]=$row['text_original'];\n\t\t}\n\t\tif (strpos($default_group,',')!==false)\n\t\t{\n\t\t\t$bits=explode(',',$default_group);\n\t\t\t$combination=new ocp_tempcode();\n\t\t\tforeach ($bits as $bit)\n\t\t\t{\n\t\t\t\tif (!$combination->is_empty()) $combination->attach(do_lang_tempcode('LIST_SEP'));\n\t\t\t\t$combination->attach(escape_html(@$group_titles[intval($bit)]));\n\t\t\t}\n\t\t\t$groups->attach(form_input_list_entry(strval($default_group),true,do_lang_tempcode('USERGROUP_SEARCH_COMBO',escape_html($combination))));\n\t\t}\n\t\t$fields[]=array('NAME'=>'_user_group','DISPLAY'=>do_lang_tempcode('GROUP'),'TYPE'=>'_LIST','SPECIAL'=>$groups);\n\t\tif (has_specific_permission(get_member(),'see_hidden_groups'))\n// $fields[]=array('NAME'=>'_photo_thumb_url','DISPLAY'=>do_lang('PHOTO'),'TYPE'=>'','SPECIAL'=>'','CHECKED'=>false);\n\t\t{\n\t\t\t//$fields[]=array('NAME'=>'_emails_only','DISPLAY'=>do_lang_tempcode('EMAILS_ONLY'),'TYPE'=>'_TICK','SPECIAL'=>'');\tCSV export better now\n\t\t}\n\n\t\treturn $fields;\n\t}", "private static function _get_custom_fields($content_type)\n\t{\n\t\t$data = get_option( CCTM::db_key );\n\t\tif (isset($data[$content_type]['custom_fields']))\n\t\t{\n\t\t\treturn $data[$content_type]['custom_fields'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t}", "public function getAllFields() {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db_q'];\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t= false;\n\t\t\t// Query set up\t\n\t\t\t$table\t\t\t= 'tb_field';\n\t\t\t$select_what\t= 'id, vc_field AS vc_name';\n\t\t\t$conditions\t\t= \"1 ORDER BY vc_field ASC\";\n\t\t\t$return\t\t\t= $db->getAllRows_Arr($table, $select_what, $conditions);\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "abstract public function getFields();", "abstract public function getFields();", "public function fields(){\n\t\treturn array();\n\t}", "private function fields() {\n $fields = array();\n include($this->directories['plugin']['var']['dir'].'/fields.php');\n return $fields;\n }", "public function fields()\n {\n return array_map(\n function (array $field) {\n return Field::fromArray($field);\n },\n $this->client->get('field')\n );\n }", "public function getFields(): array;", "public function getFields(): array;", "public function getFields(): array;", "public function get_custom_fields( $params = array() ) {\n\n\t\treturn array_merge( parent::get_custom_fields(), $this->_mapped_custom_fields );\n\t}", "public function getCustomFields($options = [])\n {\n return $this->api->get($this->buildPath(\"custom_fields\"), $options);\n }", "public function CustomFields()\n {\n \t// hasMany(RelatedModel, foreignKeyOnRelatedModel = product_id, localKey = id)\n \treturn $this->hasMany(CustomFields::class);\n }", "public function fields() {\n // The fields are passed to the constructor for this plugin.\n return $this->fields;\n }", "private function loadFields(){\n\t\t$this->fields = $this->wpdb->get_results($this->wpdb->prepare(\"\n\t\t\tSELECT\n\t\t\t\t`field`.`id` \t\t\t'field_id',\n\t\t\t\t`type`.`name` \t\t\t'type',\n\t\t\t\t`field`.`name`\t\t\t'name',\n\t\t\t\t`field`.`label`\t\t\t'label',\n\t\t\t\t`field`.`default`\t\t'default',\n\t\t\t\t`field`.`required`\t\t'required',\n\t\t\t\t`field`.`depends_id`\t'depends_id',\n\t\t\t\t`field`.`depends_value`\t'depends_value',\n\t\t\t\t`field`.`placeholder`\t'placeholder'\n\t\t\tFROM `mark_reg_fields` `field`\n\t\t\tLEFT JOIN `mark_reg_field_types` `type` ON `type`.`id` = `field`.`type_id`\n\t\t\tWHERE\n\t\t\t\t`field`.`enabled` = 1\n\t\t\t\tAND `field`.`form_id` = %d\n\t\t\t\tAND `field`.`backend_only` = 0\n\t\t\tORDER BY\n\t\t\t\t`field`.`order`\n\t\t\", $this->form_id));\n\t}", "function gmw_search_form_custom_fields( $gmw ) {\r\n\t\techo gmw_get_search_form_custom_fields( $gmw );\r\n\t}", "public function get_fields()\n {\n $catalogue_name = get_param_string('catalogue_name', '');\n if ($catalogue_name == '') {\n return array();\n }\n return $this->_get_fields($catalogue_name);\n }", "function get_field_list()\n\t{\n\t\t$fields = array();\n\n\n\t\t$this->xhr_output($fields);\n\t}", "public function getContactDataFields();", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "abstract public function getSettingsFields();", "public function fetchFields();", "public function fields()\n {\n $fullResult = $this->client->call(\n 'crm.invoice.fields'\n );\n return $fullResult;\n }", "public function fields(): array\n {\n return MyField::withSlug('name', MyField::withMeta([\n MyField::relation('categories')\n ->fromModel(ProductCategory::class, 'name')\n ->multiple(),\n MyField::uploadMedia(),\n MyField::input('price')\n ->step(0.001)\n ->required(),\n MyField::input('discount')\n ->step(0.001)\n ->required(),\n MyField::quill('body'),\n MyField::switcher('is_active')\n ->value(true)\n ]));\n }", "public function fields()\n {\n return [ \n ];\n }", "function get_all_additional_fields() {\r\n\t\t$sql = \"SELECT * FROM sys_man_additional_fields ORDER BY field_name\";\r\n\t\t$sql = $this->clean_sql($sql);\r\n\t\t$query = $this->db->query($sql);\r\n\t\t$result = $query->result();\r\n\t\treturn ($result);\r\n\t}", "public static function customFields($return_type=null)\r\n {\r\n $custom_fields = CustomField::whereAppId(\\Auth::user()->app_id)->pluck('name', 'id');\r\n if($return_type == 'json') { \r\n $custom_fields->toJson();\r\n }\r\n return $custom_fields;\r\n }", "public function all_fields()\n {\n $allfields = array();\n foreach (array_values($this->CLASS_CONTAINER) as $val){\n $allfields = array_merge($allfields, $this->{$val});\n }\n foreach (array_values($this->singular_fields) as $val){\n if($this->{$val}) {\n $allfields[] = $this->{$val};\n }\n }\n\n return $allfields;\n }", "public function fetch_fields() {}", "public function get_fields() {\n return $this->fields;\n }", "public function getUserFields()\r\n {\r\n return CrugeFactory::get()->getICrugeFieldListModels();\r\n }", "public function getSearchFields();", "public function get_fields() {\r\n\t\treturn $this->fields;\r\n\t}", "public function metaFields()\n {\n $metaFields = [];\n foreach ($this->metaFieldDefinitions() as $fieldData) {\n $metaFields[] = Field::createFromData($fieldData);\n }\n return $metaFields;\n }", "public function get_fields() {\n\n\t\t$fields = array(\n\t\t\tarray(\n\t\t\t\t'type' => 'tab',\n\t\t\t\t'name' => __( 'Dribbble', 'publisher' ),\n\t\t\t\t'id' => 'dribbble',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Dribbble ID', 'publisher' ),\n\t\t\t\t'id' => 'user_id',\n\t\t\t\t'type' => 'text',\n\t\t\t\t//\n\t\t\t\t'vc_admin_label' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Access Token', 'publisher' ),\n\t\t\t\t'id' => 'access_token',\n\t\t\t\t'type' => 'text',\n\t\t\t\t//\n\t\t\t\t'vc_admin_label' => false,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Number of Shots', 'publisher' ),\n\t\t\t\t'id' => 'photo_count',\n\t\t\t\t'type' => 'text',\n\t\t\t\t//\n\t\t\t\t'vc_admin_label' => false,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Columns', 'publisher' ),\n\t\t\t\t'id' => 'style',\n\t\t\t\t//\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t2 => __( '2 Column', 'publisher' ),\n\t\t\t\t\t3 => __( '3 Column', 'publisher' ),\n\t\t\t\t\t'slider' => __( 'Slider', 'publisher' ),\n\t\t\t\t),\n\t\t\t\t//\n\t\t\t\t'vc_admin_label' => false,\n\t\t\t),\n\t\t);\n\n\t\t/**\n\t\t * Retrieve heading fields from outside (our themes are defining them)\n\t\t */\n\t\t{\n\t\t\t$heading_fields = apply_filters( 'better-framework/shortcodes/heading-fields', array(), $this->id );\n\n\t\t\tif ( $heading_fields ) {\n\t\t\t\t$fields = array_merge( $fields, $heading_fields );\n\t\t\t}\n\t\t}\n\n\n\t\t/**\n\t\t * Retrieve design fields from outside (our themes are defining them)\n\t\t */\n\t\t{\n\t\t\t$design_fields = apply_filters( 'better-framework/shortcodes/design-fields', array(), $this->id );\n\n\t\t\tif ( $design_fields ) {\n\t\t\t\t$fields = array_merge( $fields, $design_fields );\n\t\t\t}\n\t\t}\n\n\t\tbf_array_insert_after(\n\t\t\t'bs-show-phone',\n\t\t\t$fields,\n\t\t\t'bs-text-color-scheme',\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Block Text Color Scheme', 'publisher' ),\n\t\t\t\t'id' => 'bs-text-color-scheme',\n\t\t\t\t//\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'' => __( '-- Default --', 'publisher' ),\n\t\t\t\t\t'light' => __( 'White Color Texts', 'publisher' ),\n\t\t\t\t),\n\t\t\t\t//\n\t\t\t\t'vc_admin_label' => false,\n\t\t\t)\n\t\t);\n\n\t\treturn $fields;\n\t}", "public function getFields()\n {\n return $this->content->getFields();\n }", "public static function getFields(){\n\t\treturn self::$fields;\n\t}" ]
[ "0.8274964", "0.8160087", "0.8160087", "0.8038956", "0.8032602", "0.8032602", "0.80239016", "0.7943402", "0.77329206", "0.7657585", "0.76319444", "0.7559657", "0.75156283", "0.75138754", "0.7499961", "0.74336743", "0.7430449", "0.7195594", "0.716986", "0.7154281", "0.7154281", "0.7154281", "0.7154281", "0.7154281", "0.7154281", "0.7094574", "0.7090609", "0.70805305", "0.70805305", "0.70805305", "0.70572793", "0.7056088", "0.7054273", "0.7053858", "0.7044942", "0.70384604", "0.69956475", "0.6977855", "0.69450945", "0.69313693", "0.6919006", "0.6907347", "0.69000334", "0.6893948", "0.68796635", "0.6871755", "0.6871702", "0.6845694", "0.6838029", "0.6822854", "0.68132895", "0.6803311", "0.6786177", "0.67637205", "0.67434245", "0.6741513", "0.67242354", "0.67242354", "0.67242354", "0.67242354", "0.67242354", "0.6723794", "0.6723794", "0.6721128", "0.67143965", "0.6692999", "0.66916287", "0.66916287", "0.66916287", "0.66869825", "0.6678908", "0.6659619", "0.66532433", "0.6620203", "0.6604975", "0.6599934", "0.6599557", "0.6586317", "0.6571223", "0.6571223", "0.6571223", "0.6571223", "0.6571223", "0.65705794", "0.6562181", "0.65593857", "0.6551267", "0.6550288", "0.6546096", "0.65459436", "0.6541203", "0.65332764", "0.65281564", "0.64946866", "0.64890236", "0.64809793", "0.64701116", "0.64667594", "0.64623207", "0.64589024" ]
0.785412
8
/ Add custom fields to the cache
public function addCustomFields( $fields ) { $customFields = $this->getCustomFields(); foreach ( $fields as $field ) { if ( ! isset( $customFields[ $field->handle ] ) ) { $customFields[ $field->handle ] = $field; } } $this->_customFields = $customFields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reCacheCustomFields() : void\n {\n foreach ($this->getAll() as $key => $value) {\n $this->setInRedis($key, $value);\n }\n }", "protected function cacheSave() {\n $data = array();\n foreach ($this->properties as $prop) {\n $data[$prop] = $this->$prop;\n }\n //cache_set($this->id, $data, 'cache');\n }", "function wp_cache_add($key, $data, $flag = '', $expire = 0)\n{\n global $wp_object_cache;\n return $wp_object_cache->add($key, $data, $flag, $expire);\n}", "public function cacheFieldInfo() {}", "function wp_cache_add($key, $value, $group = '', $expiration = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->add($key, $value, $group, $expiration);\n}", "protected function applyMeta(): void\n {\n $this->state->mergeIntoArray('tca.meta', $this->cache->get(static::TCA_META_CACHE_KEY, []));\n }", "function wp_cache_add($key, $data, $group = '', $expire = 0)\n {\n }", "protected function saveToCache() {}", "function wp_cache_add($key, $data, $group = '', $expire = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->add($key, $data, $group, (int) $expire);\n}", "protected function addCustomFieldset()\n {\n $this->meta = array_merge_recursive(\n $this->meta,\n [\n static::NOTE_FIELD_INDEX => $this->getFieldsetConfig(),\n ]\n );\n }", "private function set_metafile_fields(){\n\n\t\t\t// add more fields for your requierements\n $custom_fields = array( \n\t\t\t\t'field_name1'\t=> __( 'field name 1', self::$plugin_obj->class_name ),\n\t\t\t\t'field_name2'\t=> __( 'field name 2', self::$plugin_obj->class_name ),\n\t\t\t\t'field_name3'\t=> __( 'field name 3', self::$plugin_obj->class_name ),\n\t\t\t );\n\n\n foreach( $custom_fields as $custom_attrname => $custom_value){\n self::$metafile_fields->$custom_attrname = $custom_value;\n } \n\n }", "function acf_flush_field_cache($field)\n{\n}", "abstract protected function cacheData();", "public function cache()\n {\n add_settings_field(\n 'cache',\n apply_filters($this->plugin_name . 'label-cache', esc_html__('Cache', $this->plugin_name)),\n [$this->builder, 'checkbox'],\n $this->plugin_name,\n $this->plugin_name . '-library',\n [\n 'description' => 'Enable cacheing of your security.txt file.',\n 'id' => 'cache',\n 'class' => 'hide-when-disabled',\n 'value' => isset($this->options['cache']) ? $this->options['cache'] : false,\n ]\n );\n }", "public function cache() {\n if(!array_key_exists($this->steamId64, self::$steamIds)) {\n self::$steamIds[$this->steamId64] = $this;\n if(!empty($this->customUrl) &&\n !array_key_exists($this->customUrl, self::$steamIds)) {\n self::$steamIds[$this->customUrl] = $this;\n }\n }\n }", "function acf_flush_value_cache($post_id = 0, $field_name = '')\n{\n}", "protected function addOrderCustomFields(): void\n {\n $custom_field_set_id = md5('Viacash custom_field_set');\n\n $this->container->get('custom_field_set.repository')->upsert(\n [\n [\n 'id' => $custom_field_set_id,\n 'name' => 'custom_viacash',\n 'config' => [\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Viacash\", \"en-GB\" => \"Viacash\"]),\n \"translated\" => true\n ],\n 'active' => true,\n 'global' => false,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field_set_relation.repository')->upsert(\n [\n [\n 'id' => md5('Viacash custom_field_set_relation'),\n 'customFieldSetId' => $custom_field_set_id,\n 'entityName' => 'order',\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_checkout_token'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_checkout_token',\n 'type' => 'text',\n 'config' => [\n 'type' => 'text',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Barzahlen Checkout-Token\", \"en-GB\" => \"Viacash Checkout-Token\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"text\",\n \"customFieldPosition\" => 1\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_slip_id'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_slip_id',\n 'type' => 'text',\n 'config' => [\n 'type' => 'text',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Barzahlen Slip-ID\", \"en-GB\" => \"Viacash Slip-ID\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"text\",\n \"customFieldPosition\" => 2\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_division_id'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_division_id',\n 'type' => 'text',\n 'config' => [\n 'type' => 'text',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Interne Barzahlen Divisions-Nummer\", \"en-GB\" => \"Internal Viacash division number\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"text\",\n \"customFieldPosition\" => 3\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_is_sandboxed'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_is_sandboxed',\n 'type' => 'switch',\n 'config' => [\n 'type' => 'switch',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Barzahlen Sandbox-Transaktion\", \"en-GB\" => \"Viacash sandboxed transaction\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"switch\",\n \"customFieldPosition\" => 4\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_refundable_amount'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_refundable_amount',\n 'type' => 'number',\n 'config' => [\n 'type' => 'number',\n \"label\" => $this->injectFallbackLanguage([\n \"de-DE\" => \"Verbleibender per Barzahlen erstattbarer Betrag\",\n \"en-GB\" => \"Remaining amount that can be refunded with Viacash\",\n ]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"number\",\n \"customFieldPosition\" => 5\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_validity_days'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_validity_days',\n 'type' => 'number',\n 'config' => [\n 'type' => 'number',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Gültigkeitsdauer des Zahlscheins in Tagen\", \"en-GB\" => \"Days of payslip validity.\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"number\",\n \"customFieldPosition\" => 5\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n }", "function object_cache_add($key, $data, $flag = '', $expire = 0) {\n\tglobal $ts_object_cache;\n\n\treturn $ts_object_cache->add($key, $data, $flag, $expire);\n}", "function update_columns_cache()\n {\n $key = C_Photocrati_Transient_Manager::create_key('col_in_' . $this->get_table_name(), 'columns');\n global $wpdb;\n $this->_table_columns = array();\n $sql = \"SHOW COLUMNS FROM `{$this->get_table_name()}`\";\n foreach ($wpdb->get_results($sql) as $row) {\n $this->_table_columns[] = $row->Field;\n }\n C_Photocrati_Transient_Manager::update($key, $this->_table_columns);\n }", "public function updateCache();", "public function setUpCache();", "function add_custom_field($args) {\n register_rest_field( array(\"post\", \"page\"), 'wpnext', \n array(\n 'get_callback' => array( &$this, 'custom_field_get' ),\n 'update_callback' => array( &$this, 'custom_field_update' ),\n 'schema' => array(\n 'description' => \"Components and listed values.\",\n 'type' => 'object',\n 'context' => array('view', 'edit')\n )\n )\n );\n }", "protected static function addCache($key, $data)\n {\n \t$class = get_called_class();\n \tBaseEntityAbstract::$_entityCache[$class][$key] = $data;\n \treturn BaseEntityAbstract::$_entityCache[$class][$key];\n }", "function add($name, $key, $data) {\n if (!isset($this->cache[$name])) {\n $this->cache[$name] = array();\n }\n $this->cache[$name][$key] = $data;\n $data = json_encode($data);\n //error_log(\"Added to cache: '$name' key: '$key' data: '$data'\");\n }", "private function setup_cache() {\n // Set up non-persistent object caching groups\n wp_cache_add_non_persistent_groups( [ '_np_pedestal' ] );\n }", "public function setCustomFields ($order) {\n \n }", "function update_meta_cache($meta_type, $object_ids)\n {\n }", "protected function cache()\n {\n // Cache location items\n $this->locations->get(); // All\n $this->locations->menu(); // Menu\n $this->locations->mapItems(); // Map\n $this->locations->featured(); // Featured\n\n // Cache properties\n $this->properties->cacheAll(); // All\n $this->properties->specials();\n }", "private function addCustomFields() {\n if (function_exists('get_fields')) {\n foreach (self::getPostTypes() as $post_type) {\n register_rest_field($post_type, 'fields', [\n 'get_callback' => function ($post) {\n if (is_object($post)) {\n return get_fields($post->id);\n } elseif (is_array($post) && array_key_exists('id', $post)) {\n return get_fields($post['id']);\n }\n },\n ]);\n }\n }\n }", "public function add_field( $name, $field ) {\n\n\t\t$this->custom_fields[ $name ] = $field;\n\n\t}", "function _acf_apply_language_cache_key($key)\n{\n}", "protected function initializeCache() {}", "protected function initializeCache() {}", "public function saveCustom()\n {\n // Look through all of the updated fields to see if there are any Custom fields\n foreach ($this->updatedFields as $id => $updatedField) {\n\n // Translates WarrantyExpiration to \"Warranty Expiration\" for use with searching for the customID\n if (array_key_exists($updatedField, $this->customFieldMap)) {\n $realField = $this->customFieldMap[$updatedField];\n } else {\n $realField = $updatedField;\n }\n\n // Now see if Warranty Expiration is in the list of Custom fields\n if (array_key_exists($realField, $this->customFields)) {\n\n // If it is, get the ID needed for the API call\n $customID = $this->customFields[$realField];\n\n $args = [];\n $args['fieldId'] = $customID;\n // The value is stored in the main details array using WarrantyExpiration\n $args['value'] = $this->details->$updatedField;\n $args['id'] = $this->ID;\n $this->api->_request('POST', '/api/SetCustomFieldForAsset'.\"?\".http_build_query($args));\n // Remove it from the updatedFields list so the main save() doesn't try to update it\n unset($this->updatedFields[$id]);\n }\n }\n\n }", "function brag_add_meta_field($args) {\n \n $args['fields']['referral'] = '';\n $args['fields']['notes'] = '';\n $args['fields']['type'] = '';\n $args['fields']['lead_status'] = '';\n\n return $args;\n}", "public static function bootCacheTrait() {\n static::saving(function (Model $model) {\n $dirty = $model->getDirtyCached();\n\n $key = Helpers::cacheKey($model);\n if (!empty($dirty))\n lRedis::hmset($key . \":properties\", $dirty);\n }, 1000);\n }", "public function addField();", "function wck_add_meta(){\n\t\tparent::wck_add_meta();\n\t}", "public function testUpdateOrderCustomFields()\n {\n }", "public function getCustomFields() {\n }", "public function getCustomFields() {\n }", "public function addCustomFields()\n {\n if (!($enabled_custom_fields = $this->getDataManager()->getOption('custom_fields'))) {\n $enabled_custom_fields = array();\n }\n if (!($enabled_profile_fields = $this->getDataManager()->getOption('custom_fields_additional'))) {\n $enabled_profile_fields = array();\n }\n ?>\n <fieldset data-rm-target=\"#custom-fields .custom-field-select option\" id=\"profile-fields\" class=\"checkbox-list rm-ctrl syncstate\"<?php echo !$this->getDataManager()->getOption('enable_sync') ? ' disabled=\"disabled\"' : '' ?>>\n <?php foreach ($this->custom_fields as $custom_field): ?>\n <div>\n <label>\n <input class=\"profile-field-checkbox\" type=\"checkbox\" name=\"<?php echo $this->getViewKey().'[custom_fields_additional][]' ?>\" value=\"<?php echo $custom_field->getId() ?>\"<?php echo in_array($custom_field->getId(), $enabled_profile_fields) ? ' checked=\"checked\"' : '' ?> />\n <?php echo $custom_field->getName() ?> (<?php _e('customfield.type.'.$custom_field->getFieldType(), 'mgrt-wordpress') ?>)\n </label>\n </div>\n <?php endforeach; ?>\n </fieldset>\n <p class=\"description\"><?php _e('form.sync.field.custom.more.help', 'mgrt-wordpress') ?></p>\n <?php\n }", "protected function _updatefields() {}", "function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = \\false)\n {\n }", "private function cacheFetch() {\n //$data = cache_get($this->id, 'cache');;\n $data = NULL;\n if ($data) {\n foreach ($this->properties as $prop) {\n if (isset($data->data[$prop]) && !empty($data->data[$prop])) {\n $this->$prop = $data->data[$prop];\n }\n }\n }\n }", "function wp_cache_add_non_persistent_groups($groups)\n{\n global $wp_object_cache;\n\n $wp_object_cache->add_non_persistent_groups($groups);\n}", "function wp_cache_set($key, $data, $group = '', $expire = 0)\n {\n }", "public function testUpdateReplenishmentCustomFields()\n {\n }", "public function add_meta( $key, $value, $unique = false );", "function wp_api_encode_acf($data,$post,$context){\n $customMeta = (array) get_fields($post['ID']);\n\n $data['meta'] = array_merge($data['meta'], $customMeta );\n return $data;\n}", "function wp_cache_set($key, $value, $group = '', $expiration = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->set($key, $value, $group, $expiration);\n}", "function acf_cache_key($key = '')\n{\n}", "function &createCache() {}", "function acf_add_local_field($field, $prepared = \\false)\n{\n}", "function wp_cache_add_multiple(array $data, $group = '', $expire = 0)\n {\n }", "public function add_to_internal_cache($derived_key, $value)\n {\n $this->cache[$derived_key] = $value;\n }", "protected function loadFromCache() {}", "public function register_field()\n {\n }", "function wp_cache_set($key, $data, $group = '', $expire = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->set($key, $data, $group, (int) $expire);\n}", "function update_postmeta_cache($post_ids)\n {\n }", "function wp_cache_set( $key, $data, $group = '', $expire = 0 ) {\n\t\t// Intentionally empty\n\t}", "public function addExtraField($field,$value){\n $this->extraFields[$field] = $value;\n }", "function wp_cache_init()\n {\n }", "function mpfy_mt_map_location_custom_fields($custom_fields) {\n\n\t$custom_fields = mpfy_array_push_key($custom_fields, 'map_location_map', array(\n\t\t'map_location_tags'=>Carbon_Field::factory('map_tags', 'map_location_tags', 'Map Tags'),\n\t));\n\n\treturn $custom_fields;\n}", "function acf_append_data($name, $data)\n{\n}", "function addMeta() {\n\t\n\tif( class_exists('acf') ) {\n\n\t$meta_description = get_field('meta_description', 'option');\n\t$meta_keywords = get_field('meta_keywords', 'option');\n\t$meta_author = get_field('meta_author', 'option');\n\t$meta_og_image = get_field('meta_og_img', 'option');\n\t$meta_img_full = $meta_og_image['url'];\n\n\t}\n\n\tif ( $meta_description ) {\n\t\techo '<meta name=\"description\" content=\"'.$meta_description.'\">'; \n\t}\n\n\tif ( $meta_keywords ) {\n\t\techo '<meta name=\"keywords\" content=\"'.$meta_keywords.'\">'; \n\t}\n\n\tif ( $meta_author ) {\n\t\techo '<meta name=\"author\" content=\"'.$meta_author.'\">'; \n\t}\n\n\tif ( $meta_og_image ) {\n\t\techo '<meta name=\"twitter:card\" content=\"summary\" />';\n\t\techo '<meta property=\"og:image\" content=\"'.$meta_img_full.'\" />';\n\t}\n\n}", "function update_user_caches($user)\n {\n }", "public function injectFields()\n\t{\n\t\t$GLOBALS['TL_DCA']['tl_module']['palettes']['personalData'] = str_replace('newsletters;', 'newsletters,newsalerts;', $GLOBALS['TL_DCA']['tl_module']['palettes']['personalData']);\n\t\t$GLOBALS['TL_DCA']['tl_module']['palettes']['registration'] = str_replace('newsletters;', 'newsletters,newsalerts;', $GLOBALS['TL_DCA']['tl_module']['palettes']['registration']);\n\t}", "protected function update_cache_on_create()\n {\n Moebooru\\CacheHelper::expire_tag_version();\n }", "function wp_cache_add_non_persistent_groups($groups)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->add_non_persistent_groups($groups);\n}", "function wp_cache_add_non_persistent_groups($groups)\n {\n }", "public function cache() {\n $this->select(null,null,'slug asc');\n\t\tforeach ($this->cursor as $rec) {\n\t\t\t$this->cache[$rec->slug] = $rec->value;\n\t\t}\n\t}", "function acf_add_local_fields($fields = array())\n{\n}", "public function cacheObjectInfo($obj) {\n\t\t$this->_link_cache[$obj->id] = $obj->links;\n\t\t$this->_title_cache[$obj->id] = $obj->properties[\"cmis:name\"]; // Broad Assumption Here?\n\t\t$this->_objTypeId_cache[$obj->id] = $obj->properties[\"cmis:objectTypeId\"];\n\t\tif (isset($obj->properties[\"cmis:changeToken\"])) {\n\t\t\t$this->_changeToken_cache[$obj->id] = $obj->properties[\"cmis:changeToken\"];\n\t\t}\n\t}", "function simpleid_set_rp_info($realm, $rp_info) {\n if (!isset($rp_info['updated'])) $rp_info['updated'] = time();\n cache_set('rp-info', $realm, $rp_info, $rp_info['updated']);\n}", "static public function addCache($configuration) {\n\t\tif(!isset($configuration['cache_id'])) {\n\t\t\t$mComponentcache=new Maerdo_Model_Componentcache();\n\t\t\treturn($mComponentcache->insert(array('name'=>$configuration['name'],'type'=>$configuration['frontend_type'],'backend_type'=>$configuration['backend_type'])));\n\t\t}\n\t\t\n\t}", "public function addCustomField($index, $value) {\n $this->customField[$index] = $value;\n }", "public function inline_custom_data(){}", "public function setObjToCache($key, $value, $timeToCache = 0);", "public function addCustomField()\r\n {\r\n $data['field'] = array('custom_field_id' => '', 'label' => '', 'value' => '');\r\n echo $this->load->view('admin/jobs/custom-field', $data, TRUE);\r\n }", "public function setCustomField($name, $value){\r\n\t\t$this->_customFields[$name] = $value;\r\n\t}", "protected function initCaches() {}", "public function addCustomValue($name, $value) {\n $this->customValues[$name] = $value;\n // $this->addHiddenField('custom',$value);\n }", "static function set($name,$content){\n\t\tif(! self::$enable )\n\t\t\treturn $content;\n\t\tself::init();\n\t\t$i = cacheItem::getInstance($name);\n\t\t$i->content = $content;\n\t\tself::$backend->saveItem($i);\n\t\treturn $content;\n\t}", "private function _assignCustom($field, $value)\n {\n $this->custom[$field['COLUMN_NAME']] = $value;\n }", "public function saveToCache(){\r\n\t\t$n = \"hotspot_\" . $this->id;\r\n\r\n\t\t\\CacheHandler::setToCache($n,$this,20*60);\r\n\t}", "private function registerUsableFields(): void\n {\n $this->attributeList = $this->filterSystemControlFields(\n \\get_object_vars($this)\n );\n }", "function eve_api_set_page_cache($name, $data) {\n ctools_include('object-cache');\n ctools_object_cache_set('eve_api', $name, $data);\n}", "function wp_using_ext_object_cache($using = \\null)\n {\n }", "public function setCaching($cache);", "public function testUpdateExtraFields(): void { }", "function add_to_cache($className, $path)\n{\n global $cache_map, $cache_file;\n\n if(!empty($className))\n {\n if(!$cache_map)\n $cache_map = array();\n\n $cache_map[$className] = $path;\n\n file_put_contents($cache_file, '<?php ' . \"\\n\" . '$cache_map = ' .\"\\n\" . var_export($cache_map, true) . ';' );\n\n }\n}", "function update_custom_meta( $postID, $value, $field ) {\n if ( ! get_post_meta( $postID, $field ) ) {\n add_post_meta( $postID, $field, $value );\n } else {\n // or to update existing meta\n update_post_meta( $postID, $field, $value );\n }\n}", "private function cachePermissions(): void\n {\n Cache::put($this->cacheKey(), [\n 'isPayor' => $this->isPayor,\n 'isAgencyBankAccountSetup' => $this->isAgencyBankAccountSetup,\n 'canViewDocumentation' => $this->canViewDocumentation,\n ]);\n }", "protected function addFields()\n {\n $groupCustomOptionsName = CustomOptions::GROUP_CUSTOM_OPTIONS_NAME;\n $optionContainerName = CustomOptions::CONTAINER_OPTION;\n $commonOptionContainerName = CustomOptions::CONTAINER_COMMON_NAME;\n\n // Add fields to the option\n $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n [$optionContainerName]['children'][$commonOptionContainerName]['children'] = array_replace_recursive(\n $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n [$optionContainerName]['children'][$commonOptionContainerName]['children'],\n $this->getOptionFieldsConfig()\n );\n\n // Add fields to the values\n // $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n // [$optionContainerName]['children']['values']['children']['record']['children'] = array_replace_recursive(\n // $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n // [$optionContainerName]['children']['values']['children']['record']['children'],\n // $this->getValueFieldsConfig()\n // );\n }", "static function addCache($query,$rows,$fnId=\"\") {\n if (!$fnId) {\n $fnId=date(\"d-m-y-h-i-s\").rand(10000,99999).\".txt\"; \n } \n $cacheMap[] = [\"query\" => $query, \"fnId\" => $fnId];\n file_put_contents(Caching::getCachePath() . \"cachemap.txt\",$query.\"|\".$fnId.\"^\",FILE_APPEND | LOCK_EX);\n Caching::cacheWrite($fnId,$rows);\n Caching::logWrite(\"$query added to cache\");\n }", "function qw_field_meta_value( $fields ) {\n\t$show_silent_meta = QW_Settings::get_instance()->get( 'show_silent_meta', FALSE );\n\t// Create a unique cache name\n\t$_cache_name = md5(json_encode($fields));\n\t// Check if we have any cache for this\n\t$meta_fields = get_transient( $_cache_name );\n\tif ( !$meta_fields ) {\n\t\t$meta_fields = [];\n\t\t// add meta keys to field list\n\t\t$meta = qw_get_meta_keys();\n\t\tforeach ( $meta as $key ) {\n\t\t\t$field_key = 'meta_' . str_replace( \" \", \"_\", $key );\n\n\t\t\t$key_is_not_silent = ( substr( $key, 0, 1 ) != '_' && substr( $key,\n\t\t\t\t\t0,\n\t\t\t\t\t3 ) != 'ww-' && substr( $key, 0, 3 ) != 'ww_' );\n\n\t\t\t// show all keys if show_silent_meta is true\n\t\t\t// otherwise, show any key that is not silent\n\t\t\tif ( $show_silent_meta || $key_is_not_silent ) {\n\t\t\t\t$meta_fields[ $field_key ] = array(\n\t\t\t\t\t'title' => 'Custom Field: ' . $key,\n\t\t\t\t\t'description' => 'Custom Field data with key: ' . $key,\n\t\t\t\t\t'output_callback' => 'qw_display_post_meta_value',\n\t\t\t\t\t'output_arguments' => TRUE,\n\t\t\t\t\t'meta_key' => $key,\n\t\t\t\t\t'form_callback' => 'qw_meta_value_form_callback',\n\t\t\t\t\t'content_options' => TRUE,\n\t\t\t\t);\n\n\t\t\t}\n\t\t}\n\t\tset_transient( $_cache_name, $meta_fields, 900 );\n\t}\n\t$fields = array_merge($fields, $meta_fields);\n\treturn $fields;\n}", "public function enableCaching()\n {\n $this->cache = true;\n }", "public function _syncCustomMetadata($name) {}", "private function _loadOtherCountryFields()\n {\n $countries = \\App\\Countries::all();\n $countries->each(function ($country, $key) {\n if (!isset($this->_addAccountfields[$country->country_name]))\n $this->_addAccountfields[$country->country_name] = ['account_name', 'bank_name', 'swift_code', 'branch_address', 'account_number'];\n });\n }" ]
[ "0.7196821", "0.6219057", "0.620348", "0.615413", "0.613446", "0.60355854", "0.60291815", "0.59662825", "0.59468186", "0.59078306", "0.58914393", "0.58837587", "0.58808345", "0.5838609", "0.5833239", "0.58251417", "0.58195424", "0.5804406", "0.5745877", "0.57081306", "0.5683322", "0.56735593", "0.5664163", "0.5606485", "0.5591405", "0.5570317", "0.55643195", "0.5554744", "0.55529356", "0.55191547", "0.5482348", "0.5481362", "0.54750395", "0.5474756", "0.5464875", "0.54630756", "0.5432586", "0.5429407", "0.5407506", "0.5402034", "0.5402034", "0.5399513", "0.5396372", "0.53921205", "0.53880674", "0.5381232", "0.5374701", "0.5371101", "0.53677595", "0.5353539", "0.5343463", "0.5342675", "0.53414005", "0.533873", "0.5312416", "0.5303886", "0.52993846", "0.5290774", "0.5283334", "0.52677774", "0.52663624", "0.5261548", "0.52550673", "0.524425", "0.524174", "0.5238318", "0.522471", "0.5204156", "0.52021337", "0.51974195", "0.5189886", "0.51897085", "0.5188242", "0.5184695", "0.51821154", "0.5180021", "0.5179633", "0.5179194", "0.51770294", "0.5173293", "0.51678014", "0.5167733", "0.51671743", "0.5160231", "0.51588535", "0.51571876", "0.5151292", "0.5150292", "0.5145621", "0.51414126", "0.5141102", "0.51382613", "0.5137326", "0.5136898", "0.51303655", "0.51277316", "0.5108301", "0.5102487", "0.50949436", "0.50923795" ]
0.55707794
25
/ Get custom field by handle
public function getCustomFieldByHandle( $handle ) { return isset( $this->_customFields[ $handle ] ) ? $this->_customFields[ $handle ] : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_field(/* .... */)\n {\n return $this->_field;\n }", "function getFieldValue($field);", "public function getField($field_name);", "public function fetchField();", "public abstract function FetchField();", "public function getField();", "public function getField();", "public function getField();", "public function read(string $namespace, string $handle)\n {\n return $this->buildEntity(\n $this->client->get(sprintf(\n '%s/%s/%s:%s',\n $this->owner->uri(),\n 'custom-fields',\n $namespace,\n $handle\n )),\n CustomField::class\n );\n }", "public function __get($name) {\n\t\ttry {\n\t\t\treturn parent::__get($name);\n\t\t} catch (\\Exception $e) {\n\t\t\t// Is $name a field handle?\n\t\t\tif ($name != 'entryType' && $this->hasCustomField($name)) {\n\t\t\t\treturn $this->getFieldValue($name);\n\t\t\t}\n\n\t\t\t// Fine, throw the exception\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function getLookupField() {}", "public function getField($fieldName) {}", "function get_field($key, $page_id = 0) { /// get_field é para somente pegar o valor do que quero\n $id = $page_id !== 0 ? $page_id : get_the_ID();\n return get_post_meta($id, $key, true);\n }", "public function getField($slug);", "public function getField($name) { return $this->fields[$name]; }", "public function getField($pk = null)\n\t{\n\t\treturn parent::getRecord($pk);\n\t}", "function get_custom_field($key, $echo = FALSE) {\r\n global $post;\r\n $custom_field = get_post_meta($post->ID, $key, true);\r\n if ($echo == FALSE) return $custom_field;\r\n echo $custom_field;\r\n }", "public function get($field);", "public function get($field);", "public function getField($field_name) {\n $retval = NULL;\n // if field exists\n if (array_key_exists($field_name,$this->form_fields)) {\n $retval = $this->form_fields[$field_name];\n }\n return $retval;\n }", "public function getCustomField( $custom_id ) {\n\t\treturn $this->call( 'custom-fields/' . $custom_id, 'GET' );\n\t}", "function acf_get_raw_field($id = 0)\n{\n}", "public function getFieldValue(/*string*/ $fieldName);", "function get_field_object($selector, $post_id = \\false, $format_value = \\true, $load_value = \\true)\n{\n}", "function acf_get_meta_field($key = 0, $post_id = 0)\n{\n}", "public abstract function GetCurrentField();", "public function getFieldObject() {}", "function acf_get_field_reference($field_name, $post_id)\n{\n}", "public function __get($name)\n\t{\n\t\tif ($field = $this->_meta->field($name))\n\t\t{\n\t\t\treturn $this->get($name);\n\t\t}\n\t}", "private function getField($fieldName)\n {\n $form = $this->form;\n $field = $form->get($fieldName)->getConfig();\n $field->typeName = $this->getFieldTypeName($field);\n return $field;\n }", "private function _getField($field, array &$fieldHandleParts = null)\n {\n if (is_numeric($field)) {\n $fieldHandleParts = null;\n return Craft::$app->getFields()->getFieldById($field);\n }\n\n $fieldHandleParts = explode('.', $field);\n return $this->fields[$fieldHandleParts[0]] ?? null;\n }", "function news_get_field( $p_news_id, $p_field_name ) {\r\n\t\t$row = news_get_row( $p_news_id );\r\n\t\treturn ( $row[$p_field_name] );\r\n\t}", "function getField(){\n\t\treturn $this->Field;\n\t}", "function getfield($field){\n\n\t\treturn($this->record[$field]);\n\t}", "public function getField($field_name, $check_db_on_fail = true){\n if(isset($this->data[$this->alias][$field_name]))\n return $this->data[$this->alias][$field_name];\n else if($check_db_on_fail && $this->id)\n return $this->field($field_name);\n else\n return null;\n }", "function &getField($name){\n\t\t$fields =& $this->fields();\n\t\tif ( !isset($fields[$name]) ){\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn $fields[$name];\n\t\t}\n\t}", "public function getAttribute($fieldName)\n\t{\n\t\t$model = parent::getAttribute($fieldName);\n\t\t\n\t\tif ($model === null && $this->exists) {\n\t\t\t$model = CustomField::where([\n\t\t\t\t'parent_type' => get_class($this),\n\t\t\t\t'parent_id' => $this->id,\n\t\t\t\t'field_name' => $fieldName\n\t\t\t])->first();\n\t\t}\n\t\t\n\t\treturn $model;\n\t}", "public function getField()\n {\n return $this->_field;\n }", "function acf_get_reference($field_name, $post_id)\n{\n}", "public function getField(){\n return $this->field;\n }", "public function getFieldValue($fieldname)\n {\n return $this->{'get'.$fieldname}();\n }", "public function getFieldValue(Field $field, $model);", "function get_field($selector, $post_id = \\false, $format_value = \\true)\n{\n}", "public function getField(): string;", "public function retrieveFieldValue(Field $field, $model);", "public function get_field_name();", "public function getFieldName() {}", "public function getUserfield();", "function sc_get_post_meta( $id, $key ){\n\treturn (object)get_post_meta( $id, $key, true );\n}", "function get($field)\n {\n $fieldLc = strtolower($field);\n if (array_key_exists($fieldLc, self::$translate))\n $fieldLc = self::$translate[$fieldLc];\n\n switch($fieldLc)\n { // act on field name\n case 'name':\n {\n return $this->getName();\n }\n\n case 'nativename':\n {\n return $this->getNativeName();\n }\n\n case 'sorry':\n {\n return $this->getSorry();\n }\n\n case 'cc':\n {\n if (array_key_exists('cc', $this->extras))\n return $this->extras['cc'];\n else\n return null;\n }\n\n\n default:\n { // other fields\n return parent::get($fieldLc);\n } // other fields\n } // act on field name\n }", "function get_field($id=false, $field=false) {\n\t\tif(!$id && !$field) return false;\n\t\tglobal $wpdb;\n\t\t$query = \"SELECT wposts.$field FROM $wpdb->posts wposts WHERE wposts.ID=$id\";\n\t\t$results = $this->query($query);\n\t\tif(isset($results[0])) return $results[0]->$field;\n\t}", "public function get($field) {\r\n\t\treturn $this -> fields[$field];\r\n\t}", "public function __get ($field) {\n return $this->__fields[$field]['data'];\n }", "public function getField($name) {\n\t\treturn $this->fields[$name];\n\t}", "public function getFieldValue($fieldSlug, $locale = null);", "function getValueFromField()\r\n\t{\r\n\t\treturn $this->row[ key( $this->mapping ) ];\r\n\t}", "public function getCustom()\n {\n if (is_null($this->custom)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_CUSTOM);\n if (is_null($data)) {\n return null;\n }\n\n $this->custom = CustomFieldsModel::of($data);\n }\n\n return $this->custom;\n }", "function get_value_metaext($the_ID, $name, $single = true) {\r\n\t\t$retVal = get_post_meta($the_ID, $name, $single);\r\n\t\tif (!$retVal || $retVal == '')\r\n\t\t\t$retVal = null;\r\n\t\treturn $retVal;\r\n\t}", "public function getField() {\n\t\treturn $this->field; \n\t}", "function acf_get_field($id = 0)\n{\n}", "function acf_get_value($post_id = 0, $field)\n{\n}", "public function getField() {\n\t\treturn $this->_field;\n\t}", "public function _get($field) {\n\t\tif(property_exists($this, $field)) return $this->{$field}; \n\t\telse return NULL;\n\t}", "protected function getCustomFieldValue(string $fieldName)\n {\n if (!isset($this->details->Fields)) {\n return false;\n }\n foreach ($this->details->Fields as $field) {\n if ($field->FieldName == $fieldName) {\n return $field->Value;\n }\n }\n return false;\n }", "public function getField($name) {\n return $this->getFields()[$name];\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getCustomField($id)\n {\n return $this->customFields[$id];\n }", "function getValueFromField()\n {\n return $this->current_row[ key( $this->mapping ) ];\n }", "function getField ( $name )\n\t{\n\t\tif ( ake ( $name , $this->_fields ) )\n\t\t{\n\t\t\treturn $this->_fields[$name] ;\n\t\t}\n\t\treturn null ;\n\t}", "public function getSelectableField($fieldName);", "function get_post_field($field, $post = \\null, $context = 'display')\n {\n }", "public function __get($field){\n if ($field == 'usuario_id'){\n return $this->codigo;\n }\n else{\n return $this->fields[$field];\n }\n }", "public function get_field( $args, $name = '' ) {\n\n\t\tif ( empty( $name ) ) {\n\t\t\t$name = isset( $args['type'] ) ? $args['type'] : false;\n\t\t}\n\n\t\treturn $name ? $this->get_object( $name, 'field', $args ) : null;\n\t}", "public function getField($code_of_field) {\r\n\r\n\t\tif (isset ( $this->_data [\"details\"] ) && array_key_exists ( $code_of_field, $this->_data [\"details\"] )) {\r\n\t\t\treturn $this->_data [\"details\"] [$code_of_field] [\"value\"];\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "function sage_get_field( $key, $id=false, $format=true ) {\n\n global $post;\n\n $key = trim( filter_var( $key, FILTER_SANITIZE_STRING ) );\n $result = '';\n\n if ( function_exists( 'get_field' ) ) {\n if ( isset( $post->ID ) && !$id )\n $result = get_field( $key, $post->ID, $format);\n else\n $result = get_field( $key, $id, $format );\n }\n\n return $result;\n}", "function acf_get_local_field($key = '')\n{\n}", "public function getField() {\n\t\treturn $this->field;\n\t}", "public function getCustomFields() {\n }", "public function getCustomFields() {\n }", "function brag_rest_get_flamingo( $object, $field_name, $request ) {\n\n\treturn get_post_meta( $object[ 'id' ] );\n}", "function FetchField($off = 0)\n\t{\n\n\t\t$o= new ADOFieldObject();\n\t\t$o->name = @pg_field_name($this->_queryID,$off);\n\t\t$o->type = @pg_field_type($this->_queryID,$off);\n\t\t$o->max_length = @pg_fieldsize($this->_queryID,$off);\n\t\treturn $o;\n\t}", "public function getValue($fieldname, $raw = true);", "public static function field($model, $field, $name = FALSE)\n\t{\n\t\tif (FALSE == ($meta = Jelly_Meta::get($model)))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Check to see if the field is aliased\n\t\tif (isset($meta->aliases[$field]))\n\t\t{\n\t\t\t$field = $meta->aliases[$field];\n\t\t}\n\t\t\n\t\tif (isset($meta->fields[$field]))\n\t\t{\n\t\t\tif ($name)\n\t\t\t{\n\t\t\t\treturn $field;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $meta->fields[$field];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}", "public function getField($name)\n {\n return $this->fields[$name];\n }", "public function findField(string $nativeName, string $class=null): Field;", "public function getField()\n {\n $value = $this->name;\n if (null != $this->field) {\n $value = $this->field;\n }\n return $value;\n }", "public function getCustomFieldValueByName($name) {\n return Doctrine::getTable('ArticleCustomFieldValue')->getByArticleAndName($this, $name);\n }", "public function __get($field){\n if ($field == 'ENTIDAD_ID'){\n return $this->codigo;\n }\n else{\n return $this->fields;\n }\n }", "function f($field) {\n\t\treturn($this->fetchfield($field));\n\t}", "function get($field) {\n\t\tif(!is_string($field)) {\n\t\t\ttrigger_error(\"Parameter for model->get() must be a string\", E_USER_WARNING);\n\t\t\treturn null;\n\t\t}\n\n\t\tif (method_exists($this, 'get_'.$field)) {\n\t\t\t$args = func_get_args();\n\t\t\tarray_shift($args);\n\n\t\t\treturn call_user_func_array(array(& $this, 'get_'.$field), $args);\n\t\t}\n\n\t\t$result = $this->find_associated($field);\n\n\t\tif (!is_null($result)) {\n\t\t\treturn $result;\n\t\t}\n\n\t\tif (isset($this->data[$field])) {\n\t\t\treturn $this->data[$field];\n\t\t}\n\n\t}", "public function getIdentifierField();", "function get_field($name)\r\n {\r\n if ($name)\r\n {\r\n $tempArray = fetch_to_array(database::query(\"SELECT * FROM system WHERE name='$name'\"),\"\");\r\n if (is_array($tempArray)) return(current($tempArray));\r\n }\r\n else return (false);\r\n }", "protected function _getReferenceField($name) {\r\n \treturn $this->_referenceMap[$name]['field'];\r\n }", "public function __get($name) \n {\n if(isset($this->fields[$name]))\n return $this->fields[$name];\n else\n return null;\n }", "public function __get($field)\n {\n if ($field == 'userId')\n {\n return $this->uid;\n }\n else \n {\n return $this->fields[$field];\n }\n }", "public function getFieldFromModel($field)\n {\n return Data::getAdvanced(\n $this->model->fieldsIndex[$field],\n $this->model->fields[$this->model->fieldsIndex[$field]],\n static::FIELD_PREFIX . $this->getID(),\n $this,\n );\n }", "public function getValue($field) {\n if (array_key_exists($field, $this->data)) {\n return $this->data[$field];\n } else {\n die(\"Campo no encontrado\");\n }\n}" ]
[ "0.6743048", "0.66129315", "0.658516", "0.6584583", "0.6552164", "0.6547368", "0.6547368", "0.6547368", "0.64589196", "0.64382464", "0.6419736", "0.64177483", "0.6411223", "0.63991964", "0.6340991", "0.6310624", "0.62988573", "0.62436473", "0.62436473", "0.62366986", "0.6222108", "0.61571246", "0.6140616", "0.6131201", "0.6127636", "0.61238956", "0.60759073", "0.6075873", "0.60600317", "0.6025631", "0.60224104", "0.60212576", "0.6020993", "0.6011724", "0.60073364", "0.6001271", "0.5988705", "0.59815705", "0.59714884", "0.5968781", "0.5940208", "0.59360236", "0.59325874", "0.59266806", "0.5912903", "0.5910441", "0.590472", "0.5898476", "0.58974", "0.5887104", "0.58845687", "0.58787066", "0.5873835", "0.58628076", "0.5857846", "0.5856781", "0.5843506", "0.5837478", "0.5835686", "0.5835114", "0.58327967", "0.5825349", "0.5823655", "0.5819357", "0.58155906", "0.581138", "0.581138", "0.581138", "0.581138", "0.5811067", "0.58084935", "0.5804096", "0.58019143", "0.5801695", "0.5794038", "0.5791593", "0.5791037", "0.57890606", "0.57886505", "0.5783709", "0.5782274", "0.5782274", "0.5778474", "0.5775831", "0.5773975", "0.5773878", "0.5767692", "0.57649195", "0.5751512", "0.57473695", "0.5740865", "0.5729984", "0.57229865", "0.5713678", "0.57128817", "0.57104766", "0.5707977", "0.5706261", "0.5705536", "0.56961924" ]
0.7060629
0
/ Add a FieldLayoutModel's fields to the cache
public function getCustomFieldsFromFieldLayout( FieldLayoutModel $fieldLayout ) { $fields = array(); $fieldLayoutFieldModels = $fieldLayout->getFields(); foreach ( $fieldLayoutFieldModels as $fieldLayoutFieldModel ) { if ( ! in_array( $fieldLayoutFieldModel->field->getFieldType()->name, $this->getUnsupportedFieldTypes() ) ) { $fields[ $fieldLayoutFieldModel->field->handle ] = $fieldLayoutFieldModel->field; } } return $fields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cacheFieldInfo() {}", "protected function addFieldConfigs()\n {\n\n $this[\"flexibleLayoutProxy\"] = function ($c) {\n return new FlexibleLayoutProxy($c);\n };\n\n }", "public function addConfigFields(\\MUtil_Model_ModelAbstract $orgModel);", "private function loadFields() {\n\t\tif (count($this->fields) > 0) return;\n\t\t$db = getDB();\n\t\t$stat = $db->prepare(\"SELECT * FROM collection_has_field WHERE collection_id=:cid ORDER BY sort_order DESC\");\n\t\t$stat->execute(array('cid'=>$this->collection_id));\n\t\twhile($d = $stat->fetch()) {\n\t\t\tif ($d['type'] == \"STRING\") {\n\t\t\t\t$this->fields[] = new ItemFieldString( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"TEXT\") {\n\t\t\t\t$this->fields[] = new ItemFieldText( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"HTML\") {\n\t\t\t\t$this->fields[] = new ItemFieldHTML( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"EMAIL\") {\n\t\t\t\t$this->fields[] = new ItemFieldEmail( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"PHONE\") {\n\t\t\t\t$this->fields[] = new ItemFieldPhone( $d, $this->collection_id, $this);\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"We don't know about type: \".$d['type']);\n\t\t\t}\n\t\t}\n\t}", "private function createFields(){\n //Human::log(\"------------- Create fields model \".$this->modelName);\n self::$yetInit[get_class($this)]=true;\n //let's init database.\n $modelName=get_class($this);\n $modelNameManager=$modelName.\"Manager\";\n if(!class_exists($modelNameManager)){\n $modelNameManager=\"DbManager\";\n }\n $rc=new ReflectionClass($modelName);\n $rc->setStaticPropertyValue(\"manager\", new $modelNameManager( $modelName ));\n \n //browse the class properties to find db fields and then store it in a good order (keys first, associations later)\n\t $fields=array();\n foreach ($rc->getProperties() as $field){\n if($field->isPublic()){\n\n\n //get the type from the @var type $field name comment...yes, I'm sure.\n $comments=$field->getDocComment();\n $details=CodeComments::getVariable($comments);\n\n $type=$details[\"type\"];\n $isVector=$details[\"isVector\"];\n $description=$details[\"description\"];\n $fieldName=$field->name;\n\n $fieldObject=$this->getDbField($fieldName,$type,$isVector);\n\n if($fieldObject){\n $fieldObject[\"comments\"]=$description;\n switch($fieldObject[\"type\"]){\n\n case \"OneToOneAssoc\":\n case \"NToNAssoc\":\n //associations at the end\n array_push($fields, $fieldObject);\n break;\n\n default :\n //classic fields at the beginning\n array_unshift($fields, $fieldObject);\n\n }\n\n }\n }\n }\n\t //create the fields\n\t foreach ($fields as $f){\n\t\t$f[\"options\"][Field::COMMENTS]=$f[\"comments\"];\n Field::create($modelName.\".\".$f[\"name\"],$f[\"type\"],$f[\"options\"]);\n //Human::log($this->modelName.\" Create field \".$f[\"name\"]);\n \n\t }\n \n\t //whooho!\n $this->db()->init(); \n }", "function acf_flush_field_cache($field)\n{\n}", "protected function _updatefields() {}", "public function _set_model_fields(){\n // set fields only when they have not been set for this object\n if($this->_fields_loaded===FALSE){\n\n foreach ($this->_meta() as $meta) {\n\n $this->{$meta->name} = '';\n }\n }\n }", "public function addFieldToModel($field)\n {\n\t$sql= $this->sql('insert into [fields] values( null, %s, %s, %s, %s)',\n\t $field->getName(),\n\t $field->getModel()->getTableName(),\n\t $field->getHash(),\n\t get_class($field));\n\n\t$this->queue(\n\t PerfORMStorage::FIELD_ADD,\n\t $field->getName().'|'.$field->getModel()->getTableName(),\n\t $sql,\n\t array(\n\t\t'field' => $field,\n\t\t)\n\t);\n\n\t$key= $field->getHash().'|'.$field->getModel()->getTableName();\n\tif ( key_exists($key, $this->renamedFields))\n\t{\n\t $array= $this->renamedFields[$key];\n\t $array->counter++;\n\t $array->to= $field->getName();\n\t}\n\telse\n\t{\n\t $this->renamedFields[$key]= (object) array(\n\t 'counter' => 1,\n\t 'to' => $field->getName(),\n\t 'modelName' => $field->getModel()->getTableName(),\n\t );\n\t}\n }", "private function _fieldModelCreateData()\n {\n return [\n 'designFieldModel' => [\n 'shortCardContainerDesignBlockModel' => [\n 'marginTop' => 10\n ],\n 'shortCardLabelDesignBlockModel' => [\n 'marginTop' => 20\n ],\n 'shortCardLabelDesignTextModel' => [\n 'size' => 30\n ],\n 'shortCardValueDesignBlockModel' => [\n 'marginTop' => 40\n ],\n ],\n ];\n }", "abstract protected function loadFields();", "function add_sections_and_fields(): void {}", "public function getFields() {\n if($this->cachedFields == null) {\n $this->cachedFields = $this->createFields();\n }\n\n return $this->cachedFields;\n }", "function _set_editable_fields()\n\t{\n\t\tif (empty($this->fields))\n\t\t{\n\t\t\t// pull the fields dynamically from the database\n\t\t\t$this->db->cache_on();\n\t\t\t$this->fields = $this->db->list_fields($this->primary_table);\n\t\t\t$this->db->cache_off();\n\t\t}\n\t}", "public function addField();", "public function fieldLayout(): FieldLayout;", "protected function populateFields()\n {\n $currentLocale = TranslateLocale::current_locale();\n\n $fields = FieldList::create(TabSet::create('Root', Tab::create('Main')));\n\n $fields->push(HiddenField::create('Locale', 'Locale', $currentLocale));\n $fields->addFieldToTab('Root.Main', Language\\Fields\\LocaleSwitcher::create('LocaleSwitcher'));\n\n $groups = [];\n\n TranslateService::flush();\n\n ksort($this->translations);\n\n foreach ($this->translations as $entity => $translation) {\n list($group, $key) = explode('.', $entity);\n\n $groups[$group][$key] = TextField::create($entity, $this->niceLabel($key))\n ->setValue(TranslateService::lookup_translation($entity, $currentLocale))\n ->setDescription(Convert::raw2xml(TranslateService::translate($entity, $translation, null, 'en')));\n }\n\n foreach ($groups as $groupName => $subFields) {\n $fields->addFieldToTab('Root.Main', ToggleCompositeField::create($groupName, $groupName, $subFields));\n }\n\n $this->setFields($fields);\n }", "public function updateSortingFormFields()\n {\n global $rlDb;\n\n if (!$GLOBALS['config']['cache']) {\n return false;\n }\n\n $this->removeFiles('cache_sorting_forms_fields');\n\n $rlDb->setTable('categories');\n\n if ($categories = $rlDb->fetch(array('ID', 'Key'))) {\n foreach ($categories as $value) {\n $category_id = (int) $value['ID'];\n\n $sql = \"SELECT `T2`.`Key`, `T2`.`Type`, `T2`.`Default`, `T2`.`Condition`, `T2`.`Details_page`, \";\n $sql .= \"`T2`.`Multilingual`, `T2`.`Opt1`, `T2`.`Opt2`, `T2`.`Contact` \";\n $sql .= \"FROM `{db_prefix}sorting_forms` AS `T1` \";\n $sql .= \"LEFT JOIN `{db_prefix}listing_fields` AS `T2` ON `T1`.`Field_ID` = `T2`.`ID` \";\n $sql .= \"WHERE `T1`.`Category_ID` = {$category_id} ORDER BY `T1`.`Position`\";\n\n if ($fields = $rlDb->getAll($sql, 'Key')) {\n $out[$category_id] = $fields;\n }\n }\n\n $this->set('cache_sorting_forms_fields', $out);\n }\n }", "function get_member_fields()\n\t{\n\t\t//--------------------------------------------\n\t\t// Prep Cache, Return if Set\n\t\t//--------------------------------------------\n\n\t\t$cache_name = __FUNCTION__;\n\t\t$cache_hash = $this->_imploder(func_get_args());\n\n\t\tif (isset($this->cached[$cache_name][$cache_hash]))\n\t\t{\n\t\t\treturn $this->cached[$cache_name][$cache_hash];\n\t\t}\n\n\t\t$this->cached[$cache_name][$cache_hash] = array();\n\n\t\t//--------------------------------------------\n\t\t// Perform the Actual Work\n\t\t//--------------------------------------------\n\n\t\t$query = ee()->db\n\t\t\t\t\t->select(\n\t\t\t\t\t\t'm_field_id,\n\t\t\t\t\t\tm_field_name,\n\t\t\t\t\t\tm_field_label,\n\t\t\t\t\t\tm_field_type,\n\t\t\t\t\t\tm_field_list_items,\n\t\t\t\t\t\tm_field_required,\n\t\t\t\t\t\tm_field_public,\n\t\t\t\t\t\tm_field_fmt'\n\t\t\t\t\t)\n\t\t\t\t\t->get('member_fields');\n\n\t\tforeach ($query->result_array() as $row)\n\t\t{\n\t\t\t$this->cached[$cache_name][$cache_hash][$row['m_field_name']] = array(\n\t\t\t\t'id'\t\t=> $row['m_field_id'],\n\t\t\t\t'label'\t\t=> $row['m_field_label'],\n\t\t\t\t'type'\t\t=> $row['m_field_type'],\n\t\t\t\t'list'\t\t=> $row['m_field_list_items'],\n\t\t\t\t'required'\t=> $row['m_field_required'],\n\t\t\t\t'public'\t=> $row['m_field_public'],\n\t\t\t\t'format'\t=> $row['m_field_fmt']\n\t\t\t);\n\t\t}\n\n\t\t//--------------------------------------------\n\t\t// Return Data\n\t\t//--------------------------------------------\n\n\t\treturn $this->cached[$cache_name][$cache_hash];\n\t}", "function _get_fields()\n\t{\n\t\tglobal $DB;\n\t\n\t\tif ( ! isset($this->cache['fields']))\n\t\t{\n\t\t\t$this->cache['fields'] = array();\n\n\t\t\t$query = $DB->query('SELECT field_id FROM exp_weblog_fields\n\t\t\t WHERE field_type = \"ftype_id_'.$this->_fieldtype_id.'\"');\n\t\t\tif ($query->num_rows)\n\t\t\t{\n\t\t\t\tforeach($query->result as $row)\n\t\t\t\t{\n\t\t\t\t\t$this->cache['fields'][] = 'field_id_'.$row['field_id'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->cache['fields'];\n\t}", "public function clearCachedFieldInfo() {}", "public function afterFetch()\n {\n foreach ($this->formfields as $field) {\n $this->fields[$field->fieldKey] = $field->fieldName;\n }\n }", "public function addFields()\n {\n // add field\n $this->addField(new DataObject([\n 'key' => 'css_class',\n 'type' => 'multiselect',\n 'values' => $this->cssClassRowModel->toOptionArray(),\n 'label' => __('CSS Class'),\n ]));\n\n // add save button\n $this->addField(new DataObject([\n 'key' => 'save',\n 'type' => 'note',\n 'label' => ' ',\n 'options' => [\n 'text' => $this->getButtonHtml(\n __('Save'),\n 'window.pageDesignerConfig.setSettings.bind(this)()',\n 'action-primary save-settings'\n ),\n ],\n ]));\n\n return $this;\n }", "public function buildFields() {\n }", "public function set_fields() {\n $this->fields = apply_filters('wpucommentmetas_fields', $this->fields);\n foreach ($this->fields as $id => $field) {\n if (!is_array($field)) {\n $this->fields[$id] = array();\n }\n if (!isset($field['label'])) {\n $this->fields[$id]['label'] = ucfirst($id);\n }\n if (!isset($field['admin_label'])) {\n $this->fields[$id]['admin_label'] = $this->fields[$id]['label'];\n }\n if (!isset($field['type'])) {\n $this->fields[$id]['type'] = 'text';\n }\n if (!isset($field['help'])) {\n $this->fields[$id]['help'] = '';\n }\n if (!isset($field['required'])) {\n $this->fields[$id]['required'] = false;\n }\n if (!isset($field['admin_visible'])) {\n $this->fields[$id]['admin_visible'] = true;\n }\n if (!isset($field['admin_column'])) {\n $this->fields[$id]['admin_column'] = false;\n }\n if (!isset($field['admin_list_visible'])) {\n $this->fields[$id]['admin_list_visible'] = false;\n }\n if (!isset($field['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array(\n 'comment_form_logged_in_after',\n 'comment_form_after_fields'\n );\n }\n if (!is_array($this->fields[$id]['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array($this->fields[$id]['display_hooks']);\n }\n }\n }", "protected function ensureFieldCacheWarmed($className)\n {\n if (!isset($this->fields[$className])) {\n $this->fields[$className] = [];\n\n $entityModel = $this->findEntityModel($className);\n if ($entityModel) {\n $fields = $entityModel->getFields();\n foreach ($fields as $model) {\n $this->fields[$className][$model->getFieldName()] = $model;\n }\n }\n }\n }", "public function updateFeaturedFormFields()\n {\n global $config, $rlListingTypes, $rlDb;\n\n if (!$config['cache']) {\n return false;\n }\n\n $rlDb->setTable('categories');\n $categories = $rlDb->fetch(array('ID', 'Key'));\n\n foreach ($categories as $key => $value) {\n $sql = \"SELECT `T2`.`Key`, `T2`.`Type`, `T2`.`Default`, `T2`.`Condition`, `T2`.`Details_page`, `T2`.`Multilingual`, `T2`.`Opt1`, `T2`.`Opt2`, `T2`.`Contact` \";\n $sql .= \"FROM `{db_prefix}featured_form` AS `T1` \";\n $sql .= \"LEFT JOIN `{db_prefix}listing_fields` AS `T2` ON `T1`.`Field_ID` = `T2`.`ID` \";\n $sql .= \"WHERE `T1`.`Category_ID` = '{$value['ID']}' ORDER BY `T1`.`Position`\";\n\n $fields = $rlDb->getAll($sql, 'Key');\n if ($fields) {\n $out[$value['ID']] = $fields;\n }\n }\n unset($categories);\n\n $this->set('cache_featured_form_fields', $out);\n }", "public function reportFields() {\n $views = $this->entityTypeManager()->getStorage('view')->loadMultiple();\n\n // Fetch all fieldapi fields which are used in views\n // Therefore search in all views, displays and handler-types.\n $fields = [];\n $handler_types = ViewExecutable::getHandlerTypes();\n foreach ($views as $view) {\n $executable = $view->getExecutable();\n $executable->initDisplay();\n foreach ($executable->displayHandlers as $display_id => $display) {\n if ($executable->setDisplay($display_id)) {\n foreach ($handler_types as $type => $info) {\n foreach ($executable->getHandlers($type, $display_id) as $item) {\n $table_data = $this->viewsData->get($item['table']);\n if (isset($table_data[$item['field']]) && isset($table_data[$item['field']][$type])\n && $field_data = $table_data[$item['field']][$type]) {\n // The final check that we have a fieldapi field now.\n if (isset($field_data['field_name'])) {\n $fields[$field_data['field_name']][$view->id()] = $view->id();\n }\n }\n }\n }\n }\n }\n }\n\n $header = [t('Field name'), t('Used in')];\n $rows = [];\n foreach ($fields as $field_name => $views) {\n $rows[$field_name]['data'][0]['data']['#plain_text'] = $field_name;\n foreach ($views as $view) {\n $rows[$field_name]['data'][1][] = Link::fromTextAndUrl($view, new Url('entity.view.edit_form', ['view' => $view]))->toString();\n }\n $item_list = [\n '#theme' => 'item_list',\n '#items' => $rows[$field_name]['data'][1],\n '#context' => ['list_style' => 'comma-list'],\n ];\n $rows[$field_name]['data'][1] = ['data' => $item_list];\n }\n\n // Sort rows by field name.\n ksort($rows);\n $output = [\n '#type' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n '#empty' => t('No fields have been used in views yet.'),\n ];\n\n return $output;\n }", "protected abstract function setFields();", "public static function buildViewModelFields() {\n global $_DIMS;\n global $skin;\n // construction du tableau de présentation des champs\n $data =array();\n $elements=array();\n\n // collecte des données de la base\n $fields=import_fichier_modele::getModelFields();// import_fichier_assureur::getModelFields();\n\n // headers\n $data['headers'][]=$_DIMS['cste']['_DIMS_LABEL'];\n $data['headers'][]=$_DIMS['cste']['_TYPE'];\n $data['headers'][]=$_DIMS['cste']['_FIELD_NEEDED'];\n $data['headers'][]=$_DIMS['cste']['_DIMS_COMMENTS'];\n\n // construction des données à afficher\n foreach ($fields as $f) {\n $elem=array();\n // traduction libelle\n if (isset($_DIMS['cste'][$f['libelle']])) {\n $elem[0]=$_DIMS['cste'][$f['libelle']];\n }\n else {\n $elem[0]=$f['libelle'];\n }\n\n // traduction libelletype\n if (isset($_DIMS['cste'][$f['libelletype']])) {\n $elem[1]=$_DIMS['cste'][$f['libelletype']];\n }\n else {\n $elem[1]=$f['libelletype'];\n }\n\n if ($f['obligatoire']==1) {\n $elem[2]='<img src =\"./common/img/publish.png\">';\n }\n else {\n $elem[2]='&nbsp;';\n }\n\n // traduction help_constant\n if (isset($_DIMS['cste'][$f['help_constant']])) {\n $elem[3]=$_DIMS['cste'][$f['help_constant']];\n }\n else {\n $elem[3]=$f['help_constant'];\n }\n\n $elements[]=$elem;\n }\n\n //elements of table\n $data['data']['elements']=$elements;\n echo '<div style=\"margin-top:10px;clear:both;float:left;width:100%;\">'.$skin->displayArray($data).'</div>';\n }", "function layout_builder_post_update_add_extra_fields(&$sandbox = NULL) {\n $entity_field_manager = \\Drupal::service('entity_field.manager');\n \\Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'entity_view_display', function (LayoutEntityDisplayInterface $display) use ($entity_field_manager) {\n if (!$display->isLayoutBuilderEnabled()) {\n return FALSE;\n }\n\n $extra_fields = $entity_field_manager->getExtraFields($display->getTargetEntityTypeId(), $display->getTargetBundle());\n $components = $display->getComponents();\n // Sort the components to avoid them being reordered by setComponent().\n uasort($components, 'Drupal\\Component\\Utility\\SortArray::sortByWeightElement');\n $result = FALSE;\n foreach ($components as $name => $component) {\n if (isset($extra_fields['display'][$name])) {\n $display->setComponent($name, $component);\n $result = TRUE;\n }\n }\n return $result;\n });\n}", "private function loadFields(){\n\t\t$this->fields = $this->wpdb->get_results($this->wpdb->prepare(\"\n\t\t\tSELECT\n\t\t\t\t`field`.`id` \t\t\t'field_id',\n\t\t\t\t`type`.`name` \t\t\t'type',\n\t\t\t\t`field`.`name`\t\t\t'name',\n\t\t\t\t`field`.`label`\t\t\t'label',\n\t\t\t\t`field`.`default`\t\t'default',\n\t\t\t\t`field`.`required`\t\t'required',\n\t\t\t\t`field`.`depends_id`\t'depends_id',\n\t\t\t\t`field`.`depends_value`\t'depends_value',\n\t\t\t\t`field`.`placeholder`\t'placeholder'\n\t\t\tFROM `mark_reg_fields` `field`\n\t\t\tLEFT JOIN `mark_reg_field_types` `type` ON `type`.`id` = `field`.`type_id`\n\t\t\tWHERE\n\t\t\t\t`field`.`enabled` = 1\n\t\t\t\tAND `field`.`form_id` = %d\n\t\t\t\tAND `field`.`backend_only` = 0\n\t\t\tORDER BY\n\t\t\t\t`field`.`order`\n\t\t\", $this->form_id));\n\t}", "public function load_field(){\r\n $this->layout=\"ajax\";\r\n $module=$_POST['module'];\r\n $this->loadModel($module);\r\n $field_names= Set::extract('/COLUMNS/Field',$this->$module->query(\"DESCRIBE {$this->$module->useTable}\"));\r\n $field= array_combine($field_names, $field_names);\r\n $this->set(compact('field'));\r\n }", "protected function cacheModel()\n {\n $xmlObject = $this->getSimpleXmlObject();\n if ($xmlObject === null) {\n return;\n }\n\n $this->cache = $this->convertItem($xmlObject);\n }", "abstract protected function createFields();", "private function setFields(): void\n {\n $fields = acf_get_block_fields(array('name' => 'acf/' . strtolower(str_replace('-', '', $this->getId()))));\n if (!empty($fields)) {\n if ('data' === $fields[0]['name']) {\n $parsedFields = $this->parseField($fields[0]);\n if (!empty($parsedFields['data'])) {\n $this->fields = $parsedFields['data'];\n }\n }\n }\n }", "public function updateSearchFields()\n {\n global $config, $rlListingTypes, $rlDb;\n\n if (!$config['cache']) {\n return false;\n }\n\n $sql = \"SELECT `T1`.`Category_ID`, `T1`.`ID`, `T1`.`Fields`, `T2`.`Key` AS `Form_key` \";\n $sql .= \"FROM `{db_prefix}search_forms_relations` AS `T1` \";\n $sql .= \"LEFT JOIN `{db_prefix}search_forms` AS `T2` ON `T1`.`Category_ID` = `T2`.`ID` \";\n $sql .= \"WHERE `T2`.`Status` = 'active' \";\n $sql .= \"ORDER BY `Position` \";\n $relations = $rlDb->getAll($sql);\n\n if (!$relations) {\n return false;\n }\n\n foreach ($relations as $key => $value) {\n $sql = \"SELECT `ID`, `Key`, `Type`, `Default`, `Values`, `Condition`, `Details_page`, `Opt1`, `Opt2`, \";\n $sql .= \"`Multilingual`, FIND_IN_SET(`ID`, '{$value['Fields']}') AS `Order` \";\n $sql .= \"FROM `{db_prefix}listing_fields` \";\n $sql .= \"WHERE FIND_IN_SET(`ID`, '{$value['Fields']}' ) > 0 AND `Status` = 'active' \";\n $sql .= \"ORDER BY `Order`\";\n $fields = $rlDb->getAll($sql, 'Key');\n\n $out[$value['Form_key']] = array_merge($out[$value['Form_key']] ?: array(), $fields);\n unset($fields);\n }\n unset($relations);\n\n $this->set('cache_search_fields', $out);\n }", "function components_rebuildcache()\n\t{\n\t\t$this->ipsclass->cache['components'] = array();\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'com_id,com_enabled,com_section,com_filename,com_url_uri,com_url_title,com_position',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'components',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'com_enabled=1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'order' => 'com_position ASC' ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->cache['components'][] = $r;\n\t\t}\n\n\t\t$this->ipsclass->update_cache( array( 'name' => 'components', 'array' => 1, 'deletefirst' => 1 ) );\n\t}", "public abstract function createFields();", "private function parseFields(): void\n {\n foreach ($this->reflect->getProperties() as $item) {\n $name = $item->getName();\n if (in_array($name, self::SKIP_FIELDS, true)) {\n continue;\n }\n\n $docblock = $item->getDocComment();\n $defType = $this->getFieldType($name, $docblock);\n $varType = $this->getVarType($name, $docblock);\n $isRequired = $this->isRequired($name, $docblock);\n $storage = &$this->fieldsBuffer[$defType];\n\n switch ($defType) {\n case self::FIELD_SIMPLE_TYPE:\n $storage[] = $this->processSimpleField($name, $varType, $isRequired);\n break;\n case self::FIELD_DATE_TYPE:\n $storage[] = $this->processDateField($name, $varType, $isRequired);\n break;\n case self::FIELD_MO_TYPE:\n $storage[] = $this->processManyToOneField($name, $varType, $isRequired);\n break;\n case self::FIELD_OM_TYPE:\n $storage[] = $this->processOneToManyField($name);\n break;\n }\n }\n\n unset($storage);\n }", "public static function onAfterGroupAdd(&$fields)\n {\n static::deleteCacheByTag(static::getCacheTag());\n }", "function &fields(){\n\t\t// check the cache first.\n\t\tif ( isset($this->_cache[__FUNCTION__]) ){\n\t\t\treturn $this->_cache[__FUNCTION__];\n\t\t}\n\t\t\n\t\t// it is not in the cache yet, let's calculate it.\n\t\t$out = array();\n\t\t$data = $this->_parseSQL();\n\t\t$this->_expandGlobs($data);\n\t\t$numCols = count($data['columns']);\n\t\tfor ($i=0; $i<$numCols; $i++){\n\t\t\t$column = $data['columns'][$i];\n\t\t\tif ( $column['type'] == 'ident' ){\n\t\t\t\t// This column is just a normal column that is drawn from a table.\n\t\t\t\t// vs. the alternative which is a function.\n\t\t\t\tif ( $column['table'] ){\n\t\t\t\t\t$table =& $this->getTableOrView($column['table']);\n\t\t\t\t} else {\n\t\t\t\t\tif ( $column['alias'] ){\n\t\t\t\t\t\t$key = $column['alias'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$key = $column['value'];\n\t\t\t\t\t}\n\t\t\t\t\t$tablename = $this->guessColumnTableName($key);\n\t\t\t\t\t$table =& $this->getTableOrView($tablename);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$out[$key] =& $table->getField($key);\n\t\t\t\tunset($table);\n\t\t\t} else {\n\t\t\t\t$out[$column['alias']] = Dataface_Table::_newSchema($column['type'],$column['alias'], $this->name);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->_cache[__FUNCTION__] =& $out;\n\t\t$this->_fields =& $out;\n\t\treturn $out;\n\t\t\n\t\t\n\t}", "public function makeFieldList() {}", "function facebook_instant_articles_field_ui_fields_save($form, &$form_state) {\n // Setup some variables.\n $entity_type = $form['#entity_type'];\n $bundle = $form['#bundle'];\n $view_mode = $form['#view_mode'];\n\n // Delete previous field configuration configuration.\n db_delete('facebook_instant_articles_field_settings')\n ->condition('entity_type', $entity_type)\n ->condition('bundle', $bundle)\n ->condition('view_mode', $view_mode)\n ->execute();\n\n if (empty($form_state['layout_saved'])) {\n return;\n }\n\n $field_settings = array();\n\n // Save settings for each field.\n $fields = $form['#fbia_fields'];\n foreach ($fields as $field) {\n\n // Field settings.\n $field_values = $form_state['values']['fields'][$field];\n\n // In case the region is hidden, do not save.\n if (isset($field_values['region']) && $field_values['region'] == 'hidden') {\n continue;\n }\n\n // Build settings.\n $settings = array();\n $settings['weight'] = $field_values['weight'];\n $settings['label'] = $field_values['label'];\n $settings['format'] = $field_values['format']['type'];\n\n // Any formatter settings.\n if (isset($form_state['formatter_settings'][$field])) {\n $settings['formatter_settings'] = $form_state['formatter_settings'][$field];\n }\n\n $field_settings[$field] = $settings;\n }\n\n // Allow other modules to modify the field settings before they get saved.\n drupal_alter('facebook_instant_articles_field_settings', $field_settings, $form, $form_state);\n\n // Save the record.\n if (!empty($field_settings)) {\n $record = new stdClass();\n $record->id = $form['#export_id'];\n $record->entity_type = $entity_type;\n $record->bundle = $bundle;\n $record->view_mode = $view_mode;\n $record->settings = $field_settings;\n drupal_write_record('facebook_instant_articles_field_settings', $record);\n }\n\n // Clear the field cache.\n cache_clear_all('facebook_instant_articles_fields:', 'cache', TRUE);\n cache_clear_all('facebook_instant_articles_field_settings', 'cache');\n}", "function acf_flush_value_cache($post_id = 0, $field_name = '')\n{\n}", "function _acf_do_prepare_local_fields()\n{\n}", "public function loadFields()\n\t{\n\t\t// Get only the fields from the class instance, not its descendants\n\t\t$getFields = create_function('$obj', 'return get_object_vars($obj);');\n\t\t$fields = $getFields($this);\n\n\t\t// Field defaults\n\t\t$defaults = array(\n\t\t\t'primary' => false,\n\t\t\t'relation' => false\n\t\t);\n\n\t\t// Go through and set up each field\n\t\tforeach ($fields as $name => $options)\n\t\t{\n\t\t\t// Merge the defaults\n\t\t\t$options = array_merge($defaults, $options);\n\n\t\t\t// Is this the primary field?\n\t\t\tif ($options['primary'] === true)\n\t\t\t{\n\t\t\t\t$this->primaryKeyField = $name;\n\t\t\t}\n\n\t\t\t// Is this a relation?\n\t\t\tif ($options['relation'] !== false)\n\t\t\t{\n\t\t\t\t$this->relations[$name] = $options;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$this->fields[$name] = array();\n\t\t}\n\t}", "function addToField(\\Foundation\\Form\\Field $field);", "function acf_flush_field_group_cache($field_group)\n{\n}", "function update_columns_cache()\n {\n $key = C_Photocrati_Transient_Manager::create_key('col_in_' . $this->get_table_name(), 'columns');\n global $wpdb;\n $this->_table_columns = array();\n $sql = \"SHOW COLUMNS FROM `{$this->get_table_name()}`\";\n foreach ($wpdb->get_results($sql) as $row) {\n $this->_table_columns[] = $row->Field;\n }\n C_Photocrati_Transient_Manager::update($key, $this->_table_columns);\n }", "public function updateCacheFields($id) {\n\t\t$log = $this->findById($id);\n\t\t$forSave = array('id' => $id);\n\t\tswitch ($log['ActivityLog']['model']) {\n\t\t\tcase 'Workorder':\n\t\t\t\t$forSave['workorder_id'] = $log['ActivityLog']['foreign_key'];\n\t\t\tbreak;\n\t\t\tcase 'TasksWorkorder':\n\t\t\t\t$forSave['tasks_workorder_id'] = $log['ActivityLog']['foreign_key'];\n\t\t\t\t$task = $this->TasksWorkorder->findById($log['ActivityLog']['foreign_key']);\n\t\t\t\t$forSave['workorder_id'] = $task['TasksWorkorder']['workorder_id'];\n\t\t\tbreak;\n\t\t}\n\t\treturn $this->save($forSave, array('callbacks' => false));\n\t}", "function afterLayout() {\n\t\tif ($this->auto_store_cache) {\n\t\t\t$this->_storeCaches();\n\t\t}\n\t}", "protected function addFields()\n {\n $groupCustomOptionsName = CustomOptions::GROUP_CUSTOM_OPTIONS_NAME;\n $optionContainerName = CustomOptions::CONTAINER_OPTION;\n $commonOptionContainerName = CustomOptions::CONTAINER_COMMON_NAME;\n\n // Add fields to the option\n $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n [$optionContainerName]['children'][$commonOptionContainerName]['children'] = array_replace_recursive(\n $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n [$optionContainerName]['children'][$commonOptionContainerName]['children'],\n $this->getOptionFieldsConfig()\n );\n\n // Add fields to the values\n // $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n // [$optionContainerName]['children']['values']['children']['record']['children'] = array_replace_recursive(\n // $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n // [$optionContainerName]['children']['values']['children']['record']['children'],\n // $this->getValueFieldsConfig()\n // );\n }", "function minim_preprocess_views_view_fields(&$variables) {\n $fields_rendered = '';\n if (!empty($variables['fields'])) {\n foreach ($variables['fields'] AS $id => $field) {\n if (!empty($field->separator)) {\n $fields_rendered .= $field->separator;\n }\n $fields_rendered .= $field->wrapper_prefix;\n $fields_rendered .= $field->label_html;\n $fields_rendered .= $field->content;\n $fields_rendered .= $field->wrapper_suffix;\n }\n }\n $variables['fields_rendered'] = $fields_rendered;\n\n // Allow for more granular preproces_functions\n $sub_functions = array();\n $sub_functions[] = __FUNCTION__ . '__' . $variables['view']->storage->id;\n $sub_functions[] = __FUNCTION__ . '__' . $variables['view']->storage->id . '__' . $variables['view']->current_display;\n foreach ($sub_functions AS $function) {\n if (function_exists($function)) {\n $function($variables);\n }\n }\n}", "public function set_fields() {\n\n\t\t$this->fields = Pngx__Meta__Fields::get_fields();\n\t}", "protected function cacheSave() {\n $data = array();\n foreach ($this->properties as $prop) {\n $data[$prop] = $this->$prop;\n }\n //cache_set($this->id, $data, 'cache');\n }", "public function prepareFieldset();", "public function getFieldsData()\n {\n $cacheKey = $this->getCacheKey();\n\n if (isset($this->getFieldsDataCache[$cacheKey])) {\n\n return $this->getFieldsDataCache[$cacheKey];\n }\n\n $data = array();\n $db = \\Database::getInstance()->prepare(\"\n SELECT * FROM (\n SELECT\n ld.master_id AS id,\n IFNULL(ff.name, ld.name) AS name,\n IF(ff.label IS NULL OR ff.label='', ld.name, ff.label) AS label,\n ff.type,\n ff.options,\n ld.field_id,\n ld.sorting\n FROM tl_lead_data ld\n LEFT JOIN tl_form_field ff ON ff.id=ld.master_id\n LEFT JOIN tl_lead l ON ld.pid=l.id\n WHERE l.master_id=?\" . (!empty($this->fieldIds) ? (\" AND ld.field_id IN (\" . implode(',', $this->fieldIds) . \")\") : \"\") . \"\n ORDER BY l.master_id!=l.form_id\n ) ld\n GROUP BY field_id\n ORDER BY \" . (!empty($this->fieldIds) ? \\Database::getInstance()->findInSet(\"ld.field_id\", $this->fieldIds) : \"sorting\")\n )->execute($this->formId);\n\n while ($db->next()) {\n $data[$db->id] = $db->row();\n }\n\n $this->getFieldsDataCache[$cacheKey] = $data;\n\n return $data;\n }", "protected function wrap_fields()\n {\n }", "public function buildFields()\n {\n $this->addField('name', 'media.adminlist.configurator.name', true);\n $this->addField('contentType', 'media.adminlist.configurator.type', true);\n $this->addField('updatedAt', 'media.adminlist.configurator.date', true);\n $this->addField('filesize', 'media.adminlist.configurator.filesize', true);\n }", "protected function createFormFields() {\n\t}", "function facebook_instant_articles_field_ui_fields($entity_type, $bundle, $view_mode, array &$form, array &$form_state) {\n\n // Do not add the fields if there is no layout.\n if (!isset($form['#fbia_layout'])) {\n return;\n }\n\n // Get the fields and put them on the form.\n $fields = facebook_instant_articles_get_fields($entity_type, FALSE);\n\n // Get field settings.\n $field_settings = facebook_instant_articles_get_field_settings($entity_type, $bundle, $view_mode, FALSE);\n $form['#field_settings'] = $field_settings;\n\n $table = &$form['fields'];\n $form['#fbia_fields'] = array();\n\n $field_label_options = array(\n 'above' => t('Above'),\n 'inline' => t('Inline'),\n 'hidden' => t('<Hidden>'),\n );\n drupal_alter('facebook_instant_articles_label_options', $field_label_options);\n\n foreach ($fields as $key => $field) {\n\n $form['#fbia_fields'][] = $key;\n\n // Check on formatter settings.\n if (isset($form_state['formatter_settings'][$key])) {\n $field['formatter_settings'] = $form_state['formatter_settings'][$key];\n }\n elseif (isset($field_settings[$key]['formatter_settings'])) {\n $field['formatter_settings'] = $field_settings[$key]['formatter_settings'];\n $form_state['formatter_settings'][$key] = $field['formatter_settings'];\n }\n\n if (!isset($field_settings[$key]['ft']) && isset($field_settings[$key]['ft'])) {\n $form_state['formatter_settings'][$key]['ft'] = $field_settings[$key]['ft'];\n }\n\n $hidden = array('hidden' => t('<Hidden>'));\n $formatters = isset($field['properties']['formatters']) ? $hidden + $field['properties']['formatters'] : $hidden + array('default' => t('Default'));\n\n $table[$key] = array(\n '#row_type' => 'field',\n '#js_settings' => array('field'),\n '#region_callback' => 'field_ui_display_overview_row_region',\n '#attributes' => array('class' => array('draggable', 'tabledrag-leaf')),\n 'human_name' => array(\n '#markup' => check_plain($field['title']),\n ),\n 'weight' => array(\n '#type' => 'textfield',\n '#default_value' => isset($field_settings[$key]['weight']) ? $field_settings[$key]['weight'] : 0,\n '#size' => 3,\n '#attributes' => array('class' => array('field-weight')),\n ),\n 'parent_wrapper' => array(\n 'parent' => array(\n '#type' => 'select',\n '#empty_value' => '',\n '#options' => array(),\n '#attributes' => array('class' => array('field-parent')),\n '#parents' => array('fields', $key, 'parent'),\n ),\n 'hidden_name' => array(\n '#type' => 'hidden',\n '#default_value' => $key,\n '#attributes' => array('class' => array('field-name')),\n ),\n ),\n 'label' => array(\n '#type' => 'select',\n '#options' => $field_label_options,\n '#default_value' => isset($field_settings[$key]['label']) ? $field_settings[$key]['label'] : 'hidden',\n ),\n 'format' => array(\n 'type' => array(\n '#type' => 'select',\n '#options' => $formatters,\n '#default_value' => isset($field_settings[$key]['format']) ? $field_settings[$key]['format'] : 'hidden',\n '#attributes' => array('class' => array('field-formatter-type')),\n ),\n ),\n 'settings_summary' => array(),\n 'settings_edit' => array(),\n );\n\n $field['name'] = $key;\n $field['entity_type'] = $entity_type;\n $field['bundle'] = $bundle;\n $field['view_mode'] = $view_mode;\n }\n\n // Add fields submit handler.\n $form['#submit'][] = 'facebook_instant_articles_field_ui_fields_save';\n}", "private function setFields($fields = [])\n {\n foreach ($fields as $key => $input) {\n $name = array_key_exists('name', $input) ? $input['name'] : $key;\n $type = array_key_exists('type', $input) ? $input['type'] : Mystique::TEXT;\n $type_fallback = array_key_exists('type_fallback', $input) ? $input['type_fallback'] : false;\n\n $field = $input;\n if(array_key_exists('type', $field)) {\n unset($field['type']);\n }\n\n if(strpos($type, 'Inputfield') === false) {\n $type = 'Inputfield' . ucfirst($type);\n }\n if($type_fallback && strpos($type_fallback, 'Inputfield') === false) {\n $type_fallback = 'Inputfield' . ucfirst($type_fallback);\n }\n\n if($this->modules->isInstalled($type)) {\n $field['type'] = $type;\n } else if($this->modules->isInstalled($type_fallback)) {\n $field['type'] = $type_fallback;\n }\n\n if(array_key_exists('type', $field)) {\n\n if(array_key_exists('useLanguages', $field) && $field['useLanguages']) {\n $this->languageFields[] = $name;\n }\n\n if(!$type != Mystique::FIELDSET && !$type != Mystique::MARKUP) {\n $value = array_key_exists('value', $field) ? $field['value'] : '';\n if(!$value && array_key_exists('defaultValue', $field)) {\n $value = $field['defaultValue'];\n }\n $this->inputFields[$name] = $value;\n }\n\n if ($type == Mystique::CHECKBOX || $type == Mystique::TOGGLE_CHECKBOX) {\n $this->checkboxFields[] = $name;\n }\n\n if(array_key_exists('children', $field)) {\n $this->setFields($field['children']);\n }\n }\n }\n }", "public function buildFormLayout()\n {\n $this->addColumn(6, function(FormLayoutColumn $column) {\n $column->withSingleField('title');\n })->addColumn(6, function(FormLayoutColumn $column) {\n $column->withSingleField('cover');\n $column->withSingleField('description');\n $column->withSingleField('price');\n $column->withSingleField('tags');\n });\n }", "public function getFrontendFields();", "public function createFields()\n\t{\n\t\t$this->_formFields = $this->createModelFormFields();\n\t\treturn $this;\n\t}", "public function fillModelAttributes($model, $request, $fields)\n {\n }", "protected function setDbalInputFieldsToRender() {}", "public function addField($field_name){\n\t\t$this->Fields[$field_name] = new Field($field_name);\n\t}", "private function getFieldCollection()\n {\n $fields = $this->fields;\n $collection = new FieldCollection();\n\n foreach ($fields as $fieldKey => $fieldMeta) {\n $collection->add(new FieldVO($fieldKey, $fieldMeta));\n }\n\n return $collection;\n }", "function facebook_instant_articles_field_ui_layouts_save($form, &$form_state) {\n $weight = 0;\n\n // Get default values.\n $entity_type = $form['#entity_type'];\n $bundle = $form['#bundle'];\n $view_mode = $form['#view_mode'];\n\n // Determine layout variables.\n $layout = 'facebook_instant_article';\n\n // Save layout and add regions if necessary.\n $record = new stdClass();\n $record->id = $form['#export_id'];\n $record->entity_type = $entity_type;\n $record->bundle = $bundle;\n $record->settings = array();\n\n $form_state['layout_saved'] = TRUE;\n\n $fields = facebook_instant_articles_sort_fields($form_state['values']['fields'], 'weight');\n\n foreach ($fields as $key => $field) {\n\n // Make sure we need to save anything for this field.\n if (facebook_instant_articles_field_valid($key, $field, $form_state, $view_mode)) {\n continue;\n }\n\n if (!isset($record->settings['regions'][$field['region']])) {\n $record->settings['regions'][$field['region']] = array();\n }\n $record->settings['regions'][$field['region']][$weight++] = $key;\n $record->settings['fields'][$key] = $field['region'];\n\n // Save limit.\n $limit = isset($field['format']['limit']) ? trim($field['format']['limit']) : '';\n if (is_numeric($limit) || $limit === 'delta') {\n $record->settings['limit'][$key] = $limit;\n }\n }\n\n // Let other modules alter the layout settings.\n drupal_alter('facebook_instant_articles_layout_settings', $record, $form_state);\n\n $layout = $form['#fbia_layout'];\n if (!isset($layout->export_type)) {\n drupal_write_record('facebook_instant_articles_layout_settings', $record);\n }\n else {\n drupal_write_record('facebook_instant_articles_layout_settings', $record, array('id'));\n }\n\n // Clear entity info cache.\n cache_clear_all('entity_info', 'cache', TRUE);\n}", "function _get_fields_map_simple() {\n\t\t$cache_name = \"fields_map_simple\";\n\t\t// Get from local cache\n\t\tif ($this->CACHE_IN_MEMORY && isset($this->$cache_name)) {\n\t\t\treturn $this->$cache_name;\n\t\t}\n\t\t// Create array of fields in tables\n\t\tif (main()->USE_SYSTEM_CACHE) {\n\t\t\t$db_cols = cache_get($cache_name);\n\t\t}\n\t\tif (empty($db_cols)) {\n\t\t\t$Q = db()->query(\"SHOW COLUMNS FROM \".db('user').\"\");\n\t\t\twhile ($A = db()->fetch_assoc($Q)) {\n\t\t\t\tif ($A[\"Field\"] == \"id\") {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\t\n\t\t\t\t$db_cols[$A[\"Field\"]] = $A[\"Field\"];\n\t\t\t}\n\t\t\tif (main()->USE_SYSTEM_CACHE) {\n\t\t\t\tcache_set($cache_name, $db_cols);\n\t\t\t}\n\t\t}\n\t\t// Put to local cache\n\t\tif ($this->CACHE_IN_MEMORY && !isset($this->$cache_name)) {\n\t\t\t$this->$cache_name\t= $db_cols;\n\t\t}\n\n\t\treturn $db_cols;\n\t}", "function get_flexi_local_field( $id = '1234QWERasdf' ) {\n\treturn array(\n\t\tarray (\n\t\t\t'key' => $id . '_FC12qiX8p1A9',\n\t\t\t'label' => 'Components',\n\t\t\t'name' => 'components',\n\t\t\t'type' => 'flexible_content',\n\t\t\t'required' => '',\n\t\t\t'button_label' => 'Add component',\n\t\t\t'layouts' => array (\n\t\t\t\tarray (\n\t\t\t\t\t'key' => $id . '_FC12qiX7p2A8',\n\t\t\t\t\t'name' => 'image',\n\t\t\t\t\t'label' => 'Image',\n\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t'max' => 1,\n\t\t\t\t\t'sub_fields' => array (\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX4p5b7',\n\t\t\t\t\t\t\t'label' => 'Content',\n\t\t\t\t\t\t\t'name' => 'tab1',\n\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX5p4b6',\n\t\t\t\t\t\t\t'label' => 'Image',\n\t\t\t\t\t\t\t'name' => 'image',\n\t\t\t\t\t\t\t'type' => 'image',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'return_format' => 'object',\n\t\t\t\t\t\t\t'preview_size' => 'full'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX2p1C1',\n\t\t\t\t\t\t\t'label' => 'Layouts',\n\t\t\t\t\t\t\t'name' => 'layout',\n\t\t\t\t\t\t\t'type' => 'flexible_content',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'button_label' => 'Add layout',\n\t\t\t\t\t\t\t'layouts' => array (\n\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX2p0C2',\n\t\t\t\t\t\t\t\t\t'name' => 'over-image',\n\t\t\t\t\t\t\t\t\t'label' => 'Over image',\n\t\t\t\t\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t\t\t\t'sub_fields' => array (\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX6i3B7',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'tab1',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Content',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t\t\t\t\t'required' => ''\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX2p3c5',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Title',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'title',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'rows' => '1',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 30\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX1p8c9',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Description',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'description',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'rows' => '1',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 40\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12q3X9p6c8',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Price',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'price',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 15\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12q4X8p5c7',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Label',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'label',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 15\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX7i3B7',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'tab2',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Settings',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t\t\t\t\t'required' => ''\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX6i4B6',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'type',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Type',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => '33'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t'choices' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'Default',\n\t\t\t\t\t\t\t\t\t\t\t\t'Type 1',\n\t\t\t\t\t\t\t\t\t\t\t\t'Type 2',\n\t\t\t\t\t\t\t\t\t\t\t\t'Type 3'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t'default_values' => array( 0 )\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX3p1C3',\n\t\t\t\t\t\t\t\t\t'name' => 'mouseover',\n\t\t\t\t\t\t\t\t\t'label' => 'Mouseover',\n\t\t\t\t\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t\t\t\t'sub_fields' => array (\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX7P3c7',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'tab1',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Content',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t\t\t\t\t'required' => ''\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12q5X1p3c5',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Title',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'title',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'rows' => '1',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 30\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12q6X7p8c9',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Description',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'description',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'rows' => '1',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 40\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12q7X9p6c8',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Price',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'price',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 15\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12q8X8p5c7',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Label',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'label',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 15\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX7i3c7',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'tab2',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Settings',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t\t\t\t\t'required' => ''\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX6i4c6',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'type',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Type',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => '33'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t'choices' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'Default',\n\t\t\t\t\t\t\t\t\t\t\t\t'Type 1',\n\t\t\t\t\t\t\t\t\t\t\t\t'Type 2',\n\t\t\t\t\t\t\t\t\t\t\t\t'Type 3'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t'default_values' => array( 0 )\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX3p6b4',\n\t\t\t\t\t\t\t'label' => 'Settings',\n\t\t\t\t\t\t\t'name' => 'tab2',\n\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX4p7b3',\n\t\t\t\t\t\t\t'label' => 'Height',\n\t\t\t\t\t\t\t'name' => 'height',\n\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t'width' => 33\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'choices' => array (\n\t\t\t\t\t\t\t\t'auto' => 'Auto',\n\t\t\t\t\t\t\t\t'scuare' => 'Square',\n\t\t\t\t\t\t\t\t'200' => '200 pixels',\n\t\t\t\t\t\t\t\t'300' => '300 pixels',\n\t\t\t\t\t\t\t\t'400' => '400 pixels',\n\t\t\t\t\t\t\t\t'500' => '500 pixels',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'default_value' => 'auto'\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\tarray (\n\t\t\t\t\t'key' => $id . '_FC12qiX6p3A7',\n\t\t\t\t\t'name' => 'content',\n\t\t\t\t\t'label' => 'Content',\n\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t'max' => 2,\n\t\t\t\t\t'sub_fields' => array (\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX7k3N7',\n\t\t\t\t\t\t\t'name' => 'tab1',\n\t\t\t\t\t\t\t'label' => 'Settings',\n\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t'required' => ''\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12q9X1p3c5',\n\t\t\t\t\t\t\t'label' => 'Title',\n\t\t\t\t\t\t\t'name' => 'title',\n\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'rows' => '1',\n\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t'width' => 30\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12q917p8c9',\n\t\t\t\t\t\t\t'label' => 'Description',\n\t\t\t\t\t\t\t'name' => 'description',\n\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'rows' => '1',\n\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t'width' => 40\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12q329p6c8',\n\t\t\t\t\t\t\t'label' => 'Price',\n\t\t\t\t\t\t\t'name' => 'price',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t'width' => 15\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12q328p5c7',\n\t\t\t\t\t\t\t'label' => 'Label',\n\t\t\t\t\t\t\t'name' => 'label',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t'width' => 15\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX7i3N7',\n\t\t\t\t\t\t\t'name' => 'tab2',\n\t\t\t\t\t\t\t'label' => 'Settings',\n\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t'required' => ''\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX6i4N6',\n\t\t\t\t\t\t\t'name' => 'type',\n\t\t\t\t\t\t\t'label' => 'Type',\n\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t'width' => '33'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'choices' => array (\n\t\t\t\t\t\t\t\t'Default',\n\t\t\t\t\t\t\t\t'Type 1',\n\t\t\t\t\t\t\t\t'Type 2',\n\t\t\t\t\t\t\t\t'Type 3'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'default_values' => array( 0 )\n\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\t);\n}", "protected function addFieldGroupConfigs()\n {\n // TODO: add acf field group configs\n }", "function acf_add_local_fields($fields = array())\n{\n}", "protected function searchCacheByModelFields($fields, \\MPF\\Db\\Page $page = null)\n {\n $table = $fields[0]->getTable();\n if (!array_key_exists($table, self::$modelCache)) {\n return array();\n }\n\n // for now cache search is still only if there is only 1 field\n if (count($fields) > 1 || count($fields) == 0) {\n return array();\n }\n \n $field = $fields[0];\n \n // we dont search if its a foreign field\n // TODO: we could potentially search for foreign fields since its per table cache...\n if ($field->isForeign()) {\n return array();\n }\n\n $entriesFound = array();\n foreach (self::$modelCache[$table] as $dbEntry) {\n // TODO: Since introduction of the page system in the ORM there is a problem with the cache where we dont filter de cached entries by it and they are not \"ordered by\"\n if ($field->matches($dbEntry[$field->getName()])) {\n $entriesFound[] = $dbEntry;\n }\n }\n\n // we only check the count if its NOT a primary key. Or if its a primary key with a special operator (Not an equal)\n if (!$field->isPrimaryKey() || ($field->isPrimaryKey() && $field->hasOperator())) {\n // if we dont have the same count as the database we return nothing\n $count = $this->resultCountByFields($fields, $page);\n $countCache = count($entriesFound);\n \n $this->getLogger()->info('Searching \\MPF\\Db\\Entry cache, result: cache({countCache}) db({count})', array(\n 'category' => Category::FRAMEWORK | Category::DATABASE,\n 'className' => 'Db/Layer',\n 'countCache' => $countCache,\n 'count' => $count\n \n ));\n if ($count != $countCache) {\n return array();\n }\n }\n\n return $entriesFound;\n }", "private function _getSchemaFields(){\n $file = SCHEMA_PATH . $this->_core . SCHEMA_FILE;\n $key = md5($file);\n if (!($this->_cache->test($key))) {\n if(file_exists($file)){\n $xml = simplexml_load_file($file);\n $schemaFields = array();\n foreach($xml->fields->field as $field){\n $string = get_object_vars($field->attributes());\n //This bit looks honky, couldn't get it to work with object notation\n $schemaFields[] = $string[\"@attributes\"]['name'];\n }\n }\n\n $this->_cache->save($schemaFields);\n } else {\n $schemaFields = $this->_cache->load($key);\n }\n $this->_schemaFields = $schemaFields;\n return $this->_schemaFields;\n }", "function addFields($config)\n {\n global $TSFE,$LANG;\n $this->storagePid = $this->getStorageFolderPid();\n // print_r($this->storagePid);\n if(!empty($this->storagePid)) {\n $sql = \"AND pid=$this->storagePid\";\n }else{\n $sql = '';\n }\n\n $optionList = array();\n // exec_SELECTquery\n // $res = $GLOBALS['TYPO3_DB']->sql(TYPO3_db, \"SELECT uid,cat FROM tx_sbdownloader_cat WHERE hidden=0 AND deleted=0 $sql\");\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\"uid,cat\", \"tx_sbdownloader_cat\", \"hidden=0 AND deleted=0 $sql\");\n\n $optionList[0] = array(0 => 'all', 1 => 0);\n $i = 1;\n // while($row = mysql_fetch_object($res)){\n while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n $optionList[$i] = array(0 => $row['cat'], 1 => $row['uid']);\n $i++;\n }\n\n $config['items'] = array_merge($config['items'], $optionList);\n\n return $config;\n }", "public static function bootCacheTrait() {\n static::saving(function (Model $model) {\n $dirty = $model->getDirtyCached();\n\n $key = Helpers::cacheKey($model);\n if (!empty($dirty))\n lRedis::hmset($key . \":properties\", $dirty);\n }, 1000);\n }", "protected function composeFields()\n {\n $this->fields = $this->authorization->get();\n }", "final public function rebuild_cache($cache_name = null) {\n\n\t\t\t// if we want to rebuild specific kind of cache or all of it\n\t\t\t$rebild_cache = (!is_null($cache_name) && array_key_exists($cache_name, $this->cache)) ? array($cache_name => $this->cache[$cache_name]) : $this->cache;\n\n\t\t\tforeach ($rebild_cache as $name => $options) {\n\t\t\t\tif (!array_key_exists('fields', $options)) continue;\n\n\t\t\t\t$options = array_merge(array('conditions' => null, 'order' => null, 'limit' => null), $options);\n\n\t\t\t\t// find if the array of fields is multidimensional array - so we got to consider the the associations\n\t\t\t\tif (count($options['fields']) == count($options['fields'], 1)) {\n\t\t\t\t\t// no multidimensional array so no associations\n\t\t\t\t\t$associations = array();\n\t\t\t\t\t// keys to fetch are all 'fields' elements\n\t\t\t\t\t$keys = array_combine($options['fields'], $options['fields']);\n\t\t\t\t} else {\n\t\t\t\t\t// filter the associations out\n\t\t\t\t\t$associations = array_filter($options['fields'], 'is_array');\n\t\t\t\t\t// get only the fields which are no associations\n\t\t\t\t\t$keys = array_diff_key($options['fields'], $associations);\n\t\t\t\t\t// keys to fetch from main object\n\t\t\t\t\t$keys = array_combine($keys, $keys);\n\t\t\t\t}\n\n\t\t\t\t$store = array();\n\t\t\t\t// we loop through all locales\n\t\t\t\tforeach (Config()->LOCALE_SHORTCUTS as $lang) {\n\t\t\t\t\t$this->set_locale($lang);\n\t\t\t\t\t// preserve index for better cache structure\n\t\t\t\t\t$preserve_index = $this->preserve_index;\n\t\t\t\t\t$this->preserve_index = true;\n\t\t\t\t\t// find all elements according to conditions, order and limit\n\t\t\t\t\t$items = $this->find_all($options['conditions'], $options['order'], $options['limit']);\n\t\t\t\t\t// return preserve index to its original state\n\t\t\t\t\t$this->preserve_index = $preserve_index;\n\n\t\t\t\t\tforeach ($items as $id => $item) {\n\t\t\t\t\t\t// fetch the coresponding fields from each item\n\t\t\t\t\t\t$values = array();\n\t\t\t\t\t\tforeach($keys as $k) {\n\t\t\t\t\t\t $values[$k] = $item->$k;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// store them according to i18n settings\n\t\t\t\t\t\tif ($this->is_i18n == true) {\n\t\t\t\t\t\t\t$store[$lang][$id] = $values;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$store[$id] = $values;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// loop through associations and fetch their data\n\t\t\t\t\t\tforeach ($associations as $association => $fields) {\n\t\t\t\t\t\t\t// fetch the coresponding fields from each association\n\t\t\t\t\t\t\t$values = array_intersect_key((array)($item->$association()), array_combine($fields, $fields));\n\t\t\t\t\t\t\tif (empty($values)) continue;\n\t\t\t\t\t\t\t// store them according to i18n settings\n\t\t\t\t\t\t\tif ($this->is_i18n == true) {\n\t\t\t\t\t\t\t\t$store[$lang][$id][$association] = $values;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$store[$id][$association] = $values;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// write cache\n\t\t\t\t$cache_with_model = Inflector::tableize($this->get_class_name()) . '_' . $name;\n\t\t\t\t$cache_file = Config()->ROOT_PATH . 'cache/site/' . $cache_with_model . '.cache';\n\t\t\t\t$file = fopen($cache_file, \"w\");\n\t\t\t\t@flock($file, LOCK_EX);\n\t\t\t\tfwrite($file, \"<?php\\n\\$this->cached_results['\" . $cache_with_model . \"'] = \" . var_export($store, true) . \";\\n?>\");\n\t\t\t\t@flock($file, LOCK_UN);\n\t\t\t\tfclose($file);\n\t\t\t\t@chmod($cache_file, 0666);\n\t\t\t}\n\n\t\t\t// return back to original locale\n\t\t\t$this->set_locale(Registry()->locale);\n\t\t}", "function update_fields($fields){\n //\n //Get the indexed columns \n //\n //loop through all the columns in this entity \n foreach ($this->entity->columns as $column) {\n //\n //Get the name of the column\n $name= $column->name;\n //\n //if the column is foreign or primary return\n if($column->type==!'primary' || $column->type==!'foreign' ){\n //\n //Test if the column already exist in the fields array\n //first map the columns to get the column names\n $names= array_map(function ($f){return $f->column->name;}, $fields);\n //\n $enn= array_search($name, $names);\n //\n //If the culumn is an indexed column do nothing if false do the following\n if ($enn === false){\n //\n //Test if it is called a name \n if ($name== 'name'){\n //\n array_push($fields, $column);\n }\n //\n //Test if it is called a description \n if ($name== 'description'){\n //\n array_push($fields, $column);\n }\n //\n //Test if it is called a title \n if ($name== 'title'){\n //\n array_push($fields, $column);\n }\n //\n //Test if it is called a id \n if ($name== 'id'){\n //\n array_push($fields, $column);\n }\n }\n }\n }\n //\n //\n return $fields;\n }", "private function setAutofillFields() {\n foreach (static::getFields() as $field_name => $field) {\n if ($field instanceof AutofillField) {\n $this->values[$field_name] = $field->fill();\n }\n }\n }", "public function reCacheCustomFields() : void\n {\n foreach ($this->getAll() as $key => $value) {\n $this->setInRedis($key, $value);\n }\n }", "public function updateCMSFields(FieldList $fields){\n \n Requirements::CSS('BlogCategories/css/cms-blog-categories.css');\n\n // Try to fetch categories from cache \n $categories = $this->getAllBlogCategories();\n if($categories->count() >= 1){\n $cacheKey = md5($categories->sort('LastEdited', 'DESC')->First()->LastEdited);\n $cache = SS_Cache::factory('BlogCategoriesList');\n if(!($categoryList = $cache->load($cacheKey))) {\n $categoryList = \"<ul>\";\n foreach ($categories->column('Title') as $title) {\n $categoryList .= \"<li>\" .Convert::raw2xml($title). \"</li>\";\n }\n $categoryList .=\"</ul>\";\n $cache->save($categoryList, $cacheKey);\n }\n } else {\n $categoryList=\"<ul><li>No categories have been added. Add categories from the parent blog holder.</li></ul>\"; \n }\n\n //categories tab\n $gridFieldConfig = GridFieldConfig_RelationEditor::create();\n $fields->addFieldToTab('Root.Categories', GridField::create('BlogCategories', 'Blog Categories', $this->owner->BlogCategories(), $gridFieldConfig));\n $fields->addFieldToTab('Root.Categories',\n ToggleCompositeField::create(\n 'ExistingCategories',\n 'View Existing Categories',\n array(\n new LiteralField(\"CategoryList\", $categoryList)\n )\n )->setHeadingLevel(4)\n );\n\n // Optionally default category to current holder\n if(Config::inst()->get('BlogCategory', 'limit_to_holder')) {\n $holder = $this->owner->Parent();\n $gridFieldConfig->getComponentByType('GridFieldDetailForm')\n ->setItemEditFormCallback(function($form, $component) use($holder) {\n $form->Fields()->push(HiddenField::create('ParentID', false, $holder->ID));\n });\n }\n }", "function _hps_courses_fields() {\n\n return array(\n 'hps_course_name' => array(\n 'field_name' => 'hps_course_name',\n 'label' => t('Course name'),\n 'cardinality' => 1,\n 'type' => 'text',\n 'settings' => array('max_length' => 255),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n 'teaser' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n ),\n ),\n 'hps_course_year' => array(\n 'field_name' => 'hps_course_year',\n 'label' => t('Course year'),\n 'cardinality' => 1,\n 'type' => 'number_integer',\n ),\n 'hps_course_notes' => array(\n 'field_name' => 'hps_course_notes',\n 'label' => t('Notes'),\n 'cardinality' => 1,\n 'type' => 'text_long',\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n 'teaser' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n ),\n ),\n 'hps_course_participants' => array(\n 'field_name' => 'hps_course_participants',\n 'label' => t('Participants'),\n 'type' => 'field_collection',\n 'cardinality' => FIELD_CARDINALITY_UNLIMITED,\n 'settings' => array(\n 'hide_blank_items' => TRUE,\n ),\n 'widget' => array(\n 'type' => 'field_collection_embed',\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'above',\n 'type' => 'field_collection_view',\n ),\n 'teaser' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n ),\n ),\n 'hps_participant_first_name' => array(\n 'field_name' => 'hps_participant_first_name',\n 'label' => t('Participant first name'),\n 'cardinality' => 1,\n 'type' => 'text',\n 'settings' => array('max_length' => 255),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'text_default',\n ),\n 'teaser' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n ),\n ),\n 'hps_participant_last_name' => array(\n 'field_name' => 'hps_participant_last_name',\n 'label' => t('Participant last name'),\n 'cardinality' => 1,\n 'type' => 'text',\n 'settings' => array('max_length' => 255),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'text_default',\n ),\n 'teaser' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n ),\n ),\n 'hps_participant_id' => array(\n 'field_name' => 'hps_participant_id',\n 'label' => t('Participant ID'),\n 'cardinality' => 1,\n 'type' => 'text',\n 'settings' => array('max_length' => 50),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n 'teaser' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n ),\n ),\n 'hps_participant_notes' => array(\n 'field_name' => 'hps_participant_notes',\n 'label' => t('Notes'),\n 'cardinality' => 1,\n 'type' => 'text_long',\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n 'teaser' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n ),\n ),\n 'hps_person_authority' => array(\n 'field_name' => 'hps_person_authority',\n 'label' => t('Person authority'),\n 'cardinality' => 1,\n 'type' => 'taxonomy_term_reference',\n 'settings' => array(\n 'allowed_values' => array(\n array(\n 'vocabulary' => 'hps_person_authority',\n 'parent' => 0,\n ),\n ),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n 'teaser' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n ),\n ),\n 'hps_participant_role' => array(\n 'field_name' => 'hps_participant_role',\n 'label' => t('Role'),\n 'cardinality' => 1,\n 'type' => 'taxonomy_term_reference',\n 'settings' => array(\n 'allowed_values' => array(\n array(\n 'vocabulary' => 'hps_participant_role',\n 'parent' => 0,\n ),\n ),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'taxonomy_term_reference_plain',\n ),\n 'teaser' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n ),\n ),\n 'hps_course_items' => array(\n 'field_name' => 'hps_course_items',\n 'label' => t('Items'),\n 'type' => 'field_collection',\n 'cardinality' => FIELD_CARDINALITY_UNLIMITED,\n 'settings' => array(\n 'hide_blank_items' => TRUE,\n ),\n 'widget' => array(\n 'type' => 'field_collection_embed',\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n 'teaser' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n ),\n ),\n 'hps_course_item_type' => array(\n 'field_name' => 'hps_course_item_type',\n 'label' => t('Type'),\n 'cardinality' => 1,\n 'type' => 'taxonomy_term_reference',\n 'settings' => array(\n 'allowed_values' => array(\n array(\n 'vocabulary' => 'hps_course_item_type',\n 'parent' => 0,\n ),\n ),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n 'teaser' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n ),\n ),\n 'hps_course_item_uri' => array(\n 'field_name' => 'hps_course_item_uri',\n 'label' => t('Course item URI'),\n 'cardinality' => 1,\n 'type' => 'text',\n 'settings' => array('max_length' => 255),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n 'teaser' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n ),\n ),\n 'hps_course_item_entity' => array(\n 'field_name' => 'hps_course_item_entity',\n 'label' => t('Course item entity'),\n 'cardinality' => 1,\n 'type' => 'entityreference',\n 'settings' => array(\n 'target_type' => 'node',\n 'handler' => 'base',\n 'handler_settings' => array(\n 'target_bundles' => array(\n 'dspaced_entities_item' => 'dspaced_entities_item',\n ),\n 'sort' => array(\n 'type' => 'property',\n 'property' => 'title',\n 'direction' => 'ASC',\n ),\n ),\n 'behaviors' => array(\n 'views-select-list' => array(\n 'status' => 0,\n ),\n ),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n 'teaser' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n ),\n ),\n 'hps_person_authority_uuid' => array(\n 'field_name' => 'hps_person_authority_uuid',\n 'label' => t('Person authority UUID'),\n 'cardinality' => 1,\n 'type' => 'text',\n 'settings' => array('max_length' => 36),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n 'teaser' => array(\n 'label' => 'hidden',\n 'type' => 'hidden',\n ),\n ),\n ),\n 'hps_person_authority_ids' => array(\n 'field_name' => 'hps_person_authority_ids',\n 'label' => t('Alternative IDs'),\n 'cardinality' => FIELD_CARDINALITY_UNLIMITED,\n 'type' => 'text',\n 'settings' => array('max_length' => 255),\n ),\n 'hps_person_authority_names' => array(\n 'field_name' => 'hps_person_authority_names',\n 'label' => t('Alternative names'),\n 'cardinality' => FIELD_CARDINALITY_UNLIMITED,\n 'type' => 'text',\n 'settings' => array('max_length' => 255),\n ),\n );\n}", "protected function saveFieldsToLayouts ($basepath , $dummy , $relationshipName , $layoutAdditions)\n {\n // these modules either lack editviews/detailviews or use custom mechanisms for the editview/detailview. In either case, we don't want to attempt to add a relate field to them\n // would be better if GridLayoutMetaDataParser could handle this gracefully, so we don't have to maintain this list here\n $invalidModules = array('emails');\n \n $fieldsToAdd = array();\n foreach ( $layoutAdditions as $deployedModuleName => $fieldName )\n {\n if ( ! in_array( strtolower ( $deployedModuleName ) , $invalidModules ) ) {\n foreach ( array ( MB_RECORDVIEW ) as $view )\n {\n $parsedName = self::parseDeployedModuleName ( $deployedModuleName ) ;\n if (! isset ( $parsedName [ 'packageName' ] ))\n {\n $fieldsToAdd [$parsedName [ 'moduleName' ]] = $fieldName;\n } \n //Bug 22348: We should add in the field for custom modules not in this package, if they have been deployed.\n else if ($parsedName [ 'packageName' ] != $this->packageName \n && isset ( $GLOBALS [ 'beanList' ] [ $deployedModuleName ])){\n $fieldsToAdd [$deployedModuleName] = $fieldName;\n }\n }\n }\n }\n return array(array('additional_fields' => $fieldsToAdd));\n }", "protected function _initOldFieldsMap()\n {\n $this->_oldFieldsMap = Mage::helper('catalog')->getOldFieldMap();\n return $this;\n }", "function field_views_field_default_views_data($field) {\n $field_types = field_info_field_types();\n\n // Check the field module is available.\n if (!isset($field_types[$field['type']])) {\n return;\n }\n\n $data = array();\n\n $current_table = _field_sql_storage_tablename($field);\n $revision_table = _field_sql_storage_revision_tablename($field);\n\n // The list of entity:bundle that this field is used in.\n $bundles_names = array();\n $supports_revisions = FALSE;\n $entity_tables = array();\n $current_tables = array();\n $revision_tables = array();\n $groups = array();\n\n $group_name = count($field['bundles']) > 1 ? t('Field') : NULL;\n\n // Build the relationships between the field table and the entity tables.\n foreach ($field['bundles'] as $entity => $bundles) {\n $entity_info = entity_get_info($entity);\n $groups[$entity] = $entity_info['label'];\n\n // Override Node to Content.\n if ($groups[$entity] == t('Node')) {\n $groups[$entity] = t('Content');\n }\n\n // If only one bundle use this as the default name.\n if (empty($group_name)) {\n $group_name = $groups[$entity];\n }\n\n $entity_tables[$entity_info['base table']] = $entity;\n $current_tables[$entity] = $entity_info['base table'];\n if (isset($entity_info['revision table'])) {\n $entity_tables[$entity_info['revision table']] = $entity;\n $revision_tables[$entity] = $entity_info['revision table'];\n }\n\n $data[$current_table]['table']['join'][$entity_info['base table']] = array(\n 'left_field' => $entity_info['entity keys']['id'],\n 'field' => 'entity_id',\n 'extra' => array(\n array('field' => 'entity_type', 'value' => $entity),\n array('field' => 'deleted', 'value' => 0, 'numeric' => TRUE),\n ),\n );\n\n if (!empty($entity_info['entity keys']['revision']) && !empty($entity_info['revision table'])) {\n $data[$revision_table]['table']['join'][$entity_info['revision table']] = array(\n 'left_field' => $entity_info['entity keys']['revision'],\n 'field' => 'revision_id',\n 'extra' => array(\n array('field' => 'entity_type', 'value' => $entity),\n array('field' => 'deleted', 'value' => 0, 'numeric' => TRUE),\n ),\n );\n\n $supports_revisions = TRUE;\n }\n\n foreach ($bundles as $bundle) {\n $bundles_names[] = t('@entity:@bundle', array('@entity' => $entity, '@bundle' => $bundle));\n }\n }\n\n $tables = array();\n $tables[FIELD_LOAD_CURRENT] = $current_table;\n if ($supports_revisions) {\n $tables[FIELD_LOAD_REVISION] = $revision_table;\n }\n\n $add_fields = array('delta', 'language', 'bundle');\n foreach ($field['columns'] as $column_name => $attributes) {\n $add_fields[] = _field_sql_storage_columnname($field['field_name'], $column_name);\n }\n\n // Note: we don't have a label available here, because we are at the field\n // level, not at the instance level. So we just go through all instances\n // and take the one which is used the most frequently.\n $field_name = $field['field_name'];\n list($label, $all_labels) = field_views_field_label($field_name);\n foreach ($tables as $type => $table) {\n if ($type == FIELD_LOAD_CURRENT) {\n $group = $group_name;\n $old_column = 'entity_id';\n $column = $field['field_name'];\n }\n else {\n $group = t('@group (historical data)', array('@group' => $group_name));\n $old_column = 'revision_id';\n $column = $field['field_name'] . '-' . $old_column;\n }\n\n $data[$table][$old_column]['field']['moved to'] = array($table, $column);\n $data[$table][$column] = array(\n 'group' => $group,\n 'title' => $label,\n 'title short' => $label,\n 'help' => t('Appears in: @bundles.', array('@bundles' => implode(', ', $bundles_names))),\n );\n\n // Go through and create a list of aliases for all possible combinations of\n // entity type + name.\n $aliases = array();\n $also_known = array();\n foreach ($all_labels as $entity_name => $labels) {\n foreach ($labels as $label_name => $true) {\n if ($type == FIELD_LOAD_CURRENT) {\n if ($group_name != $groups[$entity_name] || $label != $label_name) {\n $aliases[] = array(\n 'base' => $current_tables[$entity_name],\n 'group' => $groups[$entity_name],\n 'title' => $label_name,\n 'help' => t('This is an alias of @group: @field.', array('@group' => $group_name, '@field' => $label)),\n );\n }\n $also_known[] = t('@group: @field', array('@group' => $groups[$entity_name], '@field' => $label_name));\n }\n else {\n if ($group_name != $groups[$entity_name] && $label != $label_name && isset($revision_tables[$entity_name])) {\n $aliases[] = array(\n 'base' => $revision_tables[$entity_name],\n 'group' => t('@group (historical data)', array('@group' => $groups[$entity_name])),\n 'title' => $label_name,\n 'help' => t('This is an alias of @group: @field.', array('@group' => $group_name, '@field' => $label)),\n );\n }\n $also_known[] = t('@group (historical data): @field', array('@group' => $groups[$entity_name], '@field' => $label_name));\n }\n }\n }\n if ($aliases) {\n $data[$table][$column]['aliases'] = $aliases;\n $data[$table][$column]['help'] .= ' ' . t('Also known as: !also.', array('!also' => implode(', ', $also_known)));\n }\n\n $keys = array_keys($field['columns']);\n $real_field = reset($keys);\n $data[$table][$column]['field'] = array(\n 'table' => $table,\n 'handler' => 'views_handler_field_field',\n 'click sortable' => TRUE,\n 'field_name' => $field['field_name'],\n // Provide a real field for group by.\n 'real field' => $column . '_' . $real_field,\n 'additional fields' => $add_fields,\n 'entity_tables' => $entity_tables,\n // Default the element type to div, let the UI change it if necessary.\n 'element type' => 'div',\n 'is revision' => $type == FIELD_LOAD_REVISION,\n );\n }\n\n foreach ($field['columns'] as $column => $attributes) {\n $allow_sort = TRUE;\n\n // Identify likely filters and arguments for each column based on field type.\n switch ($attributes['type']) {\n case 'int':\n case 'mediumint':\n case 'tinyint':\n case 'bigint':\n case 'serial':\n case 'numeric':\n case 'float':\n $filter = 'views_handler_filter_numeric';\n $argument = 'views_handler_argument_numeric';\n $sort = 'views_handler_sort';\n break;\n case 'text':\n case 'blob':\n // It does not make sense to sort by blob or text.\n $allow_sort = FALSE;\n default:\n $filter = 'views_handler_filter_string';\n $argument = 'views_handler_argument_string';\n $sort = 'views_handler_sort';\n break;\n }\n\n\n if (count($field['columns']) == 1 || $column == 'value') {\n $title = t('@label (!name)', array('@label' => $label, '!name' => $field['field_name']));\n // CCK used the first 10 characters of $label. Probably doesn't matter.\n $title_short = $label;\n }\n else {\n $title = t('@label (!name:!column)', array('@label' => $label, '!name' => $field['field_name'], '!column' => $column));\n $title_short = t('@label:!column', array('@label' => $label, '!column' => $column));\n }\n\n foreach ($tables as $type => $table) {\n if ($type == FIELD_LOAD_CURRENT) {\n $group = $group_name;\n }\n else {\n $group = t('@group (historical data)', array('@group' => $group_name));\n }\n $column_real_name = $field['storage']['details']['sql'][$type][$table][$column];\n\n // Load all the fields from the table by default.\n $additional_fields = array_values($field['storage']['details']['sql'][$type][$table]);\n\n $data[$table][$column_real_name] = array(\n 'group' => $group,\n 'title' => $title,\n 'title short' => $title_short,\n 'help' => t('Appears in: @bundles.', array('@bundles' => implode(', ', $bundles_names))),\n );\n\n // Go through and create a list of aliases for all possible combinations of\n // entity type + name.\n $aliases = array();\n $also_known = array();\n foreach ($all_labels as $entity_name => $labels) {\n foreach ($labels as $label_name => $true) {\n if ($group_name != $groups[$entity_name] || $label != $label_name) {\n if (count($field['columns']) == 1 || $column == 'value') {\n $alias_title = t('@label (!name)', array('@label' => $label_name, '!name' => $field['field_name']));\n // CCK used the first 10 characters of $label. Probably doesn't matter.\n }\n else {\n $alias_title = t('@label (!name:!column)', array('@label' => $label_name, '!name' => $field['field_name'], '!column' => $column));\n }\n $aliases[] = array(\n 'group' => $groups[$entity_name],\n 'title' => $alias_title,\n 'help' => t('This is an alias of @group: @field.', array('@group' => $group_name, '@field' => $title)),\n );\n }\n $also_known[] = t('@group: @field', array('@group' => $groups[$entity_name], '@field' => $title));\n }\n }\n if ($aliases) {\n $data[$table][$column_real_name]['aliases'] = $aliases;\n $data[$table][$column_real_name]['help'] .= ' ' . t('Also known as: !also.', array('!also' => implode(', ', $also_known)));\n }\n\n $data[$table][$column_real_name]['argument'] = array(\n 'field' => $column_real_name,\n 'table' => $table,\n 'handler' => $argument,\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n 'empty field name' => t('- No value -'),\n );\n $data[$table][$column_real_name]['filter'] = array(\n 'field' => $column_real_name,\n 'table' => $table,\n 'handler' => $filter,\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n 'allow empty' => TRUE,\n );\n if (!empty($allow_sort)) {\n $data[$table][$column_real_name]['sort'] = array(\n 'field' => $column_real_name,\n 'table' => $table,\n 'handler' => $sort,\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n );\n }\n\n // Expose additional delta column for multiple value fields.\n if ($field['cardinality'] > 1 || $field['cardinality'] == FIELD_CARDINALITY_UNLIMITED) {\n $title_delta = t('@label (!name:delta)', array('@label' => $label, '!name' => $field['field_name']));\n $title_short_delta = t('@label:delta', array('@label' => $label));\n\n $data[$table]['delta'] = array(\n 'group' => $group,\n 'title' => $title_delta,\n 'title short' => $title_short_delta,\n 'help' => t('Delta - Appears in: @bundles.', array('@bundles' => implode(', ', $bundles_names))),\n );\n $data[$table]['delta']['field'] = array(\n 'handler' => 'views_handler_field_numeric',\n );\n $data[$table]['delta']['argument'] = array(\n 'field' => 'delta',\n 'table' => $table,\n 'handler' => 'views_handler_argument_numeric',\n 'additional fields' => $additional_fields,\n 'empty field name' => t('- No value -'),\n 'field_name' => $field['field_name'],\n );\n $data[$table]['delta']['filter'] = array(\n 'field' => 'delta',\n 'table' => $table,\n 'handler' => 'views_handler_filter_numeric',\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n 'allow empty' => TRUE,\n );\n $data[$table]['delta']['sort'] = array(\n 'field' => 'delta',\n 'table' => $table,\n 'handler' => 'views_handler_sort',\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n );\n }\n\n // Expose additional language column for translatable fields.\n if (!empty($field['translatable'])) {\n $title_language = t('@label (!name:language)', array('@label' => $label, '!name' => $field['field_name']));\n $title_short_language = t('@label:language', array('@label' => $label));\n\n $data[$table]['language'] = array(\n 'group' => $group,\n 'title' => $title_language,\n 'title short' => $title_short_language,\n 'help' => t('Language - Appears in: @bundles.', array('@bundles' => implode(', ', $bundles_names))),\n );\n $data[$table]['language']['field'] = array(\n 'handler' => 'views_handler_field_locale_language',\n );\n $data[$table]['language']['argument'] = array(\n 'field' => 'language',\n 'table' => $table,\n 'handler' => 'views_handler_argument_locale_language',\n 'additional fields' => $additional_fields,\n 'empty field name' => t('<No value>'),\n 'field_name' => $field['field_name'],\n );\n $data[$table]['language']['filter'] = array(\n 'field' => 'language',\n 'table' => $table,\n 'handler' => 'views_handler_filter_locale_language',\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n 'allow empty' => TRUE,\n );\n $data[$table]['language']['sort'] = array(\n 'field' => 'language',\n 'table' => $table,\n 'handler' => 'views_handler_sort',\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n );\n }\n\n // Expose additional language column for translatable fields.\n if (!empty($field['translatable'])) {\n $title_language = t('@label (!name:language)', array('@label' => $label, '!name' => $field['field_name']));\n $title_short_language = t('@label:language', array('@label' => $label));\n\n $data[$table]['language'] = array(\n 'group' => $group,\n 'title' => $title_language,\n 'title short' => $title_short_language,\n 'help' => t('Language - Appears in: @bundles.', array('@bundles' => implode(', ', $bundles_names))),\n );\n $data[$table]['language']['field'] = array(\n 'handler' => 'views_handler_field_locale_language',\n );\n $data[$table]['language']['argument'] = array(\n 'field' => 'language',\n 'table' => $table,\n 'handler' => 'views_handler_argument_locale_language',\n 'additional fields' => $additional_fields,\n 'empty field name' => t('<No value>'),\n 'field_name' => $field['field_name'],\n );\n $data[$table]['language']['filter'] = array(\n 'field' => 'language',\n 'table' => $table,\n 'handler' => 'views_handler_filter_locale_language',\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n 'allow empty' => TRUE,\n );\n $data[$table]['language']['sort'] = array(\n 'field' => 'language',\n 'table' => $table,\n 'handler' => 'views_handler_sort',\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n );\n }\n }\n }\n\n return $data;\n}", "function add_local_field_group(){\n // ...\n }", "protected function cacheLayout($minutes){\n\t\tself::$_cacheLayout[get_class($this)] = $minutes;\n\t}", "protected function buildMainFields()\n {\n $this->meta[static::FIELD_CARRIER_NAME] = [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'componentType' => Fieldset::NAME,\n 'label' => __('%1', 'Carrier Settings'),\n 'collapsible' => true,\n 'opened' => true,\n 'dataScope' => self::DATA_SCOPE_CARRIER,\n 'sortOrder' => 10,\n ],\n ],\n ],\n 'children' => [\n static::FIELD_ENTITY_ID_NAME => [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'label' => __('Id'),\n 'componentType' => Field::NAME,\n 'formElement' => Hidden::NAME,\n 'dataScope' => static::FIELD_ENTITY_ID_NAME,\n 'dataType' => Number::NAME,\n 'sortOrder' => 0,\n ],\n ],\n ],\n ],\n static::FIELD_TITLE_NAME => [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'label' => __('Default Title'),\n 'componentType' => Field::NAME,\n 'formElement' => Input::NAME,\n 'dataScope' => static::FIELD_TITLE_NAME,\n 'dataType' => Text::NAME,\n 'sortOrder' => 10,\n 'validation' => [\n 'required-entry' => true,\n ],\n ],\n ],\n ],\n ],\n static::FIELD_IS_ACTIVE_NAME => [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'label' => __('Is Active'),\n 'componentType' => Field::NAME,\n 'formElement' => Checkbox::NAME,\n 'dataScope' => static::FIELD_IS_ACTIVE_NAME,\n 'dataType' => Number::NAME,\n 'sortOrder' => 20,\n 'prefer' => 'toggle',\n 'valueMap' => [\n 'true' => '1',\n 'false' => '0',\n ],\n ],\n ],\n ],\n ],\n static::FIELD_NAME_NAME => [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'label' => __('System Name'),\n 'componentType' => Field::NAME,\n 'formElement' => Input::NAME,\n 'dataScope' => static::FIELD_NAME_NAME,\n 'dataType' => Text::NAME,\n 'validation' => [\n 'required-entry' => true,\n ],\n 'sortOrder' => 30,\n ],\n ],\n ],\n ],\n static::FIELD_CARRIER_CODE_NAME => [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'label' => __('Carrier Code'),\n 'componentType' => Field::NAME,\n 'formElement' => Input::NAME,\n 'dataScope' => static::FIELD_CARRIER_CODE_NAME,\n 'dataType' => Text::NAME,\n 'validation' => [\n 'required-entry' => true,\n 'validate-code' => true,\n 'min_text_len‌​gth' => 1,\n 'max_text_length' => 19\n ],\n 'sortOrder' => 40,\n ],\n ],\n ],\n ],\n static::FIELD_PRICE_NAME => [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'label' => __('Price'),\n 'componentType' => Field::NAME,\n 'formElement' => Hidden::NAME,\n 'dataScope' => static::FIELD_PRICE_NAME,\n 'dataType' => Number::NAME,\n 'addbefore' => $this->getBaseCurrencySymbol(),\n 'sortOrder' => 50,\n ],\n ],\n ],\n ],\n ],\n ];\n\n return $this->meta;\n }", "protected function prepareFields($fields)\n {\n $fields = KoomehAmenity::get()->sortBy('field')->map(function($amenity) {\n $field = Boolean::class;\n\n if ($amenity->field == 'number') {\n $field = Number::class;\n } \n\n if ($amenity->field == 'text') {\n $field = Text::class;\n } \n\n $fillUsing = function($request, $model, $attribute, $requestAttribute) use ($amenity) {\n if ($value = $request->get($requestAttribute)) {\n return function() use ($model, $value, $amenity) {\n $model->amenities()->attach($amenity->getKey(), compact('value'));\n };\n }\n };\n\n $resolveUsing = function($request, $resource) use ($amenity) {\n $attached = $resource->amenities->find($amenity->getKey());\n\n return data_get($attached, 'pivot.value');\n };\n\n return $field::make($amenity->name, \"amenities_{$amenity->getKey()}\")\n ->required($amenity->required ? true : false)\n ->rules($amenity->required ? 'required' : 'nullable')\n ->fillUsing($fillUsing)\n ->resolveUsing($resolveUsing);\n })->prepend($this->fakeField());\n\n return parent::prepareFields($fields);\n }", "public static function set_fields() {\r\n if ( ! function_exists( 'acf_add_local_field_group' ) ) {\r\n return;\r\n }\r\n $options = get_option( 'myhome_redux' );\r\n $fields = array(\r\n /*\r\n * General tab\r\n */\r\n array(\r\n 'key' => 'myhome_estate_tab_general',\r\n 'label' => esc_html__( 'General', 'myhome-core' ),\r\n 'type' => 'tab',\r\n 'placement' => 'top',\r\n 'wrapper' => array (\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ),\r\n ),\r\n // Featured\r\n array(\r\n 'key' => 'myhome_estate_featured',\r\n 'label' => esc_html__( 'Featured', 'myhome-core' ),\r\n 'name' => 'estate_featured',\r\n 'type' => 'true_false',\r\n 'default_value' => false,\r\n 'wrapper' => array(\r\n 'class' => 'acf-1of3'\r\n ),\r\n ),\r\n );\r\n\r\n foreach ( My_Home_Attribute::get_attributes() as $attr ) {\r\n if ( $attr->get_type() != 'field' ) {\r\n continue;\r\n }\r\n\r\n $name = $attr->get_name();\r\n $display_after = $attr->get_display_after();\r\n if ( ! empty( $display_after ) ) {\r\n $name .= ' (' . $display_after . ')';\r\n }\r\n\r\n array_push( $fields, array(\r\n 'key' => 'myhome_estate_attr_' . $attr->get_slug(),\r\n 'label' => $name,\r\n 'name' => 'estate_attr_' . $attr->get_slug(),\r\n 'type' => 'text',\r\n 'default_value' => '',\r\n 'wrapper' => array(\r\n 'class' => 'acf-1of3'\r\n ),\r\n ) );\r\n }\r\n\r\n\r\n $fields = array_merge( $fields, array(\r\n /*\r\n * Location tab\r\n */\r\n array(\r\n 'key' => 'myhome_estate_tab_location',\r\n 'label' => esc_html__( 'Location', 'myhome-core' ),\r\n 'type' => 'tab',\r\n ),\r\n // Location\r\n array(\r\n 'key' => 'myhome_estate_location',\r\n 'label' => esc_html__( 'Location', 'myhome-core' ),\r\n 'name' => 'estate_location',\r\n 'type' => 'google_map',\r\n ),\r\n /*\r\n * Gallery tab\r\n */\r\n array(\r\n 'key' => 'myhome_estate_tab_gallery',\r\n 'label' => 'Gallery',\r\n 'instructions' => 'Click \"Add to gallery\" below to upload files',\r\n 'type' => 'tab',\r\n ),\r\n // Gallery\r\n array(\r\n 'key' => 'myhome_estate_gallery',\r\n 'label' => 'Gallery',\r\n 'name' => 'estate_gallery',\r\n 'type' => 'gallery',\r\n 'preview_size' => 'thumbnail',\r\n 'library' => 'all',\r\n )\r\n ) );\r\n\r\n if ( isset( $options['mh-estate_plans'] ) && $options['mh-estate_plans'] ) {\r\n $fields = array_merge( $fields, array(\r\n /*\r\n * Plans tab\r\n */\r\n array(\r\n 'key' => 'myhome_estate_tab_plans',\r\n 'label' => esc_html__( 'Plans', 'myhome-core' ),\r\n 'type' => 'tab',\r\n 'placement' => 'left',\r\n ),\r\n // Plan\r\n array(\r\n 'key' => 'myhome_estate_plans',\r\n 'label' => esc_html__( 'Plans', 'myhome-core' ),\r\n 'name' => 'estate_plans',\r\n 'type' => 'repeater',\r\n 'button_label' => esc_html__( 'Add plan', 'myhome-core' ),\r\n 'sub_fields' => array(\r\n // Name\r\n array(\r\n 'key' => 'myhome_estate_plans_name',\r\n 'label' => esc_html__( 'Name', 'myhome-core' ),\r\n 'name' => 'estate_plans_name',\r\n 'type' => 'text',\r\n ),\r\n // Image\r\n array(\r\n 'key' => 'myhome_estate_plans_image',\r\n 'label' => esc_html__( 'Image', 'myhome-core' ),\r\n 'name' => 'estate_plans_image',\r\n 'type' => 'image',\r\n ),\r\n ),\r\n )\r\n ) );\r\n }\r\n\r\n if ( ! empty( $options['mh-estate_video'] ) ) {\r\n $fields = array_merge( $fields, array(\r\n /*\r\n * Video tab\r\n */\r\n array(\r\n 'key' => 'myhome_estate_tab_video',\r\n 'label' => esc_html__( 'Video', 'myhome-core' ),\r\n 'type' => 'tab',\r\n 'placement' => 'left',\r\n ),\r\n // Video\r\n array(\r\n 'key' => 'myhome_estate_video',\r\n 'label' => esc_html__( 'Video link (Youtube / Vimeo / Facebook / Twitter / Instagram / link to .mp4)', 'myhome-core' ),\r\n 'name' => 'estate_video',\r\n 'type' => 'oembed',\r\n )\r\n ) );\r\n }\r\n\r\n if ( ! empty( $options['mh-estate_virtual_tour'] ) ) {\r\n $fields = array_merge( $fields, array(\r\n /*\r\n * Virtual tour tab\r\n */\r\n array(\r\n 'key' => 'myhome_estate_tab_virtual_tour',\r\n 'label' => esc_html__( 'Virtual tour', 'myhome-core' ),\r\n 'type' => 'tab',\r\n 'placement' => 'left',\r\n ),\r\n // Virtual tour\r\n array(\r\n 'key' => 'myhome_estate_virtual_tour',\r\n 'label' => esc_html__( 'Add embed code', 'myhome-core' ),\r\n 'name' => 'virtual_tour',\r\n 'type' => 'text',\r\n )\r\n ) );\r\n }\r\n\r\n acf_add_local_field_group(\r\n array(\r\n 'key' => 'myhome_estate',\r\n 'title' => '<span class=\"dashicons dashicons-admin-home\"></span> ' . esc_html__( 'Property details', 'myhome-core' ),\r\n 'fields' => $fields,\r\n 'menu_order' => 10,\r\n 'location' => array(\r\n array(\r\n array(\r\n 'param' => 'post_type',\r\n 'operator' => '==',\r\n 'value' => 'estate',\r\n ),\r\n ),\r\n ),\r\n )\r\n );\r\n }", "protected function alterFields(&$fields) {\n $label_key = $this->entityList->getTargetEntityType()->getKey('label');\n if ($label_key) {\n $fields['_label']['sort_field'] = $label_key;\n }\n }", "public function getLayoutCache(){\n\t\tif(isset(self::$_cacheLayout[get_class($this)])){\n\t\t\treturn self::$_cacheLayout[get_class($this)];\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public function addFields($formelements){\r\n\t\t $this->formElements \t= $formelements;\r\n\t}", "public function addField(\\Closure $c) {\n $field_type = $c($this);\n $this[$field_type->getFieldName()] = $field_type;\n $this['field_import_map'][$field_type->getImportFieldName()] = $field_type->getFieldName();\n $this['local_to_import'][$field_type->getFieldName()] = $field_type->getImportFieldName();\n }", "public function postImport() {\n parent::postImport();\n if (!civicrm_initialize()) {\n return;\n }\n // Need to clear the cache once the fields are created.\n civicrm_api3('system', 'flush', array('version' => 3));\n }", "public function xfields() {\n\t\t\n\t\t/* Load Model */\n\t\t$fields = $this->getModel ( 'field' );\n\t\t\n\t\t/* Get all rows */\n\t\t$fields->getAll ( 'form_id = \"' . $this->_getFormId () . '\"' );\n\t\t\n\t\tif (! count ( $fields->rows )) {\n\t\t\t$this->_redirect ( '_newField' );\n\t\t\treturn;\n\t\t}\n\t\t/* set the view file (optional) */\n\t\t$this->setView ( 'fields' );\n\t\t\n\t\t/* set last view into session */\n\t\t$this->session->returnto ( $this->getView () );\n\t}", "public function getCMSFields() {\n $fields = parent::getCMSFields();\n\n //google map module\n $location = new Location();\n $googlemapfield = new GoogleMapField($location, \"Google Map Field\");\n $Latitude = new ReadonlyField('Latitude', 'Latitude', $googlemapfield->getDefaultValue('Latitude'));\n $Longitude = new ReadonlyField('Longitude', 'Longitude', $googlemapfield->getDefaultValue('Longitude'));\n $fields->addFieldToTab('Root.Map', $googlemapfield);\n $fields->addFieldToTab('Root.Map', $Latitude);\n $fields->addFieldToTab('Root.Map', $Longitude);\n\n return $fields;\n }" ]
[ "0.5918488", "0.57938385", "0.5698413", "0.55832916", "0.5426157", "0.54191285", "0.53879297", "0.5331738", "0.5304208", "0.5303813", "0.52821356", "0.5208681", "0.5185324", "0.51755005", "0.5166491", "0.5166137", "0.5163312", "0.5156969", "0.5143783", "0.51026195", "0.5092685", "0.509176", "0.50907034", "0.5084776", "0.5084649", "0.50846064", "0.5069176", "0.5045308", "0.50288904", "0.5026311", "0.4999759", "0.4967637", "0.49469525", "0.49460104", "0.49432665", "0.49355322", "0.49220186", "0.49216932", "0.49162838", "0.490582", "0.48940277", "0.48939297", "0.48846358", "0.48827282", "0.48690325", "0.4867294", "0.48651698", "0.48617226", "0.48573968", "0.4854044", "0.485287", "0.4839787", "0.48350394", "0.48349494", "0.48347858", "0.48316503", "0.48227975", "0.4819584", "0.4811952", "0.48112953", "0.48076403", "0.48070347", "0.4799532", "0.4786138", "0.47814155", "0.47739068", "0.47599736", "0.47565988", "0.47560647", "0.47542474", "0.47419527", "0.4713177", "0.4708282", "0.4707042", "0.47018746", "0.46958414", "0.46918055", "0.468939", "0.46863195", "0.4682751", "0.4676225", "0.46746656", "0.4667493", "0.4666258", "0.46656004", "0.4662578", "0.46617818", "0.46534112", "0.46443027", "0.46400315", "0.46369174", "0.46256268", "0.46207404", "0.4614792", "0.46147135", "0.46130478", "0.46080756", "0.4606161", "0.46004552", "0.45957825", "0.459451" ]
0.0
-1
/ Get all sortable fields
public function getSortableFields() { $sortableAttributeTypes = array( AttributeType::Number, AttributeType::DateTime, AttributeType::String, AttributeType::Bool, ); $sortableFields = $this->getMetaFields(); $customFields = $this->getCustomFields(); foreach ( $customFields as $handle => $field ) { $fieldTypeContentAttribute = $field->fieldType->defineContentAttribute(); if ( is_array( $fieldTypeContentAttribute ) ) { $fieldTypeContentAttribute = array_shift( $fieldTypeContentAttribute ); } if ( in_array( $fieldTypeContentAttribute, $sortableAttributeTypes ) ) { $sortableFields[ $handle ] = $field; } } return $sortableFields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sortFields()\n {\n return property_exists($this, 'sortable') ? $this->sortable : [];\n }", "protected function get_sortable_columns()\n {\n }", "protected function get_sortable_columns()\n {\n }", "protected function get_sortable_columns()\n {\n }", "public function getListFields();", "public function get_sortable_columns()\r\n {\r\n return array(\r\n 'name' => array('name', false),\r\n 'sku' => array('sku', false),\r\n 'price' => array('price', false),\r\n 'date' => array('date', false)\r\n );\r\n }", "public function get_sortable_columns() {\n\n\t\treturn $sortable = array(\n\t\t\t// 'name' => array('name'),\n\t\t\t// 'user_id'=>array('user_id')\n\t\t);\n\t}", "function get_sortable_columns() {\n\t\t$sortable_columns = array(\n\t\t\t'id' => array( 'id', false ),\n\t\t\t'date' => array( 'date', false ),\n\t\t\t'uploader' => array( 'uploader', false ),\n\t\t\t'uploader_group' => array( 'uploader_group', false ),\n\t\t\t'site' => array( 'site', false ),\n\t\t\t'assessment' => array( 'assessment', false ),\n\t\t);\n\t\treturn $sortable_columns;\n\t}", "public function get_sortable_columns() {\n return $sortable = array(\n \"col_user\"=>array(\"user_login\",false),\n \"col_groupName\"=>array(\"groupName\",false)\n );\n }", "public static function sortables()\n {\n return ['id', 'module_name'];\n }", "public function get_sortable_columns()\n {\n return array('name' => array('name', false));\n }", "function get_sortable_columns()\n {\n $sortable_columns = array(\n// 'id' => array('id',false), //true means it's already sorted\n// 'type' => array('type', false),\n// 'name' => array('name', false),\n 'tag' => array('tag', false),\n 'kind' => array('kind', false),\n );\n return $sortable_columns;\n }", "protected abstract function getOrderFields();", "function get_sortable_columns() {\n $sortable_columns = array(\n 'title' => array('title',false), //true means it's already sorted\n 'contact_name' => array('contact_name',false),\n 'date_created' => array('date_created',false)\n );\n return $sortable_columns;\n }", "public function get_sortable_columns() {\n\t\treturn array();\n\t}", "function get_sortable_columns() {\n\t\t$sortable_columns = array(\n\t\t\t'id' => array('id', false),\n\t\t\t'company' => array('company', false),\n\t\t\t'transaction_id' => array('transaction_id', false),\n\t\t\t'email' => array('email', false),\n\t\t\t'expiration' => array('expiration', false),\n\t\t\t'accesstourlkey' => array('accesstourlkey', false),\n\t\t\t'webinarpass' => array('webinarpass', false),\n\t\t\t'total' => array('total', false)\n\t\t);\n\t\treturn $sortable_columns;\n\t}", "function get_sortable_columns() {\n\n\t\treturn $sortable_columns = array(\n\t\t\t'title'\t \t=> array( 'title', false ),\t//true means it's already sorted\n\t\t\t'rating'\t=> array( 'rating', false ),\n\t\t\t'director'\t=> array( 'director', false )\n\t\t);\n\t}", "public function get_sortable_columns() {\n return $sortable = array(\n 'template_id' => array( 'template_id', true ),\n 'template_name' => array( 'template_name', true ),\n 'create_date' => array( 'create_date', true )\n );\n }", "public function\n\t\tget_ordering_fields()\n\t{\n\t\tif (!isset($this->ordering_fields)) {\n\t\t\t$this->ordering_fields = array();\n\t\t\t\n\t\t\t$sxe = $this->get_simple_xml_element();\n\t\t\t\n\t\t\tforeach ($sxe->table->ordering->field as $field) {\n\t\t\t\t$this->ordering_fields[] = array(\n\t\t\t\t\t'name' => (string)$field['name'],\n\t\t\t\t\t'direction' => (string)$field['direction']\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\tif (count($this->ordering_fields) < 1) {\n\t\t\t\t$this->ordering_fields = array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'sort_order',\n\t\t\t\t\t\t'direction' => 'ASC'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->ordering_fields;\n\t}", "public function get_sortable_columns() {\r\n return $sortable = array(\r\n 'col_created_on'=> array('created_on', false),\r\n 'col_type'=> array('type', false),\r\n );\r\n }", "protected function get_sortable_columns() {\n\t\t$c = array(\n\t\t\t'username' => 'login',\n\t\t\t'email' => 'email',\n\t\t);\n\n\t\treturn $c;\n\t}", "public function get_sortable_columns()\r\n\t{\r\n\t\treturn [\r\n\t\t\t'name' => [ 'name', false ]\r\n\t\t];\r\n\t}", "public function ajax_sort_field() {\n\t\tglobal $wpdb;\n\n\t\t$data = array();\n\n\t\tforeach ( $_REQUEST['order'] as $k ) :\n\t\t\tif ( 'root' !== $k['item_id'] && !empty( $k['item_id'] ) ) :\n\t\t\t\t$data[] = array(\n\t\t\t\t\t'field_id' \t=> $k['item_id'],\n\t\t\t\t\t'parent' \t=> $k['parent_id']\n\t\t\t\t);\n\t\t\tendif;\n\t\tendforeach;\n\n\t\tforeach ( $data as $k => $v ) :\n\t\t\t// Update each field with it's new sequence and parent ID\n\t\t\t$wpdb->update( $this->field_table_name, array(\n\t\t\t\t'field_sequence'\t=> $k,\n\t\t\t\t'field_parent' \t=> $v['parent'] ),\n\t\t\t\tarray( 'field_id' => $v['field_id'] ),\n\t\t\t\t'%d'\n\t\t\t);\n\t\tendforeach;\n\n\t\tdie(1);\n\t}", "protected function getSortFields()\r\n {\r\n return array(\r\n 'f.ordering' => JText::_('JGRID_HEADING_ORDERING'),\r\n 'f.state' => JText::_('JSTATUS'),\r\n 'f.title' => JText::_('JGLOBAL_TITLE'),\r\n 'f.type' => JText::_('COM_JVOTER_FIELD_TYPE_LABEL'), \r\n 'f.id' => JText::_('JGRID_HEADING_ID'),\r\n );\r\n }", "static function get_sortable_columns(): array {\r\n return [\r\n 'title' => 'Title',\r\n self::qcol('date_till') => self::qcol('date_till')];\r\n }", "function get_sortable_columns()\n {\n $sortable_columns = array(\n \n 'timestamp' => array('timestamp', true),\n );\n\n return $sortable_columns;\n }", "public function get_sortable_columns() {\r\n\t\t$sortable_columns = array(\r\n\t\t\t'name' => array( 'name', true ),\r\n\t\t\t'city' => array( 'city', false )\r\n\t\t);\r\n\r\n\t\treturn $sortable_columns;\r\n\t}", "public function get_sortable_columns() {\n\t\t$sortable_columns = array(\n\t\t\t'name' => array( 'name', true ),\n\t\t\t'jumlahsts' => array( 'jumlahsts', true ),\n\t\t\t'expired' => array( 'expired', true ),\n\t\t\t'status' => array( 'status', false )\n\t\t);\n\n\t\treturn $sortable_columns;\n\t}", "function get_sortable_columns() {\n\t\t\n\t\t$sortable_columns = array();\n\t\t\n\t\treturn apply_filters('bdpp_style_sortable_columns', $sortable_columns);\n\t}", "function get_sortable_columns() {\n $sortable_columns = array(\n 'date_published' \t=> array('date_published',false), //true means its already sorted\n 'listing_title' => array('listing_title',false),\n 'quantity' => array('quantity',false),\n 'price' => array('price',false),\n 'status' => array('status',false)\n );\n return $sortable_columns;\n }", "public function getSortable()\n {\n return $this->sortable;\n }", "public function get_sortable_columns() {\n\treturn $sortable = array(\n\t\t'channel' => array('channel',false),\n\t\t'source' => array('source',false),\n\t\t'status' => array('status',false),\n\t\t'title' => array('title',false),\n 'pubdate' => array('pubdate',false)\n\t);\n}", "function get_sortable_columns()\n {\n $sortable_columns = array(\n 'date_added' => array('date_added', false),\n// 'wp_username' => array('wp_username', false),\n// 'redirect_id' => array('redirect_id', false),\n// 'redirect_destination' => array('redirect_destination', false),\n );\n return $sortable_columns;\n }", "public function get_sortable_columns()\n {\n return array(\n 'ID' => array('ID', true),\n 'Orderno' => array('Orderno', true),\n 'Mtid' => array('Mtid', true),\n 'Userid' => array('Userid', true),\n 'UserName' => array('UserName', true)\n );\n }", "public function get_sortable_columns() {\n\n\t\t// Build our array of sortable columns.\n\t\t$setup = array(\n\t\t\t'review_title' => array( 'review_title', false ),\n\t\t\t'review_product' => array( 'review_product', false ),\n\t\t\t'review_date' => array( 'review_date', true ),\n\t\t\t'review_score' => array( 'review_score', true ),\n\t\t\t'review_status' => array( 'review_status', true ),\n\t\t);\n\n\t\t// Return it, filtered.\n\t\treturn apply_filters( Core\\HOOK_PREFIX . 'review_table_sortable_columns', $setup );\n\t}", "public function ajax_sort_field() {\n global $wpdb;\n\n $data = array();\n\n foreach ($_REQUEST['order'] as $k) :\n if ('root' !== $k['item_id'] && !empty($k['item_id'])) :\n $data[] = array(\n 'field_id' => $k['item_id'],\n 'parent' => $k['parent_id']\n );\n endif;\n endforeach;\n\n foreach ($data as $k => $v) :\n // Update each field with it's new sequence and parent ID\n $wpdb->update($this->field_table_name, array(\n 'field_sequence' => $k,\n 'field_parent' => $v['parent']), array('field_id' => $v['field_id']), '%d'\n );\n endforeach;\n\n die(1);\n }", "public function fields(): array\n {\n return [\n ID::make(),\n DateTime::make('createdAt')->sortable()->readOnly()->hidden(),\n DateTime::make('updatedAt')->sortable()->readOnly()->hidden(),\n Str::make('slug'),\n Str::make('name'),\n ];\n }", "public function getFieldsList(){\n return $this->_get(1);\n }", "function get_sortable_columns( ) {\r\n\t\treturn apply_filters( 'mla_list_table_get_sortable_columns', self::$default_sortable_columns );\r\n\t}", "public function get_sortable_columns()\n {\n $sortable_columns = array();\n\n return $sortable_columns;\n }", "function get_sortable_columns() {\n $sortable_columns = array(\n 'name' => array('name',false), //true means it's already sorted\n 'job' => array('job',false),\n\t\t\t'linkedin' => array('linkedin',false),\n 'facebook' => array('facebook',false)\n );\n return $sortable_columns;\n }", "protected function get_sortable_columns() {\n\n\t\treturn array(\n\t\t\t'subject' => array( 'subject', false ),\n\t\t\t'date_sent' => array( 'date_sent', false ),\n\t\t);\n\t}", "public function getAllFields();", "public function getAllFields() {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db_q'];\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t= false;\n\t\t\t// Query set up\t\n\t\t\t$table\t\t\t= 'tb_field';\n\t\t\t$select_what\t= 'id, vc_field AS vc_name';\n\t\t\t$conditions\t\t= \"1 ORDER BY vc_field ASC\";\n\t\t\t$return\t\t\t= $db->getAllRows_Arr($table, $select_what, $conditions);\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}", "public function formFields()\n {\n return $this->hasMany('Thorazine\\Hack\\Models\\FormField')\n ->orderBy('drag_order', 'asc')\n ->orderBy('id', 'asc');\n }", "public function get_sortable_columns() {\n\t\treturn array(\n\t\t\t'category' => 'category',\n\t\t\t'due' => 'due',\n\t\t\t'status' => 'status',\n\t\t\t'method' => 'method',\n\t\t);\n\t}", "public function get_sortable_columns()\n\t{\n\t\treturn array(\n\t\t\t'timestamp' => array( 'timestamp', true ),\n\t\t);\n\t}", "static function custom_get_creatable_fields() {\n # use this functionality to get a list of all field in the table\n return self::default_get_updatable_fields();\n }", "public function getSorting();", "public function updateSortingFormFields()\n {\n global $rlDb;\n\n if (!$GLOBALS['config']['cache']) {\n return false;\n }\n\n $this->removeFiles('cache_sorting_forms_fields');\n\n $rlDb->setTable('categories');\n\n if ($categories = $rlDb->fetch(array('ID', 'Key'))) {\n foreach ($categories as $value) {\n $category_id = (int) $value['ID'];\n\n $sql = \"SELECT `T2`.`Key`, `T2`.`Type`, `T2`.`Default`, `T2`.`Condition`, `T2`.`Details_page`, \";\n $sql .= \"`T2`.`Multilingual`, `T2`.`Opt1`, `T2`.`Opt2`, `T2`.`Contact` \";\n $sql .= \"FROM `{db_prefix}sorting_forms` AS `T1` \";\n $sql .= \"LEFT JOIN `{db_prefix}listing_fields` AS `T2` ON `T1`.`Field_ID` = `T2`.`ID` \";\n $sql .= \"WHERE `T1`.`Category_ID` = {$category_id} ORDER BY `T1`.`Position`\";\n\n if ($fields = $rlDb->getAll($sql, 'Key')) {\n $out[$category_id] = $fields;\n }\n }\n\n $this->set('cache_sorting_forms_fields', $out);\n }\n }", "public function get_sortable_columns() {\n\t\t$sortable_columns = array(\n\t\t);\n\n\t\treturn $sortable_columns;\n\t}", "function tx_mnogosearch_listTableFields(array &$params) {\n\t\t$tableName = $params['row']['tx_mnogosearch_table'];\n\t\tif ($tableName != '') {\n\t\t\t$fieldTypeFilter = ($params['field'] == 'tx_mnogosearch_title_field' ?\n\t\t\t\t\tarray('input') : array('input', 'text'));\n\t\t\t$fields = array_keys($GLOBALS['TYPO3_DB']->admin_get_fields($tableName));\n\t\t\tt3lib_div::loadTCA($params['row']['tx_mnogosearch_table']);\n\t\t\t$result = array();\n\t\t\tforeach ($fields as $field) {\n\t\t\t\tif (isset($GLOBALS['TCA'][$tableName]['columns'][$field]) &&\n\t\t\t\t\t\tin_array($GLOBALS['TCA'][$tableName]['columns'][$field]['config']['type'], $fieldTypeFilter)) {\n\t\t\t\t\t$title = trim($GLOBALS['LANG']->sL($GLOBALS['TCA'][$tableName]['columns'][$field]['label']), ':');\n\t\t\t\t\t$result[$title] = array($title, $field);\n\t\t\t\t}\n\t\t\t}\n\t\t\tusort($result, tx_mnogosearch_sortItems);\n\t\t\t$params['items'] += $result;\n\t\t}\n\t}", "public function getSortableField() : int\n {\n return $this->sortableField;\n }", "public static function _prepareSortable() {\n $data = [];\n $sortableGroupField = static::getSortableGroupField();\n $sortableField = static::getSortableField();\n foreach(static::all() as $row) {\n $keyParts = [];\n foreach ($sortableGroupField as $sgf) {\n $keyParts[] = $row->{$sortableGroupField};\n }\n $key = implode('_',$keyParts);\n if ($sortableGroupField) {\n $data[$key][] = $row;\n } else {\n $data[0][$row];\n }\n }\n\n foreach ($data as $group => $groupData ) {\n $i = 0;\n foreach ($groupData as $row) {\n $row->{$sortableField} = ++$i;\n $row->save();\n echo sprintf(\"row %d was orderer<br>\\n\",$row->id);\n }\n }\n }", "function get_fields( ) {\n\t\treturn $this->fields_list;\n\t\t}", "final public function getAllFields()\r\n {\r\n return array($this->_field);\r\n }", "public function getFields() : FieldCollection;", "public function list_fields() {\n return $this->db->list_fields($this->_table());\n }", "public function get_sortable_columns() {\n\t\treturn [\n\t\t\t'uri' => [ 'uri', false ],\n\t\t\t'times_accessed' => [ 'times_accessed', false ],\n\t\t\t'accessed' => [ 'accessed', false ],\n\t\t];\n\t}", "public function get_sortable_columns() {\n\t\t$sortable_columns = array(\n\t\t\t'transaction_id' \t=> array( 'transaction_id', true ),\n\t\t\t'trade_date' \t\t=> array( 'trade_date', true ),\n\t\t\t'settlement_date' \t=> array( 'settlement_date', true ),\n\t\t\t'transaction_type' \t=> array( 'transaction_type', true ),\n\t\t\t'equity' \t\t\t=> array( 'equity', true ),\n\t\t\t'ticker_symbol' \t=> array( 'ticker_symbol', true ),\n\t\t\t'num_of_shares' \t=> array( 'num_of_shares', true ),\n\t\t\t'price' \t\t\t=> array( 'price', true ),\n\t\t\t'transaction_fees' \t=> array( 'transaction_fees', true ),\n\t\t\t'currency' \t\t\t=> array( 'currency', true ),\n\t\t\t'user_id' \t\t\t=> array( 'user_id', true ),\n\t\t\t'stock_id' \t\t\t=> array( 'stock_id', true ),\n\t\t\t'platform' \t\t\t=> array( 'platform', true ),\n\t\t\t'broker' \t\t\t=> array( 'broker', true ),\n\t\t\t'account_id' \t\t=> array( 'account_id', true ),\n\t\t\t'notes' \t\t\t=> array( 'notes', true ),\n\t\t\t//'exchange_name' => array( 'exchange_name', false )\n\t\t);\n\n\t\treturn $sortable_columns;\n\t}", "public static function sortables()\n {\n return ['plot_ref', 'plot_active', 'plot_percent_cultivated_land', 'plot_real_area', 'plot_start_date'];\n }", "public function prepareSortableFields()\n {\n if (!$this->getAvailableOrders()) {\n $this->setAvailableOrders($this->_getConfig()->getAttributeUsedForSortByArray());\n }\n $cedAvailableOrders = $this->getAvailableOrders();\n if (!$this->getSortBy()) {\n if ($defaultSortBy = $this->_getConfig()->getDefaultSortBy()) {\n if (isset($cedAvailableOrders[$defaultSortBy])) {\n $this->setSortBy($defaultSortBy);\n }\n }\n }\n return $this;\n }", "public function all_fields()\n {\n $allfields = array();\n foreach (array_values($this->CLASS_CONTAINER) as $val){\n $allfields = array_merge($allfields, $this->{$val});\n }\n foreach (array_values($this->singular_fields) as $val){\n if($this->{$val}) {\n $allfields[] = $this->{$val};\n }\n }\n\n return $allfields;\n }", "public function pubFields()\n {\n $fields = array();\n\n foreach ($this as $column => $value) {\n $fields[$column] = 'column';\n }\n\n // FIXME From Doctrine: prevent mapped Doctrine_Records from being displayed fully\n foreach ($this->_values as $key => $value) {\n $fields[$key] = 'value';\n }\n\n foreach ($this->_table->getRelations() as $key => $relation) {\n if (strpos($key, 'Clip_Model_Relation') !== 0) {\n $fields[$key] = 'relation';\n }\n }\n\n // reorder the fields conveniently\n $reorder = array(\n 'core_title' => 'map',\n 'core_uniqueid' => 'map',\n 'core_tid' => 'map',\n 'core_pid' => 'value',\n 'core_author' => 'value',\n 'core_creator' => 'map',\n 'core_approvalstate' => 'map'\n );\n $fields = array_merge($reorder, $fields);\n\n return $fields;\n }", "public function get_sortable_columns() {\n\n\t\t\t$sortable_columns = array(\n\n\t\t\t\t'topic_name' => array( 'topic_name', true )\n\n\t\t\t);\n\n\n\n\t\t\treturn $sortable_columns;\n\n\t\t}", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function listFields()\n {\n return array_keys($this->fields);\n }", "public function get_sortable_columns() {\n\t\treturn [\n\t\t\t'product' => ['product', false],\n\t\t\t'quantity' => ['quantity', false],\n\t\t\t'price' => ['price', false],\n\t\t\t'total' => ['total', false]\n\t\t];\n\t}", "public static function getSortFieldNames()\n {\n return array('iduser', 'username', 'email', 'state', 'logondate');\n }", "private function _fields() {\n if ($this->_table() && empty($this->fields)) {\n $this->fields = $this->db->list_fields($this->_table());\n }\n return $this->fields;\n }", "public function getAllFields()\n {\n return $this->fields;\n }", "protected function __fields() {\n $Fields = array_keys(get_object_vars($this));\n if (!empty ($this->__onlyFields)) {\n $Fields = $this->__onlyFields;\n }\n $NewFields = array();\n foreach ($Fields as $field) {\n if (in_array ($field, array ('__bound', '__Data', 'cleaned_data', 'label_suffix', 'required_suffix', 'is_editable', 'suppress_errors'))) continue;\n if (!is_object($this->$field)) continue;\n if (!empty ($this->disabled[$field])) continue;\n if (in_array ($field, $this->__Exclude)) continue;\n $NewFields[] = $field;\n }\n return $NewFields;\n }", "protected function getSortFields()\n\t{\n\t\treturn array(\n\t\t\t'a.lft' => JText::_('JGRID_HEADING_ORDERING'),\n\t\t\t'a.published' => JText::_('JSTATUS'),\n\t\t\t'a.title' => JText::_('JGLOBAL_TITLE'),\n\t\t\t'a.home' => JText::_('COM_MENUS_HEADING_HOME'),\n\t\t\t'a.access' => JText::_('JGRID_HEADING_ACCESS'),\n\t\t\t'association' => JText::_('COM_MENUS_HEADING_ASSOCIATION'),\n\t\t\t'language' => JText::_('JGRID_HEADING_LANGUAGE'),\n\t\t\t'a.id' => JText::_('JGRID_HEADING_ID')\n\t\t);\n\t}", "protected function _fields()\n\t{\n\t\treturn array(\n\t\t\t\t'name',\n\t\t\t 'intro', 'sort_order',\n\t\t\t 'status', 'feature',\n\t\t);\n\t}", "function getValidSorts() {\n\treturn array(\n\t\t// field => label\n\t\t'-images.count' => 'Images (Most)',\n\t\t'images.count' => 'Images (Least)',\n\t\t'name' => 'Name (A-Z)',\n\t\t'-name' => 'Name (Z-A)',\n\t\t'parent.name' => 'City (A-Z)',\n\t\t'-parent.name' => 'City (Z-A)',\n\t\t'-height' => 'Height (Highest)',\n\t\t'height' => 'Height (Lowest)',\n\t\t'-floors' => 'Floors (Most)',\n\t\t'floors' => 'Floors (Least)',\n\t\t'-year' => 'Year (Newest)',\n\t\t'year' => 'Year (Oldest)',\n\t);\n}", "private static function sorted_keys($fields)\r\n {/*{{{*/\r\n $sorts = array();\r\n foreach($fields as $field)\r\n {\r\n switch($field['type'])\r\n {\r\n case 'uploader':\r\n $sorts['uploader'][] = $field['key'];\r\n break;\r\n case 'dropdown':\r\n $sorts['dropdown'][] = $field['key'];\r\n break;\r\n case 'text':\r\n $sorts['text'][] = $field['key'];\r\n break;\r\n case 'textfull':\r\n $sorts['textfull'][] = $field['key'];\r\n break;\r\n case 'checkbox':\r\n $sorts['checkbox'][] = $field['key'];\r\n break;\r\n case 'textarea':\r\n $sorts['textarea'][] = $field['key'];\r\n break;\r\n case 'hidden':\r\n $sorts['hidden'][] = $field['key'];\r\n break;\r\n case 'editor':\r\n $sorts['editor'][] = $field['key'];\r\n break;\r\n default:\r\n $sorts['undefined'][] = $field['key'];\r\n }\r\n }\r\n return $sorts;\r\n }", "public function getAllSearchableFields()\n {\n $fields = \\Config::inst()->get(get_class($this->owner), 'searchable_fields');\n $labels = $this->owner->fieldLabels();\n\n // fallback to default method\n if(!$fields) {\n return $this->owner->searchableFields();\n }\n\n // Copied from DataObject::searchableFields() as there is no separate accessible method\n\n // rewrite array, if it is using shorthand syntax\n $rewrite = array();\n foreach($fields as $name => $specOrName) {\n $identifer = (is_int($name)) ? $specOrName : $name;\n\n if(is_int($name)) {\n // Format: array('MyFieldName')\n $rewrite[$identifer] = array();\n } elseif(is_array($specOrName)) {\n // Format: array('MyFieldName' => array(\n // 'filter => 'ExactMatchFilter',\n // 'field' => 'NumericField', // optional\n // 'title' => 'My Title', // optiona.\n // ))\n $rewrite[$identifer] = array_merge(\n array('filter' => $this->owner->relObject($identifer)->stat('default_search_filter_class')),\n (array)$specOrName\n );\n } else {\n // Format: array('MyFieldName' => 'ExactMatchFilter')\n $rewrite[$identifer] = array(\n 'filter' => $specOrName,\n );\n }\n if(!isset($rewrite[$identifer]['title'])) {\n $rewrite[$identifer]['title'] = (isset($labels[$identifer]))\n ? $labels[$identifer] : \\FormField::name_to_label($identifer);\n }\n if(!isset($rewrite[$identifer]['filter'])) {\n $rewrite[$identifer]['filter'] = 'PartialMatchFilter';\n }\n }\n\n return $rewrite;\n }", "public function Fields()\n {\n foreach ($this->getExtraFields() as $field) {\n if (!$this->fields->fieldByName($field->getName())) {\n $this->fields->push($field);\n }\n }\n\n return $this->fields;\n }", "public static function getAllFields(): array\n {\n $className = get_called_class();\n $table = with(new $className)->getTable();\n $cache_key = self::$cache_prefix.'.ALLFIELDS.' . strtoupper($table);\n\n return self::$use_cache ? Cache::remember($cache_key, 5 * 60, function () use ($table) {\n return \\Schema::getColumnListing($table);\n }) : \\Schema::getColumnListing($table);\n }", "public function admin_get_fields($tableName)\n {\n $output = [];\n $columns_res = $this->query('SHOW FULL COLUMNS FROM `' . $tableName . '`');\n if ($columns_res !== false) {\n while ($fieldRow = $columns_res->fetch_assoc()) {\n $output[$fieldRow['Field']] = $fieldRow;\n }\n $columns_res->free();\n }\n return $output;\n }", "public function getFieldList()\n {\n $sObjectName = $this->getShopObjectName();\n\n if ($sObjectName) {\n $oShopObject = oxNew($sObjectName);\n } else {\n $oShopObject = oxNew('oxbase');\n $oShopObject->init($this->getTableName());\n }\n\n if ($oShopObject instanceof oxI18n) {\n $oShopObject->setLanguage(0);\n $oShopObject->setEnableMultilang(false);\n }\n\n $sViewName = $oShopObject->getViewName();\n $sFields = str_ireplace('`' . $sViewName . \"`.\", \"\", strtoupper($oShopObject->getSelectFields()));\n $sFields = str_ireplace(array(\" \", \"`\"), array(\"\", \"\"), $sFields);\n $this->_aFieldList = explode(\",\", $sFields);\n\n return $this->_aFieldList;\n }", "function getFields();", "function list_fields()\n\t{\n\t\t$field_names = array();\n\t\twhile ($field = mysqli_fetch_field($this->result_id))\n\t\t{\n\t\t\t$field_names[] = $field->name;\n\t\t}\n\n\t\treturn $field_names;\n\t}", "public function getEditableFields() {\n\t\t$fieldsList = array(\n\t\t\tarray('name' => 'presence',\t\t\t'label' => 'Presence',\t\t\t'type' => 'radio'),\n\t\t);\n\n\t\t$fieldModelsList = array();\n\t\tforeach ($fieldsList as $fieldInfo) {\n\t\t\t$fieldModelsList[$fieldInfo['name']] = Settings_Joomlahosts_Field_Model::getInstanceByRow($fieldInfo);\n\t\t}\n\t\treturn $fieldModelsList;\n\t}", "public function getIndexableFields() {\r\n\t\treturn $this->_indexableFields;\r\n\t}", "public function getFields()\n {\n if ($this->fields) {\n return $this->fields;\n }\n\n $this->fields = array(\n 'data_type_id',\n 'name',\n 'aliases',\n 'description',\n 'driver',\n );\n\n return $this->fields;\n }", "function get_sortable_columns() {\n\n\t\t$sortable_columns = array(\n \t\t\t\t\t\t\t\t'code'\t\t\t=>\tarray( 'code', true ),\n\t\t\t\t\t\t //'product_title'\t=>\tarray( 'product_title', true ),\t\t\t\t\t\t \n\t\t\t\t\t\t 'order_date'\t=>\tarray( 'order_date', true ),\n\t\t\t\t\t\t 'order_id'\t\t=>\tarray( 'order_id', true ),\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t);\n\t\treturn apply_filters( 'woo_vou_used_add_sortable_column', $sortable_columns );\n\t}", "public function getDisplayFields(){\n\t\tif(is_array($this->display_fields) && sizeof($this->display_fields) > 0){\n\t\t\t$Fields = array();\n\t\t\tforeach($this->display_fields as $field_name){\n\t\t\t\t$Fields[$field_name] = $this->{$field_name};\n\t\t\t}\n\t\t\t\n\t\t\treturn $Fields;\n\t\t}\n\t\t\n\t\treturn $this->Fields;\n\t}", "function FieldNameList ( ) { return $this->_FieldNameList; }", "function get_fields_in_table( ){\n\t\t\t\t $result = mysql_query(\"SHOW COLUMNS FROM \".$this->db.\".\".$this->table.\"\");\n\t\t\t\tif (!$result) {\n\t\t\t\t echo 'Could not run query: ' . mysql_error();\n\t\t\t\t exit;\n\t\t\t\t}\n\t\t\t\tif (mysql_num_rows($result) > 0) {\n\t\t\t\t while ($row = mysql_fetch_assoc($result)) {\n\t\t\t\t \n\t\t\t\t //$a_fields[]=$row;\n\t\t\t\t $a_fields[]=$row['Field'].\" | \".$row['Type'];\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\treturn $a_fields;\n\t\t\t }", "protected function get_fields() {\n\t\treturn rwmb_get_registry( 'field' )->get_by_object_type( 'post' );\n\t}", "public function getMyFormFields()\n {\n $aMyFieldsByForm = [];\n\n # Build Query to get User Based Columns\n $oFieldsSel = new Select(CoreEntityModel::$aEntityTables['user-form-fields']->getTable());\n $oFieldsSel->join(['core_field' => 'core_form_field'], 'core_field.Field_ID = user_form_field.field_idfs');\n $oFieldsSel->where(['user_idfs' => $this->getID()]);\n $oFieldsSel->order('sort_id ASC');\n\n # Get My Fields from Database\n $oMyFieldsDB = CoreEntityModel::$aEntityTables['user-form-fields']->selectWith($oFieldsSel);\n\n foreach ($oMyFieldsDB as $oField) {\n # Order By Form\n if (! array_key_exists($oField->form, $aMyFieldsByForm)) {\n $aMyFieldsByForm[$oField->form] = [];\n }\n $aMyFieldsByForm[$oField->form][$oField->Field_ID] = $oField;\n }\n\n return $aMyFieldsByForm;\n }", "public function getUntranslatableFields()\n\t{\n\t\t$config_fields = Config::inst()->get('UntranslatableFields', 'fields');\n\t\t$config_invert = Config::inst()->get('UntranslatableFields', 'invert');\n\t\tif (!isset($config_fields[$this->owner->ClassName])) return array(); //Class is not in the fields\n\t\t$class_fields = $config_fields[$this->owner->ClassName];\n\t\tif ($config_invert)\n\t\t{\n\t\t\t$fields = array();\n\t\t\tforeach (array_keys((array) $this->owner) as $field)\n\t\t\t{\n\t\t\t\tif (!in_array($field, $class_fields))\n\t\t\t\t{\n\t\t\t\t\t$fields[] = $field;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $fields;\n\t\t}\n\t\treturn $class_fields;\n\t}", "public function get_fields()\n {\n $catalogue_name = get_param_string('catalogue_name', '');\n if ($catalogue_name == '') {\n return array();\n }\n return $this->_get_fields($catalogue_name);\n }", "static public function getFieldsList () {\n return self::_getInstance()->_fieldsList;\n }" ]
[ "0.795977", "0.6703822", "0.6703822", "0.670277", "0.65621424", "0.65620124", "0.6542344", "0.6506944", "0.6506915", "0.65033907", "0.6495714", "0.6448686", "0.6435488", "0.64239335", "0.64187163", "0.6380019", "0.6378172", "0.6358737", "0.63552016", "0.63318133", "0.63232094", "0.6291784", "0.6288647", "0.62839025", "0.62825453", "0.6281509", "0.62758654", "0.6257625", "0.62560123", "0.625061", "0.62506", "0.62374324", "0.6232897", "0.62271506", "0.62114304", "0.6197944", "0.6185482", "0.6176904", "0.6167526", "0.61595637", "0.61472714", "0.6146469", "0.61438847", "0.6136557", "0.6112548", "0.6094107", "0.6062074", "0.6042526", "0.60389465", "0.6032478", "0.60117054", "0.59969205", "0.5987825", "0.5980727", "0.59750134", "0.59736925", "0.59573865", "0.5954012", "0.5930245", "0.5916372", "0.5915244", "0.5911809", "0.5911071", "0.5902369", "0.5890129", "0.5884829", "0.5884829", "0.5884829", "0.5884829", "0.5884829", "0.5884829", "0.5878133", "0.5873826", "0.5870715", "0.58649915", "0.5858031", "0.58570886", "0.58488095", "0.5843488", "0.5816268", "0.5812967", "0.58074397", "0.5768774", "0.57653457", "0.57583493", "0.57521045", "0.5747736", "0.5746348", "0.5741746", "0.57400966", "0.5740018", "0.5739842", "0.5728065", "0.5725193", "0.5711196", "0.5706296", "0.5705079", "0.569599", "0.5686028", "0.5677979" ]
0.75853676
1
Get the stub file for the generator.
protected function getStub() { return __DIR__ . '/Stubs/ServiceProvider.stub'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStubFile(): string\n {\n return $this->getStubFileFromPresetStorage($this->preset, 'seeder.stub');\n }", "protected function getStub()\n {\n return $this->files->get($this->getStubPath().'/default.stub');\n }", "public function getStubFile(): string\n {\n return $this->getStubFileFromPresetStorage($this->preset, 'console.stub');\n }", "protected function getStub()\n {\n if ($this->option('view')) {\n return __DIR__ . '/stubs/view.stub';\n }\n\n return __DIR__ . '/stubs/table.stub';\n }", "private function getStub()\n {\n return $this->files->get($this->stubPath);\n }", "protected function getStub()\n {\n if ($stub = $this->option('stub')) {\n return $stub;\n }\n\n if ($this->option('model')) {\n return __DIR__.'/stubs/controller.stub';\n }\n\n return __DIR__.'/stubs/blank.stub';\n }", "protected function getStub()\n {\n return config('crudgenerator.custom_template')\n ? config('crudgenerator.path') . '/acl-migration.stub'\n : __DIR__ . '/../stubs/acl-migration.stub';\n }", "protected function getStub()\n {\n return $this->collection()\n ? __DIR__.'/stubs/resource-collection.stub'\n : __DIR__.'/stubs/resource.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/partial_stubs/model.stub';\n }", "protected function getStub() {\n $stub = null;\n\n if ($this->option('crud')) {\n return __DIR__ . '/stubs/schema.crud.stub';\n }else if ($this->option('progressive')) {\n return __DIR__ . '/stubs/schema.progressive.stub';\n }else if ($this->option('report')) {\n return __DIR__ . '/stubs/schema.report.stub';\n }else if ($this->option('chart')) {\n return __DIR__ . '/stubs/schema.chart.stub';\n }\n return __DIR__.$stub;\n }", "protected function getStub()\n {\n $stub = '/stubs/form.stub';\n\n return __DIR__.$stub;\n }", "protected function getStub()\n {\n if ($this->option('validator')) {\n return __DIR__.'/stubs/factory-validator.stub';\n } else {\n return __DIR__.'/stubs/factory-no-validator.stub';\n }\n }", "protected function getStub()\n {\n return base_path() . '/resources/stubs/model.stub';\n }", "protected function getStub()\n {\n return resource_path('stubs/view.stub');\n }", "protected function getStub()\n {\n return $this->option('model')\n ? __DIR__ . '/stubs/service.stub'\n : __DIR__ . '/stubs/service_default.stub';\n }", "protected function getStub()\n {\n $stub = __DIR__.'/../stubs/contracts/contract';\n\n if ($this->option('extends')) {\n $stub .= '.extends';\n }\n\n return $stub.'.stub';\n }", "protected function getStub()\n {\n return $this->files->get($this->getStubPath().\"/create.attribute.stub\");\n }", "protected function getStub()\n {\n $dir = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..';\n// if ($this->option('unit')) {\n// return $dir.'/stubs/unit-test.stub';\n// }\n\n return $dir. DIRECTORY_SEPARATOR .'stubs'. DIRECTORY_SEPARATOR .'test.stub';\n }", "protected function getStub()\n {\n if ($this->option('component')) {\n return __DIR__ . '/Stubs/FacadeComponent.stub';\n }\n return __DIR__ . '/Stubs/Facade.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/views/plain.stub';\n }", "protected function getStub()\n {\n return $this->getStubDir() . '/model.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/stubs/Factory.stub';\n }", "protected function getStub()\n {\n if ($this->option('plain')) {\n return __DIR__.'/stubs/base-controller.plain.stub';\n }\n\n return __DIR__.'/stubs/base-controller.stub';\n }", "protected function getStub()\n {\n $stub = null;\n\n if ($this->option('parent')) {\n $stub = '/stubs/controller.nested.stub';\n } elseif ($this->option('model')) {\n $stub = '/stubs/controller.model.stub';\n } elseif ($this->option('resource')) {\n $stub = '/stubs/controller.stub';\n }\n\n if ($this->option('api') && is_null($stub)) {\n $stub = '/stubs/controller.api.stub';\n } elseif ($this->option('api') && ! is_null($stub)) {\n $stub = str_replace('.stub', '.api.stub', $stub);\n }\n\n $stub = $stub ?? '/stubs/controller.plain.stub';\n\n return __DIR__.$stub;\n }", "protected function getStub(): string\n {\n return $this->resolveStubPath(\n $this->option('markdown') !== false\n ? '/stubs/markdown-mail.stub'\n : '/stubs/mail.stub');\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/kompo-'.($this->option('demo') ? 'demo-' : '').'form.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/../../../resources/stubs/views/view.stub';\n }", "protected function getStub()\n {\n $type = (!is_null($this->option('type')) && in_array($this->option('type'), ['plain', 'extended']))\n ? $this->option('type')\n : 'plain';\n\n return __DIR__ . \"/stubs/responder/{$type}.stub\";\n }", "protected function getStub()\n {\n if ($this->option('pivot')) {\n return parent::getStub();\n }\n\n return __DIR__ . '/stubs/model.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/interface.php.stub';\n }", "protected function getStub()\n {\n if ($this->option('trait')) {\n return __DIR__.'/../Stubs/Trait.stub';\n }\n if ($this->option('interface')) {\n return __DIR__.'/../Stubs/Interface.stub';\n }\n\n return __DIR__.'/../Stubs/Class.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../stubs/seed.stub';\n }", "protected function getStub()\n\t{\n\t\treturn $this->resolveStubPath('/stubs/integration-manifest.stub');\n\t}", "protected function getStub()\n {\n return config('laravel-crud-generator.custom_template')\n ? config('laravel-crud-generator.path') . '/model.stub'\n : __DIR__ . '/../stubs/model.stub';\n }", "protected function getStub()\n {\n return $this->resolveStubPath('/stubs/bfg-component.stub');\n }", "protected function getStub()\n {\n if ($this->option('request')) {\n return __DIR__.'/stubs/mutator-request.stub';\n } elseif ($this->option('clean')) {\n return __DIR__.'/stubs/mutator-clean.stub';\n } else {\n return __DIR__.'/stubs/mutator.stub';\n }\n }", "protected function getStub()\n {\n if ($this->option('service')) {\n return __DIR__.'/stubs/controller.service.stub';\n } elseif($this->option('base')) {\n return __DIR__.'/stubs/controller.base.stub';\n } elseif($this->option('otp')) {\n return __DIR__.'/stubs/controller.service.otp.stub';\n }\n return __DIR__.'/stubs/controller.plain.stub';\n }", "protected function getStub()\n {\n return file_get_contents(__DIR__ . '/../../Stubs/' . ucfirst($this->type() . 'Task.php'));\n }", "protected function getStub()\n {\n $stub = '/stubs/class.stub';\n\n if ($this->option('constructor')) {\n $stub = '/stubs/class.constructor.stub';\n }\n\n return __DIR__.$stub;\n }", "protected function getStub()\n {\n $stub = '/stubs/class.stub';\n\n if ($this->option('constructor')) {\n $stub = '/stubs/class.constructor.stub';\n }\n\n return __DIR__.$stub;\n }", "public function getStub()\n {\n return File::get(__DIR__.'/../stubs/migrations/migration.stub');\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/bond.stub';\n }", "private function getStub()\n {\n return app_path() . '\\Stubs\\repository_contract.stub';\n }", "protected function getStub()\n {\n if ($this->option('view')) {\n return __DIR__.'/stubs/controller/controller.view.stub';\n }\n\n return __DIR__.'/stubs/controller/controller.api.stub';\n }", "protected function getStub()\n {\n return realpath(__DIR__) .str_replace('/', DS, '/stubs/reminders.stub');\n }", "protected function getStub()\n {\n return $this->getStubsPath() . 'controller.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/../stubs/abstract/iservice.stub';\n }", "protected function getStub()\n {\n if ($this->option('model')) {\n return __DIR__ . '/Stubs/CrudRepository.stub';\n }\n\n return __DIR__ . '/Stubs/Repository.stub';\n }", "protected function getStub(): string\n {\n return __DIR__.'/stubs/php_cs.stub';\n }", "protected function getStub()\n {\n return app_path('Console/Commands/stubs/form-request.stub');\n }", "protected function getStub()\n {\n return $this->resolveStubPath('/stubs/service.stub');\n }", "protected function getStub(): string\n {\n return __DIR__.'/stubs/interaction.stub';\n }", "protected function getStub()\n {\n return $this->option('pivot')\n ? $this->resolveStubPath('/stubs/base_stubs/model.pivot.stub')\n : $this->resolveStubPath('/stubs/base_stubs/model.stub');\n }", "protected function getStub(): string\n\t{\n\t\treturn __DIR__ . '/../../../stubs/action.interface.stub';\n\t}", "protected function getStub():string\n {\n return __DIR__ . '/stubs/controller.stub';\n }", "protected function getStub()\n {\n return $this->option('model')\n ? $this->resolveStubPath('/stubs/observer.stub')\n : $this->resolveStubPath('/stubs/observer.plain.stub');\n }", "protected function getStub()\n {\n return app_path() . '\\Console\\stubs\\controller.stub';\n }", "public function getStub()\n {\n if ($this->option('pivot')) {\n return __DIR__.'/../../stubs/pivot.model.stub';\n }\n\n return __DIR__.'/../../stubs/model.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../stubs/model.stub';\n }", "protected function getStub()\n {\n if (!$this->option('pivot')) {\n return __DIR__.'/stubs/model.stub';\n }\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/repository-interface.stub';\n }", "protected function getStub()\n {\n return base_path('resources' . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'SystemParameter.stub');\n }", "protected function getStub(): string\n {\n return base_path('stubs/vue-component.stub');\n }", "protected function getStub()\n {\n return app_path('Core/Stub/Migration.stub');\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/form-request.stub';\n }", "protected function getStub()\n {\n return base_path('stubs\\service.stub');\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/service.stub';\n }", "protected function getStub()\n {\n return __DIR__.'/../stubs/' . '/' . 'request.stub';\n }", "protected function getStub()\n {\n if ($this->option('array')) {\n return $this->copyFrom('/stubs/export.array.stub');\n } elseif ($this->option('model')) {\n return $this->copyFrom('/stubs/export.model.stub');\n } elseif ($this->option('query')) {\n return $this->copyFrom('/stubs/export.query.stub');\n }\n\n return $this->copyFrom('/stubs/export.collection.stub');\n }", "protected function getStub()\n {\n return __DIR__ . '/../stubs/transformer.stub';\n }", "protected function getStub()\n\t{\n\t\treturn __DIR__.'/stubs/api.stub';\n\t}", "protected function getStub()\n {\n return __DIR__ . '/../stubs/repository.stub';\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/api-consumer-endpoint.stub';\n }", "protected function getStub()\n {\n return app_path('Stubs/migration.stub');\n }", "protected function getStub()\n {\n return realpath(__DIR__.'/stubs/dashboard.stub');\n }", "protected function getStub()\n {\n return __DIR__.'/../stubs/' . '/' . 'model.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/stubs/authServiceProvider.stub';\n }", "public function getStub()\n {\n return app()->basePath('vendor/samuel-nunes/lumen-form-request-validation/src/Console/Stubs/'.$this->stubName.'.stub');\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/entity_controller.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/action.stub';\n }", "protected function getStub()\n {\n return __DIR__.'/../stubs/composer.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../stubs/serviceProvider.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/command.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/command.stub';\n }", "protected function getStub() {\n return __DIR__ . '/stubs/trait.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../../stubs/modelValidator.stub';\n }", "protected function getStub()\n {\n return $this->resolveStubPath('/stubs/cast.stub');\n }", "public function generate()\n {\n return $this->templateStub;\n }", "protected function getStub()\n {\n return realpath(__DIR__ . '/../stubs/Filter.stub');\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/factory.stub';\n }", "protected function getStub()\n {\n return app_path('Core/Stub/HTML/Views/index.stub');\n }", "protected function getStub()\n\t{\n\t\treturn $this->getStubDirectory('Service.stub');\n\t}", "protected function getStub()\n {\n return __DIR__. '/stubs/facade.base.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/trait.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../Stubs/RepositoryInterface.stub';\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/LICENSE.stub';\n }", "protected function getStub(): string\n {\n return __DIR__ . '/stubs/filter.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/../Stubs/ServiceInterface.stub';\n }", "public function getStub()\n\t{\n\t\treturn $this->getStubDirectory('Policy.stub');\n\t}", "protected function getStub()\n {\n return __DIR__.'/stubs/make/request.stub';\n }" ]
[ "0.83574617", "0.81961524", "0.81649333", "0.8128994", "0.8034211", "0.8003086", "0.7956773", "0.794045", "0.7909817", "0.7873063", "0.7869168", "0.78583384", "0.7853997", "0.7848993", "0.78454924", "0.78430194", "0.78287834", "0.78240514", "0.7816454", "0.78106594", "0.7789014", "0.77870226", "0.77826315", "0.77590686", "0.7757107", "0.7754125", "0.77442604", "0.77360326", "0.77316254", "0.7719748", "0.7708463", "0.77074325", "0.7706351", "0.7705236", "0.7698319", "0.7692441", "0.7678055", "0.76771677", "0.76657313", "0.76657313", "0.76600385", "0.7657846", "0.76532924", "0.7646909", "0.76415414", "0.76321304", "0.7628039", "0.7622896", "0.7596873", "0.759172", "0.7583146", "0.7578393", "0.7577996", "0.7577199", "0.7571571", "0.7560202", "0.7546081", "0.75380576", "0.7537552", "0.7526637", "0.75216997", "0.7513482", "0.7508996", "0.75059754", "0.750167", "0.749516", "0.74894166", "0.74872833", "0.74834764", "0.74788624", "0.7474106", "0.74680907", "0.7428732", "0.74242127", "0.7411441", "0.74024594", "0.7390491", "0.7385624", "0.7378457", "0.73645467", "0.73558956", "0.7351068", "0.7329457", "0.7329457", "0.7318285", "0.7312668", "0.730129", "0.72962344", "0.7285334", "0.7274775", "0.7272623", "0.7262641", "0.7260939", "0.7260291", "0.7241713", "0.72241086", "0.72238797", "0.71733475", "0.71557015", "0.7152945" ]
0.71593654
98
Get the default namespace for the class.
protected function getDefaultNamespace($rootNamespace) { return $rootNamespace . '\Modules\\' . $this->baseModule . '\Providers'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultNamespace()\n\t{\n\t\treturn $this->default_namespace;\n\t}", "public function getDefaultNamespace();", "abstract public function getDefaultNameSpace();", "public function getNamespace()\n {\n return $this->getAttribute('metadata.namespace', 'default');\n }", "public function getNamespace($defaultNs) {\n return CLIUtils::readNamespace($this->getOwner(), $defaultNs, 'Enter an optional namespace for the class:');\n }", "public function getClassNamespace() {\n\t\tif ($this->classNamespace === NULL) {\n\t\t\t$this->classNamespace = $this->findClassNamespace();\n\t\t}\n\t\treturn $this->classNamespace;\n\t}", "public function getNamespacedName()\n {\n return get_class();\n }", "private function _getNamespace() {\n $ns = explode('_', get_class($this));\n return $ns[0];\n }", "final protected static function getNamespace() {\r\n $classNameParts = explode('\\\\', get_called_class());\r\n array_pop($classNameParts);\r\n return join('\\\\', $classNameParts);\r\n }", "public function getNamespace()\n {\n return isset($this->namespace) ? $this->namespace : '';\n }", "public function getBaseNamespace()\n {\n return $this->baseNamespace;\n }", "public function getRootNamespace()\n {\n return $this->rootNameSpace;\n }", "public function get_namespace() : string\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return is_null($this->config) ? null : get_class($this->config);\n }", "public function getNamespace()\n {\n $className = $this->testMetaData->getTestClassName();\n $fqdn = $this->testMetaData->getTestFullyQualifiedClassName();\n\n $namespace = str_replace('\\\\'.$className, '', $fqdn);\n\n return $namespace;\n }", "protected function getNamespace()\n {\n $namespace = Container::getInstance()->getNamespace();\n return rtrim($namespace, '\\\\');\n }", "protected function getDefaultNamespace($rootNamespace) //phpcs:ignore\n {\n return $rootNamespace.'\\Services';\n }", "protected function getNamespace()\n {\n return $this->wrapped->getNamespace();\n }", "protected function getNamespace()\n {\n $reflectionClass = new \\ReflectionClass(get_class($this));\n return dirname($reflectionClass->getNamespaceName());\n }", "protected function getDefaultNamespaces()\n {\n $resourceBundles = new LegacyBasicBundles();\n return $resourceBundles->getPackageNamespaces();\n }", "public static function getNamespace($class)\n {\n return static::splitClassName($class)[0];\n }", "public function getNamespace(): string\n {\n return $this->namespace;\n }", "public function getNamespace(): string\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n $this->_init();\n return unserialize($this->_list_cache->getNamespace());\n }", "public function getNamespace()\n {\n return null;\n }", "public function getNamespace();", "public function getNamespace();", "public function getNamespace();", "protected function getNamespaceReplacement()\n {\n if ($this->runningAsRootDir) {\n return Str::beforeLast($this->buildClassName, '\\\\');\n }\n\n $namespace = $this->theme->getClassNamespace();\n\n return str_replace('\\\\\\\\', '\\\\', $namespace);\n }", "private function getNamespaceName() {\n if ($this->getTypeName() != 'n_NAMESPACE') {\n return null;\n }\n\n $namespace_name = $this->getChildByIndex(0);\n if ($namespace_name->getTypeName() == 'n_EMPTY') {\n return null;\n }\n\n return '\\\\'.$namespace_name->getConcreteString();\n }", "public static function getRootNamespace()\n {\n $config = Config::getInstance();\n\n if ($config->has(['namespaces', 'root'])) {\n return $config->namespaces->root;\n }\n\n return 'App';\n }", "protected function getDefaultClassToExtend()\n {\n $base = $this->getControllerPath();\n\n return Helpers::fixNamespace(Helpers::getAppNamespace($base, 'Controller'));\n }", "public function getNamespace(): string;", "public function getNamespaceName();", "public function getNamespace()\n {\n return $this->_namespace;\n }", "public function getNamespace() {\n\t\treturn $this->config->get('namespace');\n\t}", "public function getNamespace()\n {\n return $this->getNamespaceName();\n }", "public function getNamespace() {\n\t\treturn $this->rootNS;\n\t}", "public function getNamespace()\n\t{\n\t\treturn $this->nameSpace;\n\t}", "public function getNamespace()\n {\n // TODO: Implement getNamespace() method.\n }", "public function getNamespace()\r\n {\r\n return $this->namespace;\r\n }", "public function getNamespace()\n\t{\n\t\treturn $this->_namespace;\n\t}", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace . '\\Services';\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace . '\\Services';\n }", "public function getNamespace()\r\n {\r\n return $this->namespace;\r\n }", "public function getNamespace() {\n return $this->namespace;\n }", "public function getNamespace()\n {\n if (null === $this->reflected) {\n $this->reflected = new \\ReflectionObject($this);\n }\n\n return $this->reflected->getNamespaceName();\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $this->repository->getModuleNamespace($this->module);\n }", "function getNamespace ();", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.'\\Service';\n }", "public function getNamespace() {\n $namespaces = $this\n ->getTree()\n ->getRootNode()\n ->selectDescendantsOfType('n_NAMESPACE')\n ->getRawNodes();\n\n foreach (array_reverse($namespaces) as $namespace) {\n if ($namespace->isAfter($this)) {\n continue;\n }\n\n $body = $namespace->getChildByIndex(1);\n if ($body->getTypeName() != 'n_EMPTY') {\n if (!$body->containsDescendant($this)) {\n continue;\n }\n }\n\n return $namespace->getNamespaceName();\n }\n\n return null;\n }", "public function rootNamespace()\n {\n return $this->laravel->getNamespace();\n }", "public function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.$this->namespace;\n }", "function getNamespace();", "function getNamespace();", "protected function getDefaultNamespace($rootNamespace): string\n {\n return $rootNamespace.'\\\\Mail';\n }", "public function getElementNamespace(): string\n {\n return $this->class_fqsen->getNamespace() ?: '\\\\';\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.'\\Lib\\Factories';\n }", "public function getNamespace()\n {\n if (is_null($this->_namespace)) {\n $namespace = $this->getConfiguration()\n ->get('router.namespace', 'Controllers');\n if (isset($this->_params['namespace'])) {\n $namespace = $this->_params['namespace'];\n }\n $this->_namespace = trim($namespace, '\\\\');\n }\n return $this->_namespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.'\\\\Jobs';\n }", "public function getNamespace()\r\n {\r\n return $this->Namespace;\r\n }", "protected function findClassNamespace() {\n\t\t$matches = array();\n\t\tpreg_match(self::PATTERN_NAMESPACE_DECLARATION, $this->originalClassCode, $matches);\n\t\treturn $matches['namespace'];\n\t}", "public function getNamespaceName() {\n\n\t\treturn $this->_namespace;\n\t}", "public function classNamespace() {}", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace;\n }", "public function getNamespace(){\n \n return $this->namespace;\n \n }", "public function getNamespace(): string\n {\n return (string) SocketIORouter::getNamespace(static::class);\n }", "function getNameSpace() { return $this->_namespace; }", "public function getContainerNamespace();", "public function getNamespace(){\n //base namepace\n $namespace = 'App\\Controllers\\\\';\n //if the namepace is defined\n if(array_key_exists('namespace', $this->params)){\n $namespace .= $this->params['namespace'] . '\\\\';\n }\n return $namespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n\t{\n\t\treturn $rootNamespace;\n\t}", "public function getNamespaceName()\n\t{\n\t\t$pos = strrpos($this->name, '\\\\');\n\t\treturn false === $pos ? '' : substr($this->name, 0, $pos);\n\t}", "protected function getDefaultNamespace($rootNamespace)\n {\n if ($this->option('view')) {\n return \"{$rootNamespace}\\Definitions\\View\";\n };\n\n return \"{$rootNamespace}\\Definitions\\Table\";\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.'\\Http\\Services';\n }", "public function getFullNamespace(): string\n {\n if (empty($this->childNamespace)) {\n return $this->namespace;\n }\n\n return $this->namespace . '\\\\' . $this->childNamespace;\n }", "public abstract function getApplicationNamespace();", "protected function getDefaultNamespace($rootNamespace) {\n return $rootNamespace . '\\Traits';\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.'\\Contracts';\n }", "public static function view_namespace()\n\t{\n\t\treturn __NAMESPACE__;\t\n\t}", "protected static function getNamespace()\n {\n $namespace = 'App\\Controllers\\\\';\n if (array_key_exists('namespace', self::$params)) {\n $namespace .= self::$params['namespace'] . '\\\\';\n } \n return $namespace;\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace . '\\Http\\Responder';\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.config('ac-developers.repository.generator.namespaces.services', '\\Services');\n }", "abstract protected function namespace(): string;", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.'\\Lib\\Data';\n }", "public static function getBaseNamespace($class)\n {\n if (is_object($class)) $class = get_class($class);\n $list = explode('\\\\', $class);\n return current($list);\n }", "protected function getDefaultNamespace($rootNamespace)\n {\n return $rootNamespace.'\\Http';\n }" ]
[ "0.8448936", "0.821764", "0.7800281", "0.74542356", "0.74156207", "0.7397914", "0.7362119", "0.7336174", "0.72904134", "0.7272925", "0.723129", "0.72085345", "0.7196747", "0.7127158", "0.7018227", "0.7012884", "0.69916", "0.6979542", "0.69777244", "0.6956813", "0.6936764", "0.6912258", "0.6912258", "0.69056207", "0.68654", "0.6861722", "0.6861722", "0.6861722", "0.6858318", "0.6854727", "0.6854387", "0.6842529", "0.68400055", "0.6813656", "0.6806945", "0.68033427", "0.67967427", "0.6793288", "0.6754474", "0.67399555", "0.6733586", "0.6731292", "0.6723682", "0.6723682", "0.6723682", "0.6723682", "0.6723682", "0.6723682", "0.6723682", "0.6723682", "0.6723682", "0.6723682", "0.67211396", "0.67211396", "0.672033", "0.67066574", "0.66961795", "0.6663625", "0.66297996", "0.6626974", "0.6617549", "0.6615463", "0.65963733", "0.6593061", "0.6593061", "0.65854853", "0.65686876", "0.6566701", "0.6559817", "0.65577304", "0.6557363", "0.6546255", "0.65450746", "0.653927", "0.65368813", "0.65368813", "0.65368813", "0.65368813", "0.65368813", "0.65368813", "0.6536637", "0.6532873", "0.6527016", "0.65192974", "0.6514792", "0.6514162", "0.6510188", "0.64932233", "0.6490978", "0.64795786", "0.64747727", "0.64678067", "0.64551157", "0.64396554", "0.6427564", "0.64247316", "0.64170855", "0.6408603", "0.6398796", "0.6396114", "0.6388626" ]
0.0
-1
Build the class with the given name.
protected function buildClass($name) { $stub = $this->files->get($this->getStub()); $this->replaceModel($stub); return $this->replaceNamespace($stub, $name)->replaceClass($stub, $name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function buildClass($name)\n {\n return $this->replaceComponentName(parent::buildClass($name));\n }", "protected function buildClass($name)\n {\n $stub = $this->files->get($this->getStub());\n\n return $this->replaceClass($stub, $name);\n }", "public function buildClass($name)\n {\n $stub = $this->files->get($this->getStub());\n\n return $this->replaceNamespace($stub, $name)->replaceClass($stub, $name);\n\n }", "protected function buildClass($name)\n {\n if ($this->option('extends')) {\n return $this->buildExtendedClass($name);\n }\n\n return parent::buildClass($name);\n }", "protected function buildClass($name)\n {\n $stub = $this->files->get($this->getStub());\n\n return $this->replaceNamespace($stub, $name)->replaceClass($stub, $name);\n }", "protected function buildClass($name)\n {\n return $this->replaceAccessor(parent::buildClass($name));\n }", "protected function buildClass($name)\n {\n $this->call('make:test', [\n 'name' => 'Database/'.$this->argument('name').'Test',\n 'component' => $this->component\n ]);\n\n return parent::buildClass($name);\n }", "protected function buildClass($name)\n {\n $namespace = $this->getNamespace($name);\n $default_replace = str_replace(\"use $namespace\\Controller;\\n\", '', parent::buildClass($name));\n //return str_replace(\"Now_Entity\", \"Creator_\" . $this->argument(\"name\"), $default_replace);\n return str_replace(\"Now_Entity\", $this->argument(\"name\"), $default_replace);\n }", "protected function buildClass($name)\n {\n $model = $this->argument('name');\n\n $stub = $this->files->get($this->getStub());\n\n $bindings = $this->option('bindings') ?: [\n $model . '.viewer' => [\n $model . '.read'\n ],\n $model . '.editor' => [\n $model . '.create',\n $model . '.update',\n $model . '.delete',\n ]\n ];\n\n if ($this->option('admin-role') == 'yes') {\n $bindings['admin'] = [\n $model . '.create',\n $model . '.read',\n $model . '.update',\n $model . '.delete',\n ];\n }\n\n $ret = $this->replaceBindings($stub, $bindings)\n ->replaceClassName($stub, ucwords($model));\n\n return $ret->replaceClass($stub, $name);\n }", "protected function buildClass($name)\n {\n $rawName = $this->getNameInput();\n\n return str_replace(\n [\n 'DummyModel',\n 'dummyModel',\n 'DummyCategory',\n 'DummyPackage',\n 'DummyAuthor',\n 'DummyLicence',\n 'DummyLink',\n ],\n [\n $rawName,\n strtolower($rawName),\n config('handlerGenerator.category'),\n config('handlerGenerator.package'),\n config('handlerGenerator.author'),\n config('handlerGenerator.license'),\n config('handlerGenerator.link'),\n ],\n parent::buildClass($name)\n );\n }", "protected function buildClass($name)\n {\n $this->line(\"<info>Creating</info> \" . $this->getNameInput());\n\n $controllerNamespace = $this->getNamespace($name);\n\n $replace = [];\n\n if ($this->option('service')) {\n $replace = $this->buildServiceReplacements($replace);\n }\n\n if ($this->option('base')) {\n $replace = $this->buildBaseReplacements($replace);\n }\n\n if ($this->option('otp')) {\n $replace = $this->buildOtpReplacements($replace);\n }\n\n $replace[\"use {$controllerNamespace}\\Controller;\\n\"] = '';\n\n return str_replace(\n array_keys($replace), array_values($replace), parent::buildClass($name)\n );\n }", "protected function buildClass($name)\n {\n $stub = $this->files->get($this->getStub());\n\n $table = $this->option('table');\n $prefix = $this->option('prefix');\n if (!$name || !$table) {\n $this->comment('Command: crud-model {name} {--table=} {--prefix=}');\n exit;\n }\n\n return $this->replaceNamespace($stub, $name)\n ->compile($stub, $table, $prefix)\n ->generate($stub)\n ->replaceClass($stub, $name);\n }", "protected function buildClass($name)\n {\n $stub = $this->files->get($this->getStub());\n\n $stub = $this->replaceNamespace($stub, $name)\n ->replaceClass($stub, $name);\n return $this->replaceTable($stub);\n }", "protected function buildClass($name)\n {\n $controllerNamespace = $this->getNamespace($name);\n $replace = [\n 'DummyServiceVar' => $this->replaceServiceVar($name),\n 'DummyViewPath' => $this->replaceViewPath($name),\n 'DummySingularServiceVar' => $this->replaceSingularServiceVar($name)\n ];\n return str_replace(\n array_keys($replace),\n array_values($replace),\n $this->generateClass($name)\n );\n }", "protected function buildClass($name = null)\n {\n $stub = $this->files->get($this->getStub());\n\n return $this->replaceClass($stub, $this->getClassName());\n }", "protected function buildClass($name)\n {\n $search = $replace = [];\n $this->buildParentReplacements($search, $replace);\n $this->buildModelReplacements($search, $replace);\n\n return str_replace($search, $replace, parent::buildClass($name));\n }", "protected function buildClass($name): string\n {\n $class = parent::buildClass($name);\n\n $class = $this->replaceComponent($class);\n\n return $this->replaceMultiple($class);\n }", "protected function buildClass($name)\n {\n $factory = class_basename(Str::ucfirst(str_replace('Factory', '', $name)));\n\n $namespaceModel = NamespaceResolver::resolveDomainNamespace($this->option('model'), NamespaceResolver::MODEL);\n\n $model = class_basename($namespaceModel);\n\n if (Str::startsWith($namespaceModel, $this->rootNamespace() . 'Models')) {\n $namespace = Str::beforeLast('Database\\\\Factories\\\\' . Str::after($namespaceModel, $this->rootNamespace() . 'Models\\\\'), '\\\\');\n } else {\n $namespace = 'Database\\\\Factories';\n }\n\n $replace = [\n '{{ factoryNamespace }}' => $namespace,\n 'NamespacedDummyModel' => $namespaceModel,\n '{{ namespacedModel }}' => $namespaceModel,\n '{{namespacedModel}}' => $namespaceModel,\n 'DummyModel' => $model,\n '{{ model }}' => $model,\n '{{model}}' => $model,\n '{{ factory }}' => $factory,\n '{{factory}}' => $factory,\n ];\n\n $parent = \\get_parent_class(\\get_parent_class($this));\n\n return str_replace(\n array_keys($replace),\n array_values($replace),\n $parent::buildClass($name)\n );\n }", "protected function buildClass($name)\n {\n $model = $this->argument('model') ?? 'Model';\n\n return str_replace(\n 'DummyModel', $model, parent::buildClass($name)\n );\n }", "protected function buildClass($name)\n {\n $key = $this->buildActionKey();\n\n return str_replace(\n [\n 'DummyKey',\n ],\n [\n $key,\n ],\n parent::buildClass($name)\n );\n }", "protected function buildClass($name)\n {\n $replace = [];\n if ($this->option('model')) {\n $replace = $this->buildModelReplacements($replace);\n }\n\n return str_replace(\n array_keys($replace), array_values($replace), parent::buildClass($name)\n );\n }", "protected function buildClass($name): string\n\t{\n\t\t$stub = parent::buildClass($name);\n\n\t\treturn $this\n\t\t\t->replaceImports($stub, $this->getImports())\n\t\t\t->replaceAction($stub, $this->getAction())\n\t\t\t->replaceParameters($stub, $this->getActionParameters());\n\t}", "protected function buildClass($name)\n {\n $stub = str_replace(\n 'DummValidator',\n class_basename($name),\n parent::buildClass($name)\n );\n\n return str_replace(\n 'DummValidator',\n $name,\n $stub\n );\n }", "protected function buildClass($name)\n {\n $stub = parent::buildClass($name);\n\n $model = $this->option('model');\n\n return $model ? $this->replaceModel($stub, $model) : $stub;\n }", "protected function buildClass($name)\n {\n $this->modelClass = $this->option('model') ?: User::class; // temporary\n\n $replace = [\n 'DummyPageTitle' => str_plural(class_basename($this->modelClass)),\n 'DummyCreateRoute' => \"route('\".strtolower(str_plural(class_basename($this->modelClass))).\".create')\",\n 'DummyCreateTitle' => 'Add '.title_case(class_basename($this->modelClass)),\n ];\n\n return str_replace(\n array_keys($replace), array_values($replace), parent::buildClass($name)\n );\n }", "protected function buildClass($name):string\n {\n $namespace = $this->getNamespace($name);\n $namespace = preg_replace('/\\\\\\Controllers$/', '', $namespace);\n /** @noinspection CallableParameterUseCaseInTypeContextInspection */\n $name = $this->argument('name');\n $repo = $this->argument('repository');\n\n $string = parent::buildClass($name);\n $string = str_replace(array('NamespaceRoot', 'DummyRepo', 'DummyClass'), array($namespace, $repo, $name), $string);\n return $string;\n }", "protected function buildClass($name = null)\n {\n $stub = $this->files->get($this->getStub());\n\n $replace = [];\n\n if ($this->option('model')) {\n $modelClass = $this->parseModel($this->option('model'));\n\n $replace = [\n '{{modelclass}}' => class_basename($modelClass),\n ];\n }\n\n $stub = $this->replaceClass($stub, $name);\n\n $stub = $this->replaceNamespace($stub, \"App\\\\Database\\\\Repositories\")->replaceClass($stub, $name);\n\n return str_replace(\n array_keys($replace), array_values($replace), $stub\n );\n }", "protected function buildClass($name)\n {\n $stub = $this->replaceUserNamespace(\n parent::buildClass($name)\n );\n\n $model = $this->option('model');\n\n return $model ? $this->replaceModel($stub, $model) : $stub;\n }", "protected function buildClass($name)\n {\n $array = explode('\\\\', $name);\n $tableArr = preg_split(\"/(?=[A-Z])/\", $array[count($array) - 1]);\n array_shift($tableArr);\n if (strpos($tableArr[count($tableArr) - 1], 'Model') !== false) {\n array_pop($tableArr);\n }\n $tableNameArr = array_map('strtolower', $tableArr);\n $replace['TableName'] = implode('_', $tableNameArr);\n\n return str_replace(\n array_keys($replace), array_values($replace), parent::buildClass($name)\n );\n }", "protected function buildClass($name)\n {\n $model = Str::studly($this->getNameInput());\n $serviceNamespace = $this->getNamespace($name);\n\n $replace = [];\n\n $repositoryClass = $this->parseRepository($model);\n\n if (!class_exists($repositoryClass)) {\n if ($this->confirm(\"A {$repositoryClass} repository does not exist. Do you want to generate it?\", true)) {\n $this->call('create:repository', ['name' => $model]);\n }\n }\n\n $replace = array_merge($replace, [\n '{{ namespacedRepository }}' => $repositoryClass,\n '{{ repository }}' => class_basename($repositoryClass),\n '{{ repositoryVariable }}' => Str::camel(Str::plural($model)),\n ]);\n\n $replace[\"use {$serviceNamespace}\\Service;\\n\"] = '';\n\n return str_replace(\n array_keys($replace),\n array_values($replace),\n parent::buildClass($name)\n );\n }", "protected function build($name)\n {\n $stub = $this->files->get($this->getStub());\n\n return $this->replaceNamespace($stub, $name)->replaceClass($stub, $name);\n }", "protected function buildClass($name)\n {\n $controllerNamespace = $this->getNamespace($name);\n $replace = [];\n if ($this->option('parent')) {\n $replace = $this->buildParentReplacements();\n }\n\n if ($this->option('model')) {\n $replace = $this->buildModelReplacements($replace);\n }\n\n $replace[\"use {$controllerNamespace}\\Controller;\\n\"] = '';\n\n return str_replace(\n array_keys($replace), array_values($replace), parent::buildClass($name)\n );\n }", "protected function buildClass($name)\n {\n $controllerNamespace = $this->getNamespace($name);\n\n $replace = [];\n\n if ($this->option('view')) {\n $replace = $this->buildViewReplacements();\n } else {\n $replace = $this->buildRequestReplacements();\n $replace = $this->buildResourceReplacements($replace);\n }\n\n $replace = $this->buildModelReplacements($replace);\n $replace = $this->buildRepositoryReplacements($replace);\n\n $replace[\"use {$controllerNamespace}\\Controller;\\n\"] = '';\n\n return str_replace(\n array_keys($replace), array_values($replace), parent::buildClass($name)\n );\n }", "protected function buildClass($name)\n {\n $formNamespace = $this->getNamespace($name);\n\n $replace = [];\n\n $replace[\"use {$formNamespace}\\Controller;\\n\"] = '';\n\n return str_replace(\n array_keys($replace),\n array_values($replace),\n parent::buildClass($name)\n );\n }", "protected function buildClass($name)\n {\n $replace = [];\n\n $replace = $this->buildRepositoryReplacements($replace);\n\n if (config('ac-developers.repository.generator.namespaces.services', '\\Services')\n == config('ac-developers.repository.generator.namespaces.interfaces.service', '\\Contracts\\Services')) {\n\n $replace[\"use DummyFullInterfaceClass;\"] = '';\n }\n\n $replace = $this->buildInterfaceReplacements($replace);\n\n return str_replace(\n array_keys($replace), array_values($replace), parent::buildClass($name)\n );\n }", "protected function buildClass($name)\n {\n $controllerNamespace = $this->getNamespace($name);\n\n $replace = [];\n\n $replace[\"use {$controllerNamespace}\\Services;\\n\"] = '';\n\n return str_replace(\n array_keys($replace), array_values($replace), parent::buildClass($name)\n );\n }", "protected function buildClass($name)\n {\n $replace = [];\n\n if ($this->option('primary')) {\n $replace['DummyPrimaryKey'] = $this->option('primary');\n }\n\n $replace['DummySubject'] = $this->option('subject') ?: strtolower($name);\n\n $lastBlueprintNamespace = array_last(explode('/', $this->blueprintRelativeDirectory));\n $lastBlueprintNamespace = $lastBlueprintNamespace ?\n \"{$lastBlueprintNamespace}\\\\\" :\n '';\n\n list($hostBlueprintClass, $hostPrimaryKey) = $this->splitString(($this->option('host') ?: ''), ':', 2, '');\n $replace['DummyHostBlueprintClass'] = $hostBlueprintClass ? \"{$lastBlueprintNamespace}{$hostBlueprintClass}::class\" : '';\n $replace['DummyHostKeyField'] = $hostPrimaryKey;\n\n list($guestBlueprintClass, $guestPrimaryKey) = $this->splitString(($this->option('guest') ?: ''), ':', 2, '');\n $replace['DummyGuestBlueprintClass'] = $guestBlueprintClass ? \"{$lastBlueprintNamespace}{$guestBlueprintClass}::class\" : '';\n $replace['DummyGuestKeyField'] = $guestPrimaryKey;\n\n if ($hostBlueprintClass !== '' || $guestBlueprintClass !== '') {\n $replace['DummyBlueprintImport'] = PHP_EOL . 'use ' . $this->convertPathToNamespace($this->blueprintRelativeDirectory, $this->rootNamespace());\n } else {\n $replace['DummyBlueprintImport'] = '';\n }\n\n return str_replace(\n array_keys($replace), array_values($replace), parent::buildClass($name)\n );\n }", "protected function buildClass($name)\n {\n $stub = parent::buildClass($name);\n\n $stub = str_replace('uri-key', Str::snake($this->argument('name'), '-'), $stub);\n\n return str_replace('dashboard-name', ucwords(Str::snake($this->argument('name'), ' ')), $stub);\n }", "protected function buildClass($name)\n {\n $stub = parent::buildClass($name);\n\n $title = Str::of($this->argument('name'))->studly()->replace('Manifest', '');\n\n return str_replace('{{ title }}', $title, $stub);\n }", "protected function buildClass($name): string\n {\n $class = parent::buildClass($name);\n\n if ($this->option('markdown') !== false) {\n $class = str_replace(['DummyView', '{{ view }}'], $this->getView(), $class);\n }\n\n return $class;\n }", "protected function buildClass($name)\n {\n if ($this->option('inline')) {\n return str_replace(\n 'DummyView',\n \"<<<'blade'\\n<div>\\n \".Inspiring::quote().\"\\n</div>\\nblade\",\n $this->build($name)\n );\n }\n\n $unit = Str::lower($this->argument('unit'));\n\n return str_replace(\n 'DummyView',\n 'view(\\''.$unit.'::components.'.$this->getView().'\\')',\n $this->build($name)\n );\n }", "public static function createFromName(string $name): self\n {\n return new ClassEntity(ReflectionClass::createFromName($name));\n }", "protected function buildClass($name)\n {\n\n $stub = $this->files->get($this->getStub());\n $tableName = $this->argument('name');\n $className = 'Create' . str_replace(' ', '', ucwords(str_replace('_', ' ', $tableName))) . 'Table';\n\n $fieldsToIndex = trim($this->option('indexes')) != '' ? explode(',', $this->option('indexes')) : [];\n $foreignKeys = trim($this->option('foreign-keys')) != '' ? explode(',', $this->option('foreign-keys')) : [];\n\n $schema = rtrim($this->option('schema'), ';');\n $fields = explode(';', $schema);\n\n $data = array();\n\n if ($schema) {\n $x = 0;\n foreach ($fields as $field) {\n\t\t\t\t\n $fieldArray = explode('#', $field);\n $data[$x]['name'] = trim($fieldArray[0]);\n\t\t\t\t$types = explode('|',$fieldArray[1]);\n\t\t\t\t$type = array_shift($types);\n $data[$x]['type'] = $type;\n if ((Str::startsWith($type, 'select')|| Str::startsWith($type, 'enum')) && isset($fieldArray[2])) {\n $options = trim($fieldArray[2]);\n $data[$x]['options'] = str_replace('options=', '', $options);\n }\n\t\t\t\t//string:30|default:'ofumbi'|nullable\n\t\t\t\t$data[$x]['modifiers'] = [];\n\t\t\t\tif(count($types)){\n\t\t\t\t\t$modifierLookup = [\n\t\t\t\t\t\t'comment',\n\t\t\t\t\t\t'default',\n\t\t\t\t\t\t'first',\n\t\t\t\t\t\t'nullable',\n\t\t\t\t\t\t'unsigned',\n\t\t\t\t\t\t'unique',\n\t\t\t\t\t\t'charset',\n\t\t\t\t\t];\n\t\t\t\t\tforeach($types as $modification){\n\t\t\t\t\t\t$variables = explode(':',$modification);\n\t\t\t\t\t\t$modifier = array_shift($variables);\n\t\t\t\t\t\tif(!in_array(trim($modifier), $modifierLookup)) continue;\n\t\t\t\t\t\t$variables = $variables[0]??\"\";\n\t\t\t\t\t\t$data[$x]['modifiers'][] = \"->\" . trim($modifier) . \"(\".$variables.\")\";\n\t\t\t\t\t}\n\t\t\t\t}\n $x++;\n }\n }\n\n $tabIndent = ' ';\n\n $schemaFields = '';\n foreach ($data as $item) {\n\t\t\t$data_type = explode(':',$item['type']);\n\t\t\t$item_type = array_shift($data_type);\n\t\t\t$variables = isset($data_type[0])?\",\".$data_type[0]:\"\";\n if (isset($this->typeLookup[$item_type ])) {\n $type = $this->typeLookup[$item_type];\n if (!empty($item['options'])) {\n $enumOptions = array_keys(json_decode($item['options'], true));\n $enumOptionsStr = implode(\",\", array_map(function ($string) {\n return '\"' . $string . '\"';\n }, $enumOptions));\n $schemaFields .= \"\\$table->enum('\" . $item['name'] . \"', [\" . $enumOptionsStr . \"])\";\n } elseif($item['name']==\"uuid\") {\n $schemaFields .= \"\\$table->uuid('\" . $item['name'] . \"')\";\n }else {\n $schemaFields .= \"\\$table->\" . $type . \"('\" . $item['name'] . \"'\".$variables.\")\";\n }\n } else {\n \t if (!empty($item['options'])) {\n $enumOptions = array_keys(json_decode($item['options'], true));\n $enumOptionsStr = implode(\",\", array_map(function ($string) {\n return '\"' . $string . '\"';\n }, $enumOptions));\n $schemaFields .= \"\\$table->enum('\" . $item['name'] . \"', [\" . $enumOptionsStr . \"])\";\n } elseif($item['name']==\"uuid\") {\n $schemaFields .= \"\\$table->uuid('\" . $item['name'] . \"')\";\n }else {\n $schemaFields .= \"\\$table->string('\" . $item['name'] . \"'\".$variables.\")\";\n }\n }\n\n // Append column modifier\n $schemaFields .= implode(\"\",$item['modifiers']);\n $schemaFields .= \";\\n\" . $tabIndent . $tabIndent . $tabIndent;\n }\n\n // add indexes and unique indexes as necessary\n foreach ($fieldsToIndex as $fldData) {\n $line = trim($fldData);\n\n // is a unique index specified after the #?\n // if no hash present, we append one to make life easier\n if (strpos($line, '#') === false) {\n $line .= '#';\n }\n\n // parts[0] = field name (or names if pipe separated)\n // parts[1] = unique specified\n $parts = explode('#', $line);\n if (strpos($parts[0], '|') !== 0) {\n $fieldNames = \"['\" . implode(\"', '\", explode('|', $parts[0])) . \"']\"; // wrap single quotes around each element\n } else {\n $fieldNames = trim($parts[0]);\n }\n\n if (count($parts) > 1 && $parts[1] == 'unique') {\n $schemaFields .= \"\\$table->unique(\" . trim($fieldNames) . \")\";\n } else {\n $schemaFields .= \"\\$table->index(\" . trim($fieldNames) . \")\";\n }\n\n $schemaFields .= \";\\n\" . $tabIndent . $tabIndent . $tabIndent;\n }\n\n // foreign keys\n foreach ($foreignKeys as $fk) {\n $line = trim($fk);\n\n $parts = explode('#', $line);\n\n // if we don't have three parts, then the foreign key isn't defined properly\n // --foreign-keys=\"foreign_entity_id#id#foreign_entity#onDelete#onUpdate\"\n if (count($parts) == 3) {\n $schemaFields .= \"\\$table->foreign('\" . trim($parts[0]) . \"')\"\n . \"->references('\" . trim($parts[1]) . \"')->on('\" . trim($parts[2]) . \"')\";\n } elseif (count($parts) == 4) {\n $schemaFields .= \"\\$table->foreign('\" . trim($parts[0]) . \"')\"\n . \"->references('\" . trim($parts[1]) . \"')->on('\" . trim($parts[2]) . \"')\"\n . \"->onDelete('\" . trim($parts[3]) . \"')\" . \"->onUpdate('\" . trim($parts[3]) . \"')\";\n } elseif (count($parts) == 5) {\n $schemaFields .= \"\\$table->foreign('\" . trim($parts[0]) . \"')\"\n . \"->references('\" . trim($parts[1]) . \"')->on('\" . trim($parts[2]) . \"')\"\n . \"->onDelete('\" . trim($parts[3]) . \"')\" . \"->onUpdate('\" . trim($parts[4]) . \"')\";\n } else {\n continue;\n }\n\n $schemaFields .= \";\\n\" . $tabIndent . $tabIndent . $tabIndent;\n }\n\n $primaryKey = $this->option('pk');\n $softDeletes = $this->option('soft-deletes');\n\n $softDeletesSnippets = '';\n if ($softDeletes == 'yes') {\n $softDeletesSnippets = \"\\$table->softDeletes();\\n\" . $tabIndent . $tabIndent . $tabIndent;\n }\n\n $schemaUp =\n \"Schema::create('\" . $tableName . \"', function (Blueprint \\$table) {\n \\$table->bigIncrements('\" . $primaryKey . \"');\n \\$table->timestamps();\\n\" . $tabIndent . $tabIndent . $tabIndent .\n $softDeletesSnippets .\n $schemaFields .\n \"});\";\n\n $schemaDown = \"Schema::drop('\" . $tableName . \"');\";\n\n return $this->replaceSchemaUp($stub, $schemaUp)\n ->replaceSchemaDown($stub, $schemaDown)\n ->replaceClass($stub, $className);\n }", "public function build( $class ) {\n\t\t$full_class_name = $this->namespace . $class;\n\t\treturn new $full_class_name();\n\t}", "static protected function build($entity_name, $name) {\n\t\t$class = 'Glue_Relationship_'.ucfirst($entity_name).'_'.ucfirst($name);\n\t\tif (class_exists($class))\n\t\t\t$relationship = new $class($entity_name, $name);\n\t\telse\n\t\t\t$relationship = new self($entity_name, $name);\n\t\treturn $relationship;\n\t}", "private static function createClass(string $name)\n\t{\n\t\tif (class_exists($name))\n\t\t{\n\t\t\treturn new $name();\n\t\t}\n\n\t\t$locator = Services::locator();\n\t\t$file = $locator->locateFile($name, 'Config');\n\n\t\tif (empty($file))\n\t\t{\n\t\t\t// No file found - check if the class was namespaced\n\t\t\tif (strpos($name, '\\\\') !== false)\n\t\t\t{\n\t\t\t\t// Class was namespaced and locateFile couldn't find it\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Check all namespaces\n\t\t\t$files = $locator->search('Config/' . $name);\n\t\t\tif (empty($files))\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Get the first match (prioritizes user and framework)\n\t\t\t$file = reset($files);\n\t\t}\n\n\t\t$name = $locator->getClassname($file);\n\n\t\tif (empty($name))\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\treturn new $name();\n\t}", "public function build($name, Request $request);", "public static function make($name)\n {\n return new static($name);\n }", "protected function qualifyClass($name)\n {\n return $this->namespace.$name;\n }", "private function buildClassDefinition()\n {\n $reflection = new \\ReflectionClass($this->context->getFullClassName());\n $haxeClass = new HaxeClass();\n $haxeClass\n ->setName($this->context->getClassName())\n ->setPackage(implode('.', explode('\\\\', $this->context->getCurrentNamespace())))\n ;\n\n $this->parseProperties($reflection, $haxeClass);\n $this->parseMethods($reflection, $haxeClass);\n\n return $haxeClass->transpile();\n }", "protected function buildClass()\n {\n return $this->files->get($this->getStub());\n }", "public function resolve(string $name)\n {\n try {\n $reflection = new ReflectionClass($name);\n } catch (ReflectionException $e) {\n throw new ClassNotFound(\"Class {$name} not found\");\n }\n\n $constructor = $reflection->getConstructor();\n if (null === $constructor) {\n return new $name();\n }\n\n $parameters = $constructor->getParameters();\n\n $dependencies = [];\n foreach ($parameters as $parameter) {\n $type = (string)$parameter->getType();\n\n try {\n $dependencies[] = $this->get($type);\n } catch (ClassNotFound $e) {\n if (!$parameter->isOptional()) {\n throw $e;\n }\n }\n }\n\n return new $name(...$dependencies);\n }", "public function setClassName(string $name) : void\n {\n //since the $this->name property is a read only and can not be changed even with reflectio na new property needs to be used\n //TODO add validation\n $this->gen_name = $name;\n }", "public function createClass()\n {\n return $this->addExcludesNameEntry($this->classes);\n }", "private static function _resolve_class_name ($name) {\n\t\t$cname = 'Upfront_MacroCodec_' . ucfirst(strtolower($name));\n\t\tif (!class_exists($cname)) return self::_resolve_class_name(self::FALLBACK);\n\t\treturn $cname;\n\t}", "public function getClass($name = null);", "function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}", "public function __construct($name) { \n $this->name = __CLASS__ . ' '. $name;\n echo __CLASS__ . ' constructor' . PHP_EOL;\n }", "private function createComponent($name) {\n\t\trequire_once(\"component/\".$name.\"/\".$name.\".inc\");\n\t\t$c = new $name($name);\n\t\t$this->components[$name] = &$c;\n\t\t$this->{$name} = &$c;\n\t}", "private function getClassFor($name)\n {\n $test = strtolower($name);\n foreach ($this->types as $class => $matchers) {\n foreach ($matchers as $matcher) {\n if ($test === $matcher) {\n return $class;\n }\n }\n }\n return $this->genericType;\n }", "static public function withName( $aName )\n\t{\n\t\t$thisClassName = get_called_class();\n\t\t$o = new $thisClassName( $aName );\n\t\tif (!empty($aName))\n\t\t\t$o->setAttr( 'name', $aName ) ;\n\t\treturn $o;\n\t}", "public function __construct($name) {}", "public function loadClass($name) {\r\n //array of classes to be laoded\r\n $classes = array(\r\n 'Config' => '../config/Config.php',\r\n 'Error' => '../validation/Error.php',\r\n 'Flash' => '../flash/Flash.php',\r\n 'NotFoundException' => '../exception/NotFoundException.php',\r\n 'JobValidator' => '../validation/JobValidator.php',\r\n 'UserCredentialsValidator' => '../validation/UserCredentialsValidator.php',\r\n 'Utils' => '../util/Utils.php',\r\n 'HeadTemplate' => '../layout/HeadTemplate.php',\r\n 'User' => '../model/User.php',\r\n 'Clinic' => '../model/Clinic.php',\r\n 'ClinicDao' => '../dao/ClinicDao.php',\r\n 'UserDao' => '../dao/UserDao.php',\r\n 'ClinicMapper' => '../mapping/ClinicMapper.php',\r\n 'UserMapper' => '../mapping/UserMapper.php',\r\n 'Dao' => '../dao/Dao.php',\r\n 'Job' => '../model/Job.php',\r\n 'JobDao' => '../dao/JobDao.php',\r\n 'JobMapper' => '../mapping/JobMapper.php',\r\n 'AccountValidator' => '../validation/AccountValidator.php');\r\n \r\n //Exception handler if class not found\r\n if (!array_key_exists($name, $classes)) {\r\n die('Class\"' . $name . '\"not found.');\r\n }\r\n require_once $classes[$name];\r\n \r\n }", "public function __construct ($name) {}", "public function setClassName($name)\n\t{\n\t\t$this->_className = $name;\n\t\treturn $this;\n\t}", "public function commandClass($name)\n {\n $namespace = explode('\\\\', __NAMESPACE__);\n $prefix = array_pop($namespace);\n $className = $prefix . ucfirst($name);\n return __NAMESPACE__ . \"\\\\Commands\\\\{$className}\";\n }", "abstract public function build();", "abstract public function build();", "public function __construct($name);", "public function __construct($name);", "private function retrieveClassName($name)\r\n {\r\n switch($name){\r\n case self::LABEL:\r\n case self::INPUT:\r\n case self::SUBIMIT:\r\n return 'Model\\\\Form\\\\Field' . ucfirst($name);\r\n default:\r\n throw new \\InvalidArgumentException(\"The $name field type does not exists\");\r\n }\r\n }", "abstract public function __construct(string $name);", "protected function buildExtendedClass(string $name)\n {\n// $namespaceExtends = $this->qualifyClass($extends);\n $namespaceExtends = $this->getExtendsNamespace();\n $extendsBasename = class_basename($namespaceExtends);\n\n $stub = str_replace([\n 'DummyExtendedInterface',\n 'DummyExtendedNamespace',\n ], [\n $extendsBasename,\n $namespaceExtends,\n ], parent::buildClass($name));\n\n return $this->getNamespace($name) === $this->getNamespace($namespaceExtends)\n ? $this->removeUselessUse($stub, $namespaceExtends)\n : $stub;\n }", "public function __construct($name) {\n $this->$name = $name;\n }", "public function inClass($name) {\n $this->name = $name;\n return PStub_Stubber::create($this->entity, $this);\n }", "public function __construct($name) {\n\t\t$this->name = (string)$name;\n\t}", "protected function fromClass(string $name) {\n if (class_exists($name, true) === false)\n return null;\n\n if (method_exists($name, '__construct') === false)\n return new Bean($name, new $name);\n\n $method = new \\ReflectionMethod($name, '__construct');\n return new Bean($name, new $name(...$this->autowire($method)));\n }", "function __construct($name) {\n $this->name = $name;\n }", "public abstract function build();", "public abstract function build();", "public function makeClassName(string $pattern, string $name): string\n {\n $className = $pattern;\n $replace = [\n '[datetime]_' => '',\n '[name]' => $this->removeSpecialCharacters($name),\n '.php' => '',\n ];\n return Str::studly(str_replace(array_keys($replace), $replace, $className));\n }", "abstract function build();", "private function make_class_name( $name, $type ) {\n\n\t\tif ( 'field' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Fields\\\\';\n\t\t} elseif ( 'page' == $type ) {\n\t\t\t$namespace = '\\\\' . __NAMESPACE__ . '\\Admin\\Pages\\\\';\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\n\t\t$class_name = implode( '_', array_map( 'ucfirst', explode( '-', $name ) ) );\n\n\t\treturn $namespace . $class_name;\n\t}", "public function create(string $class);", "function __construct($name) {\n $this->NAME = $name;\n }", "public function build(string $format)\n {\n $classPrefix = $this->config->getWriteFormatClassPrefix();\n $className = $classPrefix\n .self::COMMAND_NAME_PREFIX\n .ucfirst($format);\n $this->validator->validateClassExists($className);\n return new $className;\n }", "private function _class_open ($name, $type = NULL, $extends = NULL)\n\t{\n\n\t\t$string = $this->_php_open().\"\\n\";\n\n\t\t$string .= \"class \" . ucfirst($name) . \" \";\n\n\t\tif ($extends === NULL && $type !== NULL) {\n\n\t\t\t$string .= \"extends MY_\" . ucfirst(str_replace('Generate::', '', $type));\n\n\t\t}\n\t\telseif ($extends !== NULL) {\n\n\t\t\t$string .= \"extends $extends \";\n\n\t\t}\n\n\t\t$string .= \"\\n{\".\"\\n\";\n\n\t\treturn $string;\n\n\t}", "private function findInternalClass($name, $sectionName)\n {\n // Remove list id like xxx_3\n $classType = $sectionName;\n if (strpos($classType, '_') !== false) {\n $classType = substr($classType, 0, strpos($classType, '_'));\n }\n\n // Guess the namespace\n $namespacesByType = array(\n '' => '',\n 'vcs' => 'Liip\\RMT\\VCS',\n 'prerequisites' => 'Liip\\RMT\\Action',\n 'preReleaseActions' => 'Liip\\RMT\\Action',\n 'postReleaseActions' => 'Liip\\RMT\\Action',\n \"versionPersister\" => 'Liip\\RMT\\Version\\Persister',\n \"versionDetector\" => 'Liip\\RMT\\Version\\Persister', //todo change\n );\n $nameSpace = $namespacesByType[$classType];\n\n // Guess the class name\n // Convert from xxx-yyy-zzz to XxxYyyZzz and append suffix\n $suffixByType = array(\n '' => '',\n 'vcs' => '',\n 'prerequisites' => '',\n 'preReleaseActions' => 'Action',\n 'postReleaseActions' => 'Action',\n \"versionPersister\" => 'Persister',\n \"versionDetector\" => 'Persister', //todo change\n );\n $className = str_replace(' ', '', ucwords(str_replace('-', ' ', $name))) . $suffixByType[$classType];\n\n if (class_exists($nameSpace . '\\\\' . $className)) {\n return $nameSpace . '\\\\' . $className;\n }\n \n throw new \\Liip\\RMT\\Config\\Exception(\"Cannot resolve \" . $nameSpace . '\\\\' . $className);\n }", "private function createByName($class, $name)\n {\n return $class::findOneCreateNew([\n 'name' => $name,\n ]);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function build();", "public function build();", "public function build();", "public function build();", "public function build();", "public function build();", "public function build();", "public static function newObj($name)\n\t{\n\t\t$info = self::getClassInfo($name);\n\n\t\tif ( !file_exists($info['path'])) {\n\t\t\ttrigger_error('Obj \"'.$info['fullname'].'\" could not be instanciated. File was not found', E_USER_ERROR);\n\t\t}\n\n\t\trequire_once($info['path']);\n\n\t\treturn new $info['fullname'] ;\n\t}", "public function __construct($name)\n {\n //\n $this->name = $name;\n }", "function __construct($name)\n {\n $this->name = $name;\n }" ]
[ "0.81533456", "0.8070352", "0.80405176", "0.8011189", "0.7959702", "0.7931643", "0.7889602", "0.7861706", "0.7851589", "0.78447306", "0.7825273", "0.77749634", "0.7750451", "0.77387345", "0.77089214", "0.76841116", "0.76594216", "0.76244134", "0.7611173", "0.7603207", "0.75941664", "0.75848144", "0.7567182", "0.74889904", "0.7487985", "0.7456749", "0.7441255", "0.7424177", "0.73887676", "0.7353174", "0.73099524", "0.72950625", "0.7263062", "0.7257323", "0.725585", "0.7175274", "0.71523327", "0.71320814", "0.7129193", "0.70380735", "0.6986356", "0.6703969", "0.6586975", "0.64913607", "0.6466998", "0.6407436", "0.63434386", "0.62051266", "0.61685705", "0.61641294", "0.6124642", "0.6029975", "0.602063", "0.5987074", "0.59680367", "0.5894366", "0.5887836", "0.5887068", "0.5859647", "0.5835336", "0.5828015", "0.579406", "0.5732446", "0.5724703", "0.57130605", "0.57127297", "0.5693678", "0.5693678", "0.5691372", "0.5691372", "0.56822073", "0.5676779", "0.5665891", "0.5641497", "0.56394154", "0.5635514", "0.56330603", "0.5624646", "0.56170243", "0.56170243", "0.5602532", "0.56013674", "0.55849147", "0.5579589", "0.5579509", "0.5572693", "0.5568146", "0.55635303", "0.55578107", "0.5554014", "0.55454904", "0.55454904", "0.55454904", "0.55454904", "0.55454904", "0.55454904", "0.55454904", "0.55449826", "0.5539667", "0.5537435" ]
0.7932265
5
Process received transactions data
protected function _processReceivedTransactionData($data = [], $result = []) { $key = ''; foreach ($data as $trans) { if (!$key) { $key = $trans['time']; } $result[$trans['time']] = [ 'y' => $trans['time'], 'received' => $trans['credit'], 'spent' => 0, ]; } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processTransaction($data){\n\n\t\t$bmtProducts = array( // todo add more products \n\t\t\t91390007 => '50',\n\t\t\t91390006 => '10',\n\t\t\t91390005 => '25',\n\t\t\t91390009 => '100',\n\t\t\t91390008 => '75',\n\t\t\t\n\t\t);\n\t \n\t $sessionId = $data['ccom'];\n\t $pid = $data['productid'];\n\t \n\t $value = $bmtProducts[$pid];\n\t \n\t \t$file = 'people.log';\n\t\t$person = \"\".json_encode($data).\"\\n\";\n\n\t\tfile_put_contents($file, $person, FILE_APPEND | LOCK_EX);\n\t\t\n\t\t/** get member info by session ID **/\n\t\t$rows = getMemberInfoBySessionId($sessionId);\n\t\taddPoints($data, $rows, $value);\n\n\t\t\n\t}", "public function transaction_process()\n {\n $this->_post_vars = array_merge($_GET, $_POST);\n\n if (!isset($this->_post_vars['cart_order_id'])) {\n //process as an INS signal\n return $this->_processINS();\n }\n //Need to add <base ...> tag so it displays correctly\n geoView::getInstance()->addBaseTag = true;\n\n //VARIABLES PASSED-BACK\n //order_number - 2Checkout order number\n //card_holder_name\n //street_address\n //city\n //state\n //zip\n //country\n //email\n //phone\n //cart_order_id\n //credit_card_processed\n //total\n //ship_name\n //ship_street_address\n //ship_city\n //ship_state\n //ship_country\n //ship_zip\n trigger_error('DEBUG TRANSACTION: Top of transaction_process.');\n\n if (!$this->get('testing_mode')) {\n //check the hash\n $hash = $this->_genHash(false);\n if (!$hash || ($this->_post_vars['key'] !== $hash)) {\n //NOTE: if testing mode turned on, it will skip the normal demo mode checks.\n trigger_error('DEBUG TRANSACTION: Payment failure, secret word/MD5 hash checks failed.');\n self::_failure($transaction, 2, \"No response from server, check vendor settings\");\n return;\n }\n //gets this far, the md5 hash check passed, so safe to proceed.\n }\n\n //true if $_SERVER['HTTP_REFERER'] is blank or contains a value from $referer_array\n trigger_error('DEBUG TRANSACTION: MD5 hash check was successful.');\n\n trigger_error('DEBUG TRANSACTION: 2checkout vars: ' . print_r($this->_post_vars, 1));\n //get objects\n $transaction = geoTransaction::getTransaction($this->_post_vars['cart_order_id']);\n if (!$transaction || $transaction->getID() == 0) {\n //failed to reacquire the transaction, or transaction does not exist\n trigger_error('DEBUG TRANSACTION: Could not find transaction using: ' . $this->_post_vars['cart_order_id']);\n self::_failure($transaction, 2, \"No response from server\");\n return;\n }\n $invoice = $transaction->getInvoice();\n $order = $invoice->getOrder();\n\n //store transaction data\n $transaction->set('twocheckout_response', $this->_post_vars);\n //transaction will be saved when order is saved.\n\n if (($this->_post_vars[\"order_number\"]) && ($this->_post_vars[\"cart_order_id\"])) {\n //if ($this->_post_vars[\"credit_card_processed\"] == \"Y\")\n if (strcmp($this->_post_vars[\"credit_card_processed\"], \"Y\") == 0) {\n //CC processed ok, now do stuff on our end\n //Might want to add further checks, like to check MD5 hash (if possible),\n //or check that the total is correct.\n trigger_error('DEBUG TRANSACTION: Payment success!');\n //let the objects do their thing to make this active\n self::_success($order, $transaction, $this);\n } else {\n //error in transaction, possibly declined\n trigger_error('DEBUG TRANSACTION: Payment failure, credit card not processed.');\n self::_failure($transaction, $this->_post_vars[\"credit_card_processed\"], \"2Checkout: Card not approved\");\n }\n } else {\n trigger_error('DEBUG TRANSACTION: Payment failure, no order number or cart order ID.');\n self::_failure($transaction, 2, \"No response from server\");\n }\n }", "public function processData() {}", "public function doProcessData() {}", "function en_send_transdata() {\n\t// Handle sending of data\n}", "public function transaction_process()\n {\n //treat as a robot, to avoid redirection or cookie issues.\n //shouldn't need to do this anymore\n //define('IS_ROBOT',true);\n\n //transId\n //transStatus\n // Y - successful\n // C - cancelled\n //transTime\n //authAmount\n //authCurrency\n //authAmountString\n //rawAuthMessage\n //rawAuthCode\n //callbackPW\n //cardType\n //countryString\n //countryMatch\n // Y - match\n // N - no match\n // B - comparison not available\n // I - contact country not supplied\n // S - card issue country not available\n //AVS\n // 1234\n // 1 - card verification\n // 2 - postcode AVS check\n // 3 - address AVS check\n // 4 - country comparison check\n // values\n // 0 - not supported\n // 1 - not checked\n // 2 - matched\n // 4 - not matched\n // 8 - partially matched\n //cartId\n //M_sessionId\n //M_customerId\n //name\n //address\n //postcode\n //country\n //tel\n //fax\n //email\n //amount\n //currency\n //description\n\n trigger_error('DEBUG TRANSACTION: start worldpay transaction process');\n\n $response = $_POST;\n\n //Check to make sure this is valid\n if (!($response[\"cartId\"]) && ($response[\"M_customerId\"])) {\n //Not stuff returned\n return;\n }\n\n if (strlen(trim($this->get(\"callback_password\"))) > 0) {\n if ($this->get(\"callback_password\") != $response[\"callbackPW\"]) {\n //password does not match\n return false;\n }\n }\n\n //transaction id is saved by \"cartId\"\n $trans_id = intval($response[\"cartId\"]);\n $transaction =& geoTransaction::getTransaction($trans_id);\n trigger_error('DEBUG TRANSACTION: paypal:transaction_process() - right AFTER - transaction: ' . print_r($transaction, 1));\n\n //save response data\n $transaction->set('worldpay_response', $response);\n $transaction->save();\n\n //make sure all of transaction info matches with what was passed back.\n if ($transaction->getUser() != $response[\"M_customerId\"]) {\n //something is wrong, do not proceed\n trigger_error('ERROR TRANSACTION: Invalid user set for transaction: ' . $trans_id);\n return;\n }\n if ($transaction->getGatewayTransaction() != $response[\"M_sessionId\"]) {\n //something is wrong, do not proceed\n trigger_error('ERROR TRANSACTION: Invalid session id set for transaction: ' . $trans_id);\n return;\n }\n if ($transaction->getAmount() != $response[\"authAmount\"] || $transaction->getStatus()) {\n //something is wrong, do not proceed\n trigger_error('ERROR TRANSACTION: Invalid transaction data returned for transaction: ' . $trans_id);\n return;\n }\n\n //worldpay transloads whatever result page is shown onto their own server, and displays it without CSS for \"security.\"\n //it *does* complete this POST, though, so we can go ahead right now and mark the transaction as success/failed in the database\n //but set our normal success/failure functions to not render the page -- instead echo just a redirect to transaction_result.php to return the user fully to the local site\n\n if ($response[\"transStatus\"] == \"C\") {\n //cancelled -- fail\n self::_failure($transaction, $response[\"transStatus\"], \"Worldpay said: \" . $response['rawAuthMessage'], true);\n } elseif ($response[\"transStatus\"] != \"Y\") {\n //fail\n self::_failure($transaction, $response[\"transStatus\"], \"Worldpay said: \" . $response['rawAuthMessage'], true);\n } else {\n //success\n self::_success($transaction->getInvoice()->getOrder(), $transaction, geoPaymentGateway::getPaymentGateway(self::getType()), true);\n }\n\n $db = DataAccess::getInstance();\n $target = str_replace($db->get_site_setting('classifieds_file_name'), 'transaction_result.php?transaction=' . $transaction->getId(), $db->get_site_setting('classifieds_url'));\n echo '<meta http-equiv=\"refresh\" content=\"1; url=' . $target . '\">';\n }", "function processData() ;", "public function shellProcessTransactions() {\n\t\t\t$response = $this->_processTransactions();\n\t\t\treturn $response;\n\t\t}", "protected function processReceivedData() {\n\n parent::processReceivedData();\n }", "function handle_transaction()\n\t{\t\n\t\tif ((file_exists(get_file_base().'/data_custom/ecommerce.log')) && (is_writable_wrap(get_file_base().'/data_custom/ecommerce.log')))\n\t\t{\n\t\t\t$myfile=fopen(get_file_base().'/data_custom/ecommerce.log','at');\n\t\t\tfwrite($myfile,serialize($_POST).chr(10));\n\t\t\tfclose($myfile);\n\t\t}\n\n\t\t// assign posted variables to local variables\n\t\t$purchase_id=post_param('custom','-1');\n\n\t\t$txn_type=post_param('txn_type',NULL);\n\n\t\tif ($txn_type=='cart')\n\t\t{\t\n\t\t\trequire_lang('shopping');\n\t\t\t$item_name=do_lang('CART_ORDER',$purchase_id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$item_name=(substr(post_param('txn_type',''),0,6)=='subscr')?'':post_param('item_name','');\n\t\t}\n\n\t\t$payment_status=post_param('payment_status',''); // May be blank for subscription\n\t\t$reason_code=post_param('reason_code','');\n\t\t$pending_reason=post_param('pending_reason','');\n\t\t$memo=post_param('memo','');\n\t\t$mc_gross=post_param('mc_gross',''); // May be blank for subscription\n\t\t$tax=post_param('tax','');\n\t\tif (($tax!='') && (intval($tax)>0) && ($mc_gross!='')) $mc_gross=float_to_raw_string(floatval($mc_gross)-floatval($tax));\n\t\t$mc_currency=post_param('mc_currency',''); // May be blank for subscription\n\t\t$txn_id=post_param('txn_id',''); // May be blank for subscription\n\t\t$parent_txn_id=post_param('parent_txn_id','-1');\n\t\t$receiver_email=post_param('receiver_email',null);\n\t\tif ($receiver_email===null) $receiver_email=post_param('business');\n\n\t\t// post back to PayPal system to validate\n\t\tif (!ecommerce_test_mode())\n\t\t{\n\t\t\trequire_code('files');\n\t\t\t$pure_post=isset($GLOBALS['PURE_POST'])?$GLOBALS['PURE_POST']:$_POST;\n\t\t\t$x=0;\n\t\t\t$res=mixed();\n\t\t\tdo\n\t\t\t{\n\t\t\t\t$res=http_download_file('https://'.(ecommerce_test_mode()?'www.sandbox.paypal.com':'www.paypal.com').'/cgi-bin/webscr',NULL,false,false,'ocPortal',$pure_post+array('cmd'=>'_notify-validate'));\n\t\t\t\t$x++;\n\t\t\t}\n\t\t\twhile ((is_null($res)) && ($x<3));\n\t\t\tif (is_null($res)) my_exit(do_lang('IPN_SOCKET_ERROR'));\n\t\t\tif (!(strcmp($res,'VERIFIED')==0))\n\t\t\t{\n\t\t\t\tif (post_param('txn_type','')=='send_money') exit('Unexpected'); // PayPal has been seen to mess up on send_money transactions, making the IPN unverifiable\n\t\t\t\tmy_exit(do_lang('IPN_UNVERIFIED').' - '.$res.' - '.flatten_slashed_array($pure_post),strpos($res,'<html')!==false);\n\t\t\t}\n\t\t}\n\n\t\t$txn_type=str_replace('-','_',post_param('txn_type'));\n\t\tif ($txn_type=='subscr-modify')\n\t\t{\n\t\t\t$payment_status='SModified';\n\t\t\t$txn_id=post_param('subscr_id').'-m';\n\t\t}\n\t\telseif ($txn_type=='subscr_signup')\n\t\t{\n\t\t\t$payment_status='Completed';\n\t\t\t$mc_gross=post_param('mc_amount3');\n\t\t\tif (post_param_integer('recurring')!=1) my_exit(do_lang('IPN_SUB_RECURRING_WRONG'));\n\t\t\t$txn_id=post_param('subscr_id');\n\t\t}\n\t\telseif ($txn_type=='subscr_eot' || $txn_type=='recurring_payment_suspended_due_to_max_failed_payment')\n\t\t{\n\t\t\t$payment_status='SCancelled';\n\t\t\t$txn_id=post_param('subscr_id').'-c';\n\t\t}\n\t\telseif ($txn_type=='subscr_payment' || $txn_type=='subscr_failed' || $txn_type=='subscr_cancel')\n\t\t{\n\t\t\texit();\n\t\t}\n\n\t\t$primary_paypal_email=get_value('primary_paypal_email');\n\n\t\tif (!is_null($primary_paypal_email))\n\t\t{\n\t\t\tif ($receiver_email!=$primary_paypal_email) my_exit(do_lang('IPN_EMAIL_ERROR'));\n\t\t} else\n\t\t{\n\t\t\tif ($receiver_email!=$this->_get_payment_address()) my_exit(do_lang('IPN_EMAIL_ERROR'));\n\t\t}\n\n\t\tif (addon_installed('shopping'))\n\t\t{\n\t\t\tif (preg_match('#'.str_replace('xxx','.*',preg_quote(do_lang('shopping:CART_ORDER','xxx'),'#')).'#',$item_name)!=0)\n\t\t\t{\n\t\t\t\t$this->store_shipping_address($purchase_id);\n\t\t\t}\n\t\t}\n\n\t\treturn array($purchase_id,$item_name,$payment_status,$reason_code,$pending_reason,$memo,$mc_gross,$mc_currency,$txn_id,$parent_txn_id);\n\t}", "public function DoTransaction(){\t\t\n\t\tif($this->IsLoggedIn('cashier')){\t\t\t\n\t\t\tif(isset($_POST) && !empty($_POST)){\n\t\t\t\t$customer_id = $_POST['txn_data']['txn_customer_id'];\t\t\t\t\t\t\t\n\t\t\t\t$count=1;\n\t\t\t\tforeach($_POST['cart_data'] as $key => $value)\n\t\t\t\t{\n\t\t\t\t\tif($key){\n\t\t\t\t\t\t$count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// end\n\t\t\t\t$business_admin_id = $this->session->userdata['logged_in']['business_outlet_id'];\n\t\t\t\t$result = $this->CashierModel->BillingTransaction($_POST,$this->session->userdata['logged_in']['business_outlet_id'],$this->session->userdata['logged_in']['business_admin_id']);\n\n\t\t\t\tif($result['success'] == 'true'){\n\t\t\t\t\t$transcation_detail = $this->CashierModel->GetBilledServicesByTxnId($result['res_arr']['res_arr']['insert_id']);\n\t\t\t\t\t\n\t\t\t\t\t$cart_data['transaction_id'] = $result['res_arr']['res_arr']['insert_id'];\n\t\t\t\t\t$cart_data['outlet_admin_id'] = $business_admin_id;\t\t\t\t\t\n\t\t\t\t\t$cart_data['transaction_time'] = $transcation_detail['res_arr'][0]['txn_datetime'];\n\t\t\t\t\t$cart_data['cart_data'] = json_encode($_POST['cart_data']);\n\t\t\t\t\t$cart_detail = $this->CashierModel->Insert($cart_data,'mss_transaction_cart');\n\t\t\t\t\tif($cart_detail['success'] == 'true'){\n\t\t\t\t\t\t$this->session->set_userdata('loyalty_point',$transcation_detail['res_arr'][0]['txn_loyalty_points']);\n\t\t\t\t\t\t$this->session->set_userdata('cashback',$transcation_detail['res_arr'][0]['txn_loyalty_cashback']);\n\t\t\t\t\t\t$detail_id = $cart_detail['res_arr']['insert_id'];\n\t\t\t\t\t\t$bill_url = base_url().\"Cashier/generateBill/$customer_id/\".base64_encode($detail_id);\n\t\t\t\t\t\t$bill_url = str_replace(\"https\", \"http\", $bill_url);\n\t\t\t\t\t\t$bill_url = shortUrl($bill_url);\n\t\t\t\t\t}\n\n\t\t\t\t\t//1.Unset the payment session\n\t\t \t\t\tif(isset($this->session->userdata['payment'])){\n\t\t \t\t\t\t$this->session->unset_userdata('payment');\n\t\t\t\t\t }\n\t\t\t\t\t //j\n\t\t\t\t\t //Memebership Package Loyalty Calculation\n if(isset($this->session->userdata['cart'][$customer_id]))\n { \n $data = $this->CashierModel->GetCustomerPackages($customer_id);\n if($data['success'] == 'false')\n {\n // $this->PrettyPrintArray(\"Customer Does not have special membership\");\n }\n else{\n if(!empty($data['res_arr']))\n {\n if(isset($this->session->userdata['cart'][$customer_id]))\n {\n $curr_sess_cart = $this->session->userdata['cart'][$customer_id];\n $cart_data = array();\n $i = 0;\n $j = 0;\n $total_product = 0;\n $total_points = 0;\n for($j;$j<count($curr_sess_cart);$j++)\n {\n $service_details = $this->CashierModel->DetailsById($curr_sess_cart[$j]['service_id'],'mss_services','service_id');\n if(isset($service_details['res_arr']))\n {\n // print_r($service_details['res_arr']);\n if($service_details['res_arr']['service_type'] == 'otc')\n {\n $total_product += $curr_sess_cart[$j]['service_total_value'];\n $total_points+= ($curr_sess_cart[$j]['service_total_value']*$data['res_arr'][$i]['service_discount'])/100;\n $curr_sess_cart[$j] += ['service_discount'=>$data['res_arr'][$i]['service_discount']];\n \n array_push($cart_data,$curr_sess_cart[$j]);\n // array_push($cart_data,$data['res_arr'][$i]['service_discount']);\n }\n }\n }\n \n if(!empty($cart_data))\n {\n foreach($cart_data as $key=>$value)\n {\n }\n }\n $update = array(\n 'total_points' => $total_points,\n 'txn_id' => $result['res_arr']['res_arr']['insert_id'],\n 'customer_id' => $customer_id\n );\n $result_2 = $this->CashierModel->SpecialLoyaltyPoints($update,$this->session->userdata['logged_in']['business_outlet_id'],$this->session->userdata['logged_in']['business_admin_id']);\n // $this->PrettyPrintArray($cart_data);\n // exit;\n }\n }\n \n }\n \n }\n\t\t\t\t\t //end\n \n // 2.Then unset the cart session\n\t\t \t\t\tif(isset($this->session->userdata['cart'][$customer_id])){\n\t\t \t\t\t\t$curr_sess_cart_data = $this->session->userdata['cart'];\n\t\t \t\t\t\tunset($curr_sess_cart_data[''.$customer_id.'']);\n\t\t \t\t\t\t$this->session->set_userdata('cart',$curr_sess_cart_data);\n\t\t \t\t\t}\n if(isset($this->session->userdata['recommended_ser'][$customer_id])){\n\t\t\t\t\t\t$curr_sess_cart_data = $this->session->userdata['recommended_ser'];\n\t\t\t\t\t\tunset($curr_sess_cart_data[''.$customer_id.'']);\n\t\t\t\t\t\t$this->session->set_userdata('recommended_ser',$curr_sess_cart_data);\n\t\t\t\t\t}\n\t\t\t\t\t//3.Then unset the customer session from POS\n\t\t \t\t\tif(isset($this->session->userdata['POS'])){\n\t\t \t\t\t\t$curr_sess_cust_data = $this->session->userdata['POS'];\n\t\t \t\t\t\t\n\t\t \t\t\t\t$key = array_search($customer_id, array_column($curr_sess_cust_data, 'customer_id'));\n\t\t \t\t\t\t\n\t\t \t\t\t\tunset($curr_sess_cust_data[$key]);\n\t\t \t\t\t\t$curr_sess_cust_data = array_values($curr_sess_cust_data);\n\t\t \t\t\t\t\n\t\t \t\t\t\t$this->session->set_userdata('POS',$curr_sess_cust_data);\n\t\t \t\t\t}\n\n\t\t \t\t\t//These 2 call will be used for the further enhancement of message sending architecture.\n\t\t \t\t\t$outlet_details = $this->GetCashierDetails();\n\t\t\t\t\t$customer_details = $this->GetCustomerBilling($_POST['customer_pending_data']['customer_id']);\n\t\t\t\t\t//4.Send a msg\n\t\t\t\t\t$this->session->set_userdata('bill_url',$bill_url);\n\t\t\t\t\t$sms_status = $this->db->select('*')->from('mss_business_outlets')->where('business_outlet_id',$this->session->userdata['logged_in']['business_outlet_id'])->get()->row_array();\n\t\t\t\t\t\t// $this->PrettyPrintArray($sms_status);\n\t\t\t\t\tif($sms_status['business_outlet_sms_status']==1 && $sms_status['whats_app_sms_status']==0){\n\t\t\t\t\t\tif($_POST['send_sms'] === 'true' && $_POST['cashback']>0){\n\t\t\t\t\t\t\tif($_POST['txn_data']['txn_value']==0){\n\t\t\t\t\t\t\t$this->SendPackageTransactionSms($_POST['txn_data']['sender_id'],$_POST['txn_data']['api_key'],$_POST['customer_pending_data']['customer_mobile'],$_POST['cart_data'][0]['salon_package_name'],$count,$customer_details['customer_name'],$_POST['cart_data'][0]['service_count'],$outlet_details['business_outlet_google_my_business_url'],$customer_details['customer_rewards']);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$this->SendSms($_POST['txn_data']['sender_id'],$_POST['txn_data']['api_key'],$_POST['customer_pending_data']['customer_mobile'],$_POST['txn_data']['txn_value'],$outlet_details['business_outlet_name'],$customer_details['customer_name'],$outlet_details['business_outlet_google_my_business_url'],$customer_details['customer_rewards']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//\n\t\t\t\t\t\tif($_POST['send_sms'] === 'true' && $_POST['cashback']==0){\n\t\t\t\t\t\t\tif($_POST['txn_data']['txn_value']==0){\n\t\t\t\t\t\t\t$this->SendPackageTransactionSms($_POST['txn_data']['sender_id'],$_POST['txn_data']['api_key'],$_POST['customer_pending_data']['customer_mobile'],$_POST['cart_data'][0]['salon_package_name'],$count,$customer_details['customer_name'],$_POST['cart_data'][0]['service_count'],$outlet_details['business_outlet_google_my_business_url'],$customer_details['customer_rewards']);\n\t\t\t\t\t\t\t}else{\t\t\n\t\t\t\t\t\t\t$this->SendSms($_POST['txn_data']['sender_id'],$_POST['txn_data']['api_key'],$_POST['customer_pending_data']['customer_mobile'],$_POST['txn_data']['txn_value'],$outlet_details['business_outlet_name'],$customer_details['customer_name'],$outlet_details['business_outlet_google_my_business_url'],$customer_details['customer_rewards']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}elseif($sms_status['business_outlet_sms_status']==1 && $sms_status['whats_app_sms_status']==1){\n\t\t\t\t\t\t$this->SendSms($_POST['txn_data']['sender_id'],$_POST['txn_data']['api_key'],$_POST['customer_pending_data']['customer_mobile'],$_POST['txn_data']['txn_value'],$outlet_details['business_outlet_name'],$customer_details['customer_name'],$outlet_details['business_outlet_google_my_business_url'],$customer_details['customer_rewards']);\n\n\t\t\t\t\t\t$this->SendWhatsAppSms($sms_status['client_id'],$sms_status['whatsapp_userid'],$sms_status['whatsapp_key'],$_POST['customer_pending_data']['customer_mobile'],$_POST['txn_data']['txn_value'],$outlet_details['business_outlet_name'],$customer_details['customer_name'],$outlet_details['business_outlet_google_my_business_url'],$customer_details['customer_rewards']);\n\n\t\t\t\t\t}elseif($sms_status['business_outlet_sms_status']==0 && $sms_status['whats_app_sms_status']==1 ){\n\t\t\t\t\t\t$this->SendWhatsAppSms($sms_status['client_id'],$sms_status['whatsapp_userid'],$sms_status['whatsapp_key'],$_POST['customer_pending_data']['customer_mobile'],$_POST['txn_data']['txn_value'],$outlet_details['business_outlet_name'],$customer_details['customer_name'],$outlet_details['business_outlet_google_my_business_url'],$customer_details['customer_rewards']);\n\t\t\t\t\t}\n\t\t\t\t\t//\n \n\t\t\t\t\t$this->ReturnJsonArray(true,false,\"Transaction is successful!\");\n\t\t\t\t\tdie;\n\t\t\t\t}\n\t\t\t\telseif ($result['error'] == 'true') {\n\t\t\t\t\t$this->ReturnJsonArray(false,true,$result['message']);\n\t\t\t\t\tdie;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->LogoutUrl(base_url().\"Cashier/\");\n\t\t}\n\t}", "function en_receive_upload() {\n\t// Handle incoming upload transaction\n\t\n\t//! Insert the upload job into the queue.\n\n\t//! Connect to PgSQL\n\t$dbconn = new en_connection();\n\t\n\t//! Prepare the query and make the insertions\n\t$query = 'INSERT INTO en_upload_queue VALUES (nextval(\\'en_upload_queue_trid_seq\\'::regclass), ?, ?, ?, ?, ?, ?, \\'0\\') RETURNING trid;';\n/*\n\t$sth = $dbconn->con->prepare($query);\n\t$sth->execute(array($time,$vaule));\n\t$result = $sth->fetchAll();\n */\n\t\n\t$enqueue = $dbconn->con->prepare($query);\n\t$enqueue->execute(array(\n\t\t$_POST['en_inputformat'],\n\t\t$_POST['en_productformat'],\n\t\t$_POST['dataproduct_id'],\n\t\t$_POST['observation'],\n\t\t$_POST['api_id'],\n\t\t$_POST['signature']\n\t));\n\t$row = $enqueue->fetchAll();\n\ten_debug(\"Incoming to queue - APIID: \".$_POST['api_id'].\" - Product: \".$_POST['dataproduct_id'].\" - Transaction ID: \".$row[0]['trid']);\n\t\n\techo $row[0]['trid'];\n\t\n\t//!@todo AMONG OTHERS, CHECK IF SELECTED DATAPRODUCT SUPPORTS THE UPLOAD FORMAT ID\n}", "abstract protected function getTransactions();", "protected function processTransactionUpdate(\\XLite\\Model\\Payment\\Transaction $transaction, $data)\n {\n $transaction->setDataCell('status', 'Transaction successful', 'X-Payments message', 'C');\n\n if (isset($data['advinfo']) && is_array($data['advinfo'])) {\n\n if (!empty($data['advinfo']['Error'])) {\n $transaction->setDataCell('status', $data['advinfo']['Error'], 'X-Payments error', 'C');\n $transaction->setNote($data['advinfo']['Error']);\n }\n\n if (!empty($data['advinfo']['Message'])) {\n $transaction->setDataCell('status', $data['advinfo']['Message'], 'X-Payments message', 'C');\n $transaction->setNote($data['advinfo']['Message']);\n }\n }\n\n $transactionData = array(\n 'xpc_authorized' => $data['authorized'],\n 'xpc_captured' => $data['capturedAmount'],\n 'xpc_charged' => $data['chargedAmount'] + $data['refundedAmount'],\n 'xpc_voided' => $data['voidedAmount'],\n 'xpc_refunded' => $data['refundedAmount'],\n 'xpc_can_capture' => $data['capturedAmountAvail'],\n 'xpc_can_void' => $data['voidedAmountAvail'], \n 'xpc_can_refund' => $data['refundedAmountAvail'],\n 'xpc_is_fraud_status' => $data['isFraudStatus'],\n ); \n\n if (\n isset($data['isFraudStatus'])\n && '1' == $data['isFraudStatus']\n ) {\n // Set default fraud \"review\" for the backwards compatibility\n $transaction->getOrder()->setFraudTypeXpc(\\XLite\\Module\\CDev\\XPaymentsConnector\\Model\\Payment\\FraudCheckData::CODE_GATEWAY);\n $transaction->getOrder()->setFraudStatusXpc(\\XLite\\Model\\Order::FRAUD_STATUS_REVIEW);\n }\n\n if (\n version_compare(\\XLite\\Core\\Config::getInstance()->CDev->XPaymentsConnector->xpc_api_version, '1.6') <= 0\n && $transaction->getDataCell('xpc_txnid')\n ) {\n\n // API 1.6 backwards compatiblity Kount info update\n\n $transactions = array();\n $kountData = false;\n\n $info = $this->client->requestPaymentAdditionalInfo($transaction->getDataCell('xpc_txnid')->getValue()); \n\n if ($info->isSuccess()) {\n $response = $info->getResponse();\n if (\n !empty($response['transactions'])\n && is_array($response['transactions'])\n ) {\n $transactions = $response['transactions'];\n }\n }\n\n // Search for KOUNT data thru transactions\n foreach ($transactions as $tr) {\n\n if (\n isset($tr['fields'])\n && !empty($tr['fields'])\n && is_array($tr['fields'])\n ) {\n $kountData = $this->processKountData($transaction, $tr);\n\n if ((bool)$kountData) {\n $transactionData['xpc_kount'] = serialize($kountData);\n break;\n }\n }\n }\n }\n\n foreach ($transactionData as $key => $value) {\n $transaction->setXpcDataCell($key, $value);\n }\n\n $this->processCardValidationData($transaction, $data);\n\n $this->processMaskedCardData($transaction, $data);\n\n $this->process3dSecureData($transaction, $data);\n\n $this->processFraudCheckData($transaction, $data);\n }", "public function addTransactionChildren($data)\n\t{\n\t\t$oTransactionStatus = new Transactions_Status();\n\t\t$oTransactionStatus->setTransactionStatus($data['tr_id'], Transaction_Statuses::STATUS_SUBMITTED);\n\n\t\t$oProperties = new Transaction_Properties();\n\t\tforeach($data['properties'] as $value)\n\t\t{\n\t\t\t$oProperties->addProperty($data['tr_id'], $value['id'], $value['value']);\n\t\t}\n\t\t$oProperties->addProperty($data['tr_id'], 'transaction_password', $this->generatePassword());\n\n\t\t$oRelationship = new Transaction_Relationships();\n\t\t$relationship_id = $oRelationship->addRelationship($data);\n\t\t$oRelationship->handleRelationshipUploadedFiles(\n\t\t\t$relationship_id,\n\t\t\t$data['case_id'],\n\t\t\t$data['relationship_documents'],\n\t\t\t$this->getUploadedFiles('relationship_documents')\n\t\t);\n\n\t\t$oParty = new Transaction_Relationship_Parties();\n\t\t$data['rel_id'] = $relationship_id;\n\n\n\t\tforeach($data['parties'] as $party_data)\n\t\t{\n\t\t\t$party_data['rel_id'] = $relationship_id;\n\t\t\t$party_id = $oParty->addParty($party_data);\n\n\t\t\t$oSubjects = new Transaction_Relationship_Party_Subjects();\n\t\t\tforeach($party_data['data'] as $item)\n\t\t\t{\n\t\t\t\t$item['party_id'] = $party_id;\n\t\t\t\t$subject_id = $oSubjects->addSubject($item);\n\n\t\t\t\t$oSubjects->handleSubjectUploadedFiles(\n\t\t\t\t\t$subject_id,\n\t\t\t\t\t$data['case_id'],\n\t\t\t\t\t$item['fileData']['existing_files'],\n\t\t\t\t\t$this->getUploadedFiles($item['hash'])\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\n\t\t// objects part\n\t\t$oObject = new Transaction_Relationship_Objects();\n\t\tforeach($data['objects'] as $item)\n\t\t{\n\t\t\t$data['rel_id'] = $relationship_id;\n\t\t\t$data['object_type'] = $item['objectType'];\n\t\t\t$object_id = $oObject->addObject($data, $item['objectData']);\n\n\t\t\t$oObject->handleObjectUploadedFiles(\n\t\t\t\t$object_id,\n\t\t\t\t$data['case_id'],\n\t\t\t\t$item['fileData']['existing_files'],\n\t\t\t\t$this->getUploadedFiles($item['hash'])\n\t\t\t);\n\t\t}\n\t}", "public function process($data,$config){\n\t\t\t\n\t\t\t// Set the transaction details into \n\t\t\t// a serialized array for posting to\n\t\t\t// the order\n\t\t\t\t$details = array(\n\t\t\t\t\t\t\t\t\t\"Method\" => \"AlertPay IPN\" \n\t\t\t\t\t\t\t\t);\n\n\t\t\t// Return the trans details \n\t\t\t\t$trans = array(\n\t\t\t\t\t\t\t\t\t'status' => -1, \n\t\t\t\t\t\t\t\t\t'transaction_id' => $data[\"transaction_id\"],\n\t\t\t\t\t\t\t\t\t'payment_card' => \"\",\n\t\t\t\t\t\t\t\t\t'payment_type' => 'AlertPay IPN', \n\t\t\t\t\t\t\t\t\t'amount' => $data[\"order_total\"],\n\t\t\t\t\t\t\t\t\t'details' => serialize($details), \n\t\t\t\t\t\t\t\t\t'approval' => \"\" \n\t\t\t\t\t\t\t\t);\n\t\t\treturn $trans;\n\t\t}", "private function __processTransaction($txnId){\n\t\t$this->log(\"Processing Trasaction: {$txnId}\", 'paypal');\n\t\t//Put the afterPaypalNotification($txnId) into your app_controller.php\n\t\t$this->afterPaypalNotification($txnId);\n\t}", "public function process($data);", "public function process() {\n\n\t\t\t/**\n\t\t\t * Decode all data from JSON\n\t\t\t *\n\t\t\t * @var array $data\n\t\t\t */\n\t\t\t$data = json_decode($this->getData(), true);\n\n\t\t\t/**\n\t\t\t * Get keys from first row of data set\n\t\t\t *\n\t\t\t * @var array $columNames\n\t\t\t */\n\t\t\t$columnNames = array_keys($data[0]);\n\n\t\t\t/**\n\t\t\t * Generate tablename from given columns\n\t\t\t *\n\t\t\t * @var string $tableName\n\t\t\t */\n\t\t\t$tableName = \"tmp_plista_api_\" . md5(implode($columnNames));\n\n\t\t\t/**\n\t\t\t * Building the query for creating the temporary Table\n\t\t\t * Note: This function does not fires a DROP TABLE. If the\n\t\t\t * table already exists the data gets filled in again. So the\n\t\t\t * client is responsible for droping the table after usage\n\t\t\t *\n\t\t\t * @var string $sql\n\t\t\t */\n\t\t\t$sql = \"CREATE TABLE IF NOT EXISTS `\" . $tableName . \"`\n\t\t\t(\" . implode( $columnNames, \" VARCHAR(255), \" ) . \" VARCHAR(255))\n\t\t\tENGINE=MEMORY\n\t\t\tDEFAULT CHARSET=utf8;\";\n\n\t\t\t/**\n\t\t\t * Build the query for inserting data into the temporary table\n\t\t\t *\n\t\t\t * @var string $sql\n\t\t\t */\n\t\t\tforeach ($data as $row) {\n\t\t\t\t$sql .= \"\\nINSERT INTO $tableName (\" . implode($columnNames, \", \") . \") VALUES ('\" . implode($row, \"', '\") . \"');\";\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * set the data\n\t\t\t */\n\t\t\t$this->setData(\n\t\t\t\tarray(\n\t\t\t\t\t\"table_name\"\t=> $tableName,\n\t\t\t\t\t\"query\"\t\t=> $sql\n\t\t\t\t)\n\t\t\t);\n\t\t}", "protected function _processTransactionPaymentCompleted($parameters) {\n\t\t\t$invoiceItemData = $invoiceOrderData = $pendingTransactions = array();\n\t\t\t$invoiceTotalPaid = false;\n\n\t\t\tif (!empty($parameters['subscription_id'])) {\n\t\t\t\t$existingSubscription = $this->fetch('subscriptions', array(\n\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t'id' => $parameters['subscription_id']\n\t\t\t\t\t),\n\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t'payment_attempts'\n\t\t\t\t\t)\n\t\t\t\t));\n\n\t\t\t\tif (!empty($existingSubscription['count'])) {\n\t\t\t\t\t$subscriptionData = array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => $parameters['subscription_id'],\n\t\t\t\t\t\t\t'payment_attempts' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t$this->save('subscriptions', $subscriptionData);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($parameters['invoice_id'])) {\n\t\t\t\t$invoice = $this->_call('invoices', array(\n\t\t\t\t\t'methodName' => 'invoice',\n\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t'invoices',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t'id' => $parameters['invoice_id'],\n\t\t\t\t\t\t\t\t'payable' => true\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttrue\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t\t\t$invoiceWarningLevel = $invoice['data']['invoice']['warning_level'];\n\n\t\t\t\tif (!empty($invoice['data'])) {\n\t\t\t\t\t$invoiceData = array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'amount_paid' => $invoice['data']['invoice']['amount_paid'] + $parameters['payment_amount'],\n\t\t\t\t\t\t\t'id' => $invoice['data']['invoice']['id']\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t$total = !empty($invoice['data']['invoice']['total_pending']) ? $invoice['data']['invoice']['total_pending'] : $invoice['data']['invoice']['total'];\n\n\t\t\t\t\tif (is_numeric($invoice['data']['invoice']['remainder_pending'])) {\n\t\t\t\t\t\t$invoiceData[0]['remainder_pending'] = max(0, round(($invoice['data']['invoice']['remainder_pending'] - $parameters['payment_amount']) * 100) / 100);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t!empty($invoice['data']['invoice']['user_id']) &&\n\t\t\t\t\t\t!empty($parameters['user']) &&\n\t\t\t\t\t\t$amountToApplyToBalance = max(0, min($parameters['payment_amount'], round(($invoiceData[0]['amount_paid'] - $total) * 100) / 100))\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (empty($invoice['data']['orders'])) {\n\t\t\t\t\t\t\t$amountToApplyToBalance = $parameters['payment_amount'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$userData = array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'id' => $parameters['user']['id'],\n\t\t\t\t\t\t\t\t'balance' => ($parameters['user']['balance'] + $amountToApplyToBalance)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->save('users', $userData);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t$invoiceData[0]['amount_paid'] >= $total ||\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tisset($invoiceData[0]['remainder_pending']) &&\n\t\t\t\t\t\t\t\t$invoiceData[0]['remainder_pending'] === 0\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) &&\n\t\t\t\t\t\t$this->delete('invoice_items', array(\n\t\t\t\t\t\t\t'invoice_id' => $invoiceData[0]['id']\n\t\t\t\t\t\t))\n\t\t\t\t\t) {\n\t\t\t\t\t\t$invoiceData = array(\n\t\t\t\t\t\t\tarray_merge($invoiceData[0], array(\n\t\t\t\t\t\t\t\t'remainder_pending' => null,\n\t\t\t\t\t\t\t\t'shipping' => (!empty($invoice['data']['invoice']['shipping_pending']) ? $invoice['data']['invoice']['shipping_pending'] : $invoice['data']['invoice']['shipping']),\n\t\t\t\t\t\t\t\t'shipping_pending' => null,\n\t\t\t\t\t\t\t\t'status' => 'paid',\n\t\t\t\t\t\t\t\t'subtotal' => (!empty($invoice['data']['invoice']['subtotal_pending']) ? $invoice['data']['invoice']['subtotal_pending'] : $invoice['data']['invoice']['subtotal']),\n\t\t\t\t\t\t\t\t'subtotal_pending' => null,\n\t\t\t\t\t\t\t\t'tax' => (!empty($invoice['data']['invoice']['tax_pending']) ? $invoice['data']['invoice']['tax_pending'] : $invoice['data']['invoice']['tax']),\n\t\t\t\t\t\t\t\t'tax_pending' => null,\n\t\t\t\t\t\t\t\t'total' => (!empty($invoice['data']['invoice']['total_pending']) ? $invoice['data']['invoice']['total_pending'] : $invoice['data']['invoice']['total']),\n\t\t\t\t\t\t\t\t'total_pending' => null,\n\t\t\t\t\t\t\t\t'warning_level' => 0\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tforeach ($invoice['data']['orders'] as $orderKey => $order) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\tis_numeric($order['quantity_pending']) &&\n\t\t\t\t\t\t\t\t\t$order['quantity_pending'] > $order['quantity_active'] &&\n\t\t\t\t\t\t\t\t\t($quantity = ($order['quantity_pending'] - $order['quantity_active']))\n\t\t\t\t\t\t\t\t) ||\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t$order['status'] !== 'active' &&\n\t\t\t\t\t\t\t\t\t($quantity = $order['quantity'])\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t$quantity = (!empty($order['quantity_pending']) ? $order['quantity_pending'] : $order['quantity']);\n\t\t\t\t\t\t\t\t$orderData = array(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'currency' => $order['currency'],\n\t\t\t\t\t\t\t\t\t\t'id' => $order['id'],\n\t\t\t\t\t\t\t\t\t\t'interval_type' => (!empty($order['interval_type_pending']) ? $order['interval_type_pending'] : $order['interval_type']),\n\t\t\t\t\t\t\t\t\t\t'interval_type_pending' => null,\n\t\t\t\t\t\t\t\t\t\t'interval_value' => (!empty($order['interval_value_pending']) ? $order['interval_value_pending'] : $order['interval_value']),\n\t\t\t\t\t\t\t\t\t\t'interval_value_pending' => null,\n\t\t\t\t\t\t\t\t\t\t'ip_version' => $order['ip_version'],\n\t\t\t\t\t\t\t\t\t\t'previous_action' => null,\n\t\t\t\t\t\t\t\t\t\t'price' => ($price = (!empty($order['price_pending']) ? $order['price_pending'] : $order['price'])),\n\t\t\t\t\t\t\t\t\t\t'price_active' => min($order['price_active'] + $parameters['payment_amount'], $price),\n\t\t\t\t\t\t\t\t\t\t'price_pending' => null,\n\t\t\t\t\t\t\t\t\t\t'quantity' => $quantity,\n\t\t\t\t\t\t\t\t\t\t'quantity_active' => $order['quantity_active'],\n\t\t\t\t\t\t\t\t\t\t'quantity_allocated' => $order['quantity_allocated'],\n\t\t\t\t\t\t\t\t\t\t'quantity_pending' => null,\n\t\t\t\t\t\t\t\t\t\t'shipping' => (!empty($order['shipping_pending']) ? $order['shipping_pending'] : $order['shipping']),\n\t\t\t\t\t\t\t\t\t\t'shipping_pending' => null,\n\t\t\t\t\t\t\t\t\t\t'status' => 'active',\n\t\t\t\t\t\t\t\t\t\t'tax' => (!empty($order['tax_pending']) ? $order['tax_pending'] : $order['tax']),\n\t\t\t\t\t\t\t\t\t\t'tax_pending' => null,\n\t\t\t\t\t\t\t\t\t\t'user_id' => $order['user_id']\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$invoice['data']['orders'][$orderKey] = array_merge($invoice['data']['orders'][$orderKey], $orderData[0]);\n\t\t\t\t\t\t\t\t$invoiceItemData[] = array_merge(array_intersect_key($orderData[0], array(\n\t\t\t\t\t\t\t\t\t'currency' => true,\n\t\t\t\t\t\t\t\t\t'interval_type' => true,\n\t\t\t\t\t\t\t\t\t'interval_value' => true,\n\t\t\t\t\t\t\t\t\t'price' => true,\n\t\t\t\t\t\t\t\t\t'quantity' => true\n\t\t\t\t\t\t\t\t)), array(\n\t\t\t\t\t\t\t\t\t'invoice_id' => $invoiceData[0]['id'],\n\t\t\t\t\t\t\t\t\t'order_id' => $order['id'],\n\t\t\t\t\t\t\t\t\t'name' => $order['name']\n\t\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t\t\tif (is_numeric($order['quantity_pending'])) {\n\t\t\t\t\t\t\t\t\t$action = $orderData[0]['previous_action'] = ($order['quantity_pending'] > $order['quantity_active'] ? 'upgrade' : 'downgrade');\n\t\t\t\t\t\t\t\t\t$pendingTransactions[] = array(\n\t\t\t\t\t\t\t\t\t\t'customer_email' => $parameters['user']['email'],\n\t\t\t\t\t\t\t\t\t\t'details' => 'Order ' . $action . ' successful for order <a href=\"' . $this->settings['base_url'] . 'orders/' . $order['id'] . '\">#' . $order['id'] . '</a>.<br>' . $order['quantity'] . ' ' . $order['name'] . ' to ' . $order['quantity_pending'] . ' ' . $order['name'] . '<br>' . number_format($order['price'], 2, '.', '') . ' ' . $order['currency'] . ' for ' . $order['interval_value'] . ' ' . $order['interval_type'] . ($order['interval_value'] !== 1 ? 's' : '') . ' to ' . number_format($order['price_pending'], 2, '.', '') . ' ' . $order['currency'] . ' for ' . $order['interval_value_pending'] . ' ' . $order['interval_type_pending'] . ($order['interval_value_pending'] !== 1 ? 's' : ''),\n\t\t\t\t\t\t\t\t\t\t'id' => uniqid() . time(),\n\t\t\t\t\t\t\t\t\t\t'initial_invoice_id' => $invoiceData[0]['id'],\n\t\t\t\t\t\t\t\t\t\t'invoice_id' => $invoiceData[0]['id'],\n\t\t\t\t\t\t\t\t\t\t'payment_amount' => 0,\n\t\t\t\t\t\t\t\t\t\t'payment_currency' => $this->settings['billing']['currency'],\n\t\t\t\t\t\t\t\t\t\t'payment_status' => 'completed',\n\t\t\t\t\t\t\t\t\t\t'payment_status_message' => 'Order ' . $action . ' successful.',\n\t\t\t\t\t\t\t\t\t\t'processed' => true,\n\t\t\t\t\t\t\t\t\t\t'transaction_charset' => $this->settings['database']['charset'],\n\t\t\t\t\t\t\t\t\t\t'transaction_date' => date('Y-m-d H:i:s', strtotime('+1 second')),\n\t\t\t\t\t\t\t\t\t\t'transaction_method' => 'PaymentCompleted',\n\t\t\t\t\t\t\t\t\t\t'user_id' => $parameters['user']['id']\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t$this->save('orders', $orderData) &&\n\t\t\t\t\t\t\t\t\t$this->save('transactions', $pendingTransactions)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t$actionData = array(\n\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t'chunks' => ($chunks = ceil(($itemCount = (abs($order['quantity'] - (integer) $order['quantity_pending']))) / 10000)),\n\t\t\t\t\t\t\t\t\t\t\t'encoded_parameters' => json_encode(array(\n\t\t\t\t\t\t\t\t\t\t\t\t'action' => 'allocate',\n\t\t\t\t\t\t\t\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'order' => $orderData[0]\n\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'item_count' => $itemCount,\n\t\t\t\t\t\t\t\t\t\t\t\t'table' => ($itemCount === 1 ? 'proxy' : 'proxies')\n\t\t\t\t\t\t\t\t\t\t\t)),\n\t\t\t\t\t\t\t\t\t\t\t'foreign_key' => 'order_id',\n\t\t\t\t\t\t\t\t\t\t\t'foreign_value' => $order['id'],\n\t\t\t\t\t\t\t\t\t\t\t'processed' => ($processOrder = ($chunks == 1)),\n\t\t\t\t\t\t\t\t\t\t\t'progress' => ($processOrder ? 100 : 0),\n\t\t\t\t\t\t\t\t\t\t\t'user_id' => $parameters['user']['id']\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\tif ($processOrder) {\n\t\t\t\t\t\t\t\t\t\t$this->_call('proxies', array(\n\t\t\t\t\t\t\t\t\t\t\t'methodName' => 'allocate',\n\t\t\t\t\t\t\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t'proxies',\n\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'order' => $orderData[0]\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\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$this->save('actions', $actionData);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$invoiceOrders = $this->fetch('invoice_orders', array(\n\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t'invoice_id' => array_unique(array_filter(array(\n\t\t\t\t\t\t\t\t\t$invoice['data']['invoice']['id'],\n\t\t\t\t\t\t\t\t\t$invoice['data']['invoice']['initial_invoice_id'],\n\t\t\t\t\t\t\t\t\t$invoice['data']['invoice']['merged_invoice_id']\n\t\t\t\t\t\t\t\t)))\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t\t'initial_invoice_id',\n\t\t\t\t\t\t\t\t'invoice_id',\n\t\t\t\t\t\t\t\t'order_id'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\tif (!empty($invoiceOrders['count'])) {\n\t\t\t\t\t\t\t$invoiceOrderData = array_replace_recursive($invoiceOrders['data'], array_fill(0, $invoiceOrders['count'], array(\n\t\t\t\t\t\t\t\t'initial_invoice_id' => null\n\t\t\t\t\t\t\t)));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$invoiceTotalPaid = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t$invoiceTotalPaid &&\n\t\t\t\t\t\tempty($invoiceItemData) &&\n\t\t\t\t\t\tcount($invoice['data']['orders']) === 1 &&\n\t\t\t\t\t\t($order = $invoice['data']['orders'][0]) &&\n\t\t\t\t\t\t$order['quantity_active'] === $order['quantity_pending']\n\t\t\t\t\t) {\n\t\t\t\t\t\t$invoiceItemData[] = array_merge(array_intersect_key($order, array(\n\t\t\t\t\t\t\t'interval_type' => true,\n\t\t\t\t\t\t\t'interval_value' => true,\n\t\t\t\t\t\t\t'price' => true,\n\t\t\t\t\t\t\t'quantity' => true\n\t\t\t\t\t\t)), array(\n\t\t\t\t\t\t\t'invoice_id' => $invoiceData[0]['id'],\n\t\t\t\t\t\t\t'order_id' => $order['id'],\n\t\t\t\t\t\t\t'name' => $order['name']\n\t\t\t\t\t\t));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t$this->save('invoices', $invoiceData) &&\n\t\t\t\t\t\t$this->save('invoice_items', $invoiceItemData) &&\n\t\t\t\t\t\t$this->save('invoice_orders', $invoiceOrderData)\n\t\t\t\t\t) {\n\t\t\t\t\t\t$invoice['data']['invoice'] = array_merge($invoice['data']['invoice'], $invoiceData[0]);\n\t\t\t\t\t\t$invoiceData = array();\n\n\t\t\t\t\t\tif ($invoiceTotalPaid) {\n\t\t\t\t\t\t\t$additionalDueInvoices = $this->_call('invoices', array(\n\t\t\t\t\t\t\t\t'methodName' => 'retrieveDueInvoices',\n\t\t\t\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t\t\t\t$invoice['data']['invoice']\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t$intervalType = $invoice['data']['orders'][0]['interval_type'];\n\n\t\t\t\t\t\t\tif (!empty($additionalDueInvoices)) {\n\t\t\t\t\t\t\t\t$invoiceData = array_replace_recursive($additionalDueInvoices, array_fill(0, count($additionalDueInvoices), array(\n\t\t\t\t\t\t\t\t\t'due' => null,\n\t\t\t\t\t\t\t\t\t'warning_level' => 5\n\t\t\t\t\t\t\t\t)));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tin_array($intervalType, array(\n\t\t\t\t\t\t\t\t\t'day',\n\t\t\t\t\t\t\t\t\t'month',\n\t\t\t\t\t\t\t\t\t'week',\n\t\t\t\t\t\t\t\t\t'year'\n\t\t\t\t\t\t\t\t)) &&\n\t\t\t\t\t\t\t\t!empty($intervalValue = $invoice['data']['orders'][0]['interval_value'])\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tempty($additionalDueInvoices) ||\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t!empty($additionalDueInvoices[0]['warning_level']) &&\n\t\t\t\t\t\t\t\t\t\t$additionalDueInvoices[0]['warning_level'] === 5\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t$invoiceWarningLevel === 5 ||\n\t\t\t\t\t\t\t\t\t\tempty($invoice['data']['invoice']['initial_invoice_id'])\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t$invoice['data']['invoice']['due'] = null;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$invoiceData[] = array(\n\t\t\t\t\t\t\t\t\t\t'cart_items' => $invoice['data']['invoice']['cart_items'],\n\t\t\t\t\t\t\t\t\t\t'currency' => $invoice['data']['invoice']['currency'],\n\t\t\t\t\t\t\t\t\t\t'due' => date('Y-m-d H:i:s', strtotime($invoice['data']['invoice']['due'] . ' +' . $intervalValue . ' ' . $intervalType)),\n\t\t\t\t\t\t\t\t\t\t'initial_invoice_id' => !empty($invoice['data']['invoice']['initial_invoice_id']) ? $invoice['data']['invoice']['initial_invoice_id'] : $invoice['data']['invoice']['id'],\n\t\t\t\t\t\t\t\t\t\t'shipping' => $invoice['data']['invoice']['shipping'],\n\t\t\t\t\t\t\t\t\t\t'status' => 'unpaid',\n\t\t\t\t\t\t\t\t\t\t'subtotal' => $invoice['data']['invoice']['subtotal'],\n\t\t\t\t\t\t\t\t\t\t'tax' => $invoice['data']['invoice']['tax'],\n\t\t\t\t\t\t\t\t\t\t'total' => $invoice['data']['invoice']['total'],\n\t\t\t\t\t\t\t\t\t\t'user_id' => $invoice['data']['invoice']['user_id'],\n\t\t\t\t\t\t\t\t\t\t'warning_level' => 0\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tunset($invoiceData[0]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!empty($invoiceData)) {\n\t\t\t\t\t\t\t\t$this->save('invoices', $invoiceData);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$invoice['data']['transactions'][] = $transaction = array_merge($parameters, array(\n\t\t\t\t\t\t\t'payment_method' => $this->_retrieveTransactionPaymentMethod($parameters['payment_method_id'])\n\t\t\t\t\t\t));\n\t\t\t\t\t\t$invoice['data'] = $this->_call('invoices', array(\n\t\t\t\t\t\t\t'methodName' => 'calculateInvoicePaymentDetails',\n\t\t\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t\t\t$invoice['data']\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\tif ($parameters['payment_amount'] > 0) {\n\t\t\t\t\t\t\t$mailParameters = array(\n\t\t\t\t\t\t\t\t'from' => $this->settings['from_email'],\n\t\t\t\t\t\t\t\t'subject' => 'Invoice #' . $invoice['data']['invoice']['id'] . ' payment confirmation',\n\t\t\t\t\t\t\t\t'template' => array(\n\t\t\t\t\t\t\t\t\t'name' => 'payment_successful',\n\t\t\t\t\t\t\t\t\t'parameters' => array(\n\t\t\t\t\t\t\t\t\t\t'invoice' => $invoice['data']['invoice'],\n\t\t\t\t\t\t\t\t\t\t'transaction' => array_merge($transaction, array(\n\t\t\t\t\t\t\t\t\t\t\t'amount_applied_to_balance' => $amountToApplyToBalance\n\t\t\t\t\t\t\t\t\t\t)),\n\t\t\t\t\t\t\t\t\t\t'transactions' => $invoice['data']['transactions'],\n\t\t\t\t\t\t\t\t\t\t'user' => $parameters['user']\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'to' => $parameters['user']['email']\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$this->_sendMail($mailParameters);\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\treturn;\n\t\t}", "public function processTransaction() {\n // Uses the CURL library for php to establish a connection,\n // submit the post, and record the response.\n if(function_exists('curl_init') && extension_loaded('curl')) {\n $request = curl_init($this->getEnvironment()); // Initiate curl object\n curl_setopt($request, CURLOPT_HEADER, 0); // Set to 0 to eliminate header info from response\n curl_setopt($request, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)\n curl_setopt($request, CURLOPT_POSTFIELDS, $this->getNVP()); // Use HTTP POST to send the data\n curl_setopt($request, CURLOPT_SSL_VERIFYPEER, FALSE); // Uncomment this line if you get no gateway response.\n $postResponse = curl_exec($request); // Execute curl post and store results in $post_response\n \n // Additional options may be required depending upon your server configuration\n // you can find documentation on curl options at http://www.php.net/curl_setopt\n curl_close($request); // close curl object\n \n // Get the response.\n $this->response = $postResponse; \n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "public function mapTransactionData($data) {\n\n\t\t$transactions = [];\n\n\t\tif (is_array($data)) {\n\n\t\t\tforeach ($data as $item) {\n\n\t\t\t\t$tdata = [];\n\t\t\t\t$tdata['network'] = self::NETWORK_NAME;\n\t\t\t\t$tdata['network_tid'] = object_get($item, \"transactionID\");\n\t\t\t\t$tdata['network_status'] = object_get($item, 'paymentStatus');\n\t\t\t\t$tdata['amount'] = object_get($item, 'saleValue');\n\t\t\t\t$tdata['currency'] = self::DEFAULT_CURRENCY;\n\t\t\t\t$tdata['clickdate'] = (empty($item->date) ? null : Carbon::parse(object_get($item, 'date')));\n\t\t\t\t$tdata['commission'] = object_get($item, 'commission');\n\t\t\t\t$tdata['program_name'] = object_get($item, 'programName');\n\t\t\t\t$tdata['program_id'] = object_get($item, 'programID');\n\t\t\t\tif (preg_match(\"/shopid(\\d+).*userid(\\d+)/\", object_get($item, 'clickRef'), $matches) === 1) {\n\t\t\t\t\t$tdata['shop_id'] = $matches[1];\n\t\t\t\t\t$tdata['user_id'] = $matches[2];\n\t\t\t\t}\n\t\t\t\t$tr = new MerchantTransaction($tdata);\n\t\t\t\t$tr->_rawData = $item;\n\t\t\t\t$transactions[] = $tr;\n\t\t\t}\n\t\t}\n\n\t\treturn $transactions;\n\t}", "function _process($data)\n {\t\t\n\t\t$post = JFactory::getApplication()->input->get($_POST);\n \t\n \t$orderpayment_id = @$data['ssl_invoice_number'];\n \t\n \t$errors = array();\n \t$send_email = false;\n \t\n \t// load the orderpayment record and set some values\n JTable::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/tables' );\n $orderpayment = JTable::getInstance('OrderPayments', 'TiendaTable');\n $orderpayment->load( $orderpayment_id );\n if (empty($orderpayment_id) || empty($orderpayment->orderpayment_id))\n {\n $errors[] = JText::_('VIRTUALMERCHANT MESSAGE INVALID ORDERPAYMENTID');\n return count($errors) ? implode(\"\\n\", $errors) : '';\n }\n $orderpayment->transaction_details = $data['ssl_result_message'];\n $orderpayment->transaction_id = $data['ssl_txn_id'];\n $orderpayment->transaction_status = $data['ssl_result'];\n \n // check the stored amount against the payment amount \n \tTienda::load( 'TiendaHelperBase', 'helpers._base' );\n $stored_amount = TiendaHelperBase::number( $orderpayment->get('orderpayment_amount'), array( 'thousands'=>'' ) );\n $respond_amount = TiendaHelperBase::number( $data['ssl_amount'], array( 'thousands'=>'' ) );\n if ($stored_amount != $respond_amount ) {\n \t$errors[] = JText::_('VIRTUALMERCHANT MESSAGE AMOUNT INVALID');\n \t$errors[] = $stored_amount . \" != \" . $respond_amount;\n }\n \n // set the order's new status and update quantities if necessary\n Tienda::load( 'TiendaHelperOrder', 'helpers.order' );\n Tienda::load( 'TiendaHelperCarts', 'helpers.carts' );\n $order = JTable::getInstance('Orders', 'TiendaTable');\n $order->load( $orderpayment->order_id );\n if (count($errors)) \n {\n // if an error occurred \n $order->order_state_id = $this->params->get('failed_order_state', '10'); // FAILED\n }\n\t\telse\n {\n $order->order_state_id = $this->params->get('payment_received_order_state', '17');; // PAYMENT RECEIVED\n\n // do post payment actions\n $setOrderPaymentReceived = true;\n \n // send email\n $send_email = true;\n }\n\n // save the order\n if (!$order->save())\n {\n \t$errors[] = $order->getError();\n }\n \n // save the orderpayment\n if (!$orderpayment->save())\n {\n \t$errors[] = $orderpayment->getError(); \n }\n \n if (!empty($setOrderPaymentReceived))\n {\n $this->setOrderPaymentReceived( $orderpayment->order_id );\n }\n \n if ($send_email)\n {\n // send notice of new order\n Tienda::load( \"TiendaHelperBase\", 'helpers._base' );\n $helper = TiendaHelperBase::getInstance('Email');\n $model = Tienda::getClass(\"TiendaModelOrders\", \"models.orders\");\n $model->setId( $orderpayment->order_id );\n $order = $model->getItem();\n $helper->sendEmailNotices($order, 'new_order');\n }\n\n return count($errors) ? implode(\"\\n\", $errors) : ''; \n\n \treturn true;\n }", "private function processPayment($data){\n $p_cust_id_cliente = env('EPAYCO_P_CUST_ID_CLIENTE');\n $p_key = env('EPAYCO_P_KEY');\n $x_ref_payco = $data->x_ref_payco;\n $x_transaction_id = $data->x_transaction_id;\n $x_amount = $data->x_amount;\n $x_currency_code = $data->x_currency_code;\n $x_signature = $data->x_signature;\n $signature = hash('sha256', $p_cust_id_cliente . '^' . $p_key . '^' . $x_ref_payco . '^' . $x_transaction_id . '^' . $x_amount . '^' . $x_currency_code);\n $x_response = $data->x_response;\n $x_response_reason_text = $data->x_response_reason_text;\n $x_id_invoice = $data->x_id_invoice;\n $x_autorizacion = $data->x_approval_code;\n\n //Validamos la firma\n if ($x_signature != $signature) {\n die(\"Firma no valida\");\n }\n\n $this->saveTransaction($data);\n NotificationController::notify('delivery', $data->x_extra3, $x_amount,$data->x_extra5,\"0\");\n\n return response()->json([\n 'success' => true,\n 'message' => 'transacción procesada'\n ],200);\n\n }", "public function processPayment();", "public function controller_processReceivedData() {\n // validate received form data\n // update data model\n }", "protected abstract function handleData();", "public function TransferStockTransaction($post){\r\n\t\t$db=$this->getAdapter();\r\n\t\t$session_user = new Zend_Session_Namespace('auth');\r\n\t\t$userName = $session_user->user_name;\r\n\t\t$GetUserId = $session_user->user_id;\r\n\t\r\n\t\t$db_global = new Application_Model_DbTable_DbGlobal();\r\n\t\t\n\t\tif($post['from_location']!== $post['to_location']){\n\t\t\t//try{\n\t\t\t\n\t\t\t\t\tif($post['invoce_num']!=\"\"){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$tr_no=$post['invoce_num'];\n\t\t\t\t\t}\n\t\t\t\t\telse{\r\n\t\t\t\t\t\t$date= new Zend_Date();\r\n\t\t\t\t\t\t$tr_no=\"TR\".$date->get('hh-mm-ss');\r\n\t\t\t\t\t}\n\t\t\t\t $data_transfer=array(\r\n\t\t\t\t\t\t\t\t\t\t'invoice_num'\t=> $tr_no,\r\n\t\t\t\t\t\t\t\t\t\t'transfer_date' => $post['transfer_date'],\r\n\t\t\t\t\t\t\t\t\t\t'from_location'\t=> $post['from_location'],\r\n\t\t\t\t\t\t\t\t\t\t'to_location'\t=> $post['to_location'],\r\n\t\t\t\t\t\t\t\t\t\t'user_id' \t\t=> $GetUserId,\r\n\t\t\t\t\t\t\t\t\t\t'mod_date'\t\t=> new Zend_Date(),\r\n\t\t\t\t\t\t\t\t\t\t'remark'\t => $post['remark_transfer']\r\n\t\t\t\t\t\t\t\t );\r\n\t\t\t\t\t$transfer_id = $db_global->addRecord($data_transfer, \"tb_stocktransfer\");\r\n\t\t\t\t unset($data_transfer);\n\t\t\t\t $identity = explode(',',$post['identity']);\r\n\t\t\t\t\tforeach($identity as $i){\r\n\t\t\t\t\t \t\t\t\t$data_item=array(\r\n\t\t\t\t\t\t\t\t\t\t'transfer_id'\t => $transfer_id,\n\t\t\t\t\t\t\t\t\t\t'pro_id'\t\t => $post['item_id_'.$i],\r\n\t\t\t\t\t \t\t\t\t\t'qty'\t\t\t => $post['qty_id_'.$i],\r\n\t\t\t\t\t \t\t\t\t\t'remark_transfer'=> $post['remark_'.$i]\r\n\t\t\r\n\t\t\t\t\t\t\t\t\t );\r\n\t\t\t\t \t\t\t\t $db->insert(\"tb_transfer_item\", $data_item);\r\n\t\t\t\t\t \t\t\t\tunset($data_item);\r\n\t\t\r\n\t\t\t\t\t$rows = $db_global ->porductLocationExist($post['item_id_'.$i], $post['from_location']);\r\n\t\t\t\t\tif($rows){\r\n\t\t\t\t\t\t//update poduct location from\r\n\t\t\t\t\t\t$data_qty_location=array(\r\n\t\t\t\t\t\t\t\t'qty' \t\t\t=>\t$rows['qty']- $post['qty_id_'.$i],\n\t\t\t\t\t\t\t\t'qty_avaliable'\t=> $rows[\"qty_avaliable\"]- $post['qty_id_'.$i],\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\t$db_global->updateRecord($data_qty_location, $rows['ProLocationID'], \"ProLocationID\",\"tb_prolocation\");\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t//add move history\r\n\t\t\t\t\t\t$data_history = array\r\n\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t'transaction_type' => 2,\r\n\t\t\t\t\t\t\t\t'pro_id' \t\t=> $post['item_id_'.$i],\r\n\t\t\t\t\t\t\t\t'date'\t\t\t\t=> new Zend_Date(),\r\n\t\t\t\t\t\t\t\t'location_id' \t\t=> $post['from_location'],\r\n\t\t\t\t\t\t\t\t'Remark'\t\t\t=> $post['remark_'.$i],\r\n\t\t\t\t\t\t\t\t'qty_edit' \t=> $post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t\t'qty_before' => $rows['qty'],\r\n\t\t\t\t\t\t\t\t'qty_after' \t=> $rows['qty']- $post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t\t'user_mod'\t\t\t=> $GetUserId\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\t$db->insert(\"tb_move_history\", $data_history);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tunset($data_qty_location);unset($rows);unset($data_history);\r\n\t\t\t\t\t\t//update product location to\r\n\t\t\t\t\t\t$rows_gets_qty=$db_global -> porductLocationExist($post['item_id_'.$i], $post['to_location']);\r\n\t\t\r\n\t\t\t\t\t\tif($rows_gets_qty){\r\n\t\t\t\t\t\t\t$data_qty_location=array(\r\n\t\t\t\t\t\t\t\t\t'qty' \t\t\t=>\t$rows_gets_qty['qty']\t\t\t+ $post['qty_id_'.$i],\n\t\t\t\t\t\t\t\t\t'qty_avaliable'\t=> $rows_gets_qty[\"qty_avaliable\"]\t+ $post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t$itemid=$db_global->updateRecord($data_qty_location, $rows_gets_qty['ProLocationID'], \"ProLocationID\",\"tb_prolocation\");\r\n\t\t\t\t\t\t\t//add move history\r\n\t\t\t\t\t\t\t$data_history = array\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t'transaction_type' => 2,\r\n\t\t\t\t\t\t\t\t\t'pro_id' \t\t=> $post['item_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'date'\t\t\t\t=> new Zend_Date(),\r\n\t\t\t\t\t\t\t\t\t'location_id' \t\t=> $post['to_location'],\r\n\t\t\t\t\t\t\t\t\t'Remark'\t\t\t=> $post['remark_'.$i],//can't add remark cos short table in form\r\n\t\t\t\t\t\t\t\t\t'qty_edit' \t=> $post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'qty_before' => $rows_gets_qty['qty'],\r\n\t\t\t\t\t\t\t\t\t'qty_after' \t=> $rows_gets_qty['qty']+ $post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'user_mod'\t\t\t=> $GetUserId\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t$db->insert(\"tb_move_history\", $data_history);\n\t\t\t\t\t\t\tunset($rows_gets_qty);unset($data_history);\r\n\t\t\t\t\t\t}//if recieve deosn't exist in product location\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t$add_pro_location = array(\r\n\t\t\t\t\t\t\t\t\t'pro_id' => $post['item_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'LocationId' => $post['to_location'],\r\n\t\t\t\t\t\t\t\t\t'qty' => $post['qty_id_'.$i],\n\t\t\t\t\t\t\t\t\t'qty_avaliable'\t=> $post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'last_usermod' => $GetUserId,\r\n\t\t\t\t\t\t\t\t\t'last_mod_date' => new Zend_Date()\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t$db->insert(\"tb_prolocation\", $add_pro_location);\r\n\t\t\t\t\t\t\t//if receive not have\r\n\t\t\t\t\t\t\t$data_history = array\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t'transaction_type' => 2,\r\n\t\t\t\t\t\t\t\t\t'pro_id' \t\t=> $post['item_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'date'\t\t\t\t=> new Zend_Date(),\r\n\t\t\t\t\t\t\t\t\t'location_id' \t\t=> $post['to_location'],\r\n\t\t\t\t\t\t\t\t\t'Remark'\t\t\t=> $post['remark_'.$i],\r\n\t\t\t\t\t\t\t\t\t'qty_edit' \t=> $post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'qty_before' => 0,\r\n\t\t\t\t\t\t\t\t\t'qty_after' \t=> $post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'user_mod'\t\t\t=> $GetUserId\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t$db->insert(\"tb_move_history\", $data_history);\n\t\t\t\t\t\t\tunset($add_pro_location); unset($data_history);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{//if from doesn't exist\r\n\t\t\t\t\t\t//add qty in location if from doesn't exist\r\n\t\t\t\t\t\t$add_pro_location = array(\r\n\t\t\t\t\t\t\t\t'pro_id' => $post['item_id_'.$i],\r\n\t\t\t\t\t\t\t\t'LocationId' => $post['from_location'],\r\n\t\t\t\t\t\t\t\t'qty' => -$post['qty_id_'.$i],\n\t\t\t\t\t\t\t\t'qty_avaliable'\t=> - $post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t\t'last_usermod' => $GetUserId,\r\n\t\t\t\t\t\t\t\t'last_mod_date' => new Zend_Date()\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\t$db->insert(\"tb_prolocation\", $add_pro_location);\r\n\t\t\t\t\t\tunset($add_pro_location);\r\n\t\t\t\t\t\t//echeck for get product location\r\n\t\t\t\t\t\t$data_history = array\r\n\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t'transaction_type' => 1,\r\n\t\t\t\t\t\t\t\t'pro_id' \t\t=> $post['item_id_'.$i],\r\n\t\t\t\t\t\t\t\t'date'\t\t\t\t=> new Zend_Date(),\r\n\t\t\t\t\t\t\t\t'location_id' \t\t=> $post['from_location'],\r\n\t\t\t\t\t\t\t\t'Remark'\t\t\t=> $post['remark_'.$i],\r\n\t\t\t\t\t\t\t\t'qty_edit' \t=> $post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t\t'qty_after' \t=> -$post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t\t'user_mod'\t\t\t=> $GetUserId\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\t$db->insert(\"tb_move_history\", $data_history);\r\n\t\t\t\t\t\tunset($data_history);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t//for get stock\r\n\t\t\t\t\t\t$rows_gets_qty=$db_global -> porductLocationExist($post['item_id_'.$i], $post['to_location']);\r\n\t\t\t\t\t\tif($rows_gets_qty){\r\n\t\t\t\t\t\t\t$data_qty_location=array(\r\n\t\t\t\t\t\t\t\t\t'qty' =>$rows_gets_qty['qty']+ $post['qty_id_'.$i]\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t$db_global->updateRecord($data_qty_location, $rows_gets_qty['ProLocationID'], \"ProLocationID\",\"tb_prolocation\");\r\n\t\t\t\t\t\t\t//add move history\r\n\t\t\t\t\t\t\t$data_history = array\r\n\t\t\t\t\t\t\t( \t'transaction_type' => 2,\r\n\t\t\t\t\t\t\t\t\t'pro_id' \t\t=> $post['item_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'date'\t\t\t\t=> new Zend_Date(),\r\n\t\t\t\t\t\t\t\t\t'location_id' \t\t=> $post['to_location'],\r\n\t\t\t\t\t\t\t\t\t'Remark'\t\t\t=> $post['remark_'.$i],\r\n\t\t\t\t\t\t\t\t\t'qty_edit' \t=> $post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'qty_before' => $rows_gets_qty['qty'],\r\n\t\t\t\t\t\t\t\t\t'qty_after' \t=> $rows_gets_qty['qty']+ $post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'user_mod'\t\t\t=> $GetUserId\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t$db->insert(\"tb_move_history\", $data_history);\n\t\t\t\t\t\t\tunset($rows_gets_qty);unset($data_qty_location);\r\n\t\t\t\t\t\t}//if recieve deosn't exist in product location\r\n\t\t\t\t\t\telse{ //if doesn't exist from and to\r\n\t\t\t\t\t\t\t$add_pro_location = array(\r\n\t\t\t\t\t\t\t\t\t'pro_id' => $post['item_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'LocationId' => $post['to_location'],\r\n\t\t\t\t\t\t\t\t\t'qty' => $post['qty_id_'.$i],\n\t\t\t\t\t\t\t\t\t'qty_avaliable'\t=> $post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'last_usermod' => $GetUserId,\r\n\t\t\t\t\t\t\t\t\t'last_mod_date' => new Zend_Date()\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t$db->insert(\"tb_prolocation\", $add_pro_location);\n\t\t\t\t\t\t\tunset($add_pro_location);\r\n\t\t\t\t\t\t\t//if doesn't exist from and to\r\n\t\t\t\t\t\t\t$data_history = array\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t'transaction_type' => 1,\r\n\t\t\t\t\t\t\t\t\t'pro_id' \t\t=> $post['item_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'date'\t\t\t\t=> new Zend_Date(),\r\n\t\t\t\t\t\t\t\t\t'location_id' \t\t=> $post['to_location'],\r\n\t\t\t\t\t\t\t\t\t'Remark'\t\t\t=> $post['remark_'.$i],\r\n\t\t\t\t\t\t\t\t\t'qty_edit' \t=> $post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'qty_after' \t=> $post['qty_id_'.$i],\r\n\t\t\t\t\t\t\t\t\t'user_mod'\t\t\t=> $GetUserId\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t$db->insert(\"tb_move_history\", $data_history);\n\t\t\t\t\t\t\tunset($data_history);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//forforeach\n\t\t\t\t//$db->commit();\n\t\t /*}//try\n\t\t catch (Exception $e) {\n\t\t \t$db->rollBack();\n\t\t \t$this->view->msg = $e->getMessage();\r\n\t\t }*/\r\n\t\t}//for if\r\n\t}", "abstract public function determineTransaction();", "function process() // OK\n { \n if(! $this->validate()) {\n\t $this->_errors->addError('Failed at event validation.');\n\t return false;\n }\n \n $this->_getTransactions();\n \n// -- added\n if(! $this->validate()) {\n\t $this->_errors->addError('Failed after dynamic validations.');\n\t return false;\n }\n// --\n if (! $this->_executeTransactions()) return false;\n else return $this->storeEventDetail();\n }", "protected function processReceivedData() \n {\n parent::processReceivedData();\n // to do: call processReceivedData() for all members\n }", "protected function processReceivedData() \r\n {\r\n parent::processReceivedData();\r\n // to do: call processReceivedData() for all members\r\n }", "public function process($data)\n {\n // Delete previous set\n $this->deleteWhere('serial_number=?', $this->serial_number);\n\n // Parse log data\n $start = ''; // Start date\n $errors = array();\n $now = time();\n $four_weeks = $now + 3600 * 24 * 7 * 4;\n\n foreach (explode(\"\\n\", $data) as $line) {\n if ($line) {\n $parts = explode(\"\\t\", $line);\n\n if (count($parts) !== 3) {\n echo 'Invalid log entry: '.$line;\n } else {\n // Convert unix timestamp string to int\n $this->cert_exp_time = intval($parts[0]);\n // Trim path to 255 chars\n $this->cert_path = substr($parts[1], 0, 254);\n // Get common name out of subject\n if (preg_match('/subject= CN = ([^,]+)/', $parts[2], $matches)) {\n $this->cert_cn = $matches[1];\n } else {\n $this->cert_cn = 'Unknown';\n }\n\n $this->id = '';\n $this->timestamp = time();\n $this->create();\n \n // Check for errors\n if ($this->cert_exp_time < $now) {\n $errors[] = array(\n 'type' => 'danger',\n 'msg' => 'cert.expired',\n 'data' => json_encode(array(\n 'name' => $this->cert_cn,\n 'timestamp' => $this->cert_exp_time\n ))\n );\n } elseif ($this->cert_exp_time < $four_weeks) {\n $errors[] = array(\n 'type' => 'warning',\n 'msg' => 'cert.expire_warning',\n 'data' => json_encode(array(\n 'name' => $this->cert_cn,\n 'timestamp' => $this->cert_exp_time\n ))\n );\n }\n }\n }\n }// end foreach()\n \n if (! $errors) {\n $this->delete_event();\n } else {\n if (count($errors) == 1) {\n $error = array_pop($errors);\n $this->store_event($error['type'], $error['msg'], $error['data']);\n } else {\n // Loop through errors and submit stats\n $error_count = 0;\n $last_error = array();\n $warning_count = 0;\n // Search through errors and warnings\n foreach ($errors as $error) {\n if ($error['type'] == 'danger') {\n $last_error = $error;\n $error_count ++;\n }\n if ($error['type'] == 'warning') {\n $warning_count ++;\n }\n }\n // If errors, ignore warnings\n if ($error_count) {\n $type = 'error';\n if ($error_count == 1) {\n $msg = $last_error['msg'];\n $data = $last_error['data'];\n } else {\n $msg = 'cert.multiple_errors';\n $data = $error_count;\n }\n } else {\n $type = 'warning';\n $msg = 'cert.multiple_warnings';\n $data = $warning_count;\n }\n $this->store_event($type, $msg, $data);\n }\n }\n }", "function after_process() {\n\t\t $requestParamList = array(\"MID\" => MODULE_PAYMENT_PAYTM_MERCHANT_ID , \"ORDERID\" => $_POST['ORDERID']);\n\n\t\t $paytmParamsStatus = array();\n /* body parameters */\n $paytmParamsStatus[\"body\"] = array(\n /* Find your MID in your Paytm Dashboard at https://dashboard.paytm.com/next/apikeys */\n \"mid\" => $requestParamList['MID'],\n /* Enter your order id which needs to be check status for */\n \"orderId\" => $requestParamList['ORDERID'],\n );\n $checksumStatus = PaytmChecksum::generateSignature(json_encode($paytmParamsStatus[\"body\"], JSON_UNESCAPED_SLASHES), MODULE_PAYMENT_PAYTM_MERCHANT_KEY);\n /* head parameters */\n $paytmParamsStatus[\"head\"] = array(\n /* put generated checksum value here */\n \"signature\" => $checksumStatus\n );\n /* prepare JSON string for request */\n $post_data_status = json_encode($paytmParamsStatus, JSON_UNESCAPED_SLASHES);\n $paytstsusmurl = $this->paytmurl.PaytmConstants::ORDER_STATUS_URL; \n $ch = curl_init($paytstsusmurl);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data_status);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n $responseJson = curl_exec($ch);\n $responseStatusArray = json_decode($responseJson, true);\n\t\t if($responseStatusArray['body']['resultInfo']['resultStatus']=='TXN_SUCCESS' && $responseStatusArray['body']['txnAmount']==$_POST['TXNAMOUNT'])\n\t\t {\n\t\t \tglobal $insert_id;\n\t\t\t $status_comment=array();\n\t\t\t if(isset($_POST)){\n\t\t\t\t if(isset($_POST['ORDERID'])){\n\t\t\t\t \t$status_comment[]=\"Order Id: \" . $_POST['ORDERID'];\n\t\t\t\t }\n\t\t\t\t\n\t\t\t\t if(isset($_POST['TXNID'])){\n\t\t\t\t\t $status_comment[]=\"Paytm TXNID: \" . $_POST['TXNID'];\n\t\t\t\t }\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$sql_data_array = array('orders_id' => $insert_id,\n 'orders_status_id' => MODULE_PAYMENT_PAYTM_ORDER_STATUS_ID,\n 'date_added' => 'now()',\n 'customer_notified' => '0',\n 'comments' => implode(\"\\n\", $status_comment));\n\n\t\t\tzen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);\n\t\t}\n\t\telse{\n\t\t\tzen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, 'error_message=' . urlencode(\"It seems some issue in server to server communication. Kindly connect with administrator.\"), 'SSL', true, false));\n\t\t}\n }", "public function processRequests() {\n\t\t$receivedRequests = $this->receivedRequestMapper->findAll();\n\t\tforeach ($receivedRequests as $receivedRequest) {\n\t\t\t$id = $receivedRequest->getId();\n\t\t\t$sendingLocation = $receivedRequest->getSendingLocation();\n\t\t\t$type = $receivedRequest->getRequestType();\n\t\t\t$addedAt = $receivedRequest->getAddedAt();\n\t\t\t$field1 = $receivedRequest->getField1();\n\t\t\t\n\t\t\tswitch ($type) {\n\t\t\t\tcase Request::USER_EXISTS: //Want same behavior for these two queries\n\t\t\t\tcase Request::FETCH_USER: //for login for a user that doesn't exist in the db\n\t\t\t\t\t$userExists = $this->api->userExists($field1) ? '1' : '0';\t\n\n\t\t\t\t\t$this->api->beginTransaction();\n\t\t\t\t\t$response = new QueuedResponse($id, $sendingLocation, (string) $userExists, $this->api->microTime());\n\t\t\t\t\t$this->queuedResponseMapper->save($response); //Does not throw Exception if already exists\n\n\t\t\t\t\tif ($userExists) {\n\t\t\t\t\t\t$userUpdate = $this->userUpdateMapper->find($field1);\n\t\t\t\t\t\t$displayName = $this->api->getDisplayName($field1);\n\t\t\t\t\t\t$password = $this->api->getPassword($field1);\n\t\t\t\t\t\t$queuedUser = new QueuedUser($field1, $displayName, $password, $userUpdate->getUpdatedAt(), $sendingLocation); \n\t\t\t\t\t\t$this->queuedUserMapper->save($queuedUser); //Does not throw Exception if already exists\n\t\t\t\t\t}\n\t\t\t\t\t$this->api->commit();\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->api->log(\"Invalid request_type {$type} for request from {$sendingLocation} added_at {$addedAt}, field1 = {$field1}\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$request = $this->receivedRequestMapper->delete($receivedRequest);\n\t\t}\n\t}", "private function _processINS()\n {\n //like is needed for normal signal...\n if (!isset($this->_post_vars['message_type']) || $this->_post_vars['message_type'] !== 'ORDER_CREATED') {\n //don't care about this signal, it is not related to order created.\n trigger_error(\"DEBUG TRANSACTION: Ignoring signal, appears to be INS but NOT the order_created signal.\");\n return;\n }\n\n trigger_error(\"DEBUG TRANSACTION: Processing signal as INS signal. Var details:\\n\" . print_r($this->_post_vars, 1));\n\n //make sure it is valid...\n $hash = $this->_genHash(true);\n if (!$hash || $hash !== $this->_post_vars['md5_hash']) {\n trigger_error('DEBUG TRANSACTION: Authentication check failed, MD5 hash did not match. Check secret word settings for gateway.');\n return;\n }\n\n if (!isset($this->_post_vars['vendor_order_id'])) {\n trigger_error(\"DEBUG TRANSACTION: No vendor_order_id present, not able to process signal any further.\");\n return;\n }\n //get the transaction...\n $parts = explode(self::ORDER_SEP, $this->_post_vars['vendor_order_id']);\n if (!isset($parts[1])) {\n trigger_error(\"DEBUG TRANSACTION: vendor_order_id does not contain transaction id, cannot process INS signal. Value is {$this->_post_vars['vendor_order_id']}.\");\n return;\n }\n $transaction = geoTransaction::getTransaction((int)$parts[1]);\n if (!$transaction) {\n trigger_error(\"DEBUG TRANSACTION: Problem getting transaction for ID {$parts[1]}\");\n return;\n }\n if ($transaction->getStatus()) {\n trigger_error(\"DEBUG TRANSACTION: Transaction already active! Nothing is needed for this INS signal as the main signal already processed successfully.\");\n return;\n }\n $order = geoOrder::getOrder($parts[0]);\n if (!$order) {\n trigger_error(\"DEBUG TRANSACTION: First part of vendor_order_id, for the order ID, not able to get order from it. Value: {$parts[0]}\");\n return;\n }\n trigger_error(\"DEBUG TRANSACTION: INS Approved! Activating transaction, INS payment signal is valid and for transaction not already approved.\");\n $transaction->set('ins_data', $post_vars);\n self::_success($order, $transaction, $this, true);\n }", "function _processSale() {\n\t\t$this->autoload();\t\t\n\t\tJbPaymentxxsourcexxLib::write_log('xxsourcexx.txt', 'IPN: '.json_encode($_REQUEST));\n\t\t\n\t\t$input = jfactory::getApplication()->input;\t\t\n\t\t$status = $input->getString('xxsourcexx_transactionStatus');\n\t\t\n\t\t$success_status = array('CO','PA');\n\t\t\n\t\tif(in_array($status, $success_status)){\n\t\t\t$order_number = $input->getString('_itemId');\n\t\t\t$order_jb = JbPaymentxxsourcexxLib::getOrder($order_number);\n\t\t\t$order_jb->pay_status = 'SUCCESS';\n\t\t\t$order_jb->order_status = 'CONFIRMED';\n\t\t\t$order_jb->tx_id = $tnxref;\n\t\t\t$order_jb->store ();\n\t\t\treturn $order_jb;\t\n\t\t}else{\n\t\t\texit;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function orderCommitEtProcess($order_data, $bid)\r\n {\r\n $sysUtil = new SysUtility();\r\n $orderSet = new Order1InfoSet($bid);\r\n $result = array();\r\n\r\n $orderSet->setBusinessId($bid);\r\n $orderSet->setProductName($order_data->product_name_id);\r\n $orderSet->setMonthTerm($order_data->service_term_id);\r\n $orderSet->setStoreQuantity($order_data->store_quantity_id);\r\n $orderSet->setTotalAmount($order_data->amount_id);\r\n $orderSet->setTaxRate(CommonDefinition::TAX_RATE_CANADA);\r\n $orderSet->setAmountPaid(CommonDefinition::ZERO_NUM); // Assume no payment received yet\r\n $orderSet->setPaymentMethod(CommonDefinition::PAY_METHOD_EMAIL); // paid by email\r\n // transfer\r\n $orderSet->setOrderStatus(NeoDefinition::ORDER_STATUS_EMAIL_COMMIT); // set order status\r\n\r\n $temp = $sysUtil->generateDb1OrderId($bid);\r\n\r\n // Set the order ID\r\n $orderSet->setOrderId($temp);\r\n $orderSet->setOrderNote(NeoDefinition::ET_ORDER_NOTE_1);\r\n $orderSet->setPaymentInfo(NeoDefinition::ET_ORDER_PAYMENT_INFO_1);\r\n\r\n $tblName = $sysUtil->getNeoDb1OrderTblName();\r\n\r\n $neoModel = new NeoModel(SysDefinition::USER_DB_CONFIG);\r\n // Connect to Database\r\n $db_neo_conn = $neoModel->connect();\r\n\r\n if (! $db_neo_conn) {\r\n return (false); // Connect to DB failed return without further handling\r\n }\r\n\r\n // set the db table name\r\n $neoModel->setTableName($tblName);\r\n $queryResult = $neoModel->addDashboard1OrderById($orderSet);\r\n\r\n if ($queryResult) {\r\n $result[\"status\"] = CommonDefinition::SUCCESS;\r\n $result[\"info\"] = NeoDefinition::ET_ORDER_ADD_SUCCESS . NeoDefinition::EMAIL_INTERAC_LINK;\r\n\r\n // get the total order number after this submit if add order success\r\n\r\n $queryResult = $neoModel->getDashboard1OrderNumberByBid($bid);\r\n if (! is_bool($queryResult)) {\r\n session_start();\r\n $_SESSION[\"total_order\"] = $queryResult;\r\n }\r\n } else {\r\n $result[\"status\"] = CommonDefinition::ERROR;\r\n $result[\"info\"] = NeoDefinition::ET_ORDER_ADD_FAIL;\r\n }\r\n\r\n $neoModel->close();\r\n return ($result);\r\n }", "public function process()\n {\n // check order configurations for funny PT case\n foreach ($this->order_configurations as $config) {\n $products = $config->getProductArray(true);\n $hasPreceptorTraining = in_array(\"9\", $products);\n\n // we found preceptor training and other products\n //(we need an addtional serial number, therefor an additional config)\n if (count($products) > 1 && $hasPreceptorTraining && !$this->upgrade_purchase) {\n $this->addPreceptorTrainingConfig($config->quantity);\n }\n }\n\n //Mark order as completed\n $this->completed = true;\n $this->order_date = new \\DateTime();\n\n //Either apply upgrades or generate new serial numbers\n if ($this->upgrade_purchase) {\n $this->applyUpgradesAndDowngrades();\n } else {\n $this->generateSerialNumbers();\n }\n\n //Send email to interested parties, unless this is an instant order by Staff\n if ($this->order_type->id != 3) {\n $this->emailSerialNumbers();\n }\n\n //Generate invoice number and email the invoice if appropriate\n if ($this->payment_method->id == 1 && !$this->isFreeOrder()) {\n $this->generateInvoiceNumber();\n $this->emailInvoicePdf();\n }\n \n $session = new \\Zend_Session_Namespace(\"OrdersController\");\n $session->unsetAll();\n }", "public function handleData();", "public function syncTransactions(): void\n\t{\n\t\tif (!$this->checkTransactions()) {\n\t\t\treturn;\n\t\t}\n\n\t\t$transactions = $this->getTransactionList();\n\n\t\t/** @var array<\\Eshop\\DB\\Order> $orders */\n\t\t$orders = $this->orderRepository->many()->setIndex('this.code')->toArrayOf('uuid');\n\t\t/** @var array<\\Eshop\\DB\\EHubTransaction> $existingTransactions */\n\t\t$existingTransactions = $this->EHubTransactionRepository->many()->toArray();\n\n\t\t$newTransactionsValues = [];\n\n\t\tforeach ($transactions as $transaction) {\n\t\t\t$transactionPK = DIConnection::generateUuid('eHubTransactionId', $transaction['id']);\n\t\t\t$transactionValues = [\n\t\t\t\t'order' => null,\n\t\t\t];\n\n\t\t\tif (isset($existingTransactions[$transactionPK])) {\n\t\t\t\t$transactionValues = $existingTransactions[$transactionPK]->toArray();\n\t\t\t}\n\n\t\t\t$transactionValues['transactionId'] = $transaction['id'];\n\t\t\t$transactionValues['status'] = $transaction['status'];\n\t\t\t$transactionValues['createdTs'] = (new Carbon($transaction['dateTime']))->format('Y-m-d G:i');\n\t\t\t$transactionValues['clickDateTime'] = (new Carbon($transaction['clickDateTime']))->format('Y-m-d G:i');\n\t\t\t$transactionValues['orderAmount'] = (float) $transaction['orderAmount'];\n\t\t\t$transactionValues['originalOrderAmount'] = $transaction['originalOrderAmount'] ?? null;\n\t\t\t$transactionValues['originalCurrency'] = $transaction['originalCurrency'] ?? null;\n\t\t\t$transactionValues['commission'] = isset($transaction['commission']) ? (float) $transaction['commission'] : null;\n\t\t\t$transactionValues['type'] = $transaction['type'];\n\t\t\t$transactionValues['orderId'] = $transaction['orderId'] ?? null;\n\t\t\t$transactionValues['couponCode'] = $transaction['couponCode'] ?? null;\n\t\t\t$transactionValues['newCustomer'] = $transaction['newCustomer'] ?? null;\n\n\t\t\tif (isset($orders[$transaction['orderId']])) {\n\t\t\t\t$transactionValues['order'] = $orders[$transaction['orderId']];\n\t\t\t}\n\n\t\t\t$newTransactionsValues[] = $transactionValues;\n\t\t}\n\n\t\t$this->EHubTransactionRepository->syncMany($newTransactionsValues);\n\t}", "public function populateTransaction($data = array())\n\t{\n\t\ttry {\n\t\t\t$data = EMerchantPayHelper::sanitizeData($data, $this);\n\n\t\t\t// Check if transaction exists\n\t\t\t$insert_query = $this->db->query(\"\n\t\t\t\tSELECT\n\t\t\t\t\t*\n\t\t\t\tFROM\n\t\t\t\t\t`\" . DB_PREFIX . \"emerchantpay_checkout_transactions`\n\t\t\t\tWHERE\n\t\t\t\t\t`unique_id` = '\" . $data['unique_id'] . \"'\n\t\t\t\");\n\n\t\t\tif ($insert_query->rows) {\n\t\t\t\t$this->updateTransaction($data);\n\t\t\t} else {\n\t\t\t\t$this->addTransaction($data);\n\t\t\t}\n\t\t} catch (Exception $exception) {\n\t\t\t$this->logEx($exception);\n\t\t}\n\t}", "public function execute() {\n $request = $this->getRequest()->getParams();\n \n $order_id = strip_tags($request[\"orderId\"]);\n $order = $this->objectManagement->create('Magento\\Sales\\Model\\Order')->loadByIncrementId($order_id);\n $validateOrder = $this->validateWebhook($request, $order);\n\n $transactionId = $request['referenceId'];\n\n $mageOrderStatus = $order->getStatus();\n\n if($mageOrderStatus === 'pending') {\n\n if(!empty($validateOrder['status']) && $validateOrder['status'] === true) {\n if($request['txStatus'] == 'SUCCESS') {\n $request['additional_data']['cf_transaction_id'] = $transactionId;\n $this->logger->info(\"Cashfree Notify processing started for cashfree transaction_id(:$transactionId)\");\n $this->processPayment($transactionId, $order);\n $this->logger->info(\"Cashfree Notify processing complete for cashfree transaction_id(:$transactionId)\");\n return;\n } elseif($request['txStatus'] == 'FAILED' || $request['txStatus'] == 'CANCELLED') {\n $orderStatus = self::STATE_CANCELED;\n $this->processWebhookStatus($orderStatus, $order);\n $this->logger->info(\"Cashfree Notify change magento order status to (:$orderStatus) cashfree transaction_id(:$transactionId)\");\n return;\n } elseif($request['txStatus'] == 'USER_DROPPED') {\n $orderStatus = self::STATE_CLOSED;\n $this->processWebhookStatus($orderStatus, $order);\n $this->logger->info(\"Cashfree Notify change magento order status to (:$orderStatus) cashfree transaction_id(:$transactionId)\");\n return;\n } else {\n $orderStatus = self::STATE_PENDING_PAYMENT;\n $this->processWebhookStatus($orderStatus, $order);\n $this->logger->info(\"Cashfree Notify change magento order status to (:$orderStatus) cashfree transaction_id(:$transactionId)\");\n return;\n }\n } else {\n $errorMsg = $validateOrder['errorMsg'];\n $this->logger->info(\"Cashfree Notify processing payment for cashfree transaction_id(:$transactionId) is failed due to ERROR(: $errorMsg)\");\n return;\n }\n } else {\n $this->logger->info(\"Order has been already in processing state for cashfree transaction_id(:$transactionId)\");\n return;\n }\n }", "protected function postProcessUpdateReceipt()\n {\n }", "public function process()\n {\n // Get all orders not yet sent to Flow within the valid time period\n $orders = Order::get()\n ->filter([\n 'Scheduled' => 0,\n 'IsCart' => 0\n ]);\n\n // run through and schedule\n /** @var Order|\\Isobar\\Flow\\Extensions\\OrderExtension $order */\n foreach ($orders as $order) {\n if ($order->UnpaidTotal()->getDecimalValue() <= 0) {\n echo 'Order #' . $order->ID . ' to be scheduled' . \"\\n\";\n\n $order->scheduleOrder();\n }\n }\n }", "protected function runTransactionBuild()\n {\n $this->request->transaction = new Transaction($this->request); /* Write the transaction record to disk */\n }", "public function processResponses() {\n\t\t$receivedResponses = $this->receivedResponseMapper->findAll();\n\t\tforeach ($receivedResponses as $receivedResponse) {\n\t\t\t$requestId = $receivedResponse->getRequestId();\n\t\t\t$answer = $receivedResponse->getAnswer();\n\t\t\n\t\t\t$queuedRequest = $this->queuedRequestMapper->find($requestId);\n\t\t\tif ($queuedRequest) {\n\t\t\t\t$type = $queuedRequest->getRequestType();\n\t\t\t\t$field1 = $queuedRequest->getField1();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//request no longer exists, so just delete response\n\t\t\t\t$this->receivedResponseMapper->delete($receivedResponse);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tswitch ($type) {\n\t\t\t\tcase Request::USER_EXISTS:\n\t\t\t\t\tif ($answer !== \"1\" AND $answer !== \"0\") {\n\t\t\t\t\t\t$this->api->log(\"ReceivedResponse for Request USER_EXISTS, request_id = {$receivedResponse->getId()} had invalid response = {$answer}\"); \n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif ($answer === \"0\") {\n\t\t\t\t\t\t$friendships = $this->friendshipMapper->findAllByUser($field1);\n\t\t\t\t\t\tforeach ($friendships as $friendship) {\n\t\t\t\t\t\t\t$this->friendshipMapper->delete($friendship);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->api->beginTransaction();\n\t\t\t\t\t//Don't need destination for delete since they should all be this instance\n\t\t\t\t\t$this->receivedResponseMapper->delete($receivedResponse);\n \t\t\t\t\t$this->queuedRequestMapper->delete($receivedResponse);\n\t\t\t\t\t$this->api->commit();\n\t\t\t\t\tbreak;\n\t\t\t\tcase Request::FETCH_USER: \n\t\t\t\t\tif ($answer !== \"1\" AND $answer !== \"0\") {\n\t\t\t\t\t\t$this->api->log(\"ReceivedResponse for Request FETCH_USER, request_id = {$receivedResponse->getId()} had invalid response = {$answer}\"); \n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->api->beginTransaction();\n\t\t\t\t\t//Don't need destination for delete since they should all be this instance\n\t\t\t\t\t$this->receivedResponseMapper->delete($receivedResponse);\n \t\t\t\t\t$this->queuedRequestMapper->delete($receivedResponse);\n\t\t\t\t\t$this->api->commit();\n\t\t\t\t\t\n\t\t\t\t\tbreak;\t\n\t\t\t\tdefault:\n\t\t\t\t\t$this->api->log(\"Invalid request_type {$type} for request id {$requestId}\");\n\t\t\t\t\tcontinue;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public function storeIncomingData() {}", "private function parseResponses() \r\n {\r\n $validStates = array('Response', 'Response30');\r\n $messages = $this->MessageQueue->find('all', array(\r\n 'fields' => array('messageIdentity', 'message', 'processState', 'isCopied', 'sourceDeviceAlias'),\r\n 'conditions' => array(\r\n 'mailbox' => $this->CurrentDevice->deviceAlias,\r\n 'processState' => $validStates\r\n ),\r\n 'order' => 'createDate'\r\n ));\r\n \r\n // Start a transaction\r\n $this->MessageQueue->transaction(null, true);\r\n\r\n // Process all the messages. Any messages that fail will be placed into the $errors array.\r\n $errors = array();\r\n $processed = array();\r\n foreach($messages as $message)\r\n {\r\n $message = $message['MessageQueue'];\r\n\r\n try\r\n {\r\n libxml_use_internal_errors(true);\r\n $xml = Xml::build($message['message']);\r\n $namespaces = array_flip($xml->getNamespaces(true));\r\n\r\n // Convert the XML to an array and pass the resulting message to the correct processing function.\r\n $payload = Set::reverse($xml);\r\n // Set messageQuery to the payload array for message handling.\r\n $this->messageQuery[] = $payload['LawEnforcementTransaction']['Transaction']['Response'];\r\n\r\n if ($this->{\"handle{$message['processState']}\"}($message, $payload, $namespaces))\r\n $processed[] = $message['messageIdentity'];\r\n else\r\n $errors[] = array(\r\n 'message' => $message,\r\n 'error' => 'Message id ' . $message['messageIdentity'] . ' failed to process.'\r\n );\r\n }\r\n catch(Exception $e)\r\n {\r\n $errors[] = array(\r\n 'message' => $message,\r\n 'error' => 'Exception thrown while processing Message id ' . $message['messageIdentity'] . ': '\r\n . $e->getMessage()\r\n );\r\n }\r\n }\r\n \r\n // Just send the raw LawEnforcementTransaction to the user as is with a statement indicating the error.\r\n if (!empty($errors))\r\n {\r\n $copy = $errors;\r\n foreach($copy as $index => $error) {\r\n try\r\n {\r\n $this->queueErrorResponse($error['error'], $error['message']);\r\n $processed[] = $error['message']['messageIdentity'];\r\n unset($copy[$index]);\r\n }\r\n catch(Exception $e)\r\n {\r\n $errors[$index]['error'] = \"Failed to enqueue message that failed processing. \" \r\n . \"Original Error:\\n\\n\" . $error['error'];\r\n }\r\n }\r\n }\r\n\r\n // Dequeue all processed messages.\r\n if (!empty($processed))\r\n $this->MessageQueue->deleteAll(array('messageIdentity' => $processed));\r\n \r\n // Deal with any errors that failed to get directed towards the user. All we can do is change them in the queu\r\n // to a new state (so they're not lost) and log them in the CLIPS error log.\r\n //\r\n // This should almost never happen.\r\n if (!empty($errors)) {\r\n $ids = Set::extract($errors, '{n}.message.messageIdentity');\r\n \r\n // Log each of the messages that failed\r\n foreach($errors as $id => $error) {\r\n CakeLog::write('error', \"Message (id {$error['message']['messageIdentity']}) failed to process. \" \r\n . \"{$error['error']}\\n{$error['message']['message']}\");\r\n }\r\n \r\n // UpdateAll doesn't behave like other Cake model functions. We have to quote the param ourself.\r\n $this->MessageQueue->updateAll(\r\n array('processState' => '\\'CLIPS_Error\\''),\r\n array('messageIdentity' => $ids)\r\n );\r\n }\r\n\r\n return $this->MessageQueue->transaction(true, true);\r\n }", "function TransactionRecordLoad( &$data ) {\n\t\t$table = BIT_DB_PREFIX.\"task_transaction\";\n\t\t\n\t\t$pDataHash['data_store']['ticket_id'] = $data[0];\n\t\t$pDataHash['data_store']['transact_no'] = $data[1];\n\t\t$pDataHash['data_store']['transact'] = $data[2];\n\t\t$pDataHash['data_store']['ticket_ref'] = $data[3];\n\t\t$pDataHash['data_store']['staff_id'] = $data[4];\n\t\t$pDataHash['data_store']['previous'] = $data[5];\n\t\t$pDataHash['data_store']['room'] = $data[6];\n\t\t$pDataHash['data_store']['applet'] = $data[7];\n\t\t$pDataHash['data_store']['office'] = $data[8];\n\t\t$pDataHash['data_store']['ticket_no'] = $data[9];\n\t\tif ( $data[10] == '[null]' )\n\t\t\t$pDataHash['data_store']['proom'] = 0;\n\t\telse\n\t\t\t$pDataHash['data_store']['proom'] = $data[10];\n\t\tif ( $data[11] == '[null]' )\n\t\t\t$pDataHash['data_store']['tags'] = 0;\n\t\telse\n\t\t\t$pDataHash['data_store']['tags'] = $data[11];\n\t\tif ( $data[12] == '[null]' )\n\t\t\t$pDataHash['data_store']['clearance'] = 0;\n\t\telse\n\t\t\t$pDataHash['data_store']['clearance'] = $data[12];\n\t\t$result = $this->mDb->associateInsert( $table, $pDataHash['data_store'] );\n\t}", "public function process_gateway_notification() {\r\n\t\t$order_id = self::get_post_var( 'OrderID' );\r\n\t\t$message = self::get_post_var( 'Message' );\r\n\t\t$status_code = self::get_post_var( 'StatusCode' );\r\n\t\t$prev_status_code = self::get_post_var( 'PreviousStatusCode' );\r\n\t\t$session_id = explode( ' ', self::get_post_var( 'OrderDescription' ) );\r\n\r\n\t\tif ( is_numeric( $status_code ) ) {\r\n\t\t\t$processed = WPSC_Purchase_Log::INCOMPLETE_SALE;\r\n\t\t\tswitch ( $status_code ) {\r\n\t\t\t\tcase PS_TRX_RESULT_SUCCESS:\r\n\t\t\t\t\t$processed = WPSC_Purchase_Log::ACCEPTED_PAYMENT;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase PS_TRX_RESULT_REFERRED:\r\n\t\t\t\t\t$processed = WPSC_Purchase_Log::PAYMENT_DECLINED;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase PS_TRX_RESULT_DECLINED:\r\n\t\t\t\t\t$processed = WPSC_Purchase_Log::PAYMENT_DECLINED;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase PS_TRX_RESULT_DUPLICATE:\r\n\t\t\t\t\t$processed = ( PS_TRX_RESULT_SUCCESS === $prev_status_code )\r\n\t\t\t\t\t\t? WPSC_Purchase_Log::ACCEPTED_PAYMENT\r\n\t\t\t\t\t\t: WPSC_Purchase_Log::PAYMENT_DECLINED;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase PS_TRX_RESULT_FAILED:\r\n\t\t\t\t\t$processed = WPSC_Purchase_Log::INCOMPLETE_SALE;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\twp_die( 'Unsupported StatusCode. Please contact support.',\r\n\t\t\t\t\t\t'Unsupported StatusCode',\r\n\t\t\t\t\t\tarray( 'response' => 400 )\r\n\t\t\t\t\t);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t$data = array(\r\n\t\t\t\t'processed' => $processed,\r\n\t\t\t\t'transactid' => $order_id,\r\n\t\t\t\t'notes' => $message,\r\n\t\t\t\t'date' => time(),\r\n\t\t\t);\r\n\t\t\twpsc_update_purchase_log_details( $session_id[4], $data, 'sessionid' );\r\n\r\n\t\t\tswitch ( $processed ) {\r\n\t\t\t\tcase WPSC_Purchase_Log::ACCEPTED_PAYMENT:\r\n\t\t\t\t\ttransaction_results( $session_id, false, $order_id );\r\n\t\t\t\t\t// Thank you for purchasing.\r\n\t\t\t\t\t$this->go_to_transaction_results( $session_id[4] );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase WPSC_Purchase_Log::PAYMENT_DECLINED:\r\n\t\t\t\t\t// Sorry, your transaction was not accepted.\r\n\t\t\t\t\t$this->go_to_transaction_results( null );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t// Thank you, your purchase is pending.\r\n\t\t\t\t\t$this->go_to_transaction_results( $session_id[4] );\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\twp_die( 'Unexpected response from the payment gateway. Please contact support.',\r\n\t\t\t\t'Unexpected response from the payment gateway',\r\n\t\t\t\tarray( 'response' => 400 )\r\n\t\t\t);\r\n\t\t}\r\n\t}", "public function run()\n {\n $elements = [\n ['from_id' => 1, 'to_id' => 2, 'details' => 'sample transaction', 'amount' => 14],\n ['from_id' => 1, 'to_id' => 2, 'details' => 'sample transaction 2', 'amount' => 24],\n ['from_id' => 2, 'to_id' => 1, 'details' => 'sample transaction 3', 'amount' => 15],\n ];\n foreach($elements as $element){\n $item = new \\App\\Transaction();\n $item->from_id = $element['from_id'];\n $item->to_id = $element['to_id'];\n $item->details = $element['details'];\n $item->amount = $element['amount'];\n $item->save();\n }\n }", "public function process($data)\n {\n if (! $data) {\n throw new Exception(\"Error Processing Request: No data found\", 1);\n } else if (substr( $data, 0, 30 ) != '<?xml version=\"1.0\" encoding=\"' ) { // Else if old style text, process with old text based handler\n \n // Translate network strings to db fields\n $translate = array(\n ' agrCtlRSSI: ' => 'agrctlrssi',\n ' agrExtRSSI: ' => 'agrextrssi',\n ' agrCtlNoise: ' => 'agrctlnoise',\n ' agrExtNoise: ' => 'agrextnoise',\n ' state: ' => 'state',\n ' op mode: ' => 'op_mode',\n ' lastTxRate: ' => 'lasttxrate',\n ' maxRate: ' => 'maxrate',\n 'lastAssocStatus: ' => 'lastassocstatus',\n ' 802.11 auth: ' => 'x802_11_auth',\n ' link auth: ' => 'link_auth',\n ' BSSID: ' => 'bssid',\n ' SSID: ' => 'ssid',\n ' MCS: ' => 'mcs',\n ' channel: ' => 'channel');\n\n // Delete previous entries\n\n // Parse data\n foreach (explode(\"\\n\", $data) as $line) {\n // Translate standard entries\n foreach ($translate as $search => $field) {\n if (strpos($line, $search) === 0) {\n $value = substr($line, strlen($search));\n\n $this->$field = $value;\n break;\n }\n }\n } //end foreach explode lines\n $this->save();\n } else { // Else process with new XML handler\n\n // Process incoming wifi.plist\n $parser = new CFPropertyList();\n $parser->parse($data, CFPropertyList::FORMAT_XML);\n $plist = $parser->toArray();\n\n // Process each of the items\n foreach (array('agrctlrssi', 'agrextrssi', 'agrctlnoise', 'agrextnoise', 'state', 'op_mode', 'lasttxrate', 'lastassocstatus', 'maxrate', 'x802_11_auth', 'link_auth', 'bssid', 'ssid', 'mcs', 'channel', 'snr', 'known_networks') as $item) {\n\n // If key exists and is zero, set it to zero\n if ( array_key_exists($item, $plist) && $plist[$item] === 0) {\n $this->$item = 0;\n // Else if key does not exist in $plist, null it\n } else if (! array_key_exists($item, $plist) || $plist[$item] == '' || $plist[$item] == \"{}\" || $plist[$item] == \"[]\") {\n $this->$item = null;\n\n // Set the db fields to be the same as those in the preference file\n } else {\n $this->$item = $plist[$item];\n }\n }\n\n // Save the data because bumblebees are fuzzy\n $this->save();\n }\n }", "function saveTransaction($orderid, $payment) {\n\n\t//Get order from database\n $order = db_getOrderById($orderid); \n\n //Get buyer info from database\n $userId = \"\";\n\t $order_ordernumber = \"\";\n\t foreach($order as $o){\n\t\t$userId = $o['userid'];\n\t\t$order_ordernumber = $o['ordernumber'];\n\t }\n\n //Get order items\n $orderitems = db_getOrderItems($orderid);\n\n \t//Initialize array that will hold all order items ids and if the web service saved them succesfully\n $orderItemsSuccess = array();\n \n //Initialize array that will hold items that will be set through the web service with rollback false\n $itemsArr = array();\n \n //Initialize index of order items array\n $itemIndex = 0;\n \n \n $itemsIndexArr = array();\n \n //print_r($orderitems);\n \n //Iterate thorugh $orderItems obtained from db\n foreach ($orderitems as $orderitem) {\n \n \t//Get item from database\n\t\t\n $item = refactored_db_getItem($orderitem['itemid']);\n\n //print_r($item);\n \n //Initialize item success assuming it will be true\n $orderItemsSuccess[$itemIndex] = array(\"id\"=>$item['id'], \"success\"=>false);\n \n //Get item type to see if it is a package or not\n $type = $item['type'];\n //echo $item->name.\"-\".$item->type;\n \n if ($type == \"ITEM\") {\n\t\t\t//Save item in itemsArr to send the request to the web service\n $quantity = $orderitem['quantity'];\n array_push($itemsArr, array(\"creditTypeId\"=>$item['referenceid'],\n\t\t\t\t\t\t\t \"quantity\"=>$quantity, \n\t\t\t\t\t\t\t \"purchaseId\"=>$order_ordernumber, \n\t\t\t\t\t\t\t \"active\"=>false));\n \tarray_push($itemsIndexArr, \t$itemIndex);\n \t\n } else if ($type == \"PACKAGE\") {\n \t\n \t$orderItemsSuccess[$itemIndex][\"success\"]=true;\n\n \t//Get package items\n $packageitems = db_getPackageItems($item['id']);\n\n //Initialize array to send a ws request for package items only with rollback true\n $packageItemsArr = array();\n\n //Initialize the response\n $success = true;\n \n //Save items in request array\n foreach ($packageitems as $packageitem) {\n\n $item = refactored_db_getItem($packageitem['itemid']);\n\n $quantity = $orderitem['quantity']*$packageitem['quantity'];\n array_push($packageItemsArr, array(\"creditTypeId\"=>$item['referenceid'],\n\t\t\t\t\t\t\t\t\t \"quantity\"=>$quantity, \n\t\t\t\t\t\t\t\t\t \"purchaseId\"=>$order_ordernumber.\"\".$orderitem['itemid'], \n\t\t\t\t\t\t\t\t\t \"active\"=>false)); \n }\n \n //Send request for package\n $response = ws_assignQuota($packageItemsArr, $userId, $payment, true);\n \n //print_r($response);\n \n //Check if an item failed to be saved, if it did set success to False\n foreach ($response as $r) {\n \t\n \tif(!$r->active){ \t\n\t \t$orderItemsSuccess[$itemIndex][\"success\"]=$r->active;\n\t \tbreak;\n \t}\n } \n }\n\n //echo \"Item success = \".$orderItemsSuccess[$itemIndex][\"success\"];\n\t\t$itemIndex++;\n }\n \n \n //print_r($orderItemsSuccess);\n //print_r($itemsIndexArr);\n \n //echo \"Single Items :\";\n //print_r($itemsArr);\n \n //Send request for order items that were not packages. if there are any\n $successIndex = 0;\n\t$assignments = array();\n if(count($itemsArr)>0){\n \t$response = ws_assignQuota($itemsArr, $userId,$payment, false);\n \t\n \tif(is_array($response)){\n \t\t$assignments = array_merge($assignments,$response);\n \t}else{\n \t\tarray_push($assignments, $response);\n \t}\n \t\n \t\n \t//print_r(\"assign quota response \".$assignments);\n \t\n \t$i = 0; \t \n \t//Go thorugh the response to check which item failed\n \tforeach ($assignments as $assignment) {\n \t\t\n \t\t$index = $itemsIndexArr[$i++];\n \t\t\n \t\t//print_r(\"index \".$index);\n \t\t\n \t\t$orderItemsSuccess[$index][\"success\"]=$assignment->active;\n \t}\n \t \t\n }\n\n //echo \"OrderItemsSuccess :\";\n //print_r($orderItemsSuccess);\n return $orderItemsSuccess;\n}", "public function insertTransactionJson($input){\r\n try{\r\n foreach($input[\"transactionsresponse\"] as $key=>$trans){\r\n $storeId = (string)$trans['storeId'];\r\n $transactionDate = (string)$trans['transactionDate'];\r\n $amount = (string)$trans['amount'];\r\n $fee = (string)$trans['fee'];\r\n $amountToPrincipal = (string)$trans['amountToPrincipal'];\r\n $amountToEscrow = (string)$trans['amountToEscrow'];\r\n $amountToInterest = (string)$trans['amountToInterest'];\r\n $ledgerBalance = (string)$trans['ledgerBalance'];\r\n $checkNumber = (string)$trans['checkNumber'];\r\n $transactionType = (string)$trans['transactionType'];\r\n $pending = (string)$trans['pending'];\r\n $generatedDescription = (string)$trans['generatedDescription'];\r\n $transactionId = (string)$trans['transactionId'];\r\n $intradayOrderId = (string)$trans['intradayOrderId'];\r\n $exportTNUM = (string)$trans['exportTNUM'];\r\n $depositSlipIdentifier = (string)$trans['depositSlipIdentifier'];\r\n $checkImageIdentifier = (string)$trans['checkImageIdentifier'];\r\n $creditTransaction = (string)$trans['creditTransaction'];\r\n \r\n //convert date format from mm/dd/yyyy to yyyy-mm-dd\r\n $transactionDate = explode('/', $transactionDate);\r\n $transactionDate = [$transactionDate[2], $transactionDate[0], $transactionDate[1]];\r\n $transactionDate = join( '-', $transactionDate);\r\n\r\n if(!$this->insertTransaction( \r\n $storeId, \r\n $transactionDate, \r\n $amount, \r\n $fee, \r\n $amountToPrincipal, \r\n $amountToEscrow, \r\n $amountToInterest, \r\n $ledgerBalance, \r\n $checkNumber, \r\n $transactionType, \r\n $pending, \r\n $generatedDescription, \r\n $transactionId, \r\n $intradayOrderId, \r\n $exportTNUM, \r\n $depositSlipIdentifier, \r\n $checkImageIdentifier, \r\n $creditTransaction )){\r\n throw new Exception();\r\n }\r\n }\r\n }\r\n catch(Exception $ex) {\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "public function query_in_transactions(){\n\t\t$response = $this->execute($this->query_in_transaction_url);\n\t\tif(!$response){\n\t\t\tthrow new Exception(\"error in communication\");\n\t\t}\n\t\treturn json_decode($response,true);\n\t}", "public function processReceivedData(&$myAddress)\n {\n\t\tif (isset($_REQUEST['Address']) && \n\t\t\tisset($_REQUEST['ShoppingCart']))\n\t\t{\n\t\t\t$myAddress = $_REQUEST['Address'];\n\t\t\t$Address = $this->_database->real_escape_string($_REQUEST['Address']);\n\t\t\t$Sql = \"\n\t\t\t\tINSERT INTO `order` (address) \n\t\t\t\tVALUES ('$Address');\n\t\t\t\";\n\t\t\t$this->_database->query ($Sql);\n\t\t\tif ($this->_database->errno) \n\t\t\t{\n\t\t\t throw new Exception(\"BlockShoppingCart::processReceivedData INSERT order failed: \".$this->_database->error.\"\\n\".$Sql);\n\t\t\t}\n\t\t\t$orderid = $this->_database->insert_id;\n\n\t\t\t$Names = $_REQUEST['ShoppingCart'];\n\t\t\tfor ($i = 0; $i < count($Names); $i++) {\n\t\t\t\t$Name = $this->_database->real_escape_string($Names[$i]);\n\t\t\t\t$Sql = \"\n\t\t\t\t\tINSERT INTO pizza (orderid, name, `status`) \n\t\t\t\t\tVALUES ('$orderid', '$Name', '1b');\n\t\t\t\t\";\n\t\t\t\t$this->_database->query ($Sql);\n\t\t\t\tif ($this->_database->errno) \n\t\t\t\t{\n\t\t\t\t throw new Exception(\"BlockShoppingCart::processReceivedData INSERT pizza failed: \".$this->_database->error.\"\\n\".$Sql);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }", "public function processAndComplete()\n {\n if ($this->withdrawal->status == Withdrawal::STATUS_CREATED) {\n // update withdrawal model\n $this->withdrawal->status = Withdrawal::STATUS_COMPLETED;\n $this->withdrawal->save();\n }\n }", "public function process()\n {\n //If they don't order 7 days after sign up, the points disappear\n //send sms before 1-2days if not order placed\n $orderTable = $this->getServiceLocator()->get('Api\\Table\\LoyaltyPointTable');\n $accounts = $orderTable->getAccountsForCreditExpiry();\n if (!$accounts) {\n echo $msg = 'CreditsExpiryController: Not orders available, skipping '. $this->orderId .\"\\n\";\n $this->logger->debug($msg);\n return;\n }\n \n foreach ($accounts['list'] as $account) {\n if ($account['no_order_days_since_signup'] == 5) {\n $this->sendSms($account['contact_no']);\n } else if ($account['no_order_days_since_signup'] >= 7) {\n $this->removeCredits($account['account_id'], $account['points']);\n } \n }\n }", "public function transactionProcess (&$errorMessage);", "final public function removeTransaction(array $data):array{\n try {\n if (!isset($data['tokenTr'])) {\n throw new Exception('Could not Process(0)');\n \n }\n\n if (!Func::decodeNumber($data['tokenTr'])) {\n throw new Exception('Could not Proces (1)'); \n }\n\n $token = Func::decodeNumber($data['tokenTr']);\n } catch (Exception $e) {\n return ['success'=>0,'message'=>$e->getMessage()];\n }\n\n $this->db->delete('jc_transacciones','tr_id='.intval($token).' and tr_id_user='.$this->user.' and tr_status=0');\n return ['success'=>1,'message'=>'This transaction has been successfully removed'];\n}", "function execute()\n{\n\t\n\n\n\n\n\t$arr = array_merge($this->amount,$this->customer,$this->creditCard,$this->options);\n\t\n\t$collection = Braintree_Transaction::search(array(\n Braintree_TransactionSearch::customerId()->is($arr['customer']['id']),\n));\nif($collection->maximumCount() > 0)\n{\n\n$result = Braintree_Transaction::sale(\n array(\n 'customerId' => $arr['customer']['id'],\n 'amount' => $arr['amount']\n )\n);\nif ($result->success) {\necho json_encode(array('type'=>'success','response'=>'payment amount: '.$arr['amount'].' Your transaction id : '.$result->transaction->id));\n\tdo_action('payment_made',array('message'=>'payment amount: '.$arr['amount'].' transaction id : '.$result->transaction->id));\n\n}elseif ($result->transaction) \n{\n\techo json_encode(array('type'=>'error','response'=>$result->message));\n\n} else {\n\techo json_encode(array('type'=>'error','response'=>$result->message));\n\n\t\n}\n}else{\n\n$result = Braintree_Transaction::sale($arr);\n\nif ($result->success) {\n\tdo_action('payment_made',array('message'=>'payment amount: '.$arr['amount'].' transaction id : '.$result->transaction->id));\n\t\necho json_encode(array('type'=>'success','response'=>'Payment Amount : '.$arr['amount'].'Your transaction id : '.$result->transaction->id));\n}elseif ($result->transaction) \n{\n\techo json_encode(array('type'=>'error','response'=>$result->message));\n\n} else {\n\techo json_encode(array('type'=>'error','response'=>$result->message));\n\n\t\n}\n\n\n\n\t\n}\n\t\n}", "public function run()\n {\n while (($payload = array_shift($this->payloads)) !== null) {\n list($ttr, $message) = $payload;\n $this->startedId = $this->finishedId + 1;\n $this->handleMessage($this->startedId, $message, $ttr, 1);\n $this->finishedId = $this->startedId;\n $this->startedId = 0;\n }\n }", "public function dataTransact($data)\n\t\t{\n\t\t\t$this->connection->autocommit(false);\n\t\t\tif($this->connection->query('BEGIN;'))\n\t\t\t{\n\t\t\t\tif($this->connection->multi_query($data))\n\t\t\t\t{\n\t\t\t\t\tdo {\n\t\t\t\t\t\t/* almacenar primer juego de resultados */\n\t\t\t\t\t\tif ($result = $this->connection->store_result()) {\n\t\t\t\t\t\t\twhile ($row = $result->fetch_row()) {\n\t\t\t\t\t\t\t\techo $row[0];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$result->free();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} while ($this->connection->more_results() && $this->connection->next_result());\n\n\t\t\t\t\t$this->connection->commit();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$error = $this->connection->error;\n\t\t\t\t\t//echo \"Chiales esto trono!\";\n\t\t\t\t\t$this->connection->rollback();\n\t\t\t\t\treturn $error;\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$error = $this->connection->error;\n\t\t\t\t$this->connection->rollback();\n\t\t\t\treturn $error;\n\t\t\t}\n\t\t}", "function handleIncomingFundsERP(\n $tid, $created, $serialnumber, $paymentmethod_id, $amount\n ) {\n debug_print(\"Entry: handlingIncomingFundsERP ( tid = $tid )\");\n\n debug_print(\"Creating debtor transaction record\");\n\n $paymentmethod = loadPaymentMethod($paymentmethod_id);\n if ($paymentmethod === false)\n return false;\n\n $meter = loadMeterInformation($serialnumber);\n if ($meter === false)\n return false;\n\n $account = loadAccount($meter['account_id']);\n if ($account === false)\n return false;\n\n $branch = loadCustomerBranch($account['customerbranch_id']);\n if ($branch === false)\n return false;\n\n $branchcode = $branch['code'];\n $new_date = date('Y-m-d', strtotime($created));\n $period_id = fgetPeriod_id($new_date, __FILE__, __LINE__);\n $reference = substr($paymentmethod['code'], 0, 7) . ' ' . $tid;\n $salesorder_id = 0;\n $gst = 0.00;\n $freight = 0.00;\n $rate = 1.00;\n $invtext = '';\n $settled = 0;\n $discount = 0;\n $invtext = 'ReceivedMeter:' . $serialnumber . '(' . $branchcode . ')';\n $invtextevent = 'Received';\n $invtextserialnumber = $serialnumber;\n $invtextbranchcode = $branchcode;\n $meter_id = $meter['meter_id'];\n $posted = 1;\n\n $dtid = insertDebtorTrans(\n $tid, $paymentmethod['transactiontype_id'], $account['customerbranch_id'], $created, $period_id, $reference, $salesorder_id, \n (-($amount)), $gst, $freight, $rate, $invtext, $settled, $discount, $invtextevent, $invtextserialnumber, $invtextbranchcode, $meter_id\n );\n\n debug_print(\"Creating GL transaction records\");\n\n $vatapplicable_id = 5;\n\n if (doesGlExist($paymentmethod['erpglaccountcredit']) &&\n doesGlExist($paymentmethod['erpglaccountdebit'])) {\n $rc = insertGLTrans(\n $paymentmethod['transactiontype_id'], $tid, $new_date, $period_id, $invtext, $posted, $vatapplicable_id, $postings = array(\n array($paymentmethod['erpglaccountcredit'] => -$amount),\n array($paymentmethod['erpglaccountdebit'] => $amount)\n )\n );\n }\n\n debug_print(\"Returning transaction id $tid\");\n debug_print(\"Exit: handleIncomingFundsERP\");\n return $tid;\n }", "function the_incomplete_transaction() {\n\n // Get codeigniter object instance\n $CI = &get_instance();\n\n // Verify if flash data exists\n if ( $CI->session->flashdata('incomplete_transaction') ) {\n\n // Get incomplete transaction\n $transaction = $CI->session->flashdata('incomplete_transaction');\n\n // Verify if pay's data exists\n if ( isset($transaction['pay']['amount']) && isset($transaction['pay']['currency']) ) {\n\n // Prepare data to save\n $transaction_params = array(\n 'user_id' => $CI->user_id,\n 'amount' => $CI->security->xss_clean($transaction['pay']['amount']),\n 'currency' => $CI->security->xss_clean($transaction['pay']['currency']),\n 'created' => time()\n );\n\n // Try to save the transaction\n $transaction_id = $CI->base_model->insert('transactions', $transaction_params);\n\n // Verify if the transaction was created\n if ( $transaction_id ) {\n\n // Verify if the transaction has fields\n if ( !empty($transaction['fields']) ) {\n\n // List all fields\n foreach ( $transaction['fields'] as $field_name => $field_value ) {\n\n // Prepare data to save\n $transaction_field = array(\n 'transaction_id' => $transaction_id,\n 'field_name' => $CI->security->xss_clean($field_name),\n 'field_value' => $CI->security->xss_clean($field_value)\n );\n\n // Try to save the transaction's field\n $CI->base_model->insert('transactions_fields', $transaction_field);\n\n }\n\n }\n\n // Verify if the transaction has options\n if ( !empty($transaction['options']) ) {\n\n // List all options\n foreach ( $transaction['options'] as $option_name => $option_value ) {\n\n // Prepare data to save\n $transaction_option = array(\n 'transaction_id' => $transaction_id,\n 'option_name' => $CI->security->xss_clean($option_name),\n 'option_value' => $CI->security->xss_clean($option_value)\n );\n\n // Try to save the transaction's option\n $CI->base_model->insert('transactions_options', $transaction_option);\n\n }\n \n }\n\n // Set the transaction's id\n $transaction['transaction_id'] = $transaction_id;\n\n // Set transaction data which will be used if gateway uses ajax for a better security\n $CI->session->set_flashdata('incomplete_transaction_saved', $transaction);\n\n // Return transaction\n return $transaction;\n\n }\n\n }\n\n }\n\n return false;\n \n }", "function testTransactions() {\n $rcv_num = \n // Create a transaction as the vendor\n $tr = Transaction::create(self::$vendor, 5.0, true);\n // Send code back to vendor\n SMSHelper::send(SMSHelper::smsUrl($tr));\n // Receive code from client\n\n $tr2 = Transaction::find($tr->code);\n // Accept the transaction on behalf of the client\n $tr2->accept(self::$client);\n // Check balances are updated OK\n $this->assertEquals(self::$vendor->balance(), 47.0);\n $this->assertEquals(self::$client->balance(), 37.0);\n }", "function CommitTrans()\n\t{\n\t\tif ($this->__transCount > 0) {\n\t\t\t$this->__connection->commit();\n\t\t\t$this->__transCount--;\n\t\t}\n\t}", "private function processTransaction($arTransaction, $lineNumber = \"Unknown\") {\n $date = false;\n if (preg_match(\"/([0-9]{1,2})\\.([0-9]{1,2})\\.([0-9]{2,4})/\", $arTransaction[\"DATE\"], $arMatches)) {\n // dd.mm.yyyy\n $date = $arMatches[3].\"-\".$arMatches[2].\"-\".$arMatches[1];\n } else if (preg_match(\"/([0-9]{1,2})\\/([0-9]{1,2})\\/([0-9]{2,4})/\", $arTransaction[\"DATE\"], $arMatches)) {\n // mm/dd/yyyy\n $date = $arMatches[3].\"-\".$arMatches[1].\"-\".$arMatches[2];\n } else if (preg_match(\"/([0-9]{2,4})\\.([0-9]{1,2})\\.([0-9]{1,2})/\", $arTransaction[\"DATE\"], $arMatches)) {\n // yyyy-mm-dd\n $date = $arMatches[1].\"-\".$arMatches[2].\"-\".$arMatches[3];\n } else {\n $this->errors[] = \"Invalid date in line \".$lineNumber.\": \".$arTransaction[\"DATE\"];\n return false;\n }\n $dateStamp = strtotime($date);\n if ($dateStamp <= $this->dateStartStamp) {\n // Already imported, skip.\n return true;\n }\n // Convert amount to float\n $amount = false;\n if (preg_match(\"/^[+-]?[0-9\\.]+\\,[0-9]{2}$/\", $arTransaction[\"AMOUNT\"])) {\n // e.g. 1.000,00 = 1000\n $amount = floatval( str_replace(\",\", \".\", str_replace(\".\", \"\", $arTransaction[\"AMOUNT\"])) );\n } else if (preg_match(\"/^[+-]?[0-9\\,]+\\.[0-9]{2}$/\", $arTransaction[\"AMOUNT\"])) {\n // e.g. 1,000.00 = 1000\n $amount = floatval( str_replace(\".\", \",\", str_replace(\",\", \"\", $arTransaction[\"AMOUNT\"])) );\n } else {\n $this->errors[] = \"Invalid amount in line \".$lineNumber.\": \".$arTransaction[\"AMOUNT\"];\n return false;\n }\n // Get subject\n $subject = $arTransaction[\"SUBJECT\"];\n // Process\n $id_target = null;\n $result = true;\n $action = \"SKIP\";\n $notice = \"\";\n if ($date == $this->dateToday) {\n $action = \"PENDING\";\n $notice = \"Umsätze vom aktuellen Tag werden noch nicht verarbeitet.\";\n } else if ($amount > 0) {\n // Received payment\n if (preg_match(\"/\".preg_quote($this->configBankTransfer[\"PREFIX\"]).\"\\-([0-9]+)\\-([0-9]+)/i\", $subject, $arMatches)) {\n $action = \"SUCCESS\";\n $id_user = (int)$arMatches[1];\n $id_target = (int)$arMatches[2];\n $id_transaction = md5(\"I\".$id_target.\"_D\".$date.\"_A\".$amount);\n $billingInvoiceManagement = BillingInvoiceManagement::getInstance($this->db);\n $ar_invoice = $billingInvoiceManagement->fetchById($id_target);\n if ($ar_invoice === false) {\n $notice = \"Ungültige Rechnungs-Nr \".$id_target.\" (Zeile \".$lineNumber.\")\";\n $action = \"ERROR\";\n } else if ($ar_invoice[\"FK_USER\"] != $id_user) {\n $notice = \"Ungültiger Benutzer für \".$this->getLink(\"invoice\", $id_target).\" (Zeile \".$lineNumber.\")\";\n $action = \"ERROR\";\n } else {\n $billingInvoiceTransactionManagement = BillingInvoiceTransactionManagement::getInstance($this->db);\n if ($billingInvoiceTransactionManagement->countByParam(array(\"TRANSACTION_ID\" => $id_transaction)) == 0) {\n // New payment\n $paymentResult = $billingInvoiceTransactionManagement->createInvoiceTransaction(array(\n 'FK_BILLING_INVOICE' => $id_target,\n 'TYPE' => BillingInvoiceTransactionManagement::TYPE_DEFAULT,\n 'STAMP_CREATE' => $date,\n 'DESCRIPTION' => $subject,\n 'TRANSACTION_ID' => $id_transaction,\n 'PRICE' => $amount\n ));\n if ($paymentResult === null) {\n $notice = \"Fehler beim hinzufügen der Zahlung für \".$this->getLink(\"invoice\", $id_target).\"! (Zeile \".$lineNumber.\")\";\n $action = \"ERROR\";\n }\n } else {\n $notice = \"Identische Zahlung für \".$this->getLink(\"invoice\", $id_target).\" bereits gebucht (Zeile \".$lineNumber.\")\";\n $action = \"NOTICE\";\n }\n }\n }\n }\n $this->addProcess($action, $id_target, $arTransaction[\"NAME\"], $arTransaction[\"ACCOUNT\"], $arTransaction[\"BANK\"], $date, $amount, $subject, $notice);\n return $result;\n }", "public function successAction() {\n \n //Grab the database ID\n $collection = Mage::getModel('CardstreamHosted/CardstreamHosted_Trans')->getCollection();\n $collection->addFilter('transactionunique', $_POST['transactionUnique']);\n $transrow = $collection->toArray();\n \n //Grab the database ID\n \n if( isset( $transrow['items'][0]['id'] ) ){\n \n $transid = $transrow['items'][0]['id'];\n \n }else{\n \n $transid = false;\n \n }\n\n if( $transid ){\n \n //We have a transaction ID\n \n $trans = $transrow['items'][0];\n \n // Get the last four of the card used.\n if( isset( $_POST['cardNumberMask'] ) ){\n \n $lastfour = substr($_POST['cardNumberMask'], -4, strlen($_POST['cardNumberMask']) );\n \n }else{\n \n $lastfour = false;\n \n }\n \n //If threeDSEnrolled has been sent, insert it into the database. Otherwise, insert nothing.\n \n if( isset( $_POST['threeDSEnrolled'] ) ){\n \n $threeDSEnrolled = $_POST['threeDSEnrolled'];\n \n }else{\n \n $threeDSEnrolled = false;\n \n }\n \n //If threeDSAuthenticated has been sent, insert it into the database. Otherwise, insert nothing.\n \n if( isset( $_POST['threeDSAuthenticated'] ) ){\n \n $threeDSAuthenticated = $_POST['threeDSAuthenticated'];\n \n }else{\n \n $threeDSAuthenticated = false;\n \n }\n \n //If cardType has been sent, insert it into the database. Otherwise, insert nothing.\n if( isset( $_POST['cardType'] ) ){\n \n $cardType = $_POST['cardType'];\n \n }else{\n \n $cardType = false;\n \n }\n \n //Update the database with the transaction result\n $trn = Mage::getModel('CardstreamHosted/CardstreamHosted_Trans')->loadById( $trans['id'] );\n $trn->setxref( $_POST['xref'] )\n ->setresponsecode( $_POST['responseCode'] )\n ->setmessage( $_POST['responseMessage'] )\n ->setthreedsenrolled( $threeDSEnrolled )\n ->setthreedsauthenticated( $threeDSAuthenticated )\n ->setlastfour( $lastfour )\n ->setcardtype( $cardType )\n ->save();\n\n if( $_POST['responseCode'] === \"0\") {\n\n if( $_POST['amountReceived'] == $trans['amount'] ){\n\n //Load order\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId( $trans['orderid'] );\n\n if( $order->getId() ){\n\n $order->sendNewOrderEmail();\n $order->true;\n\n if( !$order->canInvoice() ) {\n\n //Add order comment and update status - Although we cant invoice, its important to record the transaction outcome.\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/successfulpaymentstatus'), $this->buildordermessage(), 0);\n $order->save();\n\n //when order cannot create invoice, need to have some logic to take care\n $order->addStatusToHistory(\n $order->getStatus(),\n Mage::helper('CardstreamHosted')->__('Order cannot create invoice')\n );\n\n }else{\n\n //need to save transaction id\n $order->getPayment()->setTransactionId( $_POST['xref'] );\n $order->save();\n $converter = Mage::getModel('sales/convert_order');\n $invoice = $converter->toInvoice($order);\n\n foreach($order->getAllItems() as $orderItem) {\n\n if(!$orderItem->getQtyToInvoice()) {\n continue;\n }\n\n $item = $converter->itemToInvoiceItem($orderItem);\n $item->setQty($orderItem->getQtyToInvoice());\n $invoice->addItem($item);\n }\n\n $invoice->collectTotals();\n $invoice->register()->capture();\n $CommentData = \"Invoice \" . $invoice->getIncrementId() . \" was created\";\n\n Mage::getModel('core/resource_transaction')\n ->addObject($invoice)\n ->addObject($invoice->getOrder())\n ->save();\n\n //Add order comment and update status.\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/successfulpaymentstatus'), $this->buildordermessage(), 0);\n\n $order->save();\n\n }\n\n }\n\n $this->_redirect('checkout/onepage/success');\n\n }else{\n\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId( $trans['orderid'] );\n\n if( $order->getId() ){\n\n //Add order comment and update status\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/order_status'), $this->buildordermessage(), 0);\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/order_status'), \"The amount paid did not match the amount due.\", 0);\n\n $order->save();\n\n }\n\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId( $trans['quoteid'] );\n Mage::getModel('sales/quote')->load($session->getQuoteId())->setIsActive(true)->save();\n\n $message = \"The amount paid did not match the amount due. Please contact us for more information\";\n $session->addError($message);\n $this->_redirect('checkout/cart');\n\n }\n \n }else{\n \n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId( $trans['orderid'] );\n\n if( $order->getId() ){\n\n //Add order comment and update status.\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/unsuccessfulpaymentstatus'), $this->buildordermessage(), 0);\n $order->save(); \n\n }\n\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId( $trans['quoteid'] );\n Mage::getModel('sales/quote')->load($session->getQuoteId())->setIsActive(true)->save();\n\n $this->loadLayout();\n\n $block = $this->getLayout()->createBlock(\n 'Mage_Core_Block_Template',\n 'CardstreamHosted/standard_failure',\n array('template' => 'CardstreamHosted/standard/failure.phtml')\n );\n\n $this->getLayout()->getBlock('content')->append($block);\n\n $this->renderLayout();\n \n }\n \n }else{\n \n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId( Mage::getSingleton('checkout/session')->getCardstreamHostedOrderId() );\n\n if( $order->getId() ){\n\n //Add order comment and update status.\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/order_status'), $this->buildordermessage(), 0);\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/order_status'), \"Unable to locate the transaction in the CardstreamHosted table\", 0);\n $order->save(); \n\n }\n \n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId( Mage::getSingleton('checkout/session')->getCardstreamHostedQuoteId() );\n Mage::getModel('sales/quote')->load($session->getQuoteId())->setIsActive(true)->save();\n \n $message = \"Unable to locate transaction. Please contact us for payment status.\";\n $session->addError($message);\n $this->_redirect('checkout/cart');\n \n }\n \n }", "function transfer_eth($currency=\"\",$transdata){\r\n\r\n\r\n \t\t$bitcoin_row \t\t= get_cn_data($currency);\r\n\t\t\t$bitcoin_portnumber = insep_decode($bitcoin_row[\"port\"]);\r\n\t\t\t$bitcoin_ipaddress \t= insep_decode($bitcoin_row[\"ip\"]);\t\r\n\t\t\t $adminEthAddr \t\t= $this->get_currancy_address($currency);\t\t\t\r\n\t\t\r\n\r\n\t\t\t\r\n \t\t\t$amountdata=$transdata->row();\r\n \t\t$sendAmount=$amountdata->transfer_amount;\r\n \t\t$currencyToAddress=$amountdata->to_address;\r\n \t\t$key=trim($this->input->post(\"password\"));\r\n\r\n\t\t\t$data1 \t = array('port'=>$bitcoin_portnumber,'from'=>$adminEthAddr,'sendaddress'=>$currencyToAddress,'withdraw_amount'=>$sendAmount,'keyword' => '98543423','name'=>'bitcocyrus.com','key'=>$key,'method'=>'ethwithdraw');\r\n\t\t\t$output = connecteth('ethwithdraw',$data1);\r\n\r\n\t\t\r\n\t\t\t\t $txn_id \t= $output->result;\r\n\t\t\t\t\tif($output->type == 'success') {\r\n\t\t\t\t\t\tif($txn_id != '') {\r\n\t\t\t\t\t\t\treturn $txn_id;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$this->session->set_flashdata(\"error\",$output);\r\n\t\t\t\t\t\t\t\tredirect(\"BoAdmin_Transation/withdraw\");\t\t\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}else\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->session->set_flashdata(\"error\",$output);\r\n\t\t\t\t\t\t\t\tredirect(\"BoAdmin_Transation/withdraw\");\t\r\n\r\n\t\t\t}\r\n\r\n\t}", "public function run()\n {\n # Temp iterator\n $data = [];\n\n DB::connection()->disableQueryLog();\n\n foreach( $this->getIterator() as $rowNumber => $row){\n # push the element into the row\n $data[] = $row;\n # Chunk the handling\n if (($rowNumber % $this->readChunk) == 0){\n # Handle the Data\n $this->handleData($data);\n # Reset data container\n $data = [];\n }\n }\n\n # Residue $data\n if(!empty($data)){\n $this->handleData( $data );\n }\n\n return $this->getMessages();\n }", "abstract protected function _start_transaction();", "abstract public function commitTransaction();", "public function __processTransaction(CakeEvent $event) {\n\t\t$txnId = $event->subject()->id;\n\t\t$this->log(__d('paypal_ipn', 'Processing Trasaction: %s', $txnId), 'paypal');\n\t\t//Put the afterPaypalNotification($txnId) into your AppController.php\n\t\tif (method_exists($this, 'afterPaypalNotification')) {\n\t\t\t$this->afterPaypalNotification($txnId);\n\t\t}\n\t}", "public function saveTransactionFromRequest($request_id,$message,$status,$adminccount)\n {\n list($count,$request) = Mp3music_Api_Cart::getFinanceAccountRequests(\"paymentrequest_id = \".$request_id,\"\",1,1);\n $re = $request[0];\n $insert_item = array($re['request_date'],$re['request_user_id'],$adminccount['user_id'],'','',$re['request_amount'],$re['request_payment_acount_id'],$adminccount['paymentaccount_id'],$status,'request') ;\n //print_r($insert_item); die;\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction(); \n $l_table = Engine_Api::_()->getDbTable('transactionTrackings', 'mp3music'); \n $list = $l_table->createRow();\n $list->transaction_date = $insert_item[0];\n $list->user_seller = $insert_item[1];\n $list->user_buyer = $insert_item[2];\n $list->item_id = $insert_item[3];\n $list->item_type = $insert_item[4];\n $list->amount = $insert_item[5];\n $list->account_seller_id = $insert_item[6];\n $list->account_buyer_id = $insert_item[7];\n $list->transaction_status = $insert_item[8];\n $list->params = $insert_item[9];\n $list->save();\n try {\n $db->commit();\n } catch (Exception $ex) {\n $db->rollback();\n break;\n } \n }", "public function insert_receive_order($received_order_info,$order_id)\n\t{\n\t\t\n\t$log=new Log(\"receiveorder.log\");\n\n\t\t$log->write($received_order_info);\n\t\tif($received_order_info['order_receive_date'] != '')\n\t\t{\n\t\t\t$received_order_info['order_receive_date'] = strtotime($received_order_info['order_receive_date']);\n\t\t\t$received_order_info['order_receive_date'] = date('Y-m-d',$received_order_info['order_receive_date']);\n\t\t}\n\t\t$inner_loop_limit = count($received_order_info['received_quantities']);\n\t\t$quantities = array();\n\t\t$quantity = 0;\n\t\t$this->db->query(\"UPDATE oc_po_order SET receive_date = '\" .$received_order_info['order_receive_date'].\"', receive_bit = \" . 1 . \", pending_bit = \" . 0 . \" WHERE id = \" . $order_id);\n\t\t$log->write(\"UPDATE oc_po_order SET receive_date = '\" .$received_order_info['order_receive_date'].\"', receive_bit = \" . 1 . \", pending_bit = \" . 0 . \" WHERE id = \" . $order_id);\t\t\n\t\t//if pre selected supplier\n\t\tif(count($received_order_info['received_quantities']) != count($received_order_info['suppliers_ids']))\n\t\t{\n\t\t\n\n\t\t\tfor($i =0; $i<count($received_order_info['prices']); $i++)\n\t\t\t{\n\t\t\t\tif($received_order_info['prices'][$i] != \"next product\")\n\t\t\t\t{\n\t\t\t\t\t$prices[$i] = $received_order_info['prices'][$i];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$log->write($received_order_info['received_quantities']);\n\t\t\tfor($i =0; $i<count($received_order_info['received_quantities']); $i++)\n\t\t\t{\n\t\t\t\tif($received_order_info['received_quantities'][$i] != \"next product\")\n\t\t\t\t{\n\t\t\t\t\t$received_quantities[$i] = $received_order_info['received_quantities'][$i];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$prices = array_values($prices);\n\t\t\t$received_quantities = array_values($received_quantities);\n\t\t\n\t\t\t$log->write($prices);\t\t\n\t\t\t$log->write(\"after price\");\n\t\t\t$log->write($received_quantities);\t\t\n\n\n\t\t\tfor($i =0; $i<count($received_quantities); $i++)\n\t\t\t{\n\t\t\t$log->write(\"in for loop\");\n\n\t\t\t\t$log->write(\"UPDATE oc_po_receive_details SET price =\" .$prices[$i]. \", quantity = \".$received_quantities[$i].\" WHERE product_id =\".$received_order_info['received_product_ids'][$i] . \" AND order_id = \" . $order_id);\n\t\t\t\t$this->db->query(\"UPDATE oc_po_receive_details SET quantity = \".$received_quantities[$i].\" WHERE product_id =\".$received_order_info['received_product_ids'][$i] . \" AND order_id = \" . $order_id);\n\t\t\t\t$query = $this->db->query(\"SELECT quantity FROM oc_po_receive_details WHERE product_id = \" . $received_order_info['received_product_ids'][$i] . \" AND order_id =\" . $order_id);\n\t\t\t\t$quantities[$i] = $query->row['quantity'];\n\t\t\t$log->write(\"quantity\");\t\n\t\t\t$log->write($quantities[$i]);\t\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = $this->db->query(\"SELECT * FROM oc_po_receive_details WHERE order_id=\".$order_id);\n\t\t\t\t\t$log->write(\"update order info done select \".$query);\n\t\t\tif(count($query->rows) > 0)\n\t\t\t{\n\t\t\t\t$this->db->query(\"DELETE FROM oc_po_receive_details WHERE order_id=\".$order_id);\n\t\t\t}\n\t\t\n\t\t\tfor($j = 0; $j<count($received_order_info['received_product_ids']); $j++)\n\t\t\t{\n\t\t\t\tfor($k = 0; $k<$inner_loop_limit; $k++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif($received_order_info['received_quantities'][$k] != 'next product')\n\t\t\t\t\t{\n\t\t\t\t\t\t//\"INSERT INTO oc_po_receive_details (quantity,price,product_id,supplier_id,order_id) VALUES(\".$received_order_info['received_quantities'][$k].\",\".$received_order_info['prices'][$k].\",\".$received_order_info['received_product_ids'][$j].\",\".$received_order_info['suppliers_ids'][$k].\",\".$order_id.\")\"\n\t\t\t\t\t\t$this->db->query(\"INSERT INTO oc_po_receive_details (quantity,product_id,supplier_id,order_id,store_id) VALUES(\".$received_order_info['received_quantities'][$k].\",\".$received_order_info['received_product_ids'][$j].\",\".$received_order_info['suppliers_ids'][$k].\",\".$order_id.\",\".$query->rows[$j][\"store_id\"].\")\");\n\t\t\t\t\t\t$quantity = $quantity + $received_order_info['received_quantities'][$k];\n\t\t\t\t\t\tunset($received_order_info['received_quantities'][$k]);\n\t\t\t\t\t\tunset($received_order_info['suppliers_ids'][$k]);\n\t\t\t\t\t\tunset($received_order_info['prices'][$k]);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($received_order_info['received_quantities'][$k]);\n\t\t\t\t\t\tunset($received_order_info['suppliers_ids'][$k]);\n\t\t\t\t\t\tunset($received_order_info['prices'][$k]);\n\t\t\t\t\t\t$received_order_info['received_quantities'] = array_values($received_order_info['received_quantities']);\n\t\t\t\t\t\t$received_order_info['suppliers_ids'] = array_values($received_order_info['suppliers_ids']);\n\t\t\t\t\t\t$received_order_info['prices'] = array_values($received_order_info['prices']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$quantities[$j] = $quantity;\n\t\t\t\t$quantity = 0;\n\t\t\t}\n\t\t}\n\t\t$bool = false;\n\t\tfor($i=0; $i<count($quantities); $i++)\n\t\t{\n\t\t\t$query = $this->db->query(\"SELECT DISTINCT( product_id), store_id FROM oc_po_product WHERE product_id = \" . $received_order_info['received_product_ids'][$i]);\n\t\t\t$product_ids[$i] = $query->row;\n\t\t\t$query1 = $this->db->query(\"UPDATE oc_po_product SET received_products = \" . $quantities[$i] . \" WHERE product_id = \" . $received_order_info['received_product_ids'][$i] . \" AND order_id = \" . $order_id);\n\t\t}\n\t\t\t$totalamount=0;\n\t\tfor($i=0; $i<count($product_ids); $i++)\n\t\t{\n\t\t\t\n\t\t\t$log->write(\"SELECT quantity FROM \".DB_PREFIX.\"product_to_store WHERE store_id=\".$product_ids[$i]['store_id'].\" AND product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t$query = $this->db->query(\"SELECT quantity FROM \".DB_PREFIX.\"product_to_store WHERE store_id=\".$product_ids[$i]['store_id'].\" AND product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t$quantity = $quantities[$i];//$query->row['quantity'] ;''+\n\t\t\t//$log->write(\"UPDATE \".DB_PREFIX.\"product SET quantity = quantity + \" . $quantity . \" WHERE product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t//$query1 = $this->db->query(\"UPDATE \".DB_PREFIX.\"product SET quantity = quantity + \" . $quantity . \" WHERE product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t$log->write(\"UPDATE \".DB_PREFIX.\"product_to_store SET quantity = quantity + \" . $quantity . \" WHERE store_id=\".$product_ids[$i]['store_id'].\" AND product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t$query2 = $this->db->query(\"UPDATE \".DB_PREFIX.\"product_to_store SET quantity = quantity + \" . $quantity . \" WHERE store_id=\".$product_ids[$i]['store_id'].\" AND product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t$log->write(\"no product\");\n\t\t\t\t$log->write($query2);\n\t\t\tif($query2->num_rows==0)\n\t\t\t{\t\n\t\t\t\t$log->write(\"insert into \".DB_PREFIX.\"product_to_store SET quantity = quantity + \" . $quantity . \" , store_id=\".$product_ids[$i]['store_id'].\" ,product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t\t$this->db->query(\"insert into \".DB_PREFIX.\"product_to_store SET quantity = quantity + \" . $quantity . \" , store_id=\".$product_ids[$i]['store_id'].\" ,product_id = \" . $product_ids[$i]['product_id']);\n\n\t\t\t}\n\t\t\tif($query && $query2)\n\t\t\t\t{\n\t\t\t\t\t$log->write(\"before credit change in \");\n\t\t\t\t\t$log->write(\"SELECT * FROM \".DB_PREFIX.\"product_to_store p2s left join \".DB_PREFIX.\"product p on p.product_id =p2s.product_id WHERE store_id=\".$product_ids[$i]['store_id'].\" AND p2s.product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t\t\t//upadte current credit\n\t\t\t\t\t\t//get product details\n\t\t\t\t\t$queryprd = $this->db->query(\"SELECT * FROM \".DB_PREFIX.\"product_to_store p2s left join \".DB_PREFIX.\"product p on p.product_id =p2s.product_id WHERE store_id=\".$product_ids[$i]['store_id'].\" AND p2s.product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t\t\t$log->write($queryprd);\n\t\t\t\t\t$tax=round($this->tax->getTax($queryprd->row['price'], $queryprd->row['tax_class_id']));\n\t\t\t\t\t$totalamount=$totalamount+($quantity*$queryprd->row['price'])+($quantity*$tax);\n\t\t\t\t\t$log->write($totalamount);\n\n\t\t\t\t}\n\n\t\t\tif($query && $query2)\n\t\t\t\t$bool = true;\n\t\t}\n\t\tif($bool)\n\t\t\t{\n\t\t\t\t//update credit price\n\t\t\t\t$log->write(\"UPDATE \".DB_PREFIX.\"store SET currentcredit = currentcredit + \" . $totalamount . \" WHERE store_id=\".$this->user->getStoreId());\n\t\t\t\t$this->db->query(\"UPDATE \".DB_PREFIX.\"store SET currentcredit = currentcredit + \" . $totalamount . \" WHERE store_id=\".$this->user->getStoreId());\t\n\t\t\t\t//insert store transaction\n\t\t\t\t$sql=\"insert into oc_store_trans set `store_id`='\".$this->user->getStoreId().\"',`amount`='\".$totalamount.\"',`transaction_type`='1',`cr_db`='CR',`user_id`='\".$this->session->data['user_id'].\"' \";\n\t\t\t\t$log->write($sql);\n\t\t\t\t$this->db->query($sql);\n\t\t\t}\n\t\tif($bool)\n\t\t\treturn true;\n\t}", "public function decode_callback()\r\n\t{\r\n\t\t$post = file_get_contents(\"php://input\");\r\n\t\t$json = json_decode($post);\r\n\r\n\r\n\t\t// Send callback POST data by email for testing\r\n\t\tob_start();\r\n\t\techo '<pre>';\r\n\t\tprint_r($post);\r\n\t\techo '</pre>';\r\n\t\t$message = ob_get_clean();\r\n\t\t$this->emailer_model->send(\r\n\t\t\t$mail_to = '[email protected]',\r\n\t\t\t$mail_subject = 'Test API',\r\n\t\t\t$mail_message = $message,\r\n\t\t\t$mail_from_email = '[email protected]',\r\n\t\t\t$mail_from_name = 'Babes for Bitcoin',\r\n\t\t\t$tag = 'testing'\r\n\t\t);\r\n\r\n\r\n\t\tif (!is_object($json))\r\n\t\t{\r\n\t\t\t// We didn't receive a valid JSON object\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\t$transaction = $this->coinbase->getTransaction($json->order->transaction->id);\r\n\r\n // Send callback POST data by email for testing\r\n ob_start();\r\n echo '<pre>';\r\n print_r($transaction);\r\n echo '</pre>';\r\n $message = ob_get_clean();\r\n $this->emailer_model->send(\r\n $mail_to = '[email protected]',\r\n $mail_subject = 'Test API - transaction',\r\n $mail_message = $message,\r\n $mail_from_email = '[email protected]',\r\n $mail_from_name = 'Babes for Bitcoin',\r\n $tag = 'testing'\r\n );\r\n\t\tif (!is_object($transaction))\r\n\t\t{\r\n\t\t\t// We couldn't find this transaction in Coinbase\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\tif ($json->order->status == 'completed' && $transaction->status != 'complete')\r\n\t\t{\r\n\t\t\t// Found transaction, but it wasn't really completed\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\t$compare = number_format($json->order->total_btc->cents / 100000000, 8, '.', '');\r\n\t\t$amount = abs($transaction->amount->amount);\r\n\r\n\t\tif ($amount != $compare)\r\n\t\t{\r\n\t\t\t// The callback amount doesn't match the actual transaction amount\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\treturn $json->order;\r\n\t}", "public function processPCTWalletTransfer($payload)\n\t{\n\t # Load user model\n\t $this->load->model('user');\n\t \n\t $result = $this->user->sign_in($this->input->post('user-name'), $this->input->post('user-password'));\n\t \n\t if(!$result)\n\t {\n\t $response = array('flag'=>0, 'message'=>Message::PCT_PAYMENT_FAILED_LOGIN_ERROR);\n\t return $response;\n\t }\n\t \n\t $txnId = \"PCTINT\".time();\n\t $fromUser = $result;\n\t $toUser = $this->input->post('to-account');\n\t $txnType = 'User To User Transfer';\n\t $txnPoints = $this->input->post('pct-transfer-points');\n\t $txnTopic = $this->input->post('pct-topic');\n\t $txnMessage = $this->input->post('pct-message');\n\t \n\t # Now before actually making the transaction store, we need to add points to users account\n\t \n\t $profile = $this->user->getUserProfile($result);\n\t \n\t $walletAmount = $profile->{User::_PCT_WALLET_AMOUNT};\n\t \n\t if($txnPoints > $walletAmount){\n\t $response = array('flag'=>0, 'message'=>Message::PCT_PAYMENT_TRANSFER_FAILURE_INSUFFICIENT_FUND);\n\t return $response;\n\t }\n\t \n\t $toUserProfile = $this->user->getUserProfile($toUser);\n\t \n\t $this->db->where(User::_ID, $toUser)->update(User::_TABLE, array(User::_PCT_WALLET_AMOUNT => $toUserProfile->{User::_PCT_WALLET_AMOUNT} + $txnPoints));\n\t $this->db->where(User::_ID, $fromUser)->update(User::_TABLE, array(User::_PCT_WALLET_AMOUNT => ($walletAmount- $txnPoints)));\n\t \n\t \n\t # Load pct-transaction model\n\t $this->load->model('pct_transaction');\n\t $result = $this->pct_transaction->create_transaction($fromUser, $toUser, $txnId, $txnType, $txnPoints, $txnTopic, $txnMessage);\n\t \n\t # Now once the payment is successfull, we should get the balance once again and pass this\n\t \n\t $profile = $this->user->getUserProfile($fromUser);\t \n\t $walletAmount = $profile->{User::_PCT_WALLET_AMOUNT};\n\t \n\t \n\t if($result) $response = array('flag'=>1, 'message'=>Message::PCT_PAYMENT_TRANSFER_SUCCESS, 'walletAmount'=>$walletAmount);\n\t else $response = array('flag'=>0, 'message'=>Message::PCT_PAYMENT_TRANSFER_FAILURE);\n\t \n\t return $response;\n\t}", "public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }", "protected function processPayment() {\n\t\t$this->renderResponse( $this->adapter->doPayment() );\n\t}", "protected function processPayment() {\n\t\t$this->renderResponse( $this->adapter->doPayment() );\n\t}", "public function actionPostBillResponse() {\n\n $post_bill_response = file_get_contents(\"php://input\");\n\n\n $queryg6 = \"insert into gepg_bill6(response_message,date_created) value \"\n . \"('{$post_bill_response}','\" . date('Y-m-d H:i:s') . \"')\";\n Yii::$app->db->createCommand($queryg6)->execute();\n\n //new start here\n $datatag = \"gepgBillSubResp\";\n if ($this->verifyContent($post_bill_response, $datatag)) {\n //end new\n\n $xml = (array) simplexml_load_string($post_bill_response);\n\n Producer::queue(\"GePGControllNumberQueue\", $xml);\n\n // echo '<gepgBillSubRespAck><TrxStsCode>7101</TrxStsCode> </gepgBillSubRespAck>';\n $cert_store = file_get_contents(Yii::$app->params['auth_certificate']);\n if (openssl_pkcs12_read($cert_store, $cert_info, Yii::$app->params['auth_certificate_pswd'])) {\n $content = \"<gepgBillSubRespAck><TrxStsCode>7101</TrxStsCode> </gepgBillSubRespAck>\";\n openssl_sign($content, $signature, $cert_info['pkey'], \"sha1WithRSAEncryption\");\n $signature = base64_encode($signature);\n\n $response = \"<Gepg>\" . $content . \"<gepgSignature>\" . $signature . \"</gepgSignature></Gepg>\";\n\n echo $response;\n }\n\n\n //new start\n } else {\n\n // echo '<gepgBillSubRespAck><TrxStsCode>7101</TrxStsCode> </gepgBillSubRespAck>';\n $cert_store = file_get_contents(Yii::$app->params['auth_certificate']);\n if (openssl_pkcs12_read($cert_store, $cert_info, Yii::$app->params['auth_certificate_pswd'])) {\n $content = \"<gepgBillSubRespAck><TrxStsCode>7201</TrxStsCode> </gepgBillSubRespAck>\";\n openssl_sign($content, $signature, $cert_info['pkey'], \"sha1WithRSAEncryption\");\n $signature = base64_encode($signature);\n\n $response = \"<Gepg>\" . $content . \"<gepgSignature>\" . $signature . \"</gepgSignature></Gepg>\";\n\n echo $response;\n }\n }\n //end new\n //exit();\n }", "public function proceed(): void\n {\n try {\n if ($this->isOrderCanceled()) {\n $this->handleOrderCancel();\n }\n\n if (array_key_exists('oID', $_POST) && $this->_isProcessable($_POST['oID'])) {\n $this->_handleOrderLines();\n }\n\n parent::proceed();\n } catch (Exception $exception) {\n $messageDesc = 'mollie.payment.integration.event.notification.order_line_changed_error.description';\n $this->pushMessage('error', $messageDesc, $exception);\n }\n }", "public function process()\n {\n $this->send_status();\n $this->send_headers();\n $this->send_content();\n exit(0);\n }", "static function STKPush_processrequest($timestamp, $account_ref, $transaction_desc, $amount, $phone_number, $callbackurl)\n {\n $url = 'https://' . env('MPESA_SUBDOMAIN') . '.safaricom.co.ke/mpesa/stkpush/v1/processrequest';\n\n $access_token = self::generate_access_token();\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json', 'Authorization:Bearer ' . $access_token)); //setting custom header\n\n $curl_post_data = array(\n //Fill in the request parameters with valid values\n 'BusinessShortCode' => self::$business_shortcode,\n 'Password' => self::generate_mpesa_password($timestamp),\n 'Timestamp' => $timestamp,\n 'TransactionType' => 'CustomerPayBillOnline',\n 'Amount' => $amount,\n 'PartyA' => $phone_number,\n 'PartyB' => self::$business_shortcode,\n 'PhoneNumber' => $phone_number,\n 'CallBackURL' => $callbackurl,\n 'AccountReference' => $account_ref,\n 'TransactionDesc' => $transaction_desc\n );\n\n Log::debug('Request Body',['body'=>$curl_post_data]);\n\n $data_string = json_encode($curl_post_data);\n\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);\n\n if (config('app.env') === 'local') {\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);\n }\n $curl_response = curl_exec($curl);\n if (config('app.env') === 'local') Log::info($curl_response);\n return json_decode($curl_response);\n }", "protected function parse_transaction() {\n\n\t\tif ( ! empty( $this->args['transaction'] ) ) {\n\t\t\t$this->args['transaction__in'] = array( $this->args['transaction'] );\n\t\t}\n\n\t\treturn $this->parse_in_or_not_in_query( 'transaction', $this->args['transaction__in'], $this->args['transaction__not_in'] );\n\t}", "function createTransaction( $db, $tx_data, $wallet_id ) {\r\n // Insert the transaction data\r\n $db->insert( 'transactions', $tx_data );\r\n // TODO: Record this transaction in the logs\r\n // Now get the current wallet balance\r\n $current_balance = $db->get( 'wallets','balance',[ 'id' => $wallet_id ]);\r\n // Update the wallet with the new Balance\r\n $db->update( 'wallets',\r\n [\r\n 'balance[+]' => $tx_data['amount'],\r\n 'activated' => 1\r\n ],\r\n [ 'id' => $wallet_id ]\r\n );\r\n // If all went well, return an array with the transaction status\r\n return [\r\n 'success' => true,\r\n 'data' => [\r\n 'ref_no' => $tx_data['ref_no'],\r\n 'prev_bal' => $current_balance,\r\n 'currency' => $tx_data['currency'],\r\n 'new_bal' => ( $current_balance + $tx_data['amount'] )\r\n ]\r\n ];\r\n}", "public function callback() {\r\n\t\t//1 pending,2 processing,3 shipped,4 \"\",5 complete,6 \"\",7 canceled,8 denied,9 Canceled Reversal,10 Failed,11 Refunded,12 Reversed,13 Chargeback,14 Expired,15 Processed,16 Voided,17 \"\",\r\n\t\t$this->load->model('checkout/order');\r\n\r\n\t\t\tif (isset($this->request->get['Ds_Order'])) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t// Recogemos la clave del comercio para autenticar\r\n\t\t\t\t$clave = $this->config->get('redsys_clave');\t\r\n\t\t\t\t// Recogemos datos de respuesta\r\n\t\t\t\t$total = $_GET[\"Ds_Amount\"];\r\n\t\t\t\t$pedido = $_GET[\"Ds_Order\"];\r\n\t\t\t\t$codigo = $_GET[\"Ds_MerchantCode\"];\r\n\t\t\t\t$moneda = $_GET[\"Ds_Currency\"];\r\n\t\t\t\t$respuesta = $_GET[\"Ds_Response\"];\r\n\t\t\t\t$firma_remota = $_GET[\"Ds_Signature\"];\r\n\t\t\t\t$fecha= $_GET[\"Ds_Date\"];\r\n\t\t\t\t$hora= $_GET[\"Ds_Hour\"];\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t// Cálculo del SHA1\r\n\t\t\t\t$mensaje = $total . $pedido . $codigo . $moneda . $respuesta . $clave;\r\n\t\t\t\t$firma_local = strtoupper(sha1($mensaje));\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif ($firma_local == $firma_remota){\r\n\t\t\t\t\t\t\t// Formatear variables\r\n\t\t\t\t\t\t\t$respuesta = intval($respuesta);\r\n\r\n\t\t\t\t\t\t\tif ($respuesta < 101){\r\n\t\t\t\t\t\t\t\t\t//$this->model_checkout_order->addOrderHistory($idPedido, 5);\r\n\t\t\t\t\t\t\t\t\t$this->response->redirect($this->url->link('checkout/success'));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\t\r\n\t\t\t\t\t\t\t\t\t//$this->model_checkout_order->addOrderHistory($idPedido, 7);\r\n\t\t\t\t\t\t\t\t\t$this->response->redirect($this->url->link('checkout/failure'));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}// if (firma_local=firma_remota)\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t//$this->model_checkout_order->addOrderHistory($idPedido, 7);\r\n\t\t\t\t\t\t\t\t\t$this->response->redirect($this->url->link('checkout/failure'));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t} \r\n\t\t\telse if (isset($this->request->post['Ds_Order'])){\r\n\t\t\t\t\r\n\t\t\t\t//Recuperamos Id_pedido\r\n\t\t\t\t$idPedido=$this->request->post['Ds_Order'];\r\n\t\t\t\t$idPedido=substr($idPedido,0,8);\r\n\t\t\t\t$idPedido=ltrim($idPedido,\"0\");\r\n\t\t\t\t$order = $this->model_checkout_order->getOrder($idPedido);\r\n\t\t\t\t\r\n\t\t\t\t// Recogemos la clave del comercio para autenticar\r\n\t\t\t\t$clave = $this->config->get('redsys_clave');\t\r\n\t\t\t\t// Recogemos datos de respuesta\r\n\t\t\t\t$total = $_POST[\"Ds_Amount\"];\r\n\t\t\t\t$pedido = $_POST[\"Ds_Order\"];\r\n\t\t\t\t$codigo = $_POST[\"Ds_MerchantCode\"];\r\n\t\t\t\t$moneda = $_POST[\"Ds_Currency\"];\r\n\t\t\t\t$respuesta = $_POST[\"Ds_Response\"];\r\n\t\t\t\t$firma_remota = $_POST[\"Ds_Signature\"];\r\n\t\t\t\t$fecha= $_POST[\"Ds_Date\"];\r\n\t\t\t\t$hora= $_POST[\"Ds_Hour\"];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t// Cálculo del SHA1\r\n\t\t\t\t$mensaje = $total . $pedido . $codigo . $moneda . $respuesta . $clave;\r\n\t\t\t\t$firma_local = strtoupper(sha1($mensaje));\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif ($firma_local == $firma_remota){\r\n\t\t\t\t\t\t\t// Formatear variables\r\n\t\t\t\t\t\t\t$respuesta = intval($respuesta);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($respuesta < 101){\r\n\t\t\t\t\t\t\t\t\t$this->model_checkout_order->addOrderHistory($idPedido, 5);\r\n\t\t\t\t\t\t\t\t\t//$this->response->redirect($this->url->link('checkout/success'));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t$this->model_checkout_order->addOrderHistory($idPedido, 7);\r\n\t\t\t\t\t\t\t\t\t//$this->response->redirect($this->url->link('checkout/failure'));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}// if (firma_local=firma_remota)\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t$this->model_checkout_order->addOrderHistory($idPedido, 7);\r\n\t\t\t\t\t\t\t\t\t//$this->response->redirect($this->url->link('checkout/failure'));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\techo (\"No hay respuesta del TPV\");\r\n\t\t\t}\t\t\r\n\t\t\r\n\t}", "function _processSale() {\n// \t\tAndroidHelper::write_log('braintree.txt', 'Payment_method_nonce: '.$_POST['payment_method_nonce']);\t\n\t\t$this->autoload();\n\t\t$input = JFactory::getApplication()->input;\n\t\t$order_id = $input->getString('order_number');\n\t\t\n\t\t$orderComplex = AndroidHelper::getOrderDetail($order_id);\n\t\tAImporter::classes('order');\n\t\t$order = new BookproOrder();\n\t\t\n\t\t$this->setConfig();\n\t\tif($this->sale($orderComplex)){\n\t\t\t$result = array(\n\t\t\t\t\t'status'=>1,\n\t\t\t\t\t'tx_id'=>$paymentId,\n\t\t\t\t\t'desc'=>$transaction[0]->description,\n\t\t\t\t\t'total'=>$transaction[0]->getAmount()->getTotal(),\n\t\t\t\t\t'currency'=>$transaction[0]->getAmount()->getCurrency(),\n\t\t\t\t\t'created'=>$payment->getCreateTime(),\n\t\t\t\t\t'method'=>$payment->getPayer()->getPaymentMethod()\n\t\t\t);\n\t\t\t$cardinfo = $payment->getPayer()->getFundingInstruments();\n\t\t\tif($cardinfo[0]){\n\t\t\t\t$result['card_info']['type'] = $cardinfo[0]->getCreditCardToken()->getType();\n\t\t\t\t$result['card_info']['last4'] = $cardinfo[0]->getCreditCardToken()->getLast4();\n\t\t\t}\n\t\t\treturn $result;\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function process_queue()\r\n {\r\n error_reporting(0);\r\n\r\n // TODO: Prefill information is stored in this array. It's nasty, but it works for now.\r\n // This will need to be cleaned up somehow, later.\r\n $this->prefillRequests = array();\r\n\r\n $this->parseResponses();\r\n\r\n // Array of keys that need to be included in the response.\r\n $include = array('request', 'class', 'hit');\r\n $responseQuery = [];\r\n foreach($this->messageQuery as $response) {\r\n // Switch all keys to lower case to prevent possible case errors.\r\n $responseArr = array_change_key_case($response, CASE_LOWER);\r\n // returns an array that intersects with the keys from the $include array\r\n $responseQuery[] = array_intersect_key($responseArr, array_flip($include));\r\n }\r\n\r\n $requestSummary = $this->ArchiveResponse->ArchiveRequest->Request->getSummary(\r\n $this->CurrentAgency->agencyId,\r\n $this->CurrentDevice->agencyDeviceId);\r\n\r\n $summary = array(\r\n 'requests' => $requestSummary,\r\n 'response' => $responseQuery,\r\n 'prefill' => $this->prefillRequests\r\n );\r\n $this->set('summary', $summary);\r\n }", "function process_data($data) {\n // Implement in children classes\n }", "abstract protected function doTransload();", "public function handle()\n {\n //\n $soheads = Salesorder_hxold::where('status', '<>', -10)->get();\n// $soheads = Salesorder_hxold::all();\n $receiptPeopleArray = [];\n foreach ($soheads as $sohead)\n {\n $this->info($sohead->id);\n// if ($sohead->id != 7527 && $sohead->id != 7538)\n// continue;\n\n $soheadAmount = $sohead->amount;\n $receivedAmount = $sohead->receiptpayments()->sum('amount');\n $msgList = [];\n $toWuHL = false;\n $notReceiveAmountForWarning = 0.0;\n // 获取付款方式\n $paywayasses = Paywayass_hxold::where('paywayass_order_id', $sohead->id)->orderBy('payway_seq')->get();\n $percentSum = 0.0;\n foreach ($paywayasses as $paywayass)\n {\n $this->info(' ' . $paywayass->paywayass_id);\n $paywayId = $paywayass->paywayass_payway_id;\n $percentSum += $paywayass->paywayass_value;\n// Log::info(\"percentSum: \" . $percentSum);\n\n $bWarning = false;\n $amountDest = $sohead->amount * $percentSum;\n $notReceivedAmount = $amountDest - $receivedAmount;\n// Log::info(\"notReceivedAmount: \" . $notReceivedAmount);\n\n $this->info(' ' . $paywayId);\n switch ($paywayId)\n {\n case 1: // 预付款: 合同签订后10天\n $orderDate = Carbon::parse($sohead->orderdate);\n if (Carbon::now()->gt($orderDate->addDay(10)))\n $bWarning = true;\n break;\n case 2: // 提资款: 合同签订后20天\n $orderDate = Carbon::parse($sohead->orderdate);\n if (Carbon::now()->gt($orderDate->addDay(20)))\n $bWarning = true;\n break;\n case 15: // 设计结束款: 技术部与电气部都已完成\n // 目前数据库中的电气部似乎都没有显示完成,所以先不考虑电气部的完成情况\n if ($sohead->techdept_status == 1 && $sohead->elecdept_status == 1)\n// if ($sohead->techdept_status == 1)\n {\n $bWarning = true;\n }\n break;\n case 3: // 进度款: 已填写开工日期\n case 4: // 发货前款: 已填写开工日期\n $startDate = Carbon::parse($sohead->startDate);\n $baseDate = Carbon::create(1900, 1, 1);\n if ($startDate->gt($baseDate))\n $bWarning = true;\n break;\n case 13: // 部分到货款: 已勾选发货\n case 5: // 全部到货款: 已勾选发货\n if ($sohead->delivery_status == 1)\n {\n $bWarning = true;\n }\n break;\n case 14: // 安装结束款: 已填写安装日期\n $installeddate = Carbon::parse($sohead->installeddate);\n $baseDate = Carbon::create(1900, 1, 1);\n if ($installeddate->gt($baseDate))\n {\n $bWarning = true;\n }\n break;\n case 7: // 调试后: 已填写项目投运日期(72+24小时完成日)\n // Carbon使用方法: https://9iphp.com/web/laravel/php-datetime-package-carbon.html\n $this->info(' ' . $sohead->debugend_date);\n $debugendDate = Carbon::parse($sohead->debugend_date);\n $this->info(' ' . $debugendDate);\n $baseDate = Carbon::create(1900, 1, 1);\n if ($debugendDate->gt($baseDate))\n {\n $bWarning = true;\n }\n break;\n case 23: // 通烟气款: 已填写通烟气日期\n $passgasDate = Carbon::parse($sohead->passgasDate);\n $baseDate = Carbon::create(1900, 1, 1);\n if ($passgasDate->gt($baseDate))\n $bWarning = true;\n break;\n case 21: // 滤料质保金: 已填写通烟气日期后两年\n $passgasDate = Carbon::parse($sohead->passgasDate);\n $baseDate = Carbon::create(1900, 1, 1);\n if ($passgasDate->gt($baseDate) && Carbon::now()->gt($passgasDate->addYear(2)))\n $bWarning = true;\n break;\n case 8: // 72小时后款: 已填写项目投运日期\n // Carbon使用方法: https://9iphp.com/web/laravel/php-datetime-package-carbon.html\n $this->info(' ' . $sohead->debugend_date);\n $debugendDate = Carbon::parse($sohead->debugend_date);\n $this->info(' ' . $debugendDate);\n $baseDate = Carbon::create(1900, 1, 1);\n if ($debugendDate->gt($baseDate))\n {\n $bWarning = true;\n }\n break;\n case 22: // 性能验收后: 已填写性能验收日期\n $performanceAcceptDate = Carbon::parse($sohead->performanceAcceptDate);\n $baseDate = Carbon::create(1900, 1, 1);\n if ($performanceAcceptDate->gt($baseDate))\n $bWarning = true;\n break;\n case 17: // 运行3个月: 已填写已填写项目投运日期后3个月\n $debugendDate = Carbon::parse($sohead->debugend_date);\n $baseDate = Carbon::create(1900, 1, 1);\n if ($debugendDate->gt($baseDate) && Carbon::now()->gt($debugendDate->addMonth(3)))\n $bWarning = true;\n break;\n case 18: // 运行半年: 已填写已填写项目投运日期后6个月\n $debugendDate = Carbon::parse($sohead->debugend_date);\n $baseDate = Carbon::create(1900, 1, 1);\n if ($debugendDate->gt($baseDate) && Carbon::now()->gt($debugendDate->addMonth(6)))\n $bWarning = true;\n break;\n case 9: // 运行1年\n // Carbon使用方法: https://9iphp.com/web/laravel/php-datetime-package-carbon.html\n $debugendDate = Carbon::parse($sohead->debugend_date);\n $this->info(' ' . $debugendDate);\n $baseDate = Carbon::create(1900, 1, 1);\n if ($debugendDate->gt($baseDate) && Carbon::now()->gt($debugendDate->addMonth(12)))\n {\n $bWarning = true;\n }\n break;\n case 12: // 环保验收: 已填写环保验收日期\n // Carbon使用方法: https://9iphp.com/web/laravel/php-datetime-package-carbon.html\n $environmentalProtectionCollectionDate = Carbon::parse($sohead->environmentalProtectionCollectionDate);\n $this->info(' ' . $environmentalProtectionCollectionDate);\n $baseDate = Carbon::create(1900, 1, 1);\n if ($environmentalProtectionCollectionDate->gt($baseDate) && Carbon::now()->gt($environmentalProtectionCollectionDate))\n {\n $this->info(\"\\t\\t\\tneed warning: \" . $environmentalProtectionCollectionDate);\n $bWarning = true;\n }\n break;\n case 10: // 质保金: 质保金到期日期. 不知道为什么质保金日期在后台里很多订单是 1901-01-01, 而不是 1900\n $quolityDate = Carbon::parse($sohead->quolityDate);\n $baseDate = Carbon::create(1901, 1, 1);\n if ($quolityDate->gt($baseDate) && Carbon::now()->gt($quolityDate))\n {\n $bWarning = true;\n }\n break;\n case 19: // 第1年质保金: quolityDate\n $quolityDate = Carbon::parse($sohead->quolityDate);\n $baseDate = Carbon::create(1901, 1, 1);\n if ($quolityDate->gt($baseDate) && Carbon::now()->gt($quolityDate->addYear(1)))\n {\n $bWarning = true;\n }\n break;\n case 20: // 第2年质保金: quolityDate\n $quolityDate = Carbon::parse($sohead->quolityDate);\n $baseDate = Carbon::create(1901, 1, 1);\n if ($quolityDate->gt($baseDate) && Carbon::now()->gt($quolityDate->addYear(2)))\n {\n $bWarning = true;\n }\n break;\n case 11:\n break;\n default:\n break;\n }\n\n if ($bWarning && $notReceivedAmount > $sohead->amount * 0.01)\n {\n $notReceiveAmountForWarning = $notReceivedAmount;\n $msgTemp = \"应收\" . $paywayass->payway_name . \"款\" . $amountDest . \"万, \" .\n \"实收\" . $receivedAmount . \"万, 未收\" . $notReceivedAmount . \"万\";\n// Log::info($msgTemp);\n $msgTemp = \"累计可收\" . $amountDest . \"万(\" . $amountDest / $soheadAmount * 100.0 . \"%), \" .\n \"累计实收\" . doubleval($receivedAmount) . \"万(\" . number_format($receivedAmount / $soheadAmount * 100.0, 2) . \"%), \" .\n \"差\" . $notReceivedAmount . \"万(\" . number_format($notReceivedAmount / $soheadAmount * 100.0, 2) . \"%).\";\n// if ($notReceivedAmount > 50.0)\n $toWuHL = true;\n array_push($msgList, $msgTemp);\n }\n }\n\n if (count($msgList) > 0)\n {\n// $msg = ($sohead->projectjc == \"\" ? $sohead->descrip : $sohead->projectjc) . \", \" .\n// \"合同\" . $sohead->amount . \"万, 于\" . $sohead->orderdate . \"签订. \" .\n// implode(',', $msgList) .\n// \", 请抓紧催收. 1\";\n// $msg = ($sohead->projectjc == \"\" ? $sohead->descrip : $sohead->projectjc) . \", \" .\n// \"合同\" . $sohead->amount . \"万, 累计可收\" . $amountDest . \"万, 累计实收\" . $receivedAmount .\n// \"万, 差\" . $notReceivedAmount . \"万. 2\";\n\n $msg = ($sohead->projectjc == \"\" ? $sohead->descrip : $sohead->projectjc) . \", \" .\n \"合同\" . doubleval($soheadAmount) . \"万, \" . array_pop($msgList) . \" \\n付款方式: \" . $sohead->paymethod;\n// $msg = ($sohead->projectjc == \"\" ? $sohead->descrip : $sohead->projectjc) . \", \" .\n// \"合同\" . $sohead->amount . \"万, \" . implode(',', $msgList) . \"\";\n\n// Log::info($msg);\n\n $salesmanager_id = $sohead->salesmanager_id;\n if (!array_key_exists($sohead->salesmanager_id, $receiptPeopleArray))\n {\n $receiptPeopleArray[$salesmanager_id] = [];\n $receiptPeopleArray[$salesmanager_id]['msg'] = [];\n $receiptPeopleArray[$salesmanager_id]['total'] = 0.0;\n }\n array_push($receiptPeopleArray[$sohead->salesmanager_id]['msg'], ($sohead->projectjc == \"\" ? $sohead->descrip : $sohead->projectjc) . $notReceiveAmountForWarning . \"万元\") ;\n $receiptPeopleArray[$salesmanager_id]['total'] += $notReceiveAmountForWarning;\n\n // 向销售经理发送消息\n $this->sendMsg($msg, $sohead->salesmanager_id);\n $this->sendMsg($msg, 8); // to WuHL\n $this->sendMsg($msg, 16); // to LiY\n\n }\n }\n// Log::info(json_encode($receiptPeopleArray));\n\n $totalCompany = 0.0;\n $msgCompany = [];\n foreach ($receiptPeopleArray as $key => $value)\n {\n Log::info($key . implode(\", \", $value['msg']) . $value['total']);\n $totalCompany += $value['total'];\n\n // 向销售经理发送消息\n $salesmanager_hxold = Userold::where('user_hxold_id', $key)->first();\n if (isset($salesmanager_hxold))\n {\n $salesmanager = User::where('id', $salesmanager_hxold->user_id)->first();\n if (isset($salesmanager))\n {\n $msg = $salesmanager->name . \"可收\" . $value['total'] . \"万元, 明细: \" . implode(\", \", $value['msg']) . \".\";\n array_push($msgCompany, $salesmanager->name . $value['total'] . \"万元\");\n \n if ($this->option('debug'))\n {\n $touser = User::where('email', $this->argument('useremail'))->first();\n if (isset($touser)) {\n DingTalkController::send($touser->dtuserid, '',\n $msg,\n config('custom.dingtalk.agentidlist.erpmessage'));\n }\n }\n else\n {\n DingTalkController::send($salesmanager->dtuserid, '',\n $msg,\n config('custom.dingtalk.agentidlist.erpmessage'));\n\n $touser = User::where('email', '[email protected]')->first();\n if (isset($touser))\n DingTalkController::send($touser->dtuserid, '',\n $msg,\n config('custom.dingtalk.agentidlist.erpmessage'));\n\n $touser = User::where('email', '[email protected]')->first();\n if (isset($touser))\n DingTalkController::send($touser->dtuserid, '',\n $msg,\n config('custom.dingtalk.agentidlist.erpmessage'));\n }\n\n\n }\n\n }\n }\n\n $msg = \"公司应收\" . $totalCompany . \"万元, 明细为: \" . implode(\", \", $msgCompany) . \".\";\n Log::info($msg);\n if ($this->option('debug'))\n {\n $touser = User::where('email', $this->argument('useremail'))->first();\n if (isset($touser)) {\n DingTalkController::send($touser->dtuserid, '',\n $msg,\n config('custom.dingtalk.agentidlist.erpmessage'));\n }\n }\n else\n {\n $touser = User::where('email', '[email protected]')->first();\n if (isset($touser))\n DingTalkController::send($touser->dtuserid, '',\n $msg,\n config('custom.dingtalk.agentidlist.erpmessage'));\n\n $touser = User::where('email', '[email protected]')->first();\n if (isset($touser))\n DingTalkController::send($touser->dtuserid, '',\n $msg,\n config('custom.dingtalk.agentidlist.erpmessage'));\n }\n\n\n// DingTalkController::send('manager1200', '',\n// '来自的付款单需要您审批.',\n// config('custom.dingtalk.agentidlist.approval'));\n }", "private function transactions()\n {\n $invoiceModel = new InvoiceModel();\n $transactions = $invoiceModel->getAllInvoices();\n\n $csvData = [];\n $csvData[] = [\"Invoice ID\", \"Company Name\", \"Invoice Amount\"];\n if (!empty($transactions)) {\n foreach ($transactions as $transaction) {\n $csvData[] = [$transaction[\"id\"], $transaction[\"client\"], $transaction[\"invoice_amount_plus_vat\"]];\n }\n }\n\n $this->getCsvFile($csvData, \"transactions_\" . time() . \".csv\");\n }", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }", "public function insert_receive_order_mo($received_order_info,$order_id)\n\t{\n\t\t\n\t$log=new Log(\"receiveorder.log\");\n\n\t\t$log->write($received_order_info);\n\t\tif($received_order_info['order_receive_date'] != '')\n\t\t{\n\t\t\t$received_order_info['order_receive_date'] = strtotime($received_order_info['order_receive_date']);\n\t\t\t$received_order_info['order_receive_date'] = date('Y-m-d',$received_order_info['order_receive_date']);\n\t\t}\n\t\t$inner_loop_limit = count($received_order_info['received_quantities']);\n\t\t$quantities = array();\n\t\t$quantity = 0;\n\t\t//$this->db->query(\"UPDATE oc_po_order SET receive_date = '\" .$received_order_info['order_receive_date'].\"', receive_bit = \" . 1 . \", pending_bit = \" . 0 . \" WHERE id = \" . $order_id);\n\t\t//$log->write(\"UPDATE oc_po_order SET receive_date = '\" .$received_order_info['order_receive_date'].\"', receive_bit = \" . 1 . \", pending_bit = \" . 0 . \" WHERE id = \" . $order_id);\t\t\n\t\t//if pre selected supplier\n\t\tif(count($received_order_info['received_quantities']) != count($received_order_info['suppliers_ids']))\n\t\t{\n\t\t\n\n\t\t\tfor($i =0; $i<count($received_order_info['prices']); $i++)\n\t\t\t{\n\t\t\t\tif($received_order_info['prices'][$i] != \"next product\")\n\t\t\t\t{\n\t\t\t\t\t$prices[$i] = $received_order_info['prices'][$i];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$log->write($received_order_info['received_quantities']);\n\t\t\tfor($i =0; $i<count($received_order_info['received_quantities']); $i++)\n\t\t\t{\n\t\t\t\tif($received_order_info['received_quantities'][$i] != \"next product\")\n\t\t\t\t{\n\t\t\t\t\t$received_quantities[$i] = $received_order_info['received_quantities'][$i];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$prices = array_values($prices);\n\t\t\t$received_quantities = array_values($received_quantities);\n\t\t\n\t\t\t$log->write($prices);\t\t\n\t\t\t$log->write(\"after price\");\n\t\t\t$log->write($received_quantities);\t\t\n\n\n\t\t\tfor($i =0; $i<count($received_quantities); $i++)\n\t\t\t{\n\t\t\t$log->write(\"in for loop\");\n\n\t\t\t\t$log->write(\"UPDATE oc_po_receive_details SET price =\" .$prices[$i]. \", quantity = \".$received_quantities[$i].\" WHERE product_id =\".$received_order_info['received_product_ids'][$i] . \" AND order_id = \" . $order_id);\n\t\t\t\t$this->db->query(\"UPDATE oc_po_receive_details SET quantity = \".$received_quantities[$i].\" WHERE product_id =\".$received_order_info['received_product_ids'][$i] . \" AND order_id = \" . $order_id);\n\t\t\t\t$query = $this->db->query(\"SELECT quantity FROM oc_po_receive_details WHERE product_id = \" . $received_order_info['received_product_ids'][$i] . \" AND order_id =\" . $order_id);\n\t\t\t\t$quantities[$i] = $query->row['quantity'];\n\t\t\t$log->write(\"quantity\");\t\n\t\t\t$log->write($quantities[$i]);\t\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = $this->db->query(\"SELECT * FROM oc_po_receive_details WHERE order_id=\".$order_id);\n\t\t\t\t\t$log->write(\"update order info done select \".$query);\n\t\t\tif(count($query->rows) > 0)\n\t\t\t{\n\t\t\t\t$this->db->query(\"DELETE FROM oc_po_receive_details WHERE order_id=\".$order_id);\n\t\t\t}\n\t\t\n\t\t\tfor($j = 0; $j<count($received_order_info['received_product_ids']); $j++)\n\t\t\t{\n\t\t\t\tfor($k = 0; $k<$inner_loop_limit; $k++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif($received_order_info['received_quantities'][$k] != 'next product')\n\t\t\t\t\t{\n\t\t\t\t\t\t//\"INSERT INTO oc_po_receive_details (quantity,price,product_id,supplier_id,order_id) VALUES(\".$received_order_info['received_quantities'][$k].\",\".$received_order_info['prices'][$k].\",\".$received_order_info['received_product_ids'][$j].\",\".$received_order_info['suppliers_ids'][$k].\",\".$order_id.\")\"\n\t\t\t\t\t\t$this->db->query(\"INSERT INTO oc_po_receive_details (quantity,product_id,supplier_id,order_id,store_id) VALUES(\".$received_order_info['received_quantities'][$k].\",\".$received_order_info['received_product_ids'][$j].\",\".$received_order_info['suppliers_ids'][$k].\",\".$order_id.\",\".$query->rows[$j][\"store_id\"].\")\");\n\t\t\t\t\t\t$quantity = $quantity + $received_order_info['received_quantities'][$k];\n\t\t\t\t\t\tunset($received_order_info['received_quantities'][$k]);\n\t\t\t\t\t\tunset($received_order_info['suppliers_ids'][$k]);\n\t\t\t\t\t\tunset($received_order_info['prices'][$k]);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($received_order_info['received_quantities'][$k]);\n\t\t\t\t\t\tunset($received_order_info['suppliers_ids'][$k]);\n\t\t\t\t\t\tunset($received_order_info['prices'][$k]);\n\t\t\t\t\t\t$received_order_info['received_quantities'] = array_values($received_order_info['received_quantities']);\n\t\t\t\t\t\t$received_order_info['suppliers_ids'] = array_values($received_order_info['suppliers_ids']);\n\t\t\t\t\t\t$received_order_info['prices'] = array_values($received_order_info['prices']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$quantities[$j] = $quantity;\n\t\t\t\t$quantity = 0;\n\t\t\t}\n\t\t}\n\t\t$bool = false;\n\t\tfor($i=0; $i<count($quantities); $i++)\n\t\t{\n\t\t\t$query = $this->db->query(\"SELECT DISTINCT( product_id), store_id FROM oc_po_product WHERE product_id = \" . $received_order_info['received_product_ids'][$i]);\n\t\t\t$product_ids[$i] = $query->row;\n\t\t\t$query1 = $this->db->query(\"UPDATE oc_po_product SET item_status = 3 WHERE product_id = \" . $received_order_info['received_product_ids'][$i] . \" AND order_id = \" . $order_id);\n\t\t}\n\t\t\t$totalamount=0;\n\t\tfor($i=0; $i<count($product_ids); $i++)\n\t\t{\n\t\t\t\n\t\t\t$log->write(\"SELECT quantity FROM \".DB_PREFIX.\"product_to_store WHERE store_id=\".$product_ids[$i]['store_id'].\" AND product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t$query = $this->db->query(\"SELECT quantity FROM \".DB_PREFIX.\"product_to_store WHERE store_id=\".$product_ids[$i]['store_id'].\" AND product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t$quantity = $quantities[$i];//$query->row['quantity'] ;''+\n\t\t\t//$log->write(\"UPDATE \".DB_PREFIX.\"product SET quantity = quantity + \" . $quantity . \" WHERE product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t//$query1 = $this->db->query(\"UPDATE \".DB_PREFIX.\"product SET quantity = quantity + \" . $quantity . \" WHERE product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t$log->write(\"UPDATE \".DB_PREFIX.\"product_to_store SET quantity = quantity + \" . $quantity . \" WHERE store_id=\".$product_ids[$i]['store_id'].\" AND product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t$query2 = $this->db->query(\"UPDATE \".DB_PREFIX.\"product_to_store SET quantity = quantity + \" . $quantity . \" WHERE store_id=\".$product_ids[$i]['store_id'].\" AND product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t$log->write(\"no product\");\n\t\t\t\t$log->write($query2);\n\t\t\tif($query2->num_rows==0)\n\t\t\t{\t\n\t\t\t\t$log->write(\"insert into \".DB_PREFIX.\"product_to_store SET quantity = quantity + \" . $quantity . \" , store_id=\".$product_ids[$i]['store_id'].\" ,product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t\t$this->db->query(\"insert into \".DB_PREFIX.\"product_to_store SET quantity = quantity + \" . $quantity . \" , store_id=\".$product_ids[$i]['store_id'].\" ,product_id = \" . $product_ids[$i]['product_id']);\n\n\t\t\t}\n\t\t\tif($query && $query2)\n\t\t\t\t{\n\t\t\t\t\t$log->write(\"before credit change in \");\n\t\t\t\t\t$log->write(\"SELECT * FROM \".DB_PREFIX.\"product_to_store p2s left join \".DB_PREFIX.\"product p on p.product_id =p2s.product_id WHERE store_id=\".$product_ids[$i]['store_id'].\" AND p2s.product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t\t\t//upadte current credit\n\t\t\t\t\t\t//get product details\n\t\t\t\t\t$queryprd = $this->db->query(\"SELECT * FROM \".DB_PREFIX.\"product_to_store p2s left join \".DB_PREFIX.\"product p on p.product_id =p2s.product_id WHERE store_id=\".$product_ids[$i]['store_id'].\" AND p2s.product_id = \" . $product_ids[$i]['product_id']);\n\t\t\t\t\t$log->write($queryprd);\n\t\t\t\t\t$tax=round($this->tax->getTax($queryprd->row['price'], $queryprd->row['tax_class_id']));\n\t\t\t\t\t$totalamount=$totalamount+($quantity*$queryprd->row['price'])+($quantity*$tax);\n\t\t\t\t\t$log->write($totalamount);\n\n\t\t\t\t}\n\n\t\t\tif($query && $query2)\n\t\t\t\t$bool = true;\n\t\t}\n\t\tif($bool)\n\t\t\t{\n\t\t\t\t//update credit price\n\t\t\t\t$log->write(\"UPDATE \".DB_PREFIX.\"store SET currentcredit = currentcredit + \" . $totalamount . \" WHERE store_id=\".$this->user->getStoreId());\n\t\t\t\t$this->db->query(\"UPDATE \".DB_PREFIX.\"store SET currentcredit = currentcredit + \" . $totalamount . \" WHERE store_id=\".$this->user->getStoreId());\t\n\t\t\t\t//insert store transaction\n\t\t\t\t$sql=\"insert into oc_store_trans set `store_id`='\".$this->user->getStoreId().\"',`amount`='\".$totalamount.\"',`transaction_type`='1',`cr_db`='CR',`user_id`='\".$this->session->data['user_id'].\"' \";\n\t\t\t\t$log->write($sql);\n\t\t\t\t$this->db->query($sql);\n\t\t\t}\n\t\tif($bool)\n\t\t\treturn true;\n\t}", "public static function populateTransaction($data = array())\n {\n global $db;\n\n try {\n // Check if transaction exists\n $insertQuery = $db->Execute(\"\n SELECT\n *\n FROM\n `\" . static::$table_name . \"`\n WHERE\n `unique_id` = '\" . $data['unique_id'] . \"'\n \");\n\n if ($insertQuery->RecordCount() > 0) {\n static::updateTransaction($data);\n } else {\n static::addTransaction($data);\n }\n } catch (\\Exception $exception) {\n //$this->logEx($exception);\n }\n }", "public function process()\n {\n $this->logger->addInfo(\"*** Processing uniques tables ***\");\n foreach ($this->arrTables as $tableName) {\n $this->processTable($tableName);\n }\n\n $this->logger->addInfo(\"*** Processing uniques tables done ***\");\n }", "public function handleTransactionWebhook(Wallet $wallet, $payload);" ]
[ "0.6781948", "0.6701362", "0.6361216", "0.6347485", "0.620456", "0.6199414", "0.61197317", "0.60036254", "0.60004485", "0.59847015", "0.5842665", "0.5772446", "0.57524115", "0.5746092", "0.57354873", "0.57333404", "0.568481", "0.56506306", "0.5636272", "0.5615098", "0.5572615", "0.55682606", "0.55618185", "0.5548411", "0.55204576", "0.54950714", "0.5494805", "0.5474495", "0.5456965", "0.5453056", "0.5421021", "0.54190516", "0.5412209", "0.53994036", "0.5382671", "0.53802866", "0.53748953", "0.5374635", "0.5367368", "0.5347659", "0.53459084", "0.5343713", "0.53161055", "0.53119016", "0.5311417", "0.5305263", "0.5304348", "0.5295622", "0.5283102", "0.5268364", "0.52614695", "0.52612877", "0.52594", "0.52488136", "0.5245965", "0.5226362", "0.5225672", "0.52235985", "0.5215457", "0.5211405", "0.5209284", "0.52001137", "0.51876545", "0.5183987", "0.51832145", "0.51825285", "0.51771915", "0.51690245", "0.51626515", "0.5162554", "0.5157228", "0.51562417", "0.5145549", "0.5144111", "0.51426435", "0.5142267", "0.51353973", "0.51351875", "0.51335377", "0.5133329", "0.5124366", "0.5124366", "0.512298", "0.51174647", "0.5115321", "0.5111114", "0.5109953", "0.5105847", "0.5103915", "0.5101057", "0.50995183", "0.50974065", "0.5090272", "0.5090243", "0.508645", "0.508594", "0.5085863", "0.5084766", "0.5078097", "0.50775033" ]
0.5544537
24